/* =========================================================
   Política en Joc · imprès electoral
   Paper de papereta, trama de punts, tinta blava fosca,
   vermell de segell i groc de retolador.
   ========================================================= */

:root {
  --paper: #f1e9d8;
  --paper-2: #e6d9bf;
  --card: #fffaf0;
  --ink: #17173d;
  --ink-2: #3a3a63;
  --muted: #6e6a82;
  --red: #ff4b2b;
  --blue: #3554ff;
  --yellow: #ffcf3d;
  --ok: #0f9d58;
  --ok-soft: #d3f2df;
  --ko: #d7263d;
  --ko-soft: #fbd9dc;
  --radius: 16px;
  --radius-sm: 12px;
  --bw: 2.5px;
  --hard: 5px 5px 0 var(--ink);
  --hard-sm: 3px 3px 0 var(--ink);
  --display: "Unbounded", "Arial Black", sans-serif;
  --sans: "DM Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --dots: radial-gradient(circle, rgba(23, 23, 61, .1) 1px, transparent 1.7px);
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--dots) 0 0 / 12px 12px, var(--paper);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { margin: 0; line-height: 1.05; }
p { margin: 0; }
a { color: inherit; }
button { font: inherit; color: inherit; }
.muted { color: var(--muted); }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 8px; }

/* ---------- Tipografia ---------- */
.kicker {
  display: flex; align-items: center; gap: 8px;
  font-size: .76rem; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-2);
}
.dot-live { width: 9px; height: 9px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 0 var(--red); animation: live 1.8s infinite; }
@keyframes live { 70% { box-shadow: 0 0 0 9px rgba(255, 75, 43, 0); } 100% { box-shadow: 0 0 0 0 rgba(255, 75, 43, 0); } }

.hero-title {
  display: grid;
  font-family: var(--display); font-weight: 900;
  font-size: clamp(2.8rem, 7.4vw, 6.2rem);
  line-height: .95; letter-spacing: -.045em; text-transform: uppercase;
  color: var(--ink);
  text-shadow: 4px 4px 0 var(--red);
}
.hero-title .hl {
  justify-self: start;
  color: var(--red); text-shadow: 4px 4px 0 var(--ink);
  background: linear-gradient(transparent 58%, var(--yellow) 58%, var(--yellow) 92%, transparent 92%);
  padding-right: .1em;
}
.page-title {
  font-family: var(--display); font-weight: 900; text-transform: uppercase;
  font-size: clamp(2rem, 5vw, 3.6rem); letter-spacing: -.04em; line-height: .95;
  text-shadow: 3px 3px 0 var(--red);
}
.lede { font-size: 1.15rem; color: var(--ink-2); max-width: 40ch; margin-top: 22px; font-weight: 500; }
.section-title {
  font-family: var(--display); font-weight: 800; text-transform: uppercase;
  font-size: 1.6rem; letter-spacing: -.03em;
}
.section-title.sm { font-size: 1.15rem; margin: 36px 0 14px; }

/* ---------- Barra superior ---------- */
.topbar {
  position: sticky; top: 0; z-index: 30;
  background: var(--ink); color: var(--card);
}
.topbar-inner {
  max-width: 1180px; margin: 0 auto;
  display: flex; align-items: center; gap: 22px;
  padding: 10px 20px;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-mark { width: 36px; height: 36px; background: var(--yellow); border-radius: 10px; display: grid; place-items: center; }
.brand-mark svg { width: 30px; height: 30px; }
.brand-name { font-family: var(--display); font-weight: 900; font-size: 1.15rem; letter-spacing: -.03em; text-transform: uppercase; }
.brand-name b { color: var(--ink); background: var(--red); padding: 1px 6px; margin-left: 4px; border-radius: 5px; color: var(--card); }

.nav { display: flex; gap: 2px; margin-left: 10px; }
.nav a {
  text-decoration: none; font-weight: 700; font-size: .92rem; color: rgba(255, 250, 240, .7);
  padding: 7px 14px; border-radius: 999px; transition: .15s var(--ease);
}
.nav a:hover { color: var(--card); background: rgba(255, 250, 240, .1); }
.nav a.active { color: var(--ink); background: var(--yellow); }

.top-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.sound-btn {
  width: 40px; height: 40px; border-radius: 50%; border: 2px solid rgba(255, 250, 240, .25);
  background: transparent; color: var(--card); display: grid; place-items: center; cursor: pointer;
}
.sound-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.sound-btn.off { color: rgba(255, 250, 240, .45); }
/* Canvi d'idioma a la capçalera: porta a l'altra versió (ES des del català, CA des del castellà) */
.lang-btn { display: flex; align-items: center; gap: 5px; height: 40px; padding: 0 12px 0 10px; border-radius: 999px; border: 2px solid var(--yellow); color: var(--yellow); text-decoration: none; font-family: var(--display); font-weight: 800; font-size: .8rem; letter-spacing: .02em; flex: none; }
.lang-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.lang-btn:hover { background: var(--yellow); color: var(--ink); }
/* Fins a 1279 px la capçalera no hi cap sencera: el botó de so desapareix (el so es canvia a Perfil › Ajustos) i,
   amb el menú visible (901-1279 px), el compte i el nivell queden només amb la icona i el menú s'estreny */
@media (max-width: 1279px) { .top-actions .sound-btn { display: none; } }
@media (min-width: 901px) and (max-width: 1279px) {
  .topbar-inner { gap: 12px; }
  .top-actions { gap: 8px; }
  .lang-btn { padding: 0 11px; }
  .lang-btn svg { display: none; }
  .account-btn span { display: none; }
  .account-btn { padding: 0 9px; }
  .level-text { display: none; }
  .level-chip { padding: 4px; }
  .nav { margin-left: 4px; }
  .nav a { padding-left: 8px; padding-right: 8px; font-size: .84rem; }
}
@media (min-width: 901px) and (max-width: 1099px) {
  .brand-name { display: none; }
  .nav a { padding-left: 7px; padding-right: 7px; font-size: .8rem; }
  .coin-chip { padding: 0 9px; }
}
@media (max-width: 560px) { .lang-btn { height: 36px; padding: 0 9px 0 8px; gap: 4px; font-size: .74rem; } .lang-btn svg { width: 16px; height: 16px; } }
@media (max-width: 380px), (min-width: 561px) and (max-width: 640px) { .lang-btn svg { display: none; } .lang-btn { padding: 0 9px; } }
.account-btn {
  display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px 0 10px;
  border-radius: 999px; border: 2px solid rgba(255, 250, 240, .25); background: transparent; color: var(--card);
  font-weight: 800; font-size: .88rem; cursor: pointer;
}
.account-btn:hover { background: rgba(255, 250, 240, .1); }
.account-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.avatar { border-radius: 50%; border: 2px solid var(--ink); object-fit: cover; flex: none; background: var(--paper-2); }
.avatar.ph { display: inline-grid; place-items: center; font-family: var(--display); font-weight: 800; background: var(--yellow); color: var(--ink); }
.level-chip {
  display: flex; align-items: center; gap: 10px; text-decoration: none;
  background: var(--card); color: var(--ink); border-radius: 999px; padding: 4px 14px 4px 4px;
  transition: transform .15s var(--ease);
}
.level-chip:hover { transform: translateY(-1px); }
.level-ring {
  --p: 0;
  width: 32px; height: 32px; border-radius: 50%;
  background: conic-gradient(var(--red) calc(var(--p) * 1%), var(--paper-2) 0);
  display: grid; place-items: center; position: relative;
  font-family: var(--display); font-weight: 900; font-size: .8rem;
}
.level-ring::before { content: ""; position: absolute; inset: 4px; border-radius: 50%; background: var(--card); }
.level-ring span { position: relative; }
.level-text { display: grid; line-height: 1.1; }
.level-text small { font-size: .66rem; color: var(--muted); font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.level-text strong { font-family: var(--display); font-weight: 800; font-size: .82rem; }
/* Píndola del perfil: l'única entrada al perfil des de la capçalera */
.level-chip.active { box-shadow: 0 0 0 3px var(--yellow); }
.level-chip.in { padding-left: 3px; }
.level-chip.in .level-ring { width: 36px; height: 36px; }
.level-chip.in .level-ring::before { inset: 3px; }
.level-ring .avatar { position: relative; width: 28px !important; height: 28px !important; border: 0; }
.level-n { position: absolute; right: -4px; bottom: -3px; min-width: 16px; height: 16px; padding: 0 3px; box-sizing: border-box; border-radius: 99px; display: grid; place-items: center; background: var(--red); color: #fff; border: 1.5px solid var(--card); font-style: normal; font-family: var(--display); font-weight: 900; font-size: .56rem; line-height: 1; }
.level-chip.in .level-text strong { max-width: 14ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.level-chip.in .level-text small { letter-spacing: .04em; }
/* «Entra»: només sense sessió, com a crida a crear l'usuari */
.account-btn { border-color: var(--yellow); color: var(--yellow); }
.account-btn:hover { background: var(--yellow); color: var(--ink); }
.account-btn[hidden] { display: none; }
/* Mòbil: les monedes ja ocupen el racó de la dreta de la píndola */
@media (max-width: 560px) { .level-n { right: auto; left: -5px; } }

/* ---------- Layout ---------- */
main { max-width: 1180px; margin: 0 auto; padding: 36px 20px 120px; }
.view { animation: viewIn .4s var(--ease); }
@keyframes viewIn { from { opacity: 0; transform: translateY(10px); } }

.hero { display: grid; grid-template-columns: 1.1fr 1fr; gap: 40px; align-items: center; padding: 10px 0 60px; }
.hero-copy .kicker { margin-bottom: 22px; }
.hero-art { position: relative; padding: 10px 0 0; }
.hero-hemi svg { width: 100%; height: auto; display: block; }
.hero-hemi circle { stroke: var(--ink); stroke-width: .006; animation: seatIn .5s var(--ease) both; animation-delay: var(--d); transform-box: fill-box; transform-origin: center; }
@keyframes seatIn { from { transform: scale(0); } }

.stamp {
  position: absolute; top: -6px; right: 0;
  width: 128px; height: 128px; border-radius: 50%;
  border: 4px solid var(--red); outline: 2px solid var(--red); outline-offset: -12px;
  display: grid; place-content: center; text-align: center; gap: 2px;
  color: var(--red); transform: rotate(-14deg);
  background: transparent; mix-blend-mode: multiply; pointer-events: none;
  font-family: var(--display); text-transform: uppercase;
}
.stamp span { font-size: .55rem; font-weight: 800; letter-spacing: .14em; }
.stamp b { font-size: 2rem; font-weight: 900; letter-spacing: -.04em; line-height: 1; }

.countdown-card {
  position: relative; margin: 14px auto 0;
  width: min(380px, 92%);
  background: var(--ink); color: var(--card);
  border-radius: var(--radius); padding: 16px 18px;
  box-shadow: 6px 6px 0 var(--red);
}
.cd-label { font-size: .7rem; letter-spacing: .16em; text-transform: uppercase; font-weight: 800; color: var(--yellow); }
.cd-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 10px; }
.cd-grid div { text-align: center; border-right: 1px dashed rgba(255, 250, 240, .25); }
.cd-grid div:last-child { border-right: none; }
.cd-grid span { display: block; font-family: var(--display); font-weight: 900; font-size: 2rem; line-height: 1; font-variant-numeric: tabular-nums; }
.cd-grid small { font-size: .66rem; font-weight: 700; opacity: .65; text-transform: uppercase; letter-spacing: .1em; }

.hemi-legend { margin-top: 16px; text-align: center; }
.legend-title { font-size: .7rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-2); margin-bottom: 8px; }
.legend-items { display: flex; flex-wrap: wrap; justify-content: center; gap: 5px 12px; }
.legend-item { display: inline-flex; align-items: center; gap: 5px; font-size: .78rem; font-weight: 700; color: var(--ink-2); }
.legend-item i { width: 10px; height: 10px; border-radius: 50%; border: 1.5px solid var(--ink); }
.legend-item b { color: var(--ink); }

.section-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.filters { display: flex; gap: 6px; flex-wrap: wrap; }
.filter {
  border: var(--bw) solid var(--ink); background: var(--card); border-radius: 999px;
  padding: 6px 14px; font-size: .84rem; font-weight: 800; cursor: pointer; transition: .15s var(--ease);
}
.filter:hover { background: var(--paper-2); }
.filter.active { background: var(--ink); color: var(--card); }

/* ---------- Targetes de joc ----------
   Sistema: el color és la categoria; la finestra il·lustrada mostra la mecànica del joc. */
.games { display: grid; gap: 40px; }
.featured-row { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.game-group { display: grid; gap: 16px; }
.group-head {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding-bottom: 10px; border-bottom: 2px dashed var(--ink);
}
.group-dot { width: 18px; height: 18px; border-radius: 50%; background: var(--c); border: var(--bw) solid var(--ink); box-shadow: 2px 2px 0 var(--ink); }
.group-head h3 { font-family: var(--display); font-weight: 900; font-size: 1.35rem; text-transform: uppercase; letter-spacing: -.04em; }
.group-head p { color: var(--ink-2); font-weight: 600; }
.group-count { margin-left: auto; font-size: .74rem; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.games-grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(232px, 1fr)); }

a.game-card { text-decoration: none; color: inherit; }
.game-card {
  --c: var(--red);
  position: relative; overflow: hidden;
  display: flex; flex-direction: column;
  background: var(--card);
  border: var(--bw) solid var(--ink); border-radius: 18px;
  box-shadow: var(--hard);
  transition: transform .16s var(--ease), box-shadow .16s var(--ease);
  animation: cardIn .5s var(--ease) both; animation-delay: calc(var(--i, 0) * 35ms);
}
@keyframes cardIn { from { opacity: 0; transform: translateY(16px); } }
.game-card:hover { transform: translate(-2px, -3px); box-shadow: 8px 9px 0 var(--ink); }
.game-card:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--ink); }

.gc-art {
  position: relative; height: 158px; display: grid; place-items: center; overflow: hidden;
  background:
    radial-gradient(circle, rgba(23, 23, 61, .2) 1.2px, transparent 1.9px) 0 0 / 10px 10px,
    var(--c);
  border-bottom: var(--bw) solid var(--ink);
}
.gc-art::after { /* reflex de paper */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(160deg, rgba(255, 255, 255, .22), transparent 45%);
}
.gc-art svg { width: 84%; max-height: 132px; overflow: visible; transition: transform .35s var(--ease); }
.game-card:hover .gc-art svg { transform: scale(1.06) rotate(-2deg); }
.gc-num {
  position: absolute; top: 10px; left: 10px; z-index: 1;
  font-family: var(--display); font-weight: 900; font-size: .72rem;
  background: var(--ink); color: var(--card); border-radius: 6px; padding: 3px 7px;
}
.gc-level {
  position: absolute; top: 10px; right: 10px; z-index: 1; display: flex; gap: 3px;
  background: var(--card); border: 2px solid var(--ink); border-radius: 999px; padding: 4px 6px;
}
.gc-level i { width: 7px; height: 7px; border-radius: 50%; border: 1.5px solid var(--ink); }
.gc-level i.on { background: var(--ink); }

.gc-body { flex: 1; display: flex; flex-direction: column; gap: 6px; padding: 14px 16px 16px; }
.gc-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-height: 22px; }
.gc-cat {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: .66rem; font-weight: 800; text-transform: uppercase; letter-spacing: .12em; color: var(--ink-2);
}
.gc-cat::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--c); border: 2px solid var(--ink); }
.gc-status { font-size: .64rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; padding: 2px 8px; border-radius: 6px; border: 2px solid var(--ink); }
.gc-status.new { background: var(--yellow); }
.gc-status.done { background: var(--ok-soft); }
.gc-title { font-family: var(--display); font-weight: 800; font-size: 1.2rem; letter-spacing: -.035em; line-height: 1.05; }
.gc-tag { color: var(--ink-2); font-size: .9rem; line-height: 1.4; }
.gc-meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: auto; padding-top: 8px; padding-right: 46px; font-size: .72rem; font-weight: 800; }
.gc-chip { border: 2px solid var(--ink); border-radius: 999px; padding: 2px 9px; background: var(--paper); }
.gc-chip.soft { border-style: dashed; background: transparent; }
.gc-best { color: var(--ink-2); }
.gc-best b { font-family: var(--display); color: var(--ink); }
.game-card > .gc-play {
  position: absolute; right: 14px; bottom: 14px;
  width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center; background: var(--ink); color: var(--card);
  transition: .2s var(--ease);
}
.game-card:hover > .gc-play { background: var(--c); color: var(--ink); box-shadow: 0 0 0 2px var(--ink); transform: scale(1.08); }
.gc-play svg { width: 13px; height: 13px; margin-left: 2px; }

/* Destacats: il·lustració gran a l'esquerra */
.game-card.featured { flex-direction: row; min-height: 250px; }
.game-card.featured .gc-art { flex: 0 0 36%; height: auto; border-bottom: 0; border-right: var(--bw) solid var(--ink); }
.game-card.featured .gc-art svg { width: 92%; max-height: 190px; }
.game-card.featured .gc-body { padding: 20px 20px 20px; gap: 8px; min-width: 0; container-type: inline-size; }
.game-card.featured .gc-title {
  font-size: min(2.2rem, 8.2cqi); font-weight: 900; text-transform: uppercase; letter-spacing: -.045em;
  text-shadow: 3px 3px 0 var(--c);
}
.game-card.featured .gc-tag { font-size: .92rem; }
.game-card.featured > .gc-play { width: 50px; height: 50px; background: var(--c); color: #fff; box-shadow: 0 0 0 2px var(--ink); }

.filter[data-filter]:not([data-filter="all"])::before {
  content: ""; display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 6px;
  background: var(--c); border: 1.5px solid var(--ink); vertical-align: 0;
}

/* ---------- Botons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: var(--bw) solid var(--ink); background: var(--card); color: var(--ink);
  border-radius: 12px; padding: 11px 20px;
  font-weight: 800; font-size: .95rem; cursor: pointer; text-decoration: none;
  box-shadow: var(--hard-sm);
  transition: transform .1s var(--ease), box-shadow .1s var(--ease), background .15s;
}
.btn:hover { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--ink); }
.btn:active { transform: translate(3px, 3px); box-shadow: 0 0 0 var(--ink); }
.btn.primary { background: var(--red); color: #fff; }
.btn.ghost { background: var(--card); }
.btn.lg { padding: 14px 26px; font-size: 1.02rem; }
.btn:disabled { opacity: .4; cursor: not-allowed; transform: none; box-shadow: 0 0 0 var(--ink); }
.row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 20px; }
.row.center { justify-content: center; }
.icon-btn {
  width: 44px; height: 44px; border-radius: 12px; border: var(--bw) solid var(--ink);
  background: var(--card); display: grid; place-items: center; cursor: pointer; box-shadow: var(--hard-sm);
}
.icon-btn:active { transform: translate(3px, 3px); box-shadow: none; }
.icon-btn svg { width: 20px; height: 20px; }

/* ---------- Escenari ---------- */
.stage { --c: var(--red); max-width: 880px; margin: 0 auto; }
.stage-head { display: flex; align-items: center; gap: 14px; margin-bottom: 24px; }
.stage-title { flex: 1; min-width: 0; }
.stage-title small { font-size: .72rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-2); }
.stage-title h2 {
  font-family: var(--display); font-weight: 900; font-size: 1.7rem; letter-spacing: -.04em; text-transform: uppercase;
  text-shadow: 3px 3px 0 var(--c); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 0 4px 4px 0;
}
.hud { display: flex; gap: 8px; }
.hud-item {
  background: var(--card); border: var(--bw) solid var(--ink); border-radius: 12px; box-shadow: var(--hard-sm);
  padding: 4px 12px; text-align: center; min-width: 64px;
}
.hud-item small { display: block; font-size: .58rem; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.hud-item strong { font-family: var(--display); font-weight: 800; font-size: 1.15rem; font-variant-numeric: tabular-nums; line-height: 1.2; }
.hud-item.bump { animation: bump .4s var(--ease); }
@keyframes bump { 40% { transform: scale(1.15) rotate(-3deg); background: var(--yellow); } }
.hud-item.warn { background: var(--ko); color: #fff; }
.hud-item.warn small { color: #fff; }

.stage-body { position: relative; }
.card {
  position: relative;
  background: var(--card); border: var(--bw) solid var(--ink);
  border-radius: var(--radius); box-shadow: 6px 6px 0 var(--ink); padding: 26px;
}
.qcard.on-fire { box-shadow: 6px 6px 0 var(--red); }

/* Introducció */
.intro { text-align: center; padding: 44px 28px; overflow: hidden; }
.intro::before { content: ""; position: absolute; inset: 0 0 auto; height: 110px; background: var(--dots) 0 0 / 10px 10px, color-mix(in srgb, var(--c) 18%, var(--card)); border-bottom: 2px dashed var(--ink); }
.intro > * { position: relative; }
.intro .gc-icon { width: 86px; height: 86px; border-radius: 22px; margin: 0 auto 18px; transform: rotate(-5deg); box-shadow: var(--hard); }
.intro .gc-icon svg { width: 42px; height: 42px; }
.intro-kicker { font-size: .74rem; font-weight: 800; text-transform: uppercase; letter-spacing: .14em; color: var(--ink-2); }
.intro h3 { font-family: var(--display); font-weight: 900; text-transform: uppercase; font-size: clamp(1.9rem, 5vw, 2.8rem); letter-spacing: -.04em; margin-top: 6px; text-shadow: 3px 3px 0 var(--c); }
.intro p { color: var(--ink-2); max-width: 50ch; margin: 14px auto 0; font-size: 1.04rem; }
.rules { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; margin: 22px 0 26px; }
.rules span { background: var(--paper); border: 2px solid var(--ink); border-radius: 999px; padding: 4px 13px; font-size: .82rem; font-weight: 700; }
.intro-best { margin-top: 16px; color: var(--ink-2); }
.intro-best b { font-family: var(--display); }
.intro-note { font-size: .9rem; font-weight: 600; color: var(--ko); margin: 0 auto 18px; }
.daily-box { display: flex; justify-content: center; gap: 12px; margin-bottom: 18px; }
.daily-box div { border: 2px solid var(--ink); border-radius: 12px; padding: 8px 18px; background: var(--paper); }
.daily-box small { display: block; font-size: .65rem; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.daily-box strong { font-family: var(--display); font-size: 1.3rem; }

.count-in { display: grid; place-items: center; padding: 60px 0; }
.count-in span {
  font-family: var(--display); font-weight: 900; font-size: 10rem; line-height: 1;
  color: var(--c); text-shadow: 6px 6px 0 var(--ink); animation: countIn .7s var(--ease);
}
@keyframes countIn { from { transform: scale(2.2) rotate(-12deg); opacity: 0; } }

/* Preguntes */
.progress-dots { display: flex; gap: 5px; margin-bottom: 18px; }
.progress-dots i { flex: 1; height: 8px; border-radius: 4px; border: 2px solid var(--ink); background: transparent; transition: background .3s; }
.progress-dots i.ok { background: var(--ok); }
.progress-dots i.ko { background: var(--ko); }
.progress-dots i.cur { background: var(--yellow); }

.q-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; min-height: 34px; }
.q-label {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: .72rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-2);
}
.q-label::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--c); border: 2px solid var(--ink); flex: none; }
.q-text { font-family: var(--display); font-weight: 700; font-size: clamp(1.2rem, 2.8vw, 1.65rem); letter-spacing: -.025em; line-height: 1.2; }
.q-sub { margin-top: 8px; color: var(--ink-2); }
.q-big {
  font-family: var(--display); font-weight: 900; font-size: clamp(3rem, 10vw, 5.4rem);
  letter-spacing: -.05em; line-height: 1; color: var(--ink); text-shadow: 5px 5px 0 var(--c);
  padding: 6px 0 4px;
}
.q-big.exact { color: var(--ok); }
.q-big.near { color: var(--ink); }
.q-big.far { color: var(--ko); }
.q-quote {
  margin: 0; padding: 4px 0 4px 18px; border-left: 6px solid var(--c);
  font-family: var(--display); font-weight: 700; font-size: clamp(1.25rem, 3.2vw, 1.9rem); line-height: 1.2; letter-spacing: -.03em;
}

.qtimer {
  --p: 100;
  flex: none; width: 46px; height: 46px; border-radius: 50%; position: relative;
  background: conic-gradient(var(--ink) calc(var(--p) * 1%), var(--paper-2) 0);
  display: grid; place-items: center; border: 2px solid var(--ink);
}
.qtimer::before { content: ""; position: absolute; inset: 5px; border-radius: 50%; background: var(--card); }
.qtimer span { position: relative; font-family: var(--display); font-weight: 800; font-size: .95rem; }
.qtimer.low { background: conic-gradient(var(--ko) calc(var(--p) * 1%), var(--paper-2) 0); animation: shakeSoft .5s infinite; }
@keyframes shakeSoft { 50% { transform: rotate(-6deg); } }

.lifelines { display: flex; gap: 8px; margin-top: 18px; }
.lifeline {
  border: 2px solid var(--ink); background: var(--yellow); border-radius: 999px;
  padding: 4px 12px; font-size: .78rem; font-weight: 800; cursor: pointer; box-shadow: 2px 2px 0 var(--ink);
}
.lifeline:disabled { background: var(--paper-2); opacity: .55; cursor: default; box-shadow: none; }
.lifeline.spent { text-decoration: line-through; }

.choices { display: grid; gap: 10px; margin-top: 16px; }
.choices.two { grid-template-columns: 1fr 1fr; }
.choice {
  position: relative; display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  text-align: left; cursor: pointer;
  background: var(--card); border: var(--bw) solid var(--ink);
  border-radius: var(--radius-sm); padding: 12px 14px;
  font-weight: 700; font-size: 1rem; box-shadow: var(--hard-sm);
  transition: transform .1s var(--ease), box-shadow .1s var(--ease), background .15s;
}
.choice:hover:not(:disabled) { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--ink); background: #fff4d4; }
.choice:active:not(:disabled) { transform: translate(3px, 3px); box-shadow: none; }
.choice:disabled { cursor: default; }
.choice .key {
  flex: none; width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center;
  font-family: var(--display); font-weight: 800; font-size: .78rem; background: var(--ink); color: var(--card);
}
.choice .ctext { flex: 1; min-width: 0; }
.choice.correct { background: var(--ok-soft); animation: pop .35s var(--ease); }
.choice.correct .key { background: var(--ok); }
.choice.wrong { background: var(--ko-soft); animation: shake .4s; }
.choice.wrong .key { background: var(--ko); }
.choice.dim { opacity: .45; box-shadow: none; }
.choice.gone { opacity: .2; box-shadow: none; text-decoration: line-through; }
.poll { flex-basis: 100%; display: flex; align-items: center; gap: 8px; font-size: .78rem; }
.poll i { display: block; height: 8px; border-radius: 4px; background: var(--blue); border: 1.5px solid var(--ink); min-width: 4px; }
@keyframes pop { 50% { transform: scale(1.025); } }
@keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }

.explain {
  margin-top: 18px; padding: 14px 16px; border-radius: var(--radius-sm);
  background: var(--paper); border: 2px dashed var(--ink); font-size: .96rem;
  display: grid; gap: 4px; animation: viewIn .3s var(--ease);
}
.explain strong { font-family: var(--display); font-weight: 800; font-size: .9rem; text-transform: uppercase; letter-spacing: -.01em; }
.explain.is-ok strong { color: var(--ok); }
.explain.is-ko strong { color: var(--ko); }
.next-row { display: flex; justify-content: flex-end; margin-top: 18px; }

.timebar { height: 14px; border-radius: 99px; border: var(--bw) solid var(--ink); background: var(--paper); overflow: hidden; margin-bottom: 20px; }
.timebar div { height: 100%; background: repeating-linear-gradient(-45deg, var(--ink) 0 8px, var(--ink-2) 8px 16px); transition: width .25s linear; }
.timebar.low div { background: repeating-linear-gradient(-45deg, var(--ko) 0 8px, #b51d31 8px 16px); }
.streak-chip { background: var(--red); color: #fff; font-weight: 800; font-size: .74rem; padding: 3px 10px; border-radius: 999px; border: 2px solid var(--ink); animation: pop .5s var(--ease); }
.float-pts {
  position: absolute; right: 22px; top: 12px; z-index: 5;
  font-family: var(--display); font-weight: 900; font-size: 1.7rem; color: var(--ok);
  text-shadow: 2px 2px 0 var(--ink); pointer-events: none; animation: floatUp .9s var(--ease) forwards;
}
.float-pts.neg { color: var(--ko); }
@keyframes floatUp { to { transform: translateY(-44px) rotate(-6deg); opacity: 0; } }

/* Resultats */
.result { text-align: center; padding: 44px 28px; overflow: hidden; }
.result .kicker { justify-content: center; }
.stamp-result {
  position: absolute; top: 22px; right: 18px; transform: rotate(12deg);
  font-family: var(--display); font-weight: 900; font-size: .95rem; letter-spacing: .05em;
  color: var(--red); border: 3px solid var(--red); border-radius: 8px; padding: 4px 10px; opacity: .85;
}
.result-score {
  font-family: var(--display); font-weight: 900; font-size: clamp(4.2rem, 15vw, 7.5rem);
  letter-spacing: -.06em; line-height: 1; margin: 14px 0 8px; color: var(--ink); text-shadow: 6px 6px 0 var(--c);
}
.result-sub { color: var(--ink-2); font-weight: 700; }
.result-verdict { font-family: var(--display); font-weight: 800; font-size: 1.25rem; letter-spacing: -.03em; margin-top: 16px; }
.result-badges { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; margin-top: 16px; }
.rbadge { border-radius: 999px; padding: 5px 13px; font-weight: 800; font-size: .84rem; background: var(--paper); border: 2px solid var(--ink); }
.rbadge.record { background: var(--yellow); transform: rotate(-3deg); }
.rbadge.xp { background: var(--ink); color: var(--yellow); }
.rbadge.level { background: var(--red); color: #fff; transform: rotate(2deg); }
.recap { text-align: left; margin-top: 30px; display: grid; gap: 8px; }
.recap h4 { font-family: var(--display); font-weight: 800; font-size: .9rem; text-transform: uppercase; }
.recap-item { border: 2px solid var(--ink); border-radius: var(--radius-sm); padding: 10px 14px; font-size: .92rem; background: var(--paper); }
.recap-item b { display: block; margin-bottom: 2px; }
.recap-item .ans { color: var(--ok); font-weight: 800; }

/* ---------- Endevina l'any ---------- */
.year-out { text-align: center; margin: 18px 0 6px; }
input[type="range"].year-range {
  -webkit-appearance: none; appearance: none; width: 100%; margin: 10px 0;
  height: 14px; border-radius: 99px; background: var(--paper); border: var(--bw) solid var(--ink);
}
input[type="range"].year-range::-webkit-slider-thumb {
  -webkit-appearance: none; width: 32px; height: 32px; border-radius: 50%;
  background: var(--c); border: var(--bw) solid var(--ink); box-shadow: 2px 2px 0 var(--ink); cursor: grab;
}
input[type="range"].year-range::-moz-range-thumb { width: 26px; height: 26px; border-radius: 50%; background: var(--c); border: var(--bw) solid var(--ink); cursor: grab; }
.year-scale { display: flex; justify-content: space-between; font-size: .76rem; color: var(--ink-2); font-weight: 800; }
.nudge { display: flex; justify-content: center; gap: 10px; margin-top: 18px; }
.nudge [data-d] { width: 62px; padding-inline: 0; }
.year-reveal { display: flex; justify-content: center; gap: 28px; margin-top: 10px; }
.year-reveal small { font-size: .66rem; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.year-reveal strong { display: block; font-family: var(--display); font-weight: 800; font-size: 1.8rem; }

/* ---------- Cronologia ---------- */
.chrono { display: grid; gap: 10px; margin-top: 20px; }
.chrono-item {
  display: flex; align-items: center; gap: 14px; cursor: pointer; text-align: left;
  background: var(--card); border: var(--bw) solid var(--ink); border-radius: var(--radius-sm);
  padding: 12px 14px; font-weight: 700; box-shadow: var(--hard-sm); transition: .1s var(--ease);
}
.chrono-item:hover:not(:disabled) { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--ink); }
.chrono-item .slot {
  flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
  font-family: var(--display); font-weight: 900; border: 2px dashed var(--ink); transition: .2s var(--ease);
}
.chrono-item .ct { flex: 1; }
.chrono-item.picked { background: #fff4d4; }
.chrono-item.picked .slot { background: var(--c); border: 2px solid var(--ink); color: #fff; transform: rotate(-8deg); }
.chrono-item .yr { font-family: var(--display); font-weight: 900; font-size: 1.15rem; }
.chrono-item.correct { background: var(--ok-soft); }
.chrono-item.wrong { background: var(--ko-soft); }
.chrono-item.correct .slot { background: var(--ok); color: #fff; border-style: solid; }
.chrono-item.wrong .slot { background: var(--ko); color: #fff; border-style: solid; }

/* ---------- Fes majoria ---------- */
.majority { display: grid; gap: 20px; }
.mission {
  border-radius: var(--radius); padding: 20px 22px; display: grid; gap: 6px;
  background: var(--ink); color: var(--card); box-shadow: 6px 6px 0 var(--red);
}
.mission-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.mission small { font-size: .72rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--yellow); }
.mission-tag { font-size: .72rem; font-weight: 800; border: 1.5px solid rgba(255, 250, 240, .5); border-radius: 999px; padding: 2px 10px; }
.mission h3 { font-family: var(--display); font-weight: 900; text-transform: uppercase; font-size: 1.45rem; letter-spacing: -.03em; }
.mission p { opacity: .88; }
.hemi-wrap { position: relative; }
.hemicycle { width: 100%; height: auto; display: block; }
.hemicycle circle { transition: opacity .3s; stroke: var(--ink); stroke-width: .004; }
.hemi-center { position: absolute; left: 50%; bottom: 0; transform: translateX(-50%); text-align: center; }
.hemi-center strong { display: block; font-family: var(--display); font-weight: 900; font-size: clamp(2.2rem, 7vw, 3.6rem); line-height: 1; font-variant-numeric: tabular-nums; letter-spacing: -.04em; }
.hemi-center small { font-size: .7rem; font-weight: 800; color: var(--ink-2); text-transform: uppercase; letter-spacing: .08em; }
.hemi-center.win strong { color: var(--ok); }
.seat-meter { height: 16px; border-radius: 99px; background: var(--paper); border: var(--bw) solid var(--ink); position: relative; margin: 30px 0 20px; }
.seat-meter .fill { height: 100%; border-radius: 99px; background: var(--ink-2); transition: width .4s var(--ease), background .3s; }
.seat-meter .fill.win { background: var(--ok); }
.seat-meter .mark { position: absolute; top: -8px; bottom: -8px; width: 4px; border-radius: 2px; background: var(--red); left: calc(176 / 350 * 100%); }
.seat-meter .mark::after { content: "176"; position: absolute; top: -22px; left: -12px; font-family: var(--display); font-weight: 900; font-size: .78rem; color: var(--red); }
.party-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.party-chip {
  --pc: #888;
  display: inline-flex; align-items: center; gap: 7px;
  border: 2px solid var(--ink); background: var(--card); border-radius: 999px;
  padding: 5px 12px 5px 5px; cursor: pointer; font-weight: 800; font-size: .86rem; transition: .1s var(--ease);
}
.party-chip i { width: 20px; height: 20px; border-radius: 50%; background: var(--pc); opacity: .3; border: 2px solid var(--ink); }
.party-chip span { color: var(--muted); font-variant-numeric: tabular-nums; }
.party-chip.on { background: color-mix(in srgb, var(--pc) 20%, var(--card)); box-shadow: 2px 2px 0 var(--ink); transform: translate(-1px, -1px); }
.party-chip.on i { opacity: 1; }
.party-chip.on span { color: var(--ink); }
.party-chip:disabled { cursor: default; }

/* ---------- Repartidor ---------- */
.h-game-rows { display: grid; gap: 10px; margin-top: 18px; }
.h-row {
  display: grid; grid-template-columns: 14px 1fr auto auto; gap: 14px; align-items: center;
  background: var(--card); border: var(--bw) solid var(--ink); border-radius: var(--radius-sm); padding: 10px 14px; box-shadow: var(--hard-sm);
}
.h-row .sw { width: 14px; height: 40px; border-radius: 5px; border: 2px solid var(--ink); }
.h-row .nm { font-weight: 800; }
.h-row .vt { font-size: .85rem; color: var(--ink-2); font-variant-numeric: tabular-nums; font-weight: 600; }
.h-row.out { opacity: .55; }
.stepper { display: flex; align-items: center; gap: 4px; }
.stepper button { width: 36px; height: 36px; border-radius: 10px; border: 2px solid var(--ink); background: var(--yellow); font-size: 1.2rem; font-weight: 900; cursor: pointer; }
.stepper button:active:not(:disabled) { transform: translateY(2px); }
.stepper button:disabled { opacity: .3; cursor: default; }
.stepper output { min-width: 34px; text-align: center; font-family: var(--display); font-weight: 900; font-size: 1.4rem; }
.h-truth { font-family: var(--display); font-weight: 900; font-size: 1.4rem; min-width: 30px; text-align: center; }
.h-truth.ok { color: var(--ok); }
.h-truth.ko { color: var(--ko); }
.h-status { display: flex; justify-content: space-between; align-items: center; margin-top: 16px; font-weight: 800; }
.h-pill { background: var(--paper); border: 2px solid var(--ink); border-radius: 999px; padding: 5px 13px; font-variant-numeric: tabular-nums; }
.h-pill.full { background: var(--ok-soft); }
.q-table { width: 100%; border-collapse: collapse; font-size: .85rem; font-variant-numeric: tabular-nums; background: var(--card); }
.q-table th, .q-table td { padding: 6px 9px; border: 1.5px solid var(--ink); text-align: right; white-space: nowrap; }
.q-table th:first-child, .q-table td:first-child { text-align: left; font-weight: 800; }
.q-table th { background: var(--ink); color: var(--card); font-weight: 800; font-size: .74rem; }
.q-table td.win { background: var(--yellow); font-weight: 900; }
.q-table td .rank { font-size: .64rem; margin-left: 4px; color: var(--ink-2); }
.table-wrap { overflow-x: auto; margin-top: 14px; border-radius: 10px; }

/* ---------- Més o menys ---------- */
.versus { display: grid; grid-template-columns: 1fr auto 1fr; gap: 14px; align-items: stretch; margin-top: 20px; }
.vs-card {
  background: var(--card); border: var(--bw) solid var(--ink); border-radius: var(--radius); box-shadow: var(--hard);
  padding: 26px 16px; text-align: center; cursor: pointer; transition: .12s var(--ease);
  display: grid; gap: 10px; align-content: center; min-height: 200px;
}
.vs-card:hover:not(:disabled) { transform: translate(-2px, -2px) rotate(-1deg); box-shadow: 7px 7px 0 var(--ink); background: #fff4d4; }
.vs-card:disabled { cursor: default; }
.vs-card .nm { font-family: var(--display); font-weight: 800; font-size: clamp(1.15rem, 3vw, 1.7rem); letter-spacing: -.03em; line-height: 1.1; }
.versus.long .vs-card .nm { font-family: var(--sans); font-weight: 800; font-size: 1.05rem; letter-spacing: 0; line-height: 1.3; }
.vs-card .num { font-family: var(--display); font-weight: 900; font-size: 2.8rem; line-height: 1; min-height: 2.8rem; text-shadow: 3px 3px 0 var(--c); }
.vs-card .num small { display: block; font-family: var(--sans); font-size: .7rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2); text-shadow: none; margin-top: 4px; }
.vs-card.correct { background: var(--ok-soft); }
.vs-card.wrong { background: var(--ko-soft); }
.vs-mid { display: grid; place-items: center; align-content: center; gap: 12px; }
.vs-badge { width: 50px; height: 50px; border-radius: 50%; background: var(--red); color: #fff; display: grid; place-items: center; font-family: var(--display); font-weight: 900; border: var(--bw) solid var(--ink); transform: rotate(-10deg); }
.lives { display: inline-flex; gap: 5px; }
.lives i { width: 12px; height: 12px; border-radius: 3px; background: var(--red); border: 2px solid var(--ink); transform: rotate(45deg); transition: .3s; }
.lives i.lost { background: transparent; transform: rotate(45deg) scale(.7); }

/* ---------- Qui és qui ---------- */
.clues { display: grid; gap: 8px; margin-top: 16px; }
.clues.compact { margin-top: 12px; }
.clue { display: flex; gap: 12px; align-items: start; padding: 10px 14px; border-radius: var(--radius-sm); border: 2px dashed var(--ink); color: var(--muted); font-weight: 600; }
.clue b { flex: none; font-family: var(--display); font-weight: 900; }
.clue.shown { background: var(--paper); border-style: solid; color: var(--ink); animation: viewIn .3s var(--ease); }
.clue.shown b { color: var(--c); }
.clue-pts { font-size: .82rem; font-weight: 800; color: var(--ink-2); margin-top: 12px; }
.clue-pts b { font-family: var(--display); background: var(--yellow); border: 2px solid var(--ink); border-radius: 6px; padding: 0 6px; }
.people { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 8px; margin-top: 16px; }
.person {
  display: flex; align-items: center; gap: 10px; cursor: pointer; text-align: left;
  background: var(--card); border: 2px solid var(--ink); border-radius: var(--radius-sm); box-shadow: 2px 2px 0 var(--ink);
  padding: 8px 10px; font-weight: 800; font-size: .86rem; line-height: 1.15; transition: .1s var(--ease);
}
.person:hover:not(:disabled) { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--ink); background: #fff4d4; }
.person:disabled { cursor: default; }
.person .av { flex: none; width: 38px; height: 38px; border-radius: 50%; border: 2px solid var(--ink); display: grid; place-items: center; font-family: var(--display); font-weight: 800; font-size: .76rem; color: #fff; }
.person small { display: block; font-weight: 600; color: var(--muted); font-size: .72rem; }
.person.wrong { opacity: .3; text-decoration: line-through; box-shadow: none; }
.person.correct { background: var(--ok-soft); }

/* ---------- Verificador ---------- */
.verif { display: grid; gap: 16px; }
.swipe-zone {
  position: relative; min-height: 290px; display: grid; place-items: center;
  border-radius: var(--radius); border: var(--bw) dashed var(--ink);
  background: var(--dots) 0 0 / 10px 10px, var(--paper-2); overflow: hidden; transition: background .2s;
}
.swipe-zone[data-lean="yes"] { background: var(--dots) 0 0 / 10px 10px, var(--ok-soft); }
.swipe-zone[data-lean="no"] { background: var(--dots) 0 0 / 10px 10px, var(--ko-soft); }
.swipe-hint { position: absolute; top: 50%; transform: translateY(-50%) rotate(-90deg); font-family: var(--display); font-weight: 900; font-size: 1.1rem; letter-spacing: .1em; opacity: .25; }
.swipe-hint.left { left: -6px; color: var(--ko); }
.swipe-hint.right { right: -6px; color: var(--ok); transform: translateY(-50%) rotate(90deg); }
.swipe-deck { width: min(520px, 84%); }
.swipe-card {
  background: var(--card); border: var(--bw) solid var(--ink); border-radius: var(--radius); box-shadow: var(--hard);
  padding: 26px 24px; min-height: 190px; display: grid; align-content: center; gap: 10px;
  cursor: grab; touch-action: none; user-select: none; animation: dealIn .3s var(--ease);
  transition: transform .25s var(--ease), opacity .25s;
}
.swipe-card.dragging { transition: none; cursor: grabbing; }
.swipe-card p { font-family: var(--display); font-weight: 700; font-size: clamp(1.05rem, 2.6vw, 1.35rem); letter-spacing: -.025em; line-height: 1.25; }
.sc-kicker { font-size: .7rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.swipe-card.fly-right { transform: translateX(140%) rotate(18deg) !important; opacity: 0; }
.swipe-card.fly-left { transform: translateX(-140%) rotate(-18deg) !important; opacity: 0; }
.swipe-card.is-ok { background: var(--ok-soft); }
.swipe-card.is-ko { background: var(--ko-soft); }
@keyframes dealIn { from { transform: translateY(24px) scale(.94); opacity: 0; } }
.verif-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.verdict-btn { padding: 16px; font-size: 1.05rem; font-family: var(--display); font-weight: 800; }
.verdict-btn.no { background: var(--ko); color: #fff; }
.verdict-btn.yes { background: var(--ok); color: #fff; }
.verif-log { min-height: 64px; }
.log-item { border: 2px solid var(--ink); border-radius: var(--radius-sm); padding: 10px 14px; background: var(--card); display: grid; gap: 2px; font-size: .9rem; animation: viewIn .25s var(--ease); }
.log-item b { font-family: var(--display); font-weight: 800; font-size: .8rem; }
.log-item.ok b { color: var(--ok); }
.log-item.ko b { color: var(--ko); }

/* ---------- Mapa autonòmic ---------- */
.match { display: grid; grid-template-columns: .8fr 1.2fr; gap: 14px; margin-top: 18px; }
.match-col { display: grid; gap: 8px; align-content: start; }
.match-item {
  --mc: var(--ink);
  text-align: left; cursor: pointer; background: var(--card); border: 2px solid var(--ink); border-radius: var(--radius-sm);
  padding: 10px 12px; font-weight: 700; font-size: .9rem; box-shadow: 2px 2px 0 var(--ink); transition: .1s var(--ease); min-height: 48px;
}
.match-item.left { font-family: var(--display); font-weight: 800; font-size: .86rem; letter-spacing: -.02em; }
.match-item small { display: block; font-family: var(--sans); font-size: .68rem; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.match-item:hover:not(:disabled) { background: #fff4d4; }
.match-item.sel { background: var(--yellow); transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--ink); }
.match-item.matched { background: color-mix(in srgb, var(--mc) 22%, var(--card)); border-color: var(--mc); box-shadow: none; cursor: default; position: relative; }
.match-item.matched::after { content: "✓"; position: absolute; right: 10px; top: 50%; transform: translateY(-50%); font-weight: 900; color: var(--mc); }
.match-item.shake { animation: shake .4s; background: var(--ko-soft); }

/* ---------- Paraula clau ---------- */
.definition { font-size: clamp(1.1rem, 2.6vw, 1.4rem); }
.word { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px 22px; margin: 26px 0 16px; }
.wpart { display: flex; gap: 4px; }
.tile {
  width: min(40px, calc((100vw - 110px) / 15)); height: clamp(32px, 6.6vw, 50px);
  border-bottom: 4px solid var(--ink); display: grid; place-items: end center; padding-bottom: 2px;
  font-family: var(--display); font-weight: 900; font-size: clamp(1rem, 3.4vw, 1.6rem);
}
.tile.open { animation: pop .3s var(--ease); }
.tile.missed { color: var(--ko); }
.tile.sym { border-bottom-color: transparent; width: auto; }
.votes { display: flex; justify-content: center; gap: 6px; margin-bottom: 18px; }
.votes i { width: 22px; height: 28px; border-radius: 3px; background: var(--card); border: 2px solid var(--ink); position: relative; transition: .3s var(--ease); }
.votes i::after { content: ""; position: absolute; left: 4px; right: 4px; top: 6px; height: 2px; background: var(--ink); box-shadow: 0 5px 0 var(--ink), 0 10px 0 var(--ink); }
.votes i.lost { opacity: .2; transform: translateY(6px) rotate(-12deg); }
.keyboard { display: grid; gap: 6px; }
.krow { display: flex; justify-content: center; gap: 5px; }
.keyboard .key {
  flex: 1 1 0; min-width: 0; max-width: 44px; height: 46px; border-radius: 8px; border: 2px solid var(--ink); background: var(--card);
  font-family: var(--display); font-weight: 800; font-size: .9rem; cursor: pointer; box-shadow: 2px 2px 0 var(--ink); padding: 0;
}
.keyboard .key:active:not(:disabled) { transform: translate(2px, 2px); box-shadow: none; }
.keyboard .key.hit { background: var(--ok); color: #fff; box-shadow: none; }
.keyboard .key.miss { background: var(--paper-2); color: var(--muted); box-shadow: none; text-decoration: line-through; }
.keyboard .key:disabled { cursor: default; }

/* ---------- Aprèn ---------- */
.page-head { padding: 6px 0 32px; display: grid; gap: 14px; }
.fitxes { display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); }
.fitxa {
  background: var(--card); border: var(--bw) solid var(--ink); border-radius: var(--radius);
  padding: 22px; box-shadow: var(--hard); animation: cardIn .5s var(--ease) both; animation-delay: calc(var(--i, 0) * 40ms);
}
.fitxa .tag { display: inline-block; font-size: .68rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; background: var(--ink); color: var(--yellow); padding: 3px 9px; border-radius: 6px; }
.fitxa h3 { font-family: var(--display); font-weight: 800; font-size: 1.2rem; letter-spacing: -.03em; margin: 12px 0 12px; }
.fitxa ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.fitxa li { padding-left: 20px; position: relative; font-size: .95rem; color: var(--ink-2); }
.fitxa li::before { content: ""; position: absolute; left: 0; top: .5em; width: 9px; height: 9px; border-radius: 50%; background: var(--red); border: 2px solid var(--ink); }
.fitxa a { color: var(--blue); font-weight: 800; }

.panel { margin-top: 44px; background: var(--card); border: var(--bw) solid var(--ink); border-radius: var(--radius); padding: 26px; box-shadow: 6px 6px 0 var(--ink); }
.panel-head { display: grid; gap: 8px; margin-bottom: 18px; }
.panel-head .muted { max-width: 70ch; color: var(--ink-2); }
.hondt-config { display: grid; gap: 12px; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-bottom: 14px; }
label { display: grid; gap: 6px; font-size: .74rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-2); }
input[type="number"], input[type="text"] {
  font: inherit; font-size: 1rem; font-weight: 600; text-transform: none; letter-spacing: 0; color: var(--ink);
  padding: 10px 13px; border-radius: 10px; border: 2px solid var(--ink); background: var(--paper); width: 100%; min-width: 0;
}
input:focus { outline: none; background: #fff; box-shadow: 3px 3px 0 var(--ink); }
.h-parties { display: grid; gap: 8px; }
.h-party { display: grid; grid-template-columns: 1fr 140px 40px; gap: 8px; align-items: center; }
.h-party .del { border: none; background: none; font-size: 1.5rem; font-weight: 900; cursor: pointer; }
.sim-bars { display: grid; gap: 10px; margin-top: 22px; }
.sim-bar { display: grid; grid-template-columns: 120px 1fr 44px; gap: 10px; align-items: center; font-weight: 800; font-size: .9rem; }
.sim-bar .track { height: 26px; background: var(--paper); border: 2px solid var(--ink); border-radius: 8px; overflow: hidden; }
.sim-bar .track div { height: 100%; background: var(--blue); border-right: 2px solid var(--ink); transition: width .6s var(--ease); }
.sim-bar.out .track div { background: var(--paper-2); }
.sim-bar strong { font-family: var(--display); font-weight: 900; font-size: 1.35rem; text-align: right; }
.sim-note { font-size: .86rem; color: var(--ink-2); margin-top: 14px; font-weight: 600; }

/* ---------- Calendari ---------- */
.timeline { list-style: none; margin: 0; padding: 0; position: relative; display: grid; gap: 12px; max-width: 820px; }
.timeline::before { content: ""; position: absolute; left: 21px; top: 10px; bottom: 10px; border-left: 3px dashed var(--ink); }
.tl { position: relative; display: grid; grid-template-columns: 46px 1fr; gap: 16px; align-items: center; animation: cardIn .45s var(--ease) both; animation-delay: calc(var(--i, 0) * 30ms); }
.tl-dot { width: 46px; height: 46px; border-radius: 50%; background: var(--card); border: var(--bw) solid var(--ink); display: grid; place-items: center; z-index: 1; font-family: var(--display); font-weight: 900; font-size: .95rem; }
.tl-body { background: var(--card); border: var(--bw) solid var(--ink); border-radius: var(--radius-sm); padding: 11px 16px; box-shadow: var(--hard-sm); }
.tl-date { font-size: .72rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--blue); }
.tl-text { font-weight: 700; margin-top: 2px; }
.tl.done .tl-dot { background: var(--ink); color: var(--card); }
.tl.done .tl-body { opacity: .6; box-shadow: none; }
.tl.next .tl-dot { background: var(--yellow); transform: scale(1.1) rotate(-6deg); box-shadow: 2px 2px 0 var(--ink); }
.tl.next .tl-body { background: #fff4d4; }
.tl.key .tl-body { background: var(--ink); color: var(--card); box-shadow: 4px 4px 0 var(--red); }
.tl.key .tl-date { color: var(--yellow); }
.tl.key .tl-text { font-family: var(--display); font-weight: 800; font-size: 1.1rem; letter-spacing: -.02em; }

/* ---------- Perfil ---------- */
.profile-top { display: grid; grid-template-columns: 1.3fr 1fr; gap: 20px; }
.level-card { display: flex; gap: 20px; align-items: center; }
.lc-badge { flex: none; width: 92px; height: 92px; border-radius: 50%; display: grid; place-items: center; background: var(--red); color: #fff; border: var(--bw) solid var(--ink); font-family: var(--display); font-weight: 900; font-size: 2.6rem; box-shadow: var(--hard-sm); transform: rotate(-6deg); }
.lc-body { flex: 1; display: grid; gap: 8px; }
.lc-body small { font-size: .7rem; font-weight: 800; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); }
.lc-body h3 { font-family: var(--display); font-weight: 900; font-size: 2rem; text-transform: uppercase; letter-spacing: -.04em; }
.xpbar { height: 14px; border: 2px solid var(--ink); border-radius: 99px; background: var(--paper); overflow: hidden; }
.xpbar div { height: 100%; background: var(--red); border-right: 2px solid var(--ink); }
.stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.stat { padding: 16px 10px; text-align: center; display: grid; align-content: center; }
.stat strong { font-family: var(--display); font-weight: 900; font-size: 1.7rem; letter-spacing: -.04em; }
.stat small { font-size: .7rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.ladder { display: grid; grid-template-columns: repeat(8, 1fr); gap: 6px; }
.rung { border: 2px solid var(--ink); border-radius: 10px; padding: 8px 6px; text-align: center; background: var(--card); display: grid; gap: 2px; }
.rung b { font-family: var(--display); font-weight: 900; }
.rung span { font-size: .74rem; font-weight: 800; }
.rung small { font-size: .64rem; color: var(--muted); font-weight: 700; }
.rung.done { background: var(--ink); color: var(--card); }
.rung.done small { color: rgba(255, 250, 240, .6); }
.rung.cur { background: var(--yellow); box-shadow: var(--hard-sm); transform: translateY(-3px); }
.ach-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 10px; }
.ach { display: flex; gap: 12px; align-items: center; border: 2px dashed var(--ink); border-radius: var(--radius-sm); padding: 10px 12px; opacity: .55; }
.ach b { display: block; font-size: .92rem; }
.ach small { font-size: .8rem; color: var(--ink-2); }
.ach-ico { flex: none; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; border: 2px solid var(--ink); font-weight: 900; background: var(--paper-2); }
.ach.on { opacity: 1; border-style: solid; background: var(--card); box-shadow: var(--hard-sm); }
.ach.on .ach-ico { background: var(--yellow); }
.records { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; }
.record { display: flex; align-items: center; gap: 10px; text-decoration: none; border: 2px solid var(--ink); border-radius: var(--radius-sm); padding: 10px 12px; background: var(--card); font-weight: 700; }
.record:hover { background: #fff4d4; }
.rc-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--c); border: 2px solid var(--ink); flex: none; }
.record b { margin-left: auto; font-family: var(--display); }

/* ---------- Comptes, rànquing i duels ---------- */
.hud-item strong small { font-family: var(--sans); font-size: .62rem; font-weight: 800; color: var(--muted); margin-left: 4px; }
.online-off { text-align: center; padding: 40px 26px; display: grid; justify-items: center; gap: 12px; }
.online-off .gc-icon { width: 72px; height: 72px; border-radius: 20px; transform: rotate(-5deg); box-shadow: var(--hard); }
.online-off .gc-icon svg { width: 36px; height: 36px; }
.online-off h3 { font-family: var(--display); font-weight: 900; text-transform: uppercase; font-size: clamp(1.4rem, 4vw, 2rem); letter-spacing: -.04em; }
.online-off p { color: var(--ink-2); max-width: 48ch; }
.online-off.invite .avatar { box-shadow: var(--hard-sm); }
.google-btn { background: #fff; gap: 10px; }

.account-card { display: flex; align-items: center; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.account-card .ac-ico { flex: none; width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; font-size: 1.6rem; background: var(--blue); color: #fff; border: var(--bw) solid var(--ink); }
.account-card.off .ac-ico { background: var(--paper-2); color: var(--ink); }
.ac-body { flex: 1; min-width: 200px; }
.ac-body b { font-family: var(--display); font-weight: 800; font-size: 1.05rem; letter-spacing: -.02em; }
.ac-body p { color: var(--ink-2); font-size: .92rem; }
.synced { color: var(--ok); font-weight: 800; }
.synced::before { content: "● "; }

.lb { display: grid; gap: 6px; }
.lb-row { display: flex; align-items: center; gap: 12px; padding: 8px 14px; border: 2px solid var(--ink); border-radius: var(--radius-sm); background: var(--card); }
.lb-row.me { background: #fff4d4; box-shadow: var(--hard-sm); }
.lb-pos { font-family: var(--display); font-weight: 900; width: 26px; text-align: center; }
.lb-row:nth-child(1) .lb-pos { color: var(--red); }
.lb-name { flex: 1; font-weight: 800; line-height: 1.15; }
.lb-name small { display: block; font-weight: 600; color: var(--muted); font-size: .75rem; }
.lb-row strong { font-family: var(--display); font-weight: 800; font-size: .9rem; }

.duel-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 22px; }
.duel-steps div { display: flex; gap: 10px; align-items: start; font-weight: 600; font-size: .92rem; color: var(--ink-2); }
.duel-steps b { flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--ink); color: var(--yellow); font-family: var(--display); }
.duel-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.duel-card { display: grid; gap: 10px; align-content: start; }
.duel-card h3 { font-family: var(--display); font-weight: 900; text-transform: uppercase; font-size: 1.6rem; letter-spacing: -.04em; text-shadow: 3px 3px 0 var(--red); }
.duel-card .btn { justify-self: start; margin-top: 6px; }
.join-form { display: flex; gap: 10px; margin-top: 6px; }
.join-form input { font-family: var(--display); font-weight: 900; font-size: 1.4rem; letter-spacing: .25em; text-transform: uppercase; text-align: center; }
.duel-list { display: grid; gap: 8px; }
.duel-row { display: flex; align-items: center; gap: 12px; text-decoration: none; padding: 10px 14px; border: 2px solid var(--ink); border-radius: var(--radius-sm); background: var(--card); }
.duel-row:hover { background: #fff4d4; }
.dr-name { flex: 1; font-weight: 800; line-height: 1.15; }
.dr-name small { display: block; font-weight: 600; color: var(--muted); font-size: .74rem; }
.dr-score { font-family: var(--display); font-weight: 900; }
.dr-tag { font-size: .7rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; padding: 3px 9px; border-radius: 6px; border: 2px solid var(--ink); background: var(--paper); }
.dr-tag.win { background: var(--ok); color: #fff; }
.dr-tag.lose { background: var(--ko); color: #fff; }
.dr-tag.live { background: var(--yellow); }

.waiting-room { text-align: center; display: grid; justify-items: center; gap: 12px; padding: 36px 24px; }
.waiting-room h3 { font-family: var(--display); font-weight: 800; font-size: 1.3rem; letter-spacing: -.03em; }
.code-tiles { display: flex; gap: 8px; margin: 8px 0; }
.code-tiles span {
  width: clamp(40px, 10vw, 60px); height: clamp(52px, 13vw, 76px); display: grid; place-items: center;
  font-family: var(--display); font-weight: 900; font-size: clamp(1.5rem, 5vw, 2.4rem);
  background: var(--card); border: var(--bw) solid var(--ink); border-radius: 12px; box-shadow: var(--hard-sm);
}
.code-tiles span:nth-child(odd) { transform: rotate(-3deg); }
.code-tiles span:nth-child(even) { transform: rotate(2deg); background: var(--yellow); }
.waiting-dots { font-weight: 800; color: var(--ink-2); }
.waiting-dots span { animation: blink 1.2s infinite; }
.waiting-dots span:nth-child(2) { animation-delay: .2s; }
.waiting-dots span:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 50% { opacity: 0; } }

.scoreboard { display: grid; gap: 18px; text-align: center; }
.duel-banner {
  justify-self: center; font-family: var(--display); font-weight: 900; text-transform: uppercase; font-size: clamp(1.6rem, 5vw, 2.4rem);
  letter-spacing: -.04em; padding: 6px 18px; border: var(--bw) solid var(--ink); border-radius: 12px; background: var(--yellow);
  box-shadow: var(--hard); transform: rotate(-2deg);
}
.duel-banner.win { background: var(--ok); color: #fff; }
.duel-banner.lose { background: var(--ko); color: #fff; }
.sb-players { display: grid; grid-template-columns: 1fr auto 1fr; gap: 14px; align-items: center; }
.sb-player { display: grid; justify-items: center; gap: 6px; padding: 18px 12px; border: 2px solid var(--ink); border-radius: var(--radius); background: var(--paper); }
.sb-player.me { background: #fff4d4; }
.sb-player strong { font-family: var(--display); font-weight: 900; font-size: 2.4rem; line-height: 1; text-shadow: 3px 3px 0 var(--red); }
.sb-player small { font-size: .78rem; font-weight: 700; color: var(--ink-2); }
.sb-bar { width: 100%; height: 10px; border: 2px solid var(--ink); border-radius: 99px; background: var(--card); overflow: hidden; }
.sb-bar div { height: 100%; background: var(--blue); transition: width .4s var(--ease); }
.sb-vs { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; background: var(--red); color: #fff; font-family: var(--display); font-weight: 900; border: var(--bw) solid var(--ink); transform: rotate(-10deg); }

/* ---------- Barra inferior (mòbil): vidre líquid ---------- */
.tabbar { display: none; }

/* ---------- Toast i confeti ---------- */
.toast {
  position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 160%);
  background: var(--ink); color: var(--card); border: var(--bw) solid var(--ink); box-shadow: 4px 4px 0 var(--red);
  padding: 11px 20px; border-radius: 12px; font-weight: 800; z-index: 60;
  white-space: nowrap; opacity: 0; visibility: hidden;
  transition: transform .4s var(--ease), opacity .3s, visibility 0s .4s;
}
.toast.show { transform: translate(-50%, 0); opacity: 1; visibility: visible; transition: transform .4s var(--ease), opacity .3s; }
.toast.ach { background: var(--yellow); color: var(--ink); box-shadow: 4px 4px 0 var(--ink); }
.toast.ach::before { content: "★ "; }
.toast.level { background: var(--red); color: #fff; box-shadow: 4px 4px 0 var(--ink); }
#confetti { position: fixed; inset: 0; pointer-events: none; z-index: 70; width: 100%; height: 100%; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; gap: 20px; padding-bottom: 40px; }
  .hero-art { max-width: 520px; width: 100%; justify-self: center; }
  .game-card.featured { grid-column: auto; }
  .nav { display: none; }
  .profile-top { grid-template-columns: 1fr; }
  .ladder { grid-template-columns: repeat(4, 1fr); }

  .toast { bottom: 96px; }
  body.playing .tabbar { display: none; }
}

@media (max-width: 560px) {
  main { padding: 24px 16px 120px; }
  .topbar-inner { padding: 8px 14px; gap: 10px; }
  .brand-name { font-size: 1rem; }
  .level-text small { display: none; }
  .sound-btn { width: 36px; height: 36px; }
  .card { padding: 18px; box-shadow: 4px 4px 0 var(--ink); }
  .stage-head { flex-wrap: wrap; }
  .stage-title h2 { font-size: 1.35rem; }
  .hud { width: 100%; }
  .hud-item { flex: 1; }
  .stamp { width: 96px; height: 96px; top: -14px; }
  .stamp b { font-size: 1.5rem; }
  .cd-grid span { font-size: 1.6rem; }
  .choices.two { grid-template-columns: 1fr; }
  .versus { grid-template-columns: 1fr; }
  .vs-mid { grid-auto-flow: column; justify-content: center; }
  .vs-card { min-height: 0; padding: 18px 14px; }
  .hondt-config { grid-template-columns: 1fr 1fr 1fr; }
  .h-party { grid-template-columns: 1fr 104px 30px; }
  .h-row { grid-template-columns: 10px 1fr auto; }
  .h-row .h-truth { grid-column: 3; }
  .sim-bar { grid-template-columns: 84px 1fr 34px; }
  .hemi-center strong { font-size: 1.8rem; }
  .hemi-center small { font-size: .56rem; }
  .match { grid-template-columns: 1fr; }
  .people { grid-template-columns: 1fr 1fr; }
  .person { font-size: .78rem; }
  .person .av { width: 32px; height: 32px; }
  .stat-grid { grid-template-columns: repeat(3, 1fr); }
  .panel { padding: 18px; }
  .swipe-zone { min-height: 250px; }
  .count-in span { font-size: 7rem; }
  .account-btn span { display: none; }
  .account-btn { padding: 0 9px; }
  .duel-steps, .duel-grid { grid-template-columns: 1fr; }
  .sb-players { grid-template-columns: 1fr; }
  .sb-vs { justify-self: center; }
  .brand-name { font-size: .82rem; white-space: nowrap; }
  .brand-mark { width: 32px; height: 32px; }
  .level-text strong { white-space: nowrap; }
  .level-chip { padding-right: 10px; }
}

@media (max-width: 430px) {
  .level-text { display: none; }
  .level-chip { padding: 4px; }
  .top-actions { gap: 6px; }
  .topbar-inner { gap: 8px; }
}
/* Mòbils molt estrets (320 px): la capçalera hi ha de cabre sencera */
@media (max-width: 350px) {
  .topbar-inner { padding: 8px 10px; gap: 6px; }
  .brand { gap: 6px; }
  .brand-mark { width: 28px; height: 28px; }
  .brand-mark svg { width: 24px; height: 24px; }
  .brand-name { font-size: .7rem; }
  .top-actions { gap: 4px; }
  .sound-btn { width: 32px; height: 32px; }
  .account-btn { padding: 0 7px; }
}

@media (max-width: 900px) {
  .featured-row { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .game-card.featured { flex-direction: column; }
  .game-card.featured .gc-art svg { max-height: 150px; }
  .game-card.featured .gc-art { flex: none; height: 190px; border-right: 0; border-bottom: var(--bw) solid var(--ink); }
  .gc-art svg { max-height: 96px; margin-top: 12px; }
  .games-grid { grid-template-columns: 1fr 1fr; gap: 14px; }
  .gc-art { height: 118px; }
  .gc-body { padding: 10px 12px 12px; }
  .gc-title { font-size: 1rem; }
  .gc-tag { font-size: .8rem; }
  .gc-meta { padding-right: 0; }
  .gc-chip.soft, .gc-best { display: none; }
  .game-card > .gc-play { width: 32px; height: 32px; right: 10px; bottom: 10px; }
  .game-card.featured .gc-meta { padding-right: 54px; }
  .group-head p { width: 100%; order: 3; font-size: .88rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* =========================================================
   Portada: repte diari protagonista
   ========================================================= */
.home-hero { display: grid; grid-template-columns: .85fr 1.25fr; gap: 36px; align-items: center; padding: 6px 0 40px; }
.hh-copy .kicker { margin-bottom: 18px; }
.hh-copy .hero-title { font-size: clamp(2.4rem, 5.2vw, 4.6rem); }

.daily-hero {
  position: relative; overflow: hidden; color: var(--card);
  background:
    radial-gradient(circle, rgba(255, 250, 240, .07) 1px, transparent 1.6px) 0 0 / 12px 12px,
    radial-gradient(120% 90% at 100% 0%, rgba(123, 63, 228, .55), transparent 60%),
    var(--ink);
  border: var(--bw) solid var(--ink); border-radius: 24px;
  box-shadow: 8px 8px 0 var(--red);
  padding: 22px 24px 24px;
  animation: cardIn .5s var(--ease) both;
}
.dh-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: .78rem; font-weight: 700; }
.dh-badge {
  background: var(--yellow); color: var(--ink); border-radius: 8px; padding: 4px 10px;
  font-family: var(--display); font-weight: 800; font-size: .74rem; letter-spacing: .02em; text-transform: uppercase; transform: rotate(-2deg);
}
.dh-badge b { font-weight: 900; }
.dh-date { opacity: .8; }
.dh-next { margin-left: auto; opacity: .75; }
.dh-next b { font-family: var(--display); font-variant-numeric: tabular-nums; color: var(--yellow); opacity: 1; }
.dh-main { display: grid; grid-template-columns: 1.05fr 1fr; gap: 24px; margin-top: 18px; align-items: center; }
.dh-title {
  font-family: var(--display); font-weight: 900; text-transform: uppercase; letter-spacing: -.045em; line-height: .95;
  font-size: clamp(1.8rem, 2.9vw, 2.6rem); display: grid;
}
.dh-title span { color: var(--yellow); text-shadow: 3px 3px 0 var(--red); }
.dh-sub { margin-top: 12px; color: rgba(255, 250, 240, .78); font-size: .98rem; max-width: 36ch; }
.dh-sub b { color: var(--yellow); }
.dh-cta {
  margin-top: 20px; position: relative;
  background: var(--yellow); color: var(--ink); border-color: var(--card);
  font-family: var(--display); font-weight: 800; font-size: 1.05rem; padding: 16px 26px; border-radius: 16px;
  box-shadow: 0 0 0 0 rgba(255, 207, 61, .6), 4px 4px 0 var(--red);
  animation: ctaPulse 2.2s infinite;
}
.dh-cta:hover { box-shadow: 0 0 0 0 rgba(255, 207, 61, .6), 6px 6px 0 var(--red); }
@keyframes ctaPulse { 0% { box-shadow: 0 0 0 0 rgba(255, 207, 61, .55), 4px 4px 0 var(--red); } 70% { box-shadow: 0 0 0 16px rgba(255, 207, 61, 0), 4px 4px 0 var(--red); } 100% { box-shadow: 0 0 0 0 rgba(255, 207, 61, 0), 4px 4px 0 var(--red); } }
.dh-play { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--ink); color: var(--yellow); font-size: .7rem; }
.dh-kicker { font-size: .74rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--yellow); }
.dh-time {
  font-family: var(--display); font-weight: 900; font-size: clamp(3rem, 7vw, 4.6rem); line-height: 1; letter-spacing: -.05em;
  color: var(--card); text-shadow: 4px 4px 0 var(--red); margin-top: 6px; font-variant-numeric: tabular-nums;
}
.daily-hero .row .btn:not(.primary) { background: transparent; color: var(--card); border-color: var(--card); box-shadow: 3px 3px 0 var(--card); }
.dh-slots { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.dh-slots li {
  display: grid; gap: 3px; justify-items: center; text-align: center;
  padding: 10px 4px 8px; border-radius: 12px;
  background: rgba(255, 250, 240, .06); border: 1.5px solid rgba(255, 250, 240, .22);
  animation: cardIn .45s var(--ease) both; animation-delay: calc(var(--i) * 40ms + 150ms);
}
.dh-slots b { font-family: var(--display); font-weight: 900; font-size: 1rem; color: var(--yellow); }
.dh-slots span { font-size: .64rem; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; opacity: .85; }
.dh-slots li.ok { background: rgba(15, 157, 88, .35); border-color: #3ad187; }
.dh-slots li.ko { background: rgba(215, 38, 61, .35); border-color: #ff6b7d; }
.dh-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
.dh-stats div { border-radius: 12px; padding: 8px 12px; background: rgba(255, 250, 240, .08); }
.dh-stats small { display: block; font-size: .62rem; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; opacity: .7; }
.dh-stats strong { font-family: var(--display); font-weight: 800; font-size: 1.05rem; }

/* Banda del Congrés i compte enrere */
.congress-band { display: grid; grid-template-columns: 1.15fr 1fr; gap: 32px; align-items: center; padding: 10px 0 48px; }
.band-side { display: grid; gap: 14px; }
.band-side .countdown-card { margin: 0; width: 100%; }

/* =========================================================
   Repte diari: en joc i resultat
   ========================================================= */
.daily-clock {
  font-family: var(--display); font-weight: 900; font-size: 1.15rem; font-variant-numeric: tabular-nums;
  background: var(--ink); color: var(--yellow); border-radius: 10px; padding: 4px 10px; box-shadow: 2px 2px 0 var(--red);
}
.choices.binary .choice { justify-content: center; text-align: center; min-height: 64px; font-size: 1.05rem; }
.choices.binary .choice .key { display: none; }
.q-text.small { font-size: 1rem; color: var(--ink-2); }
.match-q { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 4px; }
.match-q b { font-family: var(--display); font-weight: 800; font-size: 1.3rem; letter-spacing: -.03em; }
.mq-plus { font-family: var(--display); font-weight: 900; color: var(--red); font-size: 1.4rem; }
.mq-concept { font-weight: 800; font-size: 1.05rem; background: var(--yellow); border: 2px solid var(--ink); border-radius: 10px; padding: 6px 12px; transform: rotate(-1.5deg); }
.daily-share { display: grid; justify-items: center; gap: 12px; margin-top: 22px; }
.daily-share .btn { min-width: 220px; }
.share-grid { font-size: 1.5rem; letter-spacing: 3px; line-height: 1; }
#daily-rank:not(:empty) { margin-top: 22px; text-align: left; }
.src-link { justify-self: start; font-size: .82rem; font-weight: 800; color: var(--blue); }
/* Repte diari: proves noves (ordena, mapa, número, llei d'Hondt) */
.dmec { margin-top: 14px; display: grid; gap: 12px; }
.dmec-hint { margin: 6px 0 0; font-size: .82rem; font-weight: 600; color: var(--muted); }
.ord { display: grid; gap: 10px; }
.ord-i { --pc: var(--ink); position: relative; display: flex; align-items: center; gap: 12px; text-align: left; cursor: pointer; background: var(--card); border: var(--bw) solid var(--ink); border-left: 10px solid var(--pc); border-radius: var(--radius-sm); padding: 12px 14px; font: inherit; font-weight: 700; color: var(--ink); box-shadow: var(--hard-sm); transition: transform .1s var(--ease), background .15s; }
.ord-i em { flex: none; min-width: 30px; height: 30px; padding: 0 6px; border-radius: 99px; display: grid; place-items: center; font-style: normal; font-family: var(--display); font-weight: 900; font-size: .8rem; border: 2px dashed var(--ink); color: var(--ink); }
.ord-i span { flex: 1; min-width: 0; }
.ord-i small { flex: none; font-weight: 800; color: var(--ink-2); }
.ord-i.on { background: #fff4d4; }
.ord-i.on em { border-style: solid; background: var(--ink); color: var(--yellow); }
.ord-i.ok { background: var(--ok-soft); }
.ord-i.ok em { background: var(--ok); border-color: var(--ok); color: #fff; }
.ord-i.ko { background: var(--ko-soft); animation: shake .4s; }
.ord-i.ko em { background: var(--ko); border-color: var(--ko); color: #fff; }
.ord-i:hover:not(:disabled) { transform: translate(-1px, -1px); }
.ord-i:disabled { cursor: default; }
.dmap { max-width: 560px; justify-self: center; width: 100%; }
.dmap .sim-pg-n { display: none; }
.gss { display: grid; justify-items: center; gap: 12px; padding: 6px 0; }
.gss-n { font-family: var(--display); font-weight: 900; font-size: 3.2rem; line-height: 1; font-variant-numeric: tabular-nums; }
.gss-r { width: min(440px, 100%); accent-color: var(--red); height: 28px; }
.gss-b { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.gss-b .btn { min-width: 56px; }
.gss-res { margin: 0; padding: 10px 14px; border-radius: 12px; font-weight: 700; font-size: .92rem; text-align: center; }
.gss-res.ok { background: var(--ok-soft); }
.gss-res.ko { background: var(--ko-soft); }
/* Dibuixa-ho: mapa sense províncies per encerclar-hi un territori */
.ddraw { display: grid; gap: 10px; justify-items: center; }
.ddraw-map { width: 100%; max-width: 560px; max-height: min(62vh, 520px); border: var(--bw) solid var(--ink); border-radius: var(--radius-sm); background: #cfe6f2; touch-action: none; cursor: crosshair; user-select: none; -webkit-user-select: none; }
.ddraw-bg { fill: #e6dcc6; stroke: #c9bc9f; stroke-width: 1; }
.ddraw-es { fill: #fffaf0; stroke: #fffaf0; stroke-width: 1.2; stroke-linejoin: round; }
.ddraw-t { opacity: .72; }
.ddraw-t path { fill: #22b866; stroke: #22b866; stroke-width: 1.2; stroke-linejoin: round; }
.ddraw-u path { fill: var(--red); fill-opacity: .28; stroke: var(--red); stroke-width: 2.4; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.done .ddraw-u path { fill: none; stroke-dasharray: 5 4; }
.ddraw-live { fill: none; stroke: var(--red); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.ddraw-b { display: flex; gap: 10px; justify-content: center; }
.ddraw-b [data-ok] { min-width: 180px; }
.ddraw .gss-res { max-width: 560px; }
@media (max-width: 480px) {
  .gss-n { font-size: 2.6rem; }
}

/* Repte diari: ratxa, comodí i calendari */
.dstreak { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 0 auto 14px; max-width: 560px; padding: 10px 14px; border: 2px solid var(--ink); border-radius: 14px; background: #fff4d4; text-align: left; }
.dstreak.risk { background: #e6f4fb; }
.dstreak-f { font-size: 1.8rem; line-height: 1; }
.dstreak > div { flex: 1; min-width: 180px; display: grid; gap: 2px; }
.dstreak b { font-family: var(--display); font-weight: 900; font-size: 1.05rem; }
.dstreak small { font-size: .82rem; font-weight: 600; color: var(--ink-2); }
.dstreak-ice { flex: none; font-size: .78rem; font-weight: 800; padding: 4px 10px; border-radius: 99px; background: #dcebf3; border: 1.5px solid #7bb6e0; }
.dstreak-ice.used { background: var(--paper-2); border-color: var(--paper-2); color: var(--muted); }
.dcal { max-width: 360px; margin: 18px auto 0; padding: 12px; border: 2px solid var(--ink); border-radius: 14px; background: var(--card); }
.dcal-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.dcal-h b { font-family: var(--display); font-weight: 800; font-size: .9rem; }
.dcal-h button { width: 32px; height: 32px; border-radius: 8px; border: 2px solid var(--ink); background: var(--card); font: 800 1.1rem var(--sans); cursor: pointer; color: var(--ink); }
.dcal-h button:disabled { opacity: .3; cursor: default; }
.dcal-g { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.dcal-g > b { font-size: .64rem; font-weight: 800; color: var(--muted); text-align: center; text-transform: uppercase; }
.dcal-g > i { aspect-ratio: 1; display: grid; place-items: center; border-radius: 8px; font-style: normal; font-size: .78rem; font-weight: 700; color: var(--ink-2); background: var(--paper); }
.dcal-g > i:empty { background: none; }
.dcal-g > i.on { background: var(--ok); color: #fff; font-weight: 900; }
.dcal-g > i.mid { background: var(--yellow); color: var(--ink); font-weight: 900; }
.dcal-g > i.ice { background: #dcebf3; }
.dcal-g > i.today { box-shadow: inset 0 0 0 2.5px var(--ink); }
.dcal-g > i.fut { opacity: .45; }
.dcal-g > i.vote { background: var(--red); color: #fff; opacity: 1; }
.dcal-wrap { max-width: 360px; margin: 0 auto 14px; }
.dcal-wrap summary { cursor: pointer; font-weight: 800; font-size: .88rem; text-align: center; }
.dcal-wrap .dcal { margin-top: 8px; }
.dcal .dcal-l { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 4px 8px; margin: 10px 0 0; font-size: .7rem; font-weight: 700; color: var(--muted); }
.dcal .dcal-l span { width: 12px; height: 12px; border-radius: 4px; display: inline-block; }
.dcal-l .on { background: var(--ok); }
.dcal-l .mid { background: var(--yellow); }
.dcal-l .ice { background: #dcebf3; border: 1px solid #7bb6e0; }

/* Repte diari: resultat, compartir i comparació amb la resta */
.daily-streak-res { margin: 0; font-size: 1rem; }
.daily-share-btns { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.dsoc { display: grid; gap: 10px; margin-bottom: 18px; }
.dsoc:empty { display: none; }
.dsoc-pct { display: flex; align-items: center; gap: 14px; margin: 0; padding: 12px 14px; border: 2px solid var(--ink); border-radius: 14px; background: var(--ok-soft); }
.dsoc-pct b { font-family: var(--display); font-weight: 900; font-size: 1.8rem; flex: none; }
.dsoc-pct span { font-weight: 700; font-size: .9rem; }
.dsoc-hard { display: grid; gap: 4px; padding: 12px 14px; border: 2px solid var(--ink); border-radius: 14px; background: #fff4d4; }
.dsoc-hard small { font-size: .66rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--red); }
.dsoc-hard b { font-weight: 800; }
.dsoc-hard span { font-size: .88rem; font-weight: 600; color: var(--ink-2); }
.dsoc-lg { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0 10px; align-items: center; padding: 10px 14px; border: 2px solid var(--ink); border-radius: 14px; background: var(--card); color: var(--ink); text-decoration: none; }
.dsoc-lg span { font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dsoc-lg b { grid-row: span 2; font-family: var(--display); font-weight: 900; font-size: 1.4rem; }
.dsoc-lg small { font-size: .78rem; color: var(--muted); font-weight: 600; }
@media (prefers-reduced-motion: reduce) { .ord-i.ko { animation: none; } }
/* Repte diari: silueta, aritmètica del Congrés i parelles */
.dshape { display: grid; place-items: center; margin: 12px auto 0; width: min(240px, 70%); aspect-ratio: 1; padding: 12px; border: 2px dashed color-mix(in srgb, var(--ink) 30%, transparent); border-radius: 18px; background: #dcebf3; }
.dshape svg { width: 100%; height: 100%; }
.dshape path { fill: var(--yellow); stroke: var(--ink); stroke-width: 1.5; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.coal { display: grid; gap: 12px; }
.coal-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.coal-p { --pc: var(--ink); display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border: 2px solid var(--ink); border-radius: 99px; background: var(--card); font: inherit; font-weight: 800; color: var(--ink); cursor: pointer; box-shadow: inset 6px 0 0 var(--pc); }
.coal-p small { font-family: var(--display); font-weight: 900; font-variant-numeric: tabular-nums; }
.coal-p.on { background: var(--pc); color: #fff; box-shadow: 2px 2px 0 var(--ink); }
.coal-p:disabled { opacity: .35; cursor: not-allowed; text-decoration: line-through; }
.coal-p.on:disabled { opacity: 1; text-decoration: none; }
.coal-bar { position: relative; height: 16px; border-radius: 99px; background: var(--paper-2); border: 2px solid var(--ink); overflow: hidden; }
.coal-bar i { display: block; height: 100%; width: 0; background: var(--ink); transition: width .25s var(--ease); }
.coal-bar u { position: absolute; top: -2px; bottom: -2px; left: calc(176 / 350 * 100%); width: 0; border-left: 3px dashed var(--red); }
.coal-sum { margin: 0; font-weight: 700; text-align: center; }
.coal-sum b { font-family: var(--display); font-size: 1.4rem; }
.coal-sum.ok { color: var(--ok); }
.coal > [data-ok] { justify-self: center; min-width: 200px; }
.prs { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.6fr); gap: 12px; }
.prs-c { display: grid; gap: 8px; align-content: start; }
.prs-l, .prs-r { --pc: transparent; font: inherit; text-align: left; padding: 10px 12px; border: 2px solid var(--ink); border-radius: 12px; background: var(--card); color: var(--ink); cursor: pointer; box-shadow: inset 8px 0 0 var(--pc); min-height: 48px; }
.prs-l b { font-family: var(--display); font-weight: 900; }
.prs-l.on { outline: 3px solid var(--pc); outline-offset: 2px; }
.prs-r { font-size: .88rem; font-weight: 700; }
.prs-r.ok { background: var(--ok-soft); }
.prs-r.ko { background: var(--ko-soft); }
@media (max-width: 480px) { .prs { grid-template-columns: minmax(0, .7fr) minmax(0, 1.6fr); gap: 8px; } .prs-r { font-size: .8rem; padding: 8px; } }

/* =========================================================
   Rànquing
   ========================================================= */
.rank-tabs { display: inline-flex; gap: 4px; padding: 4px; border: 2px solid var(--ink); border-radius: 999px; background: var(--card); margin-bottom: 18px; }
.rank-tab { border: 0; background: transparent; border-radius: 999px; padding: 7px 16px; font-weight: 800; cursor: pointer; }
.rank-tab.active { background: var(--ink); color: var(--card); }
.rank-tab:disabled { opacity: .4; cursor: default; }
.rank-off { text-align: center; display: grid; justify-items: center; gap: 10px; padding: 34px 24px; }
.rank-off .gc-icon { width: 66px; height: 66px; border-radius: 18px; transform: rotate(-5deg); box-shadow: var(--hard); }
.rank-off .gc-icon svg { width: 32px; height: 32px; }
.rank-off h3 { font-family: var(--display); font-weight: 900; text-transform: uppercase; letter-spacing: -.04em; font-size: clamp(1.2rem, 3.4vw, 1.7rem); }
.rank-off p { color: var(--ink-2); max-width: 52ch; }
.lb-name small { letter-spacing: 1px; }

/* =========================================================
   Match ideològic
   ========================================================= */
.match-game { display: grid; gap: 16px; }
.actor-card {
  display: flex; align-items: center; gap: 16px; padding: 16px 18px;
  background: var(--card); border: var(--bw) solid var(--ink); border-radius: var(--radius); box-shadow: 6px 6px 0 var(--ac);
}
.actor-txt { flex: 1; min-width: 0; }
.actor-txt small { font-size: .7rem; font-weight: 800; text-transform: uppercase; letter-spacing: .12em; color: var(--ink-2); }
.actor-txt h3 { font-family: var(--display); font-weight: 900; font-size: clamp(1.4rem, 4vw, 2rem); letter-spacing: -.04em; line-height: 1; }
.actor-count { font-family: var(--display); font-weight: 800; font-size: .85rem; background: var(--paper); border: 2px solid var(--ink); border-radius: 999px; padding: 3px 10px; }
.actor-ini {
  flex: none; width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center;
  background: var(--ac); color: #fff; border: var(--bw) solid var(--ink); box-shadow: 2px 2px 0 var(--ink);
  font-family: var(--display); font-weight: 900; font-size: 1rem; letter-spacing: -.03em; text-shadow: 1px 1px 0 rgba(0, 0, 0, .35);
}
.actor-ini.lg { width: 76px; height: 76px; font-size: 1.05rem; }
.actor-ini.sm { width: 40px; height: 40px; font-size: .7rem; }
.actor-photo { margin: 0; flex: none; display: grid; gap: 3px; justify-items: center; }
.actor-photo img { width: 76px; height: 76px; border-radius: 50%; object-fit: cover; border: var(--bw) solid var(--ink); }
.actor-photo.sm img { width: 40px; height: 40px; }
.actor-photo figcaption { font-size: .55rem; color: var(--muted); max-width: 110px; text-align: center; line-height: 1.2; }
.match-zone .swipe-hint.right { color: #e0306f; }
.match-card p { font-size: clamp(1.3rem, 3.6vw, 1.8rem); text-align: center; }
.match-card .sc-kicker { text-align: center; }
.match-yes { background: #e0306f !important; }
.match-marks { display: flex; flex-wrap: wrap; gap: 6px; }
.mm { display: inline-flex; align-items: center; gap: 6px; font-size: .8rem; font-weight: 700; border: 2px solid var(--ink); border-radius: 999px; padding: 3px 10px 3px 4px; background: var(--card); animation: pop .3s var(--ease); }
.mm b { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-size: .7rem; color: #fff; }
.mm.ok b { background: var(--ok); }
.mm.ko b { background: var(--ko); }

/* Enllaç al calendari (Aprèn) */
.cal-link {
  display: flex; align-items: center; gap: 14px; text-decoration: none; margin-bottom: 24px;
  background: var(--ink); color: var(--card); border-radius: var(--radius); padding: 14px 18px; box-shadow: 5px 5px 0 var(--red);
  transition: transform .15s var(--ease);
}
.cal-link:hover { transform: translate(-2px, -2px); }
.cal-ico { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--yellow); color: var(--ink); }
.cal-ico svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; }
.cal-link small { display: block; font-size: .7rem; font-weight: 800; text-transform: uppercase; letter-spacing: .12em; color: var(--yellow); }
.cal-link b { font-family: var(--display); font-weight: 800; font-size: 1.1rem; }
.cal-go { margin-left: auto; font-family: var(--display); font-size: 1.4rem; }

.svg-defs { position: absolute; width: 0; height: 0; overflow: hidden; }

/* =========================================================
   Portada en pantalles estretes
   ========================================================= */
@media (max-width: 900px) {
  .home-hero { grid-template-columns: 1fr; gap: 18px; padding-bottom: 28px; }
  .congress-band { grid-template-columns: 1fr; gap: 14px; }
  .hero-art { max-width: 520px; width: 100%; justify-self: center; }
}

@media (max-width: 600px) {
  .hh-copy .kicker { margin-bottom: 10px; font-size: .68rem; }
  .hh-copy .hero-title { font-size: 2.1rem; text-shadow: 3px 3px 0 var(--red); }
  .hh-copy .hero-title .hl { text-shadow: 3px 3px 0 var(--ink); }
  .hh-copy .lede { display: none; }
  .daily-hero { padding: 16px 16px 18px; border-radius: 20px; box-shadow: 5px 5px 0 var(--red); }
  .dh-next { margin-left: 0; width: 100%; }
  .dh-main { grid-template-columns: 1fr; gap: 16px; margin-top: 12px; }
  .dh-title { font-size: 2rem; }
  .dh-cta { width: 100%; justify-content: center; }
  .dh-slots { gap: 6px; }
  .dh-slots li { padding: 7px 2px 6px; }
  .dh-slots span { font-size: .52rem; }
  .actor-ini.lg, .actor-photo img { width: 58px; height: 58px; }
}

.join-form .name-input { font-family: var(--sans); font-size: 1rem; font-weight: 600; letter-spacing: 0; text-transform: none; text-align: left; }
.league { margin-top: 26px; display: grid; gap: 12px; }
.actor-ini.long { font-size: .74rem; letter-spacing: -.05em; }
.actor-ini.lg.long { font-size: .82rem; }
.actor-ini.sm.long { font-size: .5rem; }

/* =========================================================
   Graella de jocs: 4 columnes fixes, el destacat n'ocupa 2
   ========================================================= */
.games-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.games-grid .game-card.featured { grid-column: span 2; min-height: 0; }
#hero-days { color: var(--red); font-weight: 900; }

/* Bloc del repte diari, més net */
.dh-title { font-size: clamp(2rem, 3.4vw, 3rem); display: block; }
.dh-dots { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.dh-dots span {
  aspect-ratio: 1; display: grid; place-items: center; border-radius: 50%;
  font-family: var(--display); font-weight: 800; font-size: .9rem;
  border: 2px solid rgba(255, 250, 240, .28); color: rgba(255, 250, 240, .85);
  animation: cardIn .45s var(--ease) both; animation-delay: calc(var(--i) * 35ms + 120ms);
}
.dh-dots span.ok { background: #19b56b; border-color: #19b56b; color: #fff; }
.dh-dots span.ko { background: #e2384f; border-color: #e2384f; color: #fff; }
.dh-chips { display: flex; gap: 8px; margin-top: 12px; }
.dh-chips span { flex: 1; border-radius: 12px; padding: 7px 12px; background: rgba(255, 250, 240, .08); }
.dh-chips small { display: block; font-size: .6rem; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; opacity: .65; }
.dh-chips b { font-family: var(--display); font-weight: 800; font-size: 1rem; }

/* L'hemicicle es desplega quan entra a la vista */
.hero-hemi circle { animation: none; opacity: 0; }
.hero-hemi.play circle { animation: seatIn .55s var(--ease) both; animation-delay: var(--d); opacity: 1; }

/* =========================================================
   Aprèn: guia visual
   ========================================================= */
.learn { display: grid; gap: 0; }
.learn-hero { display: grid; grid-template-columns: 1.2fr .8fr; gap: 28px; align-items: end; padding: 6px 0 22px; }
.learn-hero .lede { margin-top: 14px; }
.learn-hero .countdown-card { margin: 0; width: 100%; }
.learn-nav {
  position: sticky; top: calc(64px + env(safe-area-inset-top)); z-index: 5; display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none;
  padding: 10px 0; margin-bottom: 8px; background: linear-gradient(var(--paper) 70%, transparent);
}
.learn-nav::-webkit-scrollbar { display: none; }
.learn-nav a {
  flex: none; text-decoration: none; font-weight: 800; font-size: .84rem;
  border: 2px solid var(--ink); border-radius: 999px; padding: 6px 13px; background: var(--card);
}
.learn-nav a:hover { background: var(--yellow); }
.learn-sec { padding: 34px 0 10px; scroll-margin-top: 120px; }
.ls-head { display: grid; grid-template-columns: auto 1fr; column-gap: 14px; align-items: center; margin-bottom: 20px; }
.ls-num {
  grid-row: span 2; width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center;
  background: var(--ink); color: var(--yellow); font-family: var(--display); font-weight: 900; font-size: 1.1rem; transform: rotate(-4deg);
  box-shadow: 3px 3px 0 var(--red);
}
.ls-head h2 { font-family: var(--display); font-weight: 900; text-transform: uppercase; letter-spacing: -.04em; font-size: clamp(1.4rem, 3.4vw, 2.1rem); line-height: 1; }
.ls-head p { color: var(--ink-2); font-weight: 600; }

/* 01 Xifres */
.num-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.num-tile {
  position: relative; overflow: hidden; display: grid; gap: 6px; align-content: start;
  background: var(--card); border: var(--bw) solid var(--ink); border-radius: var(--radius); box-shadow: 5px 5px 0 var(--nc);
  padding: 18px 18px 20px; animation: cardIn .5s var(--ease) both; animation-delay: calc(var(--i) * 50ms);
}
.num-tile::after { content: ""; position: absolute; right: -24px; top: -24px; width: 90px; height: 90px; border-radius: 50%; background: var(--nc); opacity: .16; }
.num-tile strong { font-family: var(--display); font-weight: 900; font-size: clamp(2.4rem, 5vw, 3.4rem); letter-spacing: -.05em; line-height: 1; color: var(--ink); text-shadow: 3px 3px 0 var(--nc); font-variant-numeric: tabular-nums; }
.num-tile span { font-weight: 700; color: var(--ink-2); font-size: .92rem; max-width: 24ch; }

/* 02 Congrés */
.learn .congress-band { padding: 0; }
.maj-box {
  display: grid; gap: 10px; justify-items: start;
  background: var(--ink); color: var(--card); border-radius: var(--radius); padding: 20px; box-shadow: 6px 6px 0 var(--blue);
}
.maj-box strong { font-family: var(--display); font-weight: 900; font-size: 3.4rem; line-height: 1; color: var(--yellow); text-shadow: 3px 3px 0 var(--red); }
.maj-box span { font-weight: 600; opacity: .9; }

/* 03 Com es vota */
.vote-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; counter-reset: s; }
.vote-step {
  position: relative; display: grid; gap: 6px; align-content: start;
  background: var(--card); border: var(--bw) solid var(--ink); border-radius: var(--radius); box-shadow: var(--hard-sm);
  padding: 0 14px 16px; overflow: hidden; animation: cardIn .5s var(--ease) both; animation-delay: calc(var(--i) * 60ms);
}
.vs-art { margin: 0 -14px 6px; height: 110px; display: grid; place-items: center; background: var(--dots) 0 0 / 9px 9px, var(--paper-2); border-bottom: 2px dashed var(--ink); }
.vs-art svg { width: 82%; height: 100px; }
.vs-n { position: absolute; top: 8px; left: 8px; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--red); color: #fff; font-family: var(--display); font-weight: 900; font-size: .85rem; border: 2px solid var(--ink); }
.vote-step h3 { font-family: var(--display); font-weight: 800; font-size: 1rem; letter-spacing: -.03em; line-height: 1.1; }
.vote-step p { font-size: .86rem; color: var(--ink-2); }

/* 04 Tipus de vot */
.vote-types { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.vtype { background: var(--card); border: var(--bw) solid var(--ink); border-radius: var(--radius); box-shadow: var(--hard); padding: 0 18px 18px; overflow: hidden; display: grid; gap: 6px; align-content: start; }
.vt-art { margin: 0 -18px 8px; height: 120px; display: grid; place-items: center; background: var(--vc); border-bottom: var(--bw) solid var(--ink); }
.vt-art svg { height: 104px; }
.vtype h3 { font-family: var(--display); font-weight: 900; text-transform: uppercase; letter-spacing: -.03em; font-size: 1.2rem; }
.vtype p { color: var(--ink-2); font-size: .9rem; }
.vtype ul { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 6px; }
.vtype li { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: .88rem; }
.vtype li i { flex: none; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-size: .75rem; color: #fff; border: 2px solid var(--ink); }
.vtype li.yes i { background: var(--ok); }
.vtype li.no i { background: var(--ko); }

/* 05 Vots i escons */
.hondt-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-bottom: 22px; }
.hstep { background: var(--card); border: var(--bw) solid var(--ink); border-radius: var(--radius); box-shadow: var(--hard-sm); padding: 0 16px 16px; overflow: hidden; display: grid; gap: 6px; align-content: start; }
.hs-art { margin: 0 -16px 6px; height: 120px; display: grid; place-items: center; background: var(--dots) 0 0 / 9px 9px, #fff4d4; border-bottom: 2px dashed var(--ink); }
.hs-art svg { height: 106px; width: 90%; }
.hstep h3 { font-family: var(--display); font-weight: 800; font-size: 1.05rem; letter-spacing: -.03em; }
.hstep p { font-size: .88rem; color: var(--ink-2); }
.learn .panel { margin-top: 0; }
.sim-seats { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 22px; }
.sim-seats i { width: 30px; height: 36px; border-radius: 7px; border: 2px solid var(--ink); box-shadow: 2px 2px 0 var(--ink); animation: pop .35s var(--ease) both; }

/* 06 Després */
.after-flow { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; position: relative; }
.after-flow::before { content: ""; position: absolute; left: 4%; right: 4%; top: 22px; border-top: 3px dashed var(--ink); }
.af { position: relative; display: grid; gap: 6px; align-content: start; justify-items: start; animation: cardIn .5s var(--ease) both; animation-delay: calc(var(--i) * 70ms); }
.af-k {
  position: relative; z-index: 1; font-family: var(--display); font-weight: 900; font-size: .8rem; text-transform: uppercase; letter-spacing: -.01em;
  background: var(--yellow); border: var(--bw) solid var(--ink); border-radius: 999px; padding: 9px 12px; box-shadow: 2px 2px 0 var(--ink); white-space: nowrap;
}
.af b { font-family: var(--display); font-weight: 800; font-size: .98rem; letter-spacing: -.03em; line-height: 1.15; margin-top: 6px; }
.af p { font-size: .84rem; color: var(--ink-2); }
.af.warn .af-k { background: var(--red); color: #fff; }

/* 07 Diccionari */
.dict-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.flip { --fc: var(--red); border: 0; padding: 0; background: none; cursor: pointer; perspective: 900px; height: 150px; text-align: left; }
.flip-in { position: relative; display: block; width: 100%; height: 100%; transition: transform .55s var(--ease); transform-style: preserve-3d; }
.flip.on .flip-in { transform: rotateY(180deg); }
.flip-front, .flip-back {
  position: absolute; inset: 0; display: grid; align-content: space-between; gap: 6px; padding: 14px;
  border: var(--bw) solid var(--ink); border-radius: var(--radius-sm); backface-visibility: hidden; -webkit-backface-visibility: hidden; box-shadow: var(--hard-sm);
}
.flip-front { background: var(--fc); color: var(--ink); }
.flip-front b { font-family: var(--display); font-weight: 900; font-size: 1.02rem; letter-spacing: -.03em; line-height: 1.05; text-transform: uppercase; overflow-wrap: anywhere; }
.flip-front small { font-size: .7rem; font-weight: 800; opacity: .75; }
.flip-back { background: var(--card); transform: rotateY(180deg); align-content: start; overflow: auto; }
.flip-back b { font-family: var(--display); font-weight: 800; font-size: .74rem; text-transform: uppercase; color: var(--ink-2); }
.flip-back span { font-size: .86rem; font-weight: 600; line-height: 1.35; }
.learn .cal-link { margin: 34px 0 0; }

/* Responsive */
@media (max-width: 1000px) {
  .vote-steps { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .after-flow { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 22px; }
  .after-flow::before { display: none; }
}
@media (max-width: 900px) {
  .games-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .learn-hero { grid-template-columns: 1fr; }
  .learn-nav { top: 56px; }
  .num-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .vote-types, .hondt-steps { grid-template-columns: 1fr; }
  .vt-art, .hs-art { height: 104px; }
}
@media (max-width: 600px) {
  .games-grid { gap: 14px; }
  .dh-title { font-size: 1.9rem; }
  .dh-dots { gap: 6px; }
  .dh-dots span { font-size: .78rem; }
  .vote-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .vote-step:last-child { grid-column: span 2; }
  .vs-art { height: 92px; }
  .vs-art svg { height: 84px; }
  .after-flow { grid-template-columns: 1fr; gap: 0; }
  .af { grid-template-columns: auto 1fr; column-gap: 12px; padding-bottom: 16px; border-left: 3px dashed var(--ink); margin-left: 14px; padding-left: 18px; }
  .af-k { grid-row: span 2; margin-left: -34px; align-self: start; }
  .af b { margin-top: 0; }
  .af p { grid-column: 2; }
  .num-tile { padding: 14px; }
  .num-tile span { font-size: .8rem; }
  .flip { height: 140px; }
  .dict-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ls-num { width: 44px; height: 44px; font-size: .95rem; }
}

.flip-front b { overflow-wrap: normal; word-break: normal; hyphens: manual; }
.flip-front b.long { font-size: .84rem; letter-spacing: -.04em; }
@media (max-width: 600px) {
  .hh-copy .k-date { display: none; }
  .flip-front b { font-size: .86rem; }
  .flip-front b.long { font-size: .66rem; }
}
@media (max-width: 600px) {
  .af-k { width: 112px; text-align: center; font-size: .68rem; padding: 8px 4px; }
}

/* =========================================================
   Aprèn: partits cara a cara
   ========================================================= */
.party-map { background: var(--card); border: var(--bw) solid var(--ink); border-radius: var(--radius); box-shadow: var(--hard); padding: 14px 14px 10px; }
.party-map svg { width: 100%; height: auto; display: block; }
.party-map .ax { font-family: var(--sans); font-weight: 800; font-size: 13px; fill: var(--ink-2); text-transform: uppercase; letter-spacing: .06em; }
.pm-dot { cursor: pointer; outline: none; }
.pm-dot circle:first-child { transition: transform .25s var(--ease); transform-box: fill-box; transform-origin: center; }
.pm-dot:hover circle:first-child, .pm-dot:focus-visible circle:first-child { transform: scale(1.12); }
.pm-lbl { font-family: var(--display); font-weight: 900; font-size: 13px; fill: #fff; paint-order: stroke; stroke: var(--ink); stroke-width: 3px; pointer-events: none; }
.pm-lbl.out { fill: var(--ink); stroke: var(--card); stroke-width: 4px; font-size: 12px; }
.pm-sel { font-family: var(--display); font-weight: 900; font-size: 11px; fill: var(--yellow); pointer-events: none; }
.pm-cap { font-size: .82rem; color: var(--ink-2); font-weight: 600; margin-top: 6px; }

.cmp-pick { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 16px; }
.pchip {
  display: inline-flex; align-items: center; gap: 7px; cursor: pointer;
  border: 2px solid var(--ink); background: var(--card); border-radius: 999px; padding: 5px 12px 5px 6px;
  font-weight: 800; font-size: .86rem; transition: .12s var(--ease);
}
.pchip i { width: 18px; height: 18px; border-radius: 50%; background: var(--pc); border: 2px solid var(--ink); }
.pchip b { background: var(--ink); color: var(--yellow); border-radius: 6px; padding: 0 6px; font-family: var(--display); font-size: .72rem; }
.pchip.on { background: color-mix(in srgb, var(--pc) 22%, var(--card)); box-shadow: 2px 2px 0 var(--ink); transform: translate(-1px, -1px); }

.cmp { display: grid; grid-template-columns: 1fr auto 1fr; gap: 14px; align-items: start; }
.cmp-vs { align-self: center; width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; background: var(--red); color: #fff; font-family: var(--display); font-weight: 900; border: var(--bw) solid var(--ink); transform: rotate(-10deg); box-shadow: var(--hard-sm); }
.cmp-col { background: var(--card); border: var(--bw) solid var(--ink); border-radius: var(--radius); box-shadow: 6px 6px 0 var(--pc); overflow: hidden; animation: cardIn .4s var(--ease) both; }
.cmp-head { display: grid; grid-template-columns: auto 1fr; column-gap: 10px; align-items: center; padding: 14px 16px; background: var(--dots) 0 0 / 9px 9px, var(--pc); border-bottom: var(--bw) solid var(--ink); color: #fff; }
.cmp-side { grid-row: span 2; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--ink); color: var(--yellow); font-family: var(--display); font-weight: 900; }
.cmp-head b { font-family: var(--display); font-weight: 900; font-size: 1.6rem; letter-spacing: -.04em; line-height: 1; text-shadow: 2px 2px 0 var(--ink); }
.cmp-head small { font-weight: 800; font-size: .78rem; text-shadow: 1px 1px 0 rgba(0, 0, 0, .35); }
.cmp-cand { display: flex; gap: 14px; align-items: center; padding: 16px; border-bottom: 2px dashed var(--ink); }
.cmp-cand small { font-size: .66rem; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.cmp-cand h4 { font-family: var(--display); font-weight: 800; font-size: 1.15rem; letter-spacing: -.03em; line-height: 1.1; margin: 2px 0 4px; }
.cmp-cand p { font-size: .85rem; color: var(--ink-2); }
.cmp-rows { margin: 0; padding: 4px 16px 14px; display: grid; }
.cmp-rows > div { padding: 10px 0; border-bottom: 1px solid #e2d6bd; display: grid; gap: 4px; }
.cmp-rows > div:last-child { border-bottom: 0; }
.cmp-rows dt { font-size: .66rem; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.cmp-rows dd { margin: 0; font-weight: 600; font-size: .92rem; }
.cmp-rows .big { font-family: var(--display); font-weight: 900; font-size: 1.5rem; letter-spacing: -.04em; }
.seatbar { position: relative; display: block; height: 12px; margin-top: 6px; border: 2px solid var(--ink); border-radius: 99px; background: var(--paper); overflow: hidden; }
.seatbar i { display: block; height: 100%; background: var(--pc); }
.seatbar em { position: absolute; top: -2px; bottom: -2px; left: calc(176 / 350 * 100%); width: 3px; background: var(--red); }
.cmp-rows .chips { display: flex; flex-wrap: wrap; gap: 5px; }
.cmp-rows .chips span { font-size: .78rem; font-weight: 800; border: 2px solid var(--ink); border-radius: 999px; padding: 2px 9px; background: color-mix(in srgb, var(--pc) 16%, var(--card)); }
.vbadge { display: inline-block; font-weight: 900; font-size: .82rem; border: 2px solid var(--ink); border-radius: 8px; padding: 3px 10px; }
.vbadge.yes { background: var(--ok); color: #fff; }
.vbadge.no { background: var(--ko); color: #fff; }
.vbadge.na { background: var(--paper-2); }

.pphoto { --pc: var(--ink); margin: 0; flex: none; display: grid; gap: 4px; justify-items: center; width: 84px; }
.pphoto img, .pphoto span { width: 84px; height: 84px; border-radius: 50%; object-fit: cover; object-position: center 22%; border: 3px solid var(--ink); box-shadow: 0 0 0 4px var(--pc); background: var(--paper-2); }
.pphoto.lg { width: 96px; }
.pphoto.lg img, .pphoto.lg span { width: 96px; height: 96px; }
.pphoto.ini span { display: grid; place-items: center; background: var(--pc); color: #fff; font-family: var(--display); font-weight: 900; font-size: 1.4rem; }
.pphoto figcaption { font-size: .52rem; line-height: 1.2; text-align: center; max-width: 110px; }
.pphoto figcaption a { color: var(--muted); text-decoration: none; }
.pphoto figcaption a:hover { text-decoration: underline; }

.sub-h { font-family: var(--display); font-weight: 900; text-transform: uppercase; letter-spacing: -.03em; font-size: 1.15rem; margin: 30px 0 14px; }
.cand-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.cand {
  position: relative; display: grid; justify-items: center; text-align: center; gap: 6px; align-content: start;
  background: var(--card); border: var(--bw) solid var(--ink); border-radius: var(--radius); box-shadow: 4px 4px 0 var(--pc);
  padding: 18px 14px 14px; animation: cardIn .45s var(--ease) both; animation-delay: calc(var(--i) * 30ms);
}
.cand-sig { font-family: var(--display); font-weight: 900; font-size: .74rem; background: var(--pc); color: #fff; border: 2px solid var(--ink); border-radius: 6px; padding: 2px 8px; text-shadow: 1px 1px 0 rgba(0, 0, 0, .35); }
.cand h4 { font-family: var(--display); font-weight: 800; font-size: 1rem; letter-spacing: -.03em; line-height: 1.1; }
.cand p { font-size: .8rem; color: var(--ink-2); }
.cand-cmp { padding: 6px 14px; font-size: .8rem; margin-top: 4px; }
.src-note { margin-top: 16px; font-size: .76rem; color: var(--muted); line-height: 1.5; }
.src-note a { color: var(--blue); font-weight: 700; }

@media (max-width: 760px) {
  .cmp { grid-template-columns: 1fr 1fr; gap: 10px; }
  .cmp-vs { display: none; }
  .cmp-head { padding: 10px; }
  .cmp-head b { font-size: 1.2rem; }
  .cmp-head small { display: none; }
  .cmp-side { grid-row: auto; width: 26px; height: 26px; font-size: .8rem; }
  .cmp-cand { flex-direction: column; text-align: center; padding: 12px 10px; gap: 8px; }
  .cmp-cand p { font-size: .76rem; }
  .cmp-cand h4 { font-size: .98rem; }
  .cmp-rows { padding: 2px 10px 10px; }
  .cmp-rows dd { font-size: .8rem; }
  .cmp-rows .big { font-size: 1.2rem; }
  .cmp-rows .chips span { font-size: .68rem; padding: 2px 7px; }
  .pphoto.lg, .pphoto { width: 72px; }
  .pphoto.lg img, .pphoto.lg span, .pphoto img, .pphoto span { width: 72px; height: 72px; }
  .cand-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .cand { padding: 14px 10px 12px; }
  .party-map { padding: 8px; }
  .party-map .ax { font-size: 15px; }
}

/* Argumentari dels partits */
.cmp-core { padding: 14px 16px; border-bottom: 2px dashed var(--ink); background: color-mix(in srgb, var(--pc) 8%, var(--card)); display: grid; gap: 6px; }
.cmp-core small { font-size: .66rem; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.cmp-core q { font-family: var(--display); font-weight: 800; font-size: 1.02rem; letter-spacing: -.025em; line-height: 1.25; quotes: "«" "»"; }
.cmp-core q::before, .cmp-core q::after { color: var(--pc); }
.cmp-core p { font-size: .86rem; color: var(--ink-2); }

.args { margin-top: 22px; background: var(--card); border: var(--bw) solid var(--ink); border-radius: var(--radius); box-shadow: var(--hard); overflow: hidden; }
.args-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 16px 18px; background: var(--ink); color: var(--card); }
.args-head h3 { font-family: var(--display); font-weight: 900; text-transform: uppercase; letter-spacing: -.03em; font-size: 1.1rem; }
.args-head p { font-weight: 800; display: flex; gap: 8px; align-items: center; }
.args-head span { background: var(--pc); color: #fff; border: 2px solid var(--card); border-radius: 6px; padding: 1px 8px; font-family: var(--display); font-size: .8rem; text-shadow: 1px 1px 0 rgba(0, 0, 0, .35); }
.args-row { display: grid; grid-template-columns: 190px 1fr 1fr; border-top: 2px solid var(--ink); }
.args-row:first-of-type { border-top: 0; }
.args-label { display: flex; align-items: center; gap: 10px; padding: 14px 16px; background: var(--paper); border-right: 2px solid var(--ink); font-weight: 800; font-size: .88rem; }
.args-label svg { width: 24px; height: 24px; flex: none; fill: none; stroke: var(--ink); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.args-cell { padding: 12px 16px; border-left: 4px solid var(--pc); display: grid; gap: 4px; align-content: start; }
.args-cell + .args-cell { border-left: 4px solid var(--pc); box-shadow: inset 2px 0 0 var(--ink); }
.args-cell b { font-family: var(--display); font-weight: 900; font-size: .7rem; color: var(--pc); text-transform: uppercase; filter: brightness(.8); }
.args-cell p { font-size: .9rem; font-weight: 500; line-height: 1.4; }
.args .src-note { padding: 10px 16px 14px; margin: 0; border-top: 2px solid var(--ink); }
@media (max-width: 760px) {
  .args-row { grid-template-columns: 1fr 1fr; }
  .args-label { grid-column: 1 / -1; border-right: 0; border-bottom: 2px dashed var(--ink); padding: 10px 12px; font-size: .82rem; }
  .args-cell { padding: 10px 10px; }
  .args-cell p { font-size: .8rem; }
  .cmp-core { padding: 10px; }
  .cmp-core q { font-size: .88rem; }
  .cmp-core p { font-size: .76rem; }
}

/* App: sense zoom per doble toc i sense el menú de previsualització d'enllaços en mantenir premut */
html { touch-action: manipulation; }
a, button, img, .tabbar, .game-card { -webkit-touch-callout: none; }
.tabbar, .tabbar *, .game-card, .btn, .choice { -webkit-user-select: none; user-select: none; }

/* =========================================================
   Duel 1 vs 1: Elecció de preguntes, marcador en viu, xat i icones
   ========================================================= */
.duel-live-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 12px 16px; margin-bottom: 14px; background: var(--card);
}
.dlb-side { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1; }
.dlb-side.them { justify-content: flex-end; text-align: right; }
.dlb-info { display: grid; gap: 4px; min-width: 0; }
.dlb-info.right { justify-items: end; }
.dlb-info b { font-family: var(--display); font-weight: 800; font-size: .86rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dlb-sub { font-size: .72rem; font-weight: 700; color: var(--muted); }
.dlb-vs {
  flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
  background: var(--red); color: #fff; font-family: var(--display); font-weight: 900; font-size: .72rem;
  border: 2px solid var(--ink); transform: rotate(-8deg);
}
.duel-mini-dots { display: flex; gap: 3px; flex-wrap: wrap; }
.duel-mini-dots i {
  width: 8px; height: 8px; border-radius: 2px; border: 1.5px solid var(--ink); background: var(--paper-2);
}
.duel-mini-dots i.ok { background: var(--ok); }
.duel-mini-dots i.ko { background: var(--ko); }

/* Fase d'elecció (1 per a tu, 1 per al rival) */
.draft-stage { display: grid; gap: 18px; text-align: center; padding: 24px 20px; }
.draft-head { display: grid; gap: 6px; justify-items: center; }
.draft-step-badge {
  display: inline-block; font-family: var(--display); font-weight: 900; font-size: .72rem;
  text-transform: uppercase; letter-spacing: .08em; background: var(--yellow); color: var(--ink);
  border: 2px solid var(--ink); border-radius: 99px; padding: 3px 12px; box-shadow: 2px 2px 0 var(--ink);
}
.draft-head h3 { font-family: var(--display); font-weight: 900; font-size: clamp(1.2rem, 3.2vw, 1.6rem); letter-spacing: -.03em; }
.draft-pair { display: grid; grid-template-columns: 1fr auto 1fr; gap: 14px; align-items: stretch; }
.draft-or {
  align-self: center; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center;
  background: var(--ink); color: var(--yellow); font-family: var(--display); font-weight: 900; font-size: .82rem;
}
.draft-card {
  display: flex; flex-direction: column; justify-content: space-between; gap: 12px; text-align: left;
  background: var(--paper); border: var(--bw) solid var(--ink); border-radius: var(--radius);
  padding: 18px; cursor: pointer; box-shadow: var(--hard-sm); transition: transform .15s var(--ease), box-shadow .15s var(--ease), background .15s;
}
.draft-card:hover { transform: translate(-2px, -2px); box-shadow: var(--hard); background: #fff4d4; }
.dc-cat {
  align-self: flex-start; font-size: .68rem; font-weight: 800; text-transform: uppercase; letter-spacing: .1em;
  background: var(--ink); color: var(--card); padding: 3px 9px; border-radius: 6px;
}
.dc-preview {
  font-family: var(--display); font-weight: 700; font-size: clamp(.95rem, 2.2vw, 1.12rem);
  line-height: 1.32; color: var(--ink); flex: 1; margin: 4px 0;
}
.dc-cta {
  display: block; text-align: center; font-family: var(--display); font-weight: 800; font-size: .82rem;
  padding: 9px 12px; border: 2px solid var(--ink); border-radius: 10px; background: var(--yellow); color: var(--ink);
  box-shadow: 2px 2px 0 var(--ink);
}
.dc-sub { display: block; text-align: center; font-size: .72rem; font-weight: 700; color: var(--muted); }
.draft-card.chosen-mine { background: var(--ok-soft); border-color: var(--ink); transform: scale(1.02); }
.draft-card.chosen-mine .dc-cta { background: var(--ok); color: #fff; }
.draft-card.chosen-rival { background: var(--ko-soft); opacity: .88; transform: scale(.97); }
.draft-card.chosen-rival .dc-cta { background: var(--red); color: #fff; }

/* Etiqueta d'origen a cada pregunta del duel */
.q-origin {
  display: inline-block; padding: 2px 8px; border-radius: 6px; border: 1.5px solid var(--ink);
  font-weight: 800; font-size: .66rem; letter-spacing: .06em; text-transform: uppercase; margin-left: 4px;
}
.q-origin.mine { background: var(--yellow); color: var(--ink); }
.q-origin.rival { background: var(--red); color: #fff; }

/* Avís de revenja */
.rematch-alert {
  display: flex; align-items: center; justify-content: center; gap: 12px; flex-wrap: wrap;
  padding: 12px 16px; border: var(--bw) solid var(--ink); border-radius: var(--radius-sm);
  background: #fff4d4; box-shadow: var(--hard-sm); animation: pop .3s var(--ease);
}

/* Xat i icones en directe */
.duel-social { margin-top: 16px; display: grid; gap: 10px; padding: 16px 18px; }
.ds-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.ds-emotes { display: flex; gap: 6px; flex-wrap: wrap; }
.ds-emote-btn {
  width: 38px; height: 38px; border-radius: 10px; border: 2px solid var(--ink); background: var(--paper);
  font-size: 1.25rem; display: grid; place-items: center; cursor: pointer; box-shadow: 2px 2px 0 var(--ink);
  transition: transform .1s var(--ease);
}
.ds-emote-btn:hover { transform: translate(-1px, -1px) scale(1.08); background: var(--yellow); }
.ds-emote-btn:active { transform: translate(1px, 1px); box-shadow: none; }
.ds-quick { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 2px; }
.ds-chip {
  flex: none; border: 1.5px solid var(--ink); border-radius: 99px; background: var(--paper);
  padding: 4px 11px; font-size: .76rem; font-weight: 800; cursor: pointer; white-space: nowrap;
}
.ds-chip:hover { background: var(--yellow); }
.ds-msgs {
  max-height: 170px; overflow-y: auto; display: grid; gap: 6px; padding: 10px;
  border: 2px solid var(--ink); border-radius: var(--radius-sm); background: var(--paper);
}
.ds-msg { display: flex; align-items: flex-start; gap: 8px; text-align: left; }
.ds-msg.me { flex-direction: row-reverse; text-align: right; }
.ds-bubble {
  max-width: 78%; padding: 6px 11px; border: 1.5px solid var(--ink); border-radius: 10px;
  background: var(--card); font-size: .85rem; line-height: 1.3;
}
.ds-msg.me .ds-bubble { background: #fff4d4; }
.ds-bubble b { display: block; font-size: .66rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.ds-form { display: flex; gap: 8px; }
.ds-form input { flex: 1; padding: 8px 12px; font-size: .9rem; }
.ds-form .btn { padding: 8px 16px; }

/* Bafarades flotants d'icones */
.duel-emote-layer {
  position: fixed; top: calc(76px + env(safe-area-inset-top)); right: 18px; z-index: 65; display: grid; gap: 8px; pointer-events: none;
}
.duel-emote-pop {
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px;
  background: var(--card); border: var(--bw) solid var(--ink); border-radius: 99px;
  box-shadow: var(--hard-sm); animation: emotePop 2.6s var(--ease) forwards;
}
.dep-name { font-family: var(--display); font-weight: 800; font-size: .8rem; }
.dep-ico { font-size: 1.7rem; line-height: 1; }
@keyframes emotePop {
  0% { transform: translateY(16px) scale(.7); opacity: 0; }
  14% { transform: translateY(0) scale(1.06); opacity: 1; }
  24% { transform: scale(1); opacity: 1; }
  82% { transform: translateY(0) scale(1); opacity: 1; }
  100% { transform: translateY(-18px) scale(.9); opacity: 0; }
}

@media (max-width: 640px) {
  .draft-pair { grid-template-columns: 1fr; gap: 10px; }
  .draft-or { width: 30px; height: 30px; font-size: .72rem; justify-self: center; }
  .duel-live-bar { padding: 10px 12px; }
  .dlb-info b { font-size: .76rem; }
}


/* Duel: barra en directe compartida, temporitzador d'elecció i resum de preguntes */
.dlb-side.them { flex-direction: row-reverse; }
.dlb-side.them .dlb-info { justify-items: end; }
.dlb-info b { display: flex; align-items: baseline; gap: 6px; }
.dlb-side.them .dlb-info b { flex-direction: row-reverse; }
.dlb-pts { background: var(--ink); color: var(--yellow); border-radius: 6px; padding: 0 6px; font-size: .78rem; }
.draft-head .qtimer { margin-top: 4px; }
.duel-qlist { margin-top: 18px; display: grid; gap: 6px; text-align: left; }
.dq { display: grid; grid-template-columns: 28px 1fr 28px; gap: 10px; align-items: center; padding: 8px 10px; border: 2px solid var(--ink); border-radius: var(--radius-sm); background: var(--paper); }
.dq b { display: block; font-size: .86rem; line-height: 1.3; }
.dq small { font-size: .72rem; color: var(--muted); font-weight: 600; }
.dq-n { font-family: var(--display); font-weight: 900; font-size: .8rem; text-align: center; }
.dq-r { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; border: 2px solid var(--ink); font-weight: 900; background: var(--paper-2); }
.dq.ok .dq-r { background: var(--ok); color: #fff; }
.dq.ko .dq-r { background: var(--ko); color: #fff; }
.result .duel-live-bar { margin: 16px 0 10px; text-align: left; }
.result .rematch-slot:not(:empty) { margin: 10px 0; }
/* Icona gegant que surt flotant pel mig de la pantalla */
.duel-emote-big { position: fixed; left: 50%; bottom: 18%; z-index: 66; font-size: 4.5rem; pointer-events: none; animation: emoteRise 1.8s var(--ease) forwards; }
@keyframes emoteRise {
  0% { transform: translate(-50%, 40px) scale(.4); opacity: 0; }
  20% { transform: translate(-50%, 0) scale(1.15); opacity: 1; }
  70% { opacity: 1; }
  100% { transform: translate(-50%, -220px) scale(1); opacity: 0; }
}
@media (max-width: 640px) {
  .duel-mini-dots i { width: 7px; height: 7px; }
  .dlb-side { gap: 6px; }
  .dlb-sub { font-size: .66rem; }
}

/* Comparador ampliat: cara a cara */
.stars { margin: 0; padding-left: 18px; display: grid; gap: 3px; }
.face { margin-top: 22px; background: var(--card); border: var(--bw) solid var(--ink); border-radius: var(--radius); box-shadow: var(--hard); overflow: hidden; }
.face-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 16px 18px; background: var(--ink); color: var(--card); }
.face-head h3 { font-family: var(--display); font-weight: 900; text-transform: uppercase; letter-spacing: -.03em; font-size: 1.1rem; }
.face-head p { font-weight: 800; display: flex; gap: 8px; align-items: center; }
.face-head span { background: var(--pc); color: #fff; border: 2px solid var(--card); border-radius: 6px; padding: 1px 8px; font-family: var(--display); font-size: .8rem; text-shadow: 1px 1px 0 rgba(0,0,0,.35); }
.face-grid { display: grid; grid-template-columns: 1fr 1fr; }
.face-card { padding: 16px 18px; display: grid; gap: 10px; align-content: start; }
.face-card + .face-card { border-left: 2px solid var(--ink); }
.face-card h4 { font-family: var(--display); font-weight: 800; font-size: .86rem; text-transform: uppercase; letter-spacing: .04em; }
.dist { display: flex; align-items: center; gap: 10px; }
.dist-bar { flex: 1; height: 14px; border: 2px solid var(--ink); border-radius: 99px; background: var(--paper-2); overflow: hidden; }
.dist-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--yellow), var(--red)); }
.fx small { font-size: .68rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.fx-track { position: relative; height: 38px; margin: 6px 12px 0; border-bottom: 2px solid var(--ink); background: linear-gradient(var(--ink), var(--ink)) 0 50% / 100% 2px no-repeat; }
.fx-track .lo, .fx-track .hi { position: absolute; bottom: -18px; font-size: .64rem; font-weight: 700; color: var(--muted); }
.fx-track .lo { left: 0; } .fx-track .hi { right: 0; }
.fx-dot { position: absolute; top: 50%; left: var(--v); width: 24px; height: 24px; margin: -12px 0 0 -12px; border-radius: 50%; background: var(--pc); border: 2px solid var(--ink); color: #fff; display: grid; place-items: center; font-style: normal; font-family: var(--display); font-weight: 900; font-size: .68rem; text-shadow: 1px 1px 0 rgba(0,0,0,.4); }
.fx:last-child { margin-bottom: 12px; }
.evo { display: grid; gap: 6px; }
.evo span { display: flex; align-items: center; gap: 8px; border-left: 4px solid var(--pc); padding-left: 8px; }
.evo em { font-style: normal; font-weight: 900; font-family: var(--display); font-size: .8rem; min-width: 52px; }
.delta { font-weight: 800; font-size: .8rem; padding: 0 6px; border-radius: 6px; border: 1.5px solid var(--ink); background: var(--paper-2); }
.delta.up { background: var(--ok); color: #fff; } .delta.down { background: var(--ko); color: #fff; }
.same { margin: 0; padding-left: 18px; display: grid; gap: 4px; font-size: .88rem; }
@media (max-width: 760px) {
  .face-grid { grid-template-columns: 1fr; }
  .face-card + .face-card { border-left: 0; border-top: 2px solid var(--ink); }
}

/* Pactòmetre */
.pacte { display: grid; gap: 16px; }
.pc-src, .news-filter { display: flex; gap: 8px; flex-wrap: nowrap; overflow-x: auto; padding: 2px 2px 8px; scrollbar-width: none; }
.pc-src::-webkit-scrollbar, .news-filter::-webkit-scrollbar { display: none; }
.pc-chip { flex: none; display: grid; text-align: left; border: 2px solid var(--ink); border-radius: 99px; background: var(--card); padding: 6px 14px; font-weight: 800; font-size: .82rem; cursor: pointer; box-shadow: 2px 2px 0 var(--ink); }
.pc-chip small { font-size: .62rem; font-weight: 700; color: var(--muted); }
.pc-chip.on { background: var(--ink); color: var(--card); }
.pc-chip.on small { color: var(--yellow); }
.pc-chip.custom { background: var(--yellow); }
.pc-chip.custom.on { background: var(--ink); }
.pc-main { background: var(--card); border: var(--bw) solid var(--ink); border-radius: var(--radius); box-shadow: var(--hard); padding: 18px; display: grid; gap: 14px; }
.pc-hemi { position: relative; max-width: 560px; width: 100%; margin: 0 auto; }
.pc-hemi svg { width: 100%; height: auto; display: block; }
.pc-hemi circle { transition: opacity .25s; }
.pc-hemi-num { position: absolute; left: 0; right: 0; bottom: 4%; text-align: center; display: grid; }
.pc-hemi-num b { font-family: var(--display); font-weight: 900; font-size: clamp(2rem, 8vw, 3.2rem); line-height: 1; }
.pc-hemi-num span { font-size: .72rem; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.pc-bar { position: relative; height: 22px; display: flex; border: 2.5px solid var(--ink); border-radius: 99px; background: var(--paper-2); margin-top: 14px; }
.pc-bar i { display: block; height: 100%; transition: width .35s var(--ease); }
.pc-bar i:first-child { border-radius: 99px 0 0 99px; }
.pc-bar i:nth-child(3) { border-radius: 0 99px 99px 0; }
.pc-bar .y { background: var(--ok); } .pc-bar .a { background: var(--yellow); } .pc-bar .n { background: var(--ko); }
.pc-bar em { position: absolute; top: -6px; bottom: -6px; width: 0; border-left: 3px dashed var(--ink); }
.pc-bar em span { position: absolute; top: -20px; left: -16px; width: 32px; text-align: center; font-family: var(--display); font-weight: 900; font-size: .72rem; }
.pc-count { display: flex; justify-content: space-between; gap: 8px; font-weight: 800; font-size: .86rem; flex-wrap: wrap; }
.pc-count b { font-family: var(--display); font-size: 1.05rem; }
.pc-count .y b { color: var(--ok); } .pc-count .n b { color: var(--ko); }
.pc-verdict { border: 2.5px solid var(--ink); border-radius: var(--radius-sm); padding: 12px 14px; display: grid; gap: 2px; }
.pc-verdict b { font-family: var(--display); font-weight: 900; }
.pc-verdict p { font-size: .88rem; }
.pc-verdict.ok { background: var(--ok-soft); } .pc-verdict.mid { background: #fff4d4; } .pc-verdict.ko { background: var(--ko-soft); }
.pc-presets { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-weight: 800; font-size: .84rem; }
.pc-presets .btn { padding: 6px 12px; font-size: .8rem; }
.pc-parties { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.pc-party { background: var(--card); border: 2.5px solid var(--ink); border-radius: var(--radius-sm); box-shadow: 3px 3px 0 var(--ink); display: grid; overflow: hidden; border-left: 8px solid var(--pc); }
.pc-party.si { background: var(--ok-soft); } .pc-party.abs { background: #fff4d4; } .pc-party.no { background: var(--card); }
.pc-stance { display: grid; grid-template-columns: auto 1fr; align-items: center; column-gap: 8px; text-align: left; padding: 8px 10px 4px; background: none; border: 0; cursor: pointer; font: inherit; }
.pc-stance i { grid-row: span 2; width: 14px; height: 14px; border-radius: 50%; background: var(--pc); border: 2px solid var(--ink); }
.pc-stance b { font-family: var(--display); font-weight: 800; font-size: .84rem; }
.pc-stance span { font-size: .7rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.pc-party.si .pc-stance span { color: var(--ok); } .pc-party.no .pc-stance span { color: var(--ko); }
.pc-seats { display: flex; align-items: center; justify-content: space-between; padding: 4px 8px 8px; gap: 6px; }
.pc-seats strong { font-family: var(--display); font-weight: 900; font-size: 1.3rem; }
.pc-seats button { width: 30px; height: 30px; border-radius: 8px; border: 2px solid var(--ink); background: var(--paper); font-weight: 900; font-size: 1rem; cursor: pointer; }
.pc-seats button:active { transform: translate(1px, 1px); }
.pc-total { font-size: .8rem; color: var(--muted); font-weight: 600; }
.pc-total.bad { color: var(--ko); font-weight: 800; }
.pc-note { margin-top: -6px; }
.pc-majs { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 10px; }
.pc-maj { display: flex; align-items: center; justify-content: space-between; gap: 10px; text-align: left; padding: 10px 12px; background: var(--card); border: 2.5px solid var(--ink); border-radius: var(--radius-sm); box-shadow: 3px 3px 0 var(--ink); cursor: pointer; font: inherit; }
.pc-maj:hover { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--ink); }
.pm-names { display: flex; flex-wrap: wrap; gap: 4px; }
.pm-names i { font-style: normal; font-size: .72rem; font-weight: 800; color: #fff; background: var(--pc); border: 1.5px solid var(--ink); border-radius: 6px; padding: 1px 7px; text-shadow: 1px 1px 0 rgba(0, 0, 0, .35); }
.pc-maj b { font-family: var(--display); font-weight: 900; font-size: 1.1rem; }
.pc-pct { display: grid; gap: 8px; background: var(--card); border: var(--bw) solid var(--ink); border-radius: var(--radius); box-shadow: var(--hard); padding: 16px; }
.pc-pct-row { display: grid; grid-template-columns: 74px 1fr 72px 76px; gap: 8px; align-items: center; font-size: .84rem; }
.pc-pct-row .n { font-weight: 800; }
.pc-pct-row .bar { position: relative; height: 18px; border: 2px solid var(--ink); border-radius: 6px; background: var(--paper-2); overflow: hidden; }
.pc-pct-row .bar i { position: absolute; inset: 0 auto 0 0; background: var(--pc); }
.pc-pct-row .bar em { position: absolute; top: 6px; height: 4px; background: var(--ink); opacity: .75; border-radius: 2px; }
.pc-pct-row b { white-space: nowrap; font-family: var(--display); font-weight: 800; text-align: right; }
.pc-pct-row small { color: var(--muted); font-weight: 700; font-size: .7rem; }

@media (max-width: 640px) {
  .pc-pct-row { grid-template-columns: 62px 1fr 52px; }
  .pc-pct-row small { display: none; }
  .pc-parties { grid-template-columns: repeat(2, 1fr); }
  .pc-main { padding: 14px 12px; }
}

/* Legal, peu de pàgina i drets de l'usuari */
.legal-tabs { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 10px; scrollbar-width: none; }
.legal-tabs::-webkit-scrollbar { display: none; }
.legal-tabs a { flex: none; padding: 6px 14px; border: 2px solid var(--ink); border-radius: 99px; background: var(--card); font-weight: 800; font-size: .82rem; text-decoration: none; color: inherit; box-shadow: 2px 2px 0 var(--ink); }
.legal-tabs a.on { background: var(--ink); color: var(--card); }
.card.legal { padding: 22px clamp(16px, 4vw, 34px) 30px; max-width: 820px; display: block; }
.card.legal .page-title { font-size: clamp(1.6rem, 5vw, 2.4rem); margin: 4px 0 14px; }
.card.legal h2 { font-family: var(--display); font-weight: 800; font-size: 1.02rem; margin: 22px 0 6px; letter-spacing: -.02em; }
.card.legal p, .card.legal li { font-size: .94rem; line-height: 1.55; }
.card.legal p { margin: 6px 0; }
.card.legal ul { margin: 6px 0; padding-left: 20px; display: grid; gap: 4px; }
.card.legal a { color: var(--blue); font-weight: 700; }
.legal-pending { background: #fff4d4; border: 2px dashed var(--ink); border-radius: var(--radius-sm); padding: 8px 12px; font-weight: 800; font-size: .84rem; }
.legal-table { display: grid; border: 2px solid var(--ink); border-radius: var(--radius-sm); overflow: hidden; margin: 8px 0; font-size: .84rem; }
.lt-row { display: grid; grid-template-columns: 1.1fr 1fr 2fr 1fr; gap: 10px; padding: 8px 12px; border-top: 1.5px solid var(--ink); align-items: start; word-break: break-word; }
.lt-row:first-child { border-top: 0; }
.lt-row.head { background: var(--ink); color: var(--card); font-family: var(--display); font-size: .74rem; text-transform: uppercase; letter-spacing: .04em; }
.legal-table.credits .lt-row { grid-template-columns: 1.4fr 1.6fr .8fr .8fr; }
.legal-table code { font-size: .78rem; background: var(--paper-2); border-radius: 4px; padding: 0 4px; }
.legal-note { font-size: .74rem; color: var(--muted); font-weight: 600; margin: 8px 0 0; flex-basis: 100%; }
.legal-note a { color: inherit; text-decoration: underline; }
/* Selector d'idioma (català / castellà) */
.lang-sw { display: inline-flex; gap: 2px; padding: 3px; border: 2px solid var(--ink); border-radius: 999px; background: var(--card); vertical-align: middle; }
.lang-sw a { padding: 3px 10px; border-radius: 999px; font-size: .76rem; font-weight: 800; color: var(--ink); text-decoration: none; }
.lang-sw a[aria-current] { background: var(--ink); color: var(--card); }
.lang-sw a:not([aria-current]):hover { background: var(--paper-2); }
.lang-sw-lg { flex-shrink: 0; }
.lang-sw-lg a { padding: 6px 12px; font-size: .8rem; }
/* Peu de pàgina: franja fosca com la capçalera; marca, idioma i cafè a l'esquerra i tres grups d'enllaços a la dreta */
.site-foot { margin-top: 48px; background: var(--ink); color: var(--card); padding-bottom: calc(100px + env(safe-area-inset-bottom, 0px)); }
.sf-in { max-width: 1180px; margin: 0 auto; padding: 36px 20px 22px; display: grid; gap: 28px; }
.sf-main { display: grid; grid-template-columns: minmax(240px, 1fr) minmax(0, 2fr); gap: 28px 48px; align-items: start; }
.sf-id { display: grid; gap: 16px; justify-items: start; }
.sf-brand { display: flex; align-items: center; gap: 12px; color: var(--card); text-decoration: none; }
.sf-brand .brand-mark { width: 44px; height: 44px; flex: none; }
.sf-brand .brand-mark svg { width: 36px; height: 36px; }
.sf-brand b { display: block; font-family: var(--display); font-weight: 900; font-size: 1.05rem; letter-spacing: -.02em; }
.sf-brand small { display: block; font-size: .8rem; color: rgba(255, 250, 240, .7); font-weight: 600; }
.sf-acts { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.sf-lang { display: inline-flex; align-items: center; gap: 8px; }
.sf-sw { background: rgba(255, 255, 255, .06); border-color: rgba(255, 250, 240, .3); }
.sf-sw a { color: var(--card); padding: 5px 12px; font-size: .8rem; }
.sf-sw a[aria-current] { background: var(--yellow); color: var(--ink); }
.sf-sw a:not([aria-current]):hover { background: rgba(255, 255, 255, .12); }
.site-foot .sf-coffee { display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; border-radius: 999px; border: 2px solid var(--yellow); background: var(--yellow); color: var(--ink); font-size: .8rem; font-weight: 800; text-decoration: none; }
.site-foot .sf-coffee:hover { background: transparent; color: var(--yellow); }
.sf-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px 28px; }
.sf-col h2 { margin: 0 0 10px; font-family: var(--display); font-size: .7rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--yellow); }
.sf-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.site-foot .sf-col a, .site-foot .sf-col .linklike { font-size: .88rem; font-weight: 600; color: rgba(255, 250, 240, .86); text-decoration: none; text-align: left; }
.site-foot .sf-col a:hover, .site-foot .sf-col .linklike:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.site-foot a:focus-visible, .site-foot button:focus-visible { outline: 2px solid var(--yellow); outline-offset: 3px; border-radius: 4px; }
.sf-note { margin: 0; padding-top: 16px; border-top: 1px solid rgba(255, 250, 240, .14); display: flex; flex-wrap: wrap; gap: 6px 18px; justify-content: space-between; font-size: .76rem; font-weight: 600; color: rgba(255, 250, 240, .6); }
@media (max-width: 900px) { .sf-main { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 640px) {
  .sf-in { padding: 28px 16px 18px; gap: 22px; }
  .sf-cols { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .sf-col h2 { margin-bottom: 8px; }
  .sf-col ul { display: flex; flex-wrap: wrap; gap: 8px 18px; }
}
@media (min-width: 901px) { .site-foot { padding-bottom: 0; } }
body.playing .site-foot { display: none; }
.account-tools { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.account-tools p { flex-basis: 100%; font-size: .8rem; }
.account-tools .btn { padding: 7px 14px; font-size: .82rem; }
.btn.danger { color: var(--ko); border-color: var(--ko); }
.pc-blackout { background: #fff4d4; border: 2.5px solid var(--ink); border-radius: var(--radius-sm); padding: 12px 14px; display: grid; gap: 2px; }
.pc-blackout p { font-size: .86rem; }
@media (max-width: 640px) {
  .lt-row, .legal-table.credits .lt-row { grid-template-columns: 1fr; gap: 2px; }
  .lt-row.head { display: none; }
}

/* Banner de consentiment de cookies */
#consent { position: fixed; z-index: 90; left: 50%; transform: translateX(-50%); bottom: 16px; width: min(760px, calc(100% - 24px)); background: var(--card); border: var(--bw) solid var(--ink); border-radius: var(--radius); box-shadow: var(--hard); padding: 16px 18px; display: grid; gap: 12px; animation: pop .3s var(--ease); }
#consent b { font-family: var(--display); font-weight: 800; }
#consent p { font-size: .86rem; line-height: 1.45; margin: 4px 0 0; }
#consent a { color: var(--blue); font-weight: 700; }
.cs-settings { display: grid; gap: 8px; margin-top: 10px; }
.cs-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 12px; border: 2px solid var(--ink); border-radius: var(--radius-sm); background: var(--paper); }
.cs-row small { display: block; font-size: .74rem; color: var(--muted); font-weight: 600; }
.cs-row input { width: 22px; height: 22px; accent-color: var(--ink); flex: none; }
.cs-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.cs-actions .btn { padding: 8px 16px; font-size: .86rem; }
.linklike { background: none; border: 0; padding: 0; font: inherit; font-weight: 800; color: var(--blue); text-decoration: underline; cursor: pointer; }
@media (max-width: 900px) {
  #consent { bottom: calc(88px + env(safe-area-inset-bottom)); max-height: calc(100dvh - 120px); overflow-y: auto; }
  .cs-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .cs-actions [data-cs="reject"] { order: 1; } .cs-actions [data-cs="accept"] { order: 2; }
  .cs-actions [data-cs="settings"], .cs-actions [data-cs="save"] { grid-column: 1 / -1; order: 3; }
}

/* =========================================================
   Aprèn 2.0: portada, capítols, exemples interactius i eines
   ========================================================= */
.ap-page { animation: viewIn .35s var(--ease); }
.ap-crumb { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; font-weight: 800; font-size: .86rem; }
.ap-crumb a { color: var(--ink); text-decoration: none; background: var(--card); border: 2px solid var(--ink); border-radius: 999px; padding: 5px 13px; box-shadow: 2px 2px 0 var(--ink); }
.ap-crumb a:hover { background: var(--yellow); }
.ap-crumb span { color: var(--muted); font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; }

/* ---------- Portada ---------- */
.ap-hero { display: grid; grid-template-columns: 1.25fr .9fr; gap: 28px; align-items: end; padding-bottom: 8px; }
.ap-hero .lede { margin-top: 14px; max-width: 46ch; }
.ap-count { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 18px; padding: 8px 14px; background: var(--ink); color: var(--card); border-radius: 999px; font-weight: 600; font-size: .86rem; box-shadow: 3px 3px 0 var(--red); }
.ap-count b { font-family: var(--display); color: var(--yellow); font-variant-numeric: tabular-nums; }
@media (max-width: 640px) { .ap-count-tail { display: none; } }
.ap-prog.card { display: grid; grid-template-columns: auto 1fr; gap: 6px 18px; align-items: center; padding: 20px; box-shadow: 6px 6px 0 var(--blue); }
.ap-ring-wrap { grid-column: 1; grid-row: 1 / span 2; align-self: center; position: relative; width: 96px; height: 96px; display: grid; place-items: center; }
.ap-ring { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.ap-ring circle { fill: none; stroke-width: 9; }
.ap-ring .bg { stroke: var(--paper-2); }
.ap-ring .fg { stroke: var(--red); stroke-linecap: round; transition: stroke-dashoffset 1s var(--ease); }
.ap-prog-n { position: relative; z-index: 1; text-align: center; font-family: var(--display); line-height: 1; white-space: nowrap; }
.ap-prog-n b { font-size: 2rem; font-weight: 900; }
.ap-prog-n span { font-weight: 800; color: var(--muted); }
.ap-prog-txt { grid-column: 2; grid-row: 1 / span 2; display: grid; gap: 6px; justify-items: start; }
.ap-prog-txt > b { font-family: var(--display); font-weight: 900; font-size: 1.15rem; letter-spacing: -.03em; }
.ap-prog-txt > span { font-size: .88rem; color: var(--ink-2); font-weight: 600; }
.ap-prog-txt .btn { margin-top: 6px; padding: 10px 16px; font-size: .9rem; }

.ap-h2 { font-family: var(--display); font-weight: 900; text-transform: uppercase; letter-spacing: -.04em; font-size: clamp(1.3rem, 3vw, 1.8rem); margin: 42px 0 16px; }
.ap-h2 span { background: linear-gradient(transparent 58%, var(--yellow) 58%, var(--yellow) 92%, transparent 92%); padding: 0 .1em; }

.ap-chapters { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.ap-ch {
  --tone: var(--red);
  position: relative; display: grid; grid-template-rows: auto 1fr auto; text-decoration: none; color: inherit;
  background: var(--card); border: var(--bw) solid var(--ink); border-radius: var(--radius); box-shadow: 5px 5px 0 var(--tone); overflow: hidden;
  transition: transform .15s var(--ease), box-shadow .15s var(--ease); animation: cardIn .45s var(--ease) both; animation-delay: calc(var(--i) * 40ms);
}
.ap-ch:hover { transform: translate(-2px, -2px); box-shadow: 7px 7px 0 var(--tone); }
.ap-ch-art { display: grid; place-items: center; height: 124px; background: var(--dots) 0 0 / 9px 9px, color-mix(in srgb, var(--tone) 22%, var(--card)); border-bottom: 2px dashed var(--ink); }
.ap-ch-art svg { height: 100px; width: 86%; }
.ap-ch-n { position: absolute; top: 10px; left: 10px; width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; background: var(--ink); color: var(--yellow); font-family: var(--display); font-weight: 900; font-size: .9rem; transform: rotate(-5deg); box-shadow: 2px 2px 0 var(--tone); }
.ap-ch-body { display: grid; gap: 4px; align-content: start; padding: 14px 16px 6px; }
.ap-ch-body b { font-family: var(--display); font-weight: 800; font-size: 1.04rem; letter-spacing: -.03em; line-height: 1.15; }
.ap-ch-body small { font-size: .84rem; color: var(--ink-2); font-weight: 600; line-height: 1.35; }
.ap-st { justify-self: start; margin: 6px 16px 14px; font-size: .72rem; font-weight: 800; padding: 3px 10px; border-radius: 999px; border: 2px solid var(--ink); background: var(--paper); }
.ap-st.ok { background: var(--ok); color: #fff; }
.ap-st.retry { background: #fff4d4; }
.ap-ch.is-done::after { content: "✓"; position: absolute; top: 10px; right: 10px; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--ok); color: #fff; font-weight: 900; border: 2px solid var(--ink); }

.ap-tools { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.ap-tool {
  --tone: var(--blue);
  display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center; text-decoration: none; color: inherit;
  background: var(--card); border: var(--bw) solid var(--ink); border-radius: var(--radius); box-shadow: var(--hard-sm); padding: 14px 16px;
  transition: transform .15s var(--ease), box-shadow .15s var(--ease);
}
.ap-tool:hover { transform: translate(-2px, -2px); box-shadow: 5px 5px 0 var(--ink); background: #fff4d4; }
.ap-tool-ico { width: 48px; height: 48px; border-radius: 13px; display: grid; place-items: center; background: var(--tone); color: #fff; border: 2px solid var(--ink); box-shadow: 2px 2px 0 var(--ink); }
.ap-tool-ico svg { width: 26px; height: 26px; }
.ap-tool b { display: block; font-family: var(--display); font-weight: 800; font-size: .98rem; letter-spacing: -.03em; }
.ap-tool small { display: block; font-size: .82rem; color: var(--ink-2); font-weight: 600; margin-top: 2px; }
.ap-go { font-weight: 900; font-size: 1.2rem; }

.ap-word { display: grid; gap: 4px; margin-top: 28px; padding: 18px 20px; text-decoration: none; color: inherit; background: var(--ink); color: var(--card); border-radius: var(--radius); border: var(--bw) solid var(--ink); box-shadow: 5px 5px 0 var(--yellow); }
.ap-word .kicker { color: var(--yellow); }
.ap-word b { font-family: var(--display); font-weight: 900; font-size: 1.5rem; letter-spacing: -.03em; }
.ap-word > span:last-child { opacity: .9; font-weight: 500; }

/* ---------- Capítol ---------- */
.ap-chapter { --tone: var(--red); max-width: 900px; margin: 0 auto; }
.ap-ch-head { display: grid; grid-template-columns: 220px 1fr; gap: 26px; align-items: center; margin-bottom: 26px; }
.ap-ch-headart { display: grid; place-items: center; height: 170px; border: var(--bw) solid var(--ink); border-radius: var(--radius); box-shadow: 6px 6px 0 var(--tone); background: var(--dots) 0 0 / 9px 9px, color-mix(in srgb, var(--tone) 24%, var(--card)); transform: rotate(-2deg); }
.ap-ch-headart svg { width: 82%; height: 140px; }
.ap-title { font-family: var(--display); font-weight: 900; text-transform: uppercase; letter-spacing: -.045em; line-height: .98; font-size: clamp(1.9rem, 5vw, 3.1rem); margin: 6px 0 12px; text-shadow: 3px 3px 0 var(--tone); }
.ap-lead { font-size: 1.14rem; line-height: 1.5; color: var(--ink-2); font-weight: 500; max-width: 60ch; }
.ap-body { display: grid; gap: 18px; }
.ap-h { font-family: var(--display); font-weight: 900; font-size: clamp(1.15rem, 2.6vw, 1.45rem); letter-spacing: -.035em; text-transform: uppercase; margin-top: 18px; padding-left: 14px; border-left: 6px solid var(--tone); line-height: 1.1; }
.ap-p { font-size: 1.06rem; line-height: 1.62; max-width: 70ch; color: var(--ink); }
.ap-p b { font-weight: 800; }
.term { display: inline; padding: 0 2px; margin: 0; border: 0; background: color-mix(in srgb, var(--tone, var(--blue)) 14%, transparent); border-bottom: 2px dotted var(--ink); border-radius: 3px; font: inherit; font-weight: 700; color: inherit; cursor: help; }
.term:hover, .term:focus-visible { background: var(--yellow); }

.ap-call { position: relative; display: grid; gap: 4px; padding: 14px 16px 14px 58px; border: var(--bw) solid var(--ink); border-radius: var(--radius-sm); box-shadow: var(--hard-sm); background: #e5eaff; }
.ap-call::before { content: "i"; position: absolute; left: 14px; top: 14px; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--blue); color: #fff; font-family: var(--display); font-weight: 900; border: 2px solid var(--ink); }
.ap-call.warn { background: #ffe1da; }
.ap-call.warn::before { content: "!"; background: var(--red); }
.ap-call.tip { background: var(--ok-soft); }
.ap-call.tip::before { content: "★"; background: var(--ok); font-size: .9rem; }
.ap-call b { font-family: var(--display); font-weight: 800; font-size: .95rem; letter-spacing: -.02em; }
.ap-call p { font-size: .95rem; line-height: 1.5; }
.ap-call a { color: var(--blue); font-weight: 800; }

.ap-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.ap-list li { position: relative; padding: 10px 14px 10px 46px; background: var(--card); border: 2px solid var(--ink); border-radius: var(--radius-sm); font-size: 1rem; line-height: 1.45; }
.ap-list li::before { content: "✓"; position: absolute; left: 12px; top: 10px; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--tone); color: #fff; font-weight: 900; font-size: .8rem; border: 2px solid var(--ink); }

.ap-facts { margin: 4px 0; }
.ap-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; }
.ap-cards.four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ap-card { display: grid; gap: 6px; align-content: start; background: var(--card); border: var(--bw) solid var(--ink); border-radius: var(--radius); box-shadow: var(--hard-sm); padding: 16px; overflow: hidden; }
.ap-card-art { margin: -16px -16px 6px; height: 104px; display: grid; place-items: center; background: var(--dots) 0 0 / 9px 9px, color-mix(in srgb, var(--tone) 16%, var(--card)); border-bottom: 2px dashed var(--ink); }
.ap-card-art svg { height: 92px; width: 80%; }
.ap-card b { font-family: var(--display); font-weight: 800; font-size: 1.02rem; letter-spacing: -.03em; line-height: 1.15; }
.ap-card p { font-size: .94rem; line-height: 1.5; color: var(--ink-2); }

.ap-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.ap-step { position: relative; display: grid; gap: 4px; padding: 0 0 22px 56px; }
.ap-step::before { content: ""; position: absolute; left: 19px; top: 40px; bottom: 0; border-left: 3px dashed var(--ink); }
.ap-step:last-child::before { display: none; }
.ap-step-n { position: absolute; left: 0; top: 0; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--tone); color: #fff; font-family: var(--display); font-weight: 900; border: var(--bw) solid var(--ink); box-shadow: 2px 2px 0 var(--ink); }
.ap-step b { font-family: var(--display); font-weight: 800; font-size: 1.05rem; letter-spacing: -.03em; padding-top: 8px; }
.ap-step p { font-size: .97rem; line-height: 1.5; color: var(--ink-2); }
.ap-step-art { display: none; }
.ap-steps.wide { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.ap-steps.wide .ap-step { padding: 0 12px 14px; background: var(--card); border: var(--bw) solid var(--ink); border-radius: var(--radius); box-shadow: var(--hard-sm); overflow: hidden; align-content: start; }
.ap-steps.wide .ap-step::before { display: none; }
.ap-steps.wide .ap-step-art { display: grid; place-items: center; margin: 0 -12px 6px; height: 96px; background: var(--dots) 0 0 / 9px 9px, color-mix(in srgb, var(--tone) 18%, var(--card)); border-bottom: 2px dashed var(--ink); }
.ap-steps.wide .ap-step-art svg { height: 84px; width: 86%; }
.ap-steps.wide .ap-step-n { top: 8px; left: 8px; width: 28px; height: 28px; font-size: .8rem; }
.ap-steps.wide .ap-step b { font-size: .95rem; padding-top: 0; }
.ap-steps.wide .ap-step p { font-size: .84rem; }

.ap-compare { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.ap-cmp { background: var(--card); border: var(--bw) solid var(--ink); border-radius: var(--radius); box-shadow: var(--hard); overflow: hidden; }
.ap-cmp header { display: grid; grid-template-columns: 92px 1fr; gap: 12px; align-items: center; padding: 12px 16px; background: var(--st); border-bottom: var(--bw) solid var(--ink); }
.ap-cmp-art svg { width: 92px; height: 66px; }
.ap-cmp header b { display: block; font-family: var(--display); font-weight: 900; font-size: 1.15rem; letter-spacing: -.03em; text-transform: uppercase; line-height: 1.05; }
.ap-cmp header small { display: inline-block; margin-top: 6px; font-size: .74rem; font-weight: 800; background: var(--ink); color: var(--card); border-radius: 6px; padding: 2px 8px; }
.ap-cmp ul { list-style: none; margin: 0; padding: 10px 16px 14px; display: grid; gap: 0; }
.ap-cmp li { padding: 8px 0 8px 22px; position: relative; font-size: .94rem; line-height: 1.45; border-bottom: 1.5px dashed color-mix(in srgb, var(--ink) 30%, transparent); }
.ap-cmp li:last-child { border-bottom: 0; }
.ap-cmp li::before { content: ""; position: absolute; left: 2px; top: 15px; width: 9px; height: 9px; border-radius: 3px; background: var(--tone); border: 1.5px solid var(--ink); transform: rotate(45deg); }

/* Test */
.ap-quiz.card { margin-top: 34px; padding: 22px; box-shadow: 6px 6px 0 var(--tone); }
.ap-quiz-head { display: grid; grid-template-columns: auto 1fr; gap: 14px; align-items: center; margin-bottom: 16px; }
.ap-quiz-ico { width: 54px; height: 54px; border-radius: 14px; display: grid; place-items: center; background: var(--tone); color: #fff; font-size: 1.6rem; font-weight: 900; border: var(--bw) solid var(--ink); transform: rotate(-5deg); box-shadow: 3px 3px 0 var(--ink); }
.ap-quiz-head h2 { font-family: var(--display); font-weight: 900; font-size: 1.25rem; letter-spacing: -.03em; text-transform: uppercase; }
/* La fila es parteix al mòbil: a l examen hi ha 10 indicadors */
.ap-quiz-top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 10px; }
.ap-dots { display: flex; gap: 6px; flex: 0 1 auto; min-width: 0; }
.ap-dots i { flex: 0 1 28px; min-width: 6px; width: auto; height: 8px; border-radius: 99px; background: var(--paper-2); border: 1.5px solid var(--ink); }
.ap-dots i.done { background: var(--ink); }
.ap-dots i.on { background: var(--tone); }
.ap-q { font-family: var(--display); font-weight: 800; font-size: clamp(1.05rem, 2.6vw, 1.3rem); letter-spacing: -.03em; line-height: 1.25; margin: 14px 0 4px; }
.ap-result { display: grid; grid-template-columns: auto 1fr; gap: 18px; align-items: center; }
.ap-result-score { width: 96px; height: 96px; border-radius: 50%; display: grid; place-items: center; align-content: center; grid-auto-flow: column; background: var(--ok); color: #fff; border: var(--bw) solid var(--ink); box-shadow: var(--hard-sm); font-family: var(--display); }
.ap-result.ko .ap-result-score { background: var(--red); }
.ap-result-score b { font-size: 2.4rem; font-weight: 900; }
.ap-result-score span { font-weight: 800; opacity: .85; align-self: end; margin-bottom: 18px; }
.ap-result h3 { font-family: var(--display); font-weight: 900; font-size: 1.35rem; text-transform: uppercase; letter-spacing: -.03em; }
.ap-result p { color: var(--ink-2); font-weight: 600; }
.ap-result p b { color: var(--ok); }

.ap-practice { display: grid; gap: 2px; margin-top: 18px; padding: 16px 20px; text-decoration: none; color: var(--card); background: var(--ink); border: var(--bw) solid var(--ink); border-radius: var(--radius); box-shadow: 5px 5px 0 var(--tone); }
.ap-practice .kicker { color: var(--yellow); }
.ap-practice b { font-family: var(--display); font-weight: 900; font-size: 1.15rem; letter-spacing: -.03em; }
.ap-practice small { opacity: .85; font-weight: 500; }
.ap-practice:hover { transform: translate(-2px, -2px); }
.ap-pager { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 18px; }
.ap-pager a { display: grid; gap: 2px; padding: 14px 16px; text-decoration: none; color: inherit; background: var(--card); border: var(--bw) solid var(--ink); border-radius: var(--radius); box-shadow: var(--hard-sm); }
.ap-pager a:hover { background: #fff4d4; }
.ap-pager .next { text-align: right; }
.ap-pager small { font-size: .74rem; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.ap-pager b { font-family: var(--display); font-weight: 800; font-size: .95rem; letter-spacing: -.03em; }

/* Barra de lectura */
#ap-read { position: absolute; left: 0; bottom: 0; height: 4px; width: 0; background: var(--yellow); box-shadow: 0 0 0 1px var(--ink); transition: width .1s linear; pointer-events: none; z-index: 2; }

/* Glossari emergent */
.term-pop { position: absolute; z-index: 80; display: grid; gap: 6px; padding: 14px 16px; background: var(--card); border: var(--bw) solid var(--ink); border-radius: var(--radius-sm); box-shadow: 5px 5px 0 var(--ink); animation: pop .25s var(--ease); }
.term-pop b { font-family: var(--display); font-weight: 900; font-size: 1rem; letter-spacing: -.02em; }
.term-pop p { font-size: .92rem; line-height: 1.45; }
.term-pop a { font-size: .8rem; font-weight: 800; color: var(--blue); }

/* ---------- Exemples interactius ---------- */
.ap-w { margin: 2px 0; }
.ap-hemi { display: grid; grid-template-columns: 1.3fr 1fr; gap: 22px; align-items: center; background: var(--card); border: var(--bw) solid var(--ink); border-radius: var(--radius); box-shadow: var(--hard); padding: 18px; }
.ap-hemi-side { display: grid; gap: 12px; }
.ap-hemi .maj-box strong { font-size: 2.8rem; }
.ap-hemi .hemi-legend { margin-top: 0; text-align: left; }
.ap-hemi .legend-items { justify-content: flex-start; }

.ap-range { display: grid; gap: 6px; font-weight: 700; font-size: .92rem; }
.ap-range span { display: flex; align-items: center; gap: 8px; }
.ap-range span i { width: 14px; height: 14px; border-radius: 4px; background: var(--pc, var(--ink)); border: 2px solid var(--ink); }
.ap-range b { font-family: var(--display); font-weight: 800; }
.ap-range input[type="range"] { width: 100%; accent-color: var(--pc, var(--red)); height: 28px; }

.ap-senate { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; }
.ap-senate-paper { background: var(--dots) 0 0 / 10px 10px, #ecd3a6; border: var(--bw) solid var(--ink); border-radius: 8px; box-shadow: var(--hard); padding: 16px; display: grid; gap: 12px; transform: rotate(-.6deg); }
.ap-senate-top { font-family: var(--display); font-weight: 800; font-size: .72rem; letter-spacing: .02em; text-align: center; border-bottom: 2px solid var(--ink); padding-bottom: 8px; }
.ap-senate-top small { font-family: var(--sans); font-weight: 700; font-size: .78rem; }
.ap-senate-party { display: grid; gap: 4px; }
.ap-senate-party > b { font-size: .74rem; font-weight: 900; text-transform: uppercase; letter-spacing: .06em; display: flex; align-items: center; gap: 6px; }
.ap-senate-party > b::before { content: ""; width: 10px; height: 10px; border-radius: 3px; background: var(--pc); border: 1.5px solid var(--ink); }
.ap-senate-row { display: flex; align-items: center; gap: 10px; cursor: pointer; padding: 6px 8px; border-radius: 8px; font-weight: 700; }
.ap-senate-row:hover { background: rgba(255, 255, 255, .45); }
.ap-senate-row input { position: absolute; opacity: 0; pointer-events: none; }
.ap-senate-row .box { flex: none; width: 24px; height: 24px; border: 2.5px solid var(--ink); border-radius: 4px; background: #fff; display: grid; place-items: center; }
.ap-senate-row input:checked + .box::after { content: "✕"; color: var(--red); font-weight: 900; font-size: 1.05rem; line-height: 1; }
.ap-senate-row input:focus-visible + .box { outline: 3px solid var(--blue); outline-offset: 2px; }
.ap-senate-out { position: sticky; top: 90px; display: grid; gap: 6px; padding: 18px; border: var(--bw) solid var(--ink); border-radius: var(--radius); box-shadow: var(--hard-sm); background: var(--card); }
.ap-senate-out b { font-family: var(--display); font-weight: 900; font-size: 1.3rem; text-transform: uppercase; letter-spacing: -.03em; }
.ap-senate-out.ok { background: var(--ok-soft); }
.ap-senate-out.ok b { color: var(--ok); }
.ap-senate-out.ko { background: var(--ko-soft); animation: shake .4s; }
.ap-senate-out.ko b { color: var(--ko); }
.ap-senate-out.blank { background: #fff; }

.ap-sorter { display: grid; gap: 10px; }
.ap-sorter-score { justify-self: start; font-weight: 800; padding: 6px 14px; background: var(--ink); color: var(--card); border-radius: 999px; }
.ap-sorter-score b { font-family: var(--display); color: var(--yellow); }
.ap-sort { display: grid; grid-template-columns: 1fr auto; gap: 8px 14px; align-items: center; padding: 12px 14px; background: var(--card); border: 2px solid var(--ink); border-radius: var(--radius-sm); }
.ap-sort p { font-weight: 700; font-size: .96rem; line-height: 1.35; }
.ap-sort-opts { display: flex; gap: 6px; }
.ap-sort-opts button { border: 2px solid var(--ink); background: var(--paper); border-radius: 9px; padding: 7px 12px; font-weight: 800; font-size: .84rem; cursor: pointer; box-shadow: 2px 2px 0 var(--ink); }
.ap-sort-opts button:hover:not(:disabled) { background: var(--yellow); }
.ap-sort-opts button:disabled { cursor: default; opacity: .45; box-shadow: none; }
.ap-sort-opts button.right { opacity: 1; background: var(--ok); color: #fff; }
.ap-sort-opts button.wrong { opacity: 1; background: var(--ko); color: #fff; }
.ap-sort.ok { border-color: var(--ok); }
.ap-sort.ko { border-color: var(--ko); }
.ap-sort-exp { grid-column: 1 / -1; font-size: .86rem; font-weight: 600; color: var(--ink-2); }

.ap-blank.card, .ap-weight.card, .ap-dh.card, .ap-margin.card, .ap-inv.card, .ap-map.card { padding: 18px; box-shadow: var(--hard); display: grid; gap: 14px; }
.ap-blank-bars { display: grid; gap: 8px; }
.ap-bb { display: grid; grid-template-columns: 76px 1fr 64px; gap: 10px; align-items: center; font-weight: 800; font-size: .86rem; }
.ap-bb .track { position: relative; height: 22px; background: var(--paper); border: 2px solid var(--ink); border-radius: 6px; overflow: visible; }
.ap-bb .track i { display: block; height: 100%; border-radius: 4px 0 0 4px; }
.ap-bb .track em { position: absolute; top: -5px; bottom: -5px; border-left: 3px dashed var(--red); }
.ap-bb b { font-family: var(--display); font-size: .8rem; text-align: right; }
.ap-bb.out { opacity: .5; }
.ap-blank-out, .ap-mg-out { font-size: .95rem; line-height: 1.5; padding: 10px 12px; background: var(--paper); border: 2px dashed var(--ink); border-radius: var(--radius-sm); }

.ap-map { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); align-items: center; }
.ap-tiles { position: relative; display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); grid-template-rows: repeat(9, auto); gap: 4px; }
.ap-tile { grid-column: calc(var(--x) + 1); grid-row: calc(var(--y) + 1); aspect-ratio: 1; display: grid; place-items: center; align-content: center; gap: 0; padding: 0; border: 2px solid var(--ink); border-radius: 7px; cursor: pointer; font-family: var(--display); color: var(--ink); transition: transform .12s var(--ease); }
.ap-tile:hover { transform: scale(1.12); z-index: 2; }
.ap-tile small { font-size: .5rem; font-weight: 800; opacity: .75; line-height: 1; }
.ap-tile b { font-size: .86rem; font-weight: 900; line-height: 1.05; }
.ap-tile.t1 { background: #fff4d4; }
.ap-tile.t2 { background: #ffe08a; }
.ap-tile.t3 { background: var(--yellow); }
.ap-tile.t4 { background: var(--red); color: #fff; }
.ap-tile.t5 { background: var(--ink); color: var(--yellow); }
.ap-tile.sel { outline: 3px solid var(--blue); outline-offset: 2px; transform: scale(1.12); z-index: 3; }
.ap-canary { grid-column: 1 / span 2; grid-row: 9; align-self: end; margin-bottom: -16px; font-size: .62rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); text-align: center; pointer-events: none; }
.ap-map-side { display: grid; gap: 14px; }
.ap-map-info { display: grid; gap: 2px; justify-items: start; padding: 16px; background: var(--paper); border: 2px solid var(--ink); border-radius: var(--radius-sm); min-height: 150px; }
.ap-map-info > b { font-family: var(--display); font-weight: 900; font-size: 1.15rem; letter-spacing: -.03em; }
.ap-map-info .big { font-family: var(--display); font-weight: 900; font-size: 3rem; line-height: 1; color: var(--red); text-shadow: 2px 2px 0 var(--ink); }
.ap-map-info small { font-size: .82rem; font-weight: 700; color: var(--ink-2); }
.ap-map-legend { display: flex; flex-wrap: wrap; gap: 6px 12px; font-size: .78rem; font-weight: 700; }
.ap-map-legend span { display: inline-flex; align-items: center; gap: 5px; }
.ap-map-legend i { width: 14px; height: 14px; border-radius: 4px; border: 1.5px solid var(--ink); }
.ap-map-legend i.t1 { background: #fff4d4; } .ap-map-legend i.t2 { background: #ffe08a; } .ap-map-legend i.t3 { background: var(--yellow); } .ap-map-legend i.t4 { background: var(--red); } .ap-map-legend i.t5 { background: var(--ink); }

.ap-wrow { display: grid; grid-template-columns: 140px 1fr 78px; gap: 10px; align-items: center; font-weight: 700; font-size: .88rem; }
.ap-wrow .track { height: 18px; background: var(--paper); border: 2px solid var(--ink); border-radius: 6px; overflow: hidden; }
.ap-wrow .track i { display: block; height: 100%; background: var(--tone); }
.ap-wrow b { font-family: var(--display); font-size: .82rem; text-align: right; }
.ap-wrow.avg { font-weight: 900; }
.ap-wrow.avg .track i { background: repeating-linear-gradient(-45deg, var(--ink) 0 6px, var(--ink-2) 6px 12px); }
.ap-note { font-size: .88rem; color: var(--ink-2); font-weight: 600; line-height: 1.5; }

.ap-dh { grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); align-items: start; }
.ap-dh-controls { display: grid; gap: 12px; }
.ap-dh-seats { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-weight: 800; font-size: .88rem; }
.ap-dh-seats button { width: 40px; height: 36px; border: 2px solid var(--ink); border-radius: 9px; background: var(--card); font-family: var(--display); font-weight: 900; cursor: pointer; box-shadow: 2px 2px 0 var(--ink); }
.ap-dh-seats button.on { background: var(--ink); color: var(--yellow); }
.ap-dh-out { display: grid; gap: 12px; min-width: 0; }
.ap-dh-chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.ap-seat { width: 34px; height: 40px; border-radius: 8px; display: grid; place-items: center; background: var(--pc); color: #fff; font-family: var(--display); font-weight: 900; font-size: .8rem; border: 2px solid var(--ink); box-shadow: 2px 2px 0 var(--ink); text-shadow: 1px 1px 0 rgba(0, 0, 0, .35); animation: pop .35s var(--ease) both; animation-delay: calc(var(--k) * 60ms); }
.ap-dh-sum { display: flex; flex-wrap: wrap; gap: 6px; margin-left: 4px; }
.ap-dh-sum em { font-style: normal; font-weight: 800; font-size: .78rem; padding: 2px 8px; border-radius: 6px; border: 1.5px solid var(--ink); background: color-mix(in srgb, var(--pc) 22%, var(--card)); }
.ap-dh-table { overflow-x: auto; }
.ap-dh-table .q-table { min-width: 0; }
.ap-dh-table .sw { display: inline-block; width: 10px; height: 10px; border-radius: 3px; border: 1.5px solid var(--ink); margin-right: 6px; vertical-align: -1px; }

.ap-camp { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
.ap-camp li { display: grid; gap: 4px; align-content: start; padding: 10px; background: var(--card); border: 2px solid var(--ink); border-radius: var(--radius-sm); box-shadow: 2px 2px 0 var(--ink); }
.ap-camp .d { font-family: var(--display); font-weight: 900; font-size: .9rem; color: var(--tone); }
.ap-camp .t { font-size: .8rem; font-weight: 700; line-height: 1.3; }
.ap-camp li.done { opacity: .5; }
.ap-camp li.next, .ap-camp li.today { background: #fff4d4; box-shadow: 3px 3px 0 var(--tone); }
.ap-camp li.next::before { content: "Ara ve"; font-size: .62rem; font-weight: 900; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.ap-camp li.today::before { content: "Avui"; font-size: .62rem; font-weight: 900; text-transform: uppercase; letter-spacing: .08em; color: var(--red); }
.ap-camp li.key { background: var(--ink); color: var(--card); }
.ap-camp li.key .d { color: var(--yellow); }

.ap-mg-axis { display: grid; gap: 10px; }
.ap-mg-row { display: grid; grid-template-columns: 120px 1fr; gap: 10px; align-items: center; font-weight: 800; font-size: .86rem; }
.ap-mg-track { position: relative; height: 26px; background: var(--paper); border: 2px solid var(--ink); border-radius: 6px; }
.ap-mg-track .band { position: absolute; top: 3px; bottom: 3px; background: color-mix(in srgb, var(--pc) 35%, transparent); border: 2px solid var(--pc); border-radius: 4px; transition: left .2s, width .2s; }
.ap-mg-track .pt { position: absolute; top: -4px; bottom: -4px; width: 4px; margin-left: -2px; background: var(--ink); border-radius: 2px; }
.ap-mg-scale { display: flex; justify-content: space-between; margin-left: 130px; font-size: .72rem; font-weight: 700; color: var(--muted); }

.ap-after { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.ap-after li { position: relative; display: grid; grid-template-columns: 120px 1fr; column-gap: 16px; padding-bottom: 18px; animation: cardIn .45s var(--ease) both; animation-delay: calc(var(--i) * 60ms); }
.ap-after li::before { content: ""; position: absolute; left: 59px; top: 34px; bottom: 0; border-left: 3px dashed var(--ink); }
.ap-after li:last-child::before { display: none; }
.ap-after .k { grid-row: span 2; position: relative; z-index: 1; justify-self: center; align-self: start; font-family: var(--display); font-weight: 900; font-size: .78rem; text-transform: uppercase; background: var(--yellow); border: var(--bw) solid var(--ink); border-radius: 999px; padding: 8px 12px; box-shadow: 2px 2px 0 var(--ink); white-space: nowrap; }
.ap-after li.warn .k { background: var(--red); color: #fff; }
.ap-after b { font-family: var(--display); font-weight: 800; font-size: 1.02rem; letter-spacing: -.03em; padding-top: 6px; }
.ap-after p { font-size: .94rem; color: var(--ink-2); line-height: 1.45; }

.ap-inv-presets { display: flex; flex-wrap: wrap; gap: 6px; }
.ap-inv-presets button { border: 2px solid var(--ink); background: var(--paper); border-radius: 999px; padding: 5px 12px; font-weight: 800; font-size: .8rem; cursor: pointer; }
.ap-inv-presets button:hover { background: var(--yellow); }
.ap-inv-abs { font-weight: 700; font-size: .9rem; color: var(--ink-2); }
.ap-inv-abs b { font-family: var(--display); color: var(--ink); }
.ap-inv-res { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ap-inv-res > div { display: grid; gap: 2px; padding: 12px 14px; border: var(--bw) solid var(--ink); border-radius: var(--radius-sm); background: var(--card); }
.ap-inv-res small { font-size: .74rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.ap-inv-res b { font-family: var(--display); font-weight: 900; font-size: 1.15rem; }
.ap-inv-res .ok { background: var(--ok-soft); }
.ap-inv-res .ok b { color: var(--ok); }
.ap-inv-res .ko { background: var(--ko-soft); }
.ap-inv-res .ko b { color: var(--ko); }
.ap-inv-res .na { opacity: .55; }

.ap-law { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.ap-law li { position: relative; display: grid; grid-template-columns: 44px 1fr; gap: 14px; padding-bottom: 16px; }
.ap-law li::before { content: ""; position: absolute; left: 21px; top: 44px; bottom: 0; border-left: 3px solid var(--ink); }
.ap-law li:last-child::before { display: none; }
.ap-law .n { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--ink); color: var(--yellow); font-family: var(--display); font-weight: 900; border: var(--bw) solid var(--ink); transform: rotate(-4deg); }
.ap-law li:nth-child(5) .n, .ap-law li:nth-child(6) .n { background: #ecd3a6; color: var(--ink); }
.ap-law li:last-child .n { background: var(--red); color: #fff; }
.ap-law b { font-family: var(--display); font-weight: 800; font-size: 1.02rem; letter-spacing: -.03em; display: block; padding-top: 4px; }
.ap-law p { font-size: .94rem; color: var(--ink-2); line-height: 1.5; }

/* ---------- Eines ---------- */
.ap-toolpage { --tone: var(--blue); }
.ap-tool-head { --tone: var(--blue); margin-bottom: 22px; }
.ap-tool-hero { display: grid; grid-template-columns: auto 1fr; gap: 18px; align-items: center; }
.ap-tool-hero .ap-tool-ico { width: 74px; height: 74px; border-radius: 20px; transform: rotate(-5deg); box-shadow: 4px 4px 0 var(--ink); }
.ap-tool-hero .ap-tool-ico svg { width: 38px; height: 38px; }
.ap-tool-hero .ap-title { margin: 0 0 8px; text-shadow: 3px 3px 0 var(--tone); }
#ap-tool-simulador .panel { margin-top: 0; }

/* Diccionari */
.dict { display: grid; gap: 14px; max-width: 860px; }
.dict-search { display: flex; align-items: center; gap: 10px; padding: 0 16px; background: var(--card); border: var(--bw) solid var(--ink); border-radius: 999px; box-shadow: var(--hard-sm); }
.dict-search svg { width: 20px; height: 20px; fill: none; stroke: var(--ink); stroke-width: 2.4; stroke-linecap: round; }
.dict-search input { flex: 1; min-width: 0; border: 0; background: transparent; font: inherit; font-weight: 600; font-size: 1rem; padding: 13px 0; outline: none; }
.dict-letters { display: flex; flex-wrap: wrap; gap: 6px; }
.dict-letters button { width: 34px; height: 34px; border: 2px solid var(--ink); border-radius: 9px; background: var(--card); font-family: var(--display); font-weight: 900; font-size: .8rem; cursor: pointer; }
.dict-letters button:hover:not(:disabled) { background: var(--yellow); }
.dict-letters button:disabled { opacity: .3; cursor: default; }
.dict-list { display: grid; gap: 8px; }
.dict-l { font-family: var(--display); font-weight: 900; font-size: 1.4rem; color: var(--red); text-shadow: 2px 2px 0 var(--ink); margin: 12px 0 2px; scroll-margin-top: 90px; }
.dict-item { background: var(--card); border: 2px solid var(--ink); border-radius: var(--radius-sm); box-shadow: 2px 2px 0 var(--ink); }
.dict-item summary { cursor: pointer; padding: 12px 16px; font-family: var(--display); font-weight: 800; font-size: .98rem; letter-spacing: -.02em; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.dict-item summary::-webkit-details-marker { display: none; }
.dict-item summary::after { content: "+"; font-size: 1.3rem; line-height: 1; }
.dict-item[open] summary::after { content: "−"; }
.dict-item[open] summary { border-bottom: 2px dashed var(--ink); }
.dict-item p { padding: 12px 16px 14px; font-size: .96rem; line-height: 1.5; }

/* Comparador de partits: al mòbil, una columna amb selector */
.cmp-seg { display: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .ap-chapters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ap-steps.wide { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ap-camp { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .ap-hero { grid-template-columns: 1fr; gap: 18px; }
  .ap-tools { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ap-ch-head { grid-template-columns: 1fr; gap: 16px; }
  .ap-ch-headart { height: 130px; max-width: 260px; }
  .ap-ch-headart svg { height: 110px; }
  .ap-hemi, .ap-map, .ap-dh { grid-template-columns: 1fr; }
  .ap-senate { grid-template-columns: 1fr; }
  .ap-senate-out { position: static; }
}
@media (max-width: 760px) {
  .cmp-seg { display: flex; gap: 8px; margin: 12px 0 10px; }
  .cmp-seg button { flex: 1; display: flex; align-items: center; justify-content: center; gap: 8px; padding: 10px; border: var(--bw) solid var(--ink); border-radius: 12px; background: var(--card); font-family: var(--display); font-weight: 900; font-size: .95rem; cursor: pointer; box-shadow: var(--hard-sm); }
  .cmp-seg button i { font-style: normal; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--ink); color: var(--yellow); font-size: .72rem; }
  .cmp-seg button.on { background: var(--pc); color: #fff; text-shadow: 1px 1px 0 rgba(0, 0, 0, .35); }
  .cmp[data-show] { grid-template-columns: 1fr; }
  .cmp[data-show="A"] > .cmp-col:last-child, .cmp[data-show="B"] > .cmp-col:first-child { display: none; }
  .cmp[data-show] .cmp-head small { display: block; }
  .cmp[data-show] .cmp-cand { flex-direction: row; text-align: left; }
  .cmp[data-show] .cmp-cand p { font-size: .86rem; }
  .cmp[data-show] .cmp-rows dd { font-size: .92rem; }
}
@media (max-width: 640px) {
  .ap-prog.card { grid-template-columns: auto 1fr; padding: 16px; }
  .ap-ring-wrap { width: 78px; height: 78px; }
  .ap-prog-n b { font-size: 1.35rem; }
  .ap-prog-n span { font-size: .78rem; }
  .ap-prog-txt .btn { width: 100%; white-space: normal; text-align: left; }
  .ap-chapters { grid-template-columns: 1fr; gap: 12px; }
  .ap-ch { grid-template-columns: 104px 1fr; grid-template-rows: 1fr auto; }
  .ap-ch-art { grid-row: span 2; height: auto; min-height: 112px; border-bottom: 0; border-right: 2px dashed var(--ink); }
  .ap-ch-art svg { height: 72px; width: 90%; }
  .ap-ch-n { width: 30px; height: 30px; font-size: .75rem; top: 8px; left: 8px; }
  .ap-ch-body { padding: 12px 12px 2px; }
  .ap-ch-body b { font-size: .98rem; }
  .ap-ch-body small { font-size: .8rem; }
  .ap-st { margin: 6px 12px 12px; }
  .ap-ch.is-done::after { width: 24px; height: 24px; font-size: .75rem; top: 8px; right: 8px; }
  .ap-tools { grid-template-columns: 1fr; gap: 10px; }
  .ap-tool { padding: 12px 14px; }
  .ap-tool-ico { width: 42px; height: 42px; }
  .ap-compare { grid-template-columns: 1fr; }
  .ap-cards.four { grid-template-columns: 1fr; }
  .ap-steps.wide { grid-template-columns: 1fr; gap: 10px; }
  .ap-steps.wide .ap-step { grid-template-columns: 96px 1fr; column-gap: 12px; padding: 0 12px 0 0; align-items: center; }
  .ap-steps.wide .ap-step-art { grid-row: span 2; margin: 0; height: 100%; min-height: 96px; border-bottom: 0; border-right: 2px dashed var(--ink); }
  .ap-steps.wide .ap-step-art svg { height: 64px; }
  .ap-steps.wide .ap-step b { align-self: end; padding-top: 10px; }
  .ap-steps.wide .ap-step p { align-self: start; padding-bottom: 10px; }
  .ap-sort { grid-template-columns: 1fr; }
  .ap-sort-opts button { flex: 1; padding: 8px 6px; }
  .ap-camp { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ap-camp li.key { grid-column: span 2; }
  .ap-wrow { grid-template-columns: 96px 1fr 64px; font-size: .8rem; gap: 8px; }
  .ap-bb { grid-template-columns: 64px 1fr 56px; font-size: .8rem; gap: 8px; }
  .ap-mg-row { grid-template-columns: 1fr; gap: 4px; }
  .ap-mg-scale { margin-left: 0; }
  .ap-after li { grid-template-columns: 96px 1fr; column-gap: 10px; }
  .ap-after li::before { left: 47px; }
  .ap-after .k { font-size: .66rem; padding: 7px 8px; }
  .ap-inv-res { grid-template-columns: 1fr; }
  .ap-pager { grid-template-columns: 1fr; }
  .ap-pager .next { text-align: left; }
  .ap-quiz.card { padding: 16px; }
  .ap-result { grid-template-columns: 1fr; justify-items: start; }
  .ap-tool-hero { grid-template-columns: 1fr; gap: 12px; }
  .ap-tool-hero .ap-tool-ico { width: 60px; height: 60px; }
  .ap-tile small { font-size: .42rem; }
  .ap-tile b { font-size: .72rem; }
  .ap-tiles { gap: 3px; }
  .ap-tile { border-width: 1.5px; border-radius: 5px; }
  .ap-call { padding-left: 52px; }
  .ap-p { font-size: 1rem; }
}
.ap-range input[type="range"] { -webkit-appearance: none; appearance: none; height: 12px; margin: 8px 0; border-radius: 99px; background: var(--paper-2); border: 2px solid var(--ink); cursor: pointer; }
.ap-range input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 26px; height: 26px; border-radius: 50%; background: var(--pc, var(--red)); border: 2.5px solid var(--ink); box-shadow: 2px 2px 0 var(--ink); }
.ap-range input[type="range"]::-moz-range-thumb { width: 22px; height: 22px; border-radius: 50%; background: var(--pc, var(--red)); border: 2.5px solid var(--ink); box-shadow: 2px 2px 0 var(--ink); }
.ap-range input[type="range"]:focus-visible { outline: 3px solid var(--blue); outline-offset: 4px; }
.ap-range, .ap-senate-row { text-transform: none; letter-spacing: normal; color: var(--ink); }
.ap-range { font-size: .95rem; }
.ap-senate-row { font-size: .98rem; }
.ap-bb { grid-template-columns: 76px 1fr 74px; }
.ap-bb b { white-space: nowrap; }
.ap-after li { grid-template-columns: 136px 1fr; }
.ap-after li::before { left: 67px; }
.ap-after .k { font-size: .72rem; padding: 8px 10px; }
@media (max-width: 640px) {
  .ap-bb { grid-template-columns: 62px 1fr 64px; }
  .ap-bb b { font-size: .72rem; }
  .ap-after li { grid-template-columns: 104px 1fr; }
  .ap-after li::before { left: 51px; }
  .ap-after .k { font-size: .62rem; padding: 7px 7px; }
}

/* Aprèn · Part 1: context polític */
.ap-h2-sub { margin: -8px 0 16px; color: var(--ink-2); font-weight: 600; }

.ap-pres.card { padding: 18px; box-shadow: var(--hard); display: grid; gap: 10px; }
.ap-pres-bar { display: flex; height: 26px; border: var(--bw) solid var(--ink); border-radius: 8px; overflow: hidden; }
.ap-pres-bar i { display: block; height: 100%; border-right: 2px solid var(--ink); }
.ap-pres-bar i:last-child { border-right: 0; background-image: repeating-linear-gradient(-45deg, transparent 0 6px, rgba(255, 255, 255, .25) 6px 12px) !important; }
.ap-pres-years { display: flex; justify-content: space-between; font-size: .72rem; font-weight: 800; color: var(--muted); }
.ap-pres-list { list-style: none; margin: 4px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; }
.ap-pres-list li { display: grid; gap: 2px; padding: 8px 10px 8px 14px; border: 2px solid var(--ink); border-left: 7px solid var(--pc); border-radius: 10px; background: var(--paper); }
.ap-pres-list b { font-family: var(--display); font-weight: 800; font-size: .86rem; letter-spacing: -.02em; line-height: 1.15; }
.ap-pres-list span { font-size: .78rem; font-weight: 700; color: var(--ink-2); display: flex; gap: 6px; align-items: center; }
.ap-pres-list span i { font-style: normal; font-size: .66rem; font-weight: 900; color: #fff; background: var(--pc); border: 1.5px solid var(--ink); border-radius: 5px; padding: 0 5px; }

.ap-bip.card { padding: 18px; box-shadow: var(--hard); display: grid; gap: 12px; }
.ap-bip-chart { display: grid; grid-template-columns: repeat(14, minmax(0, 1fr)); gap: 6px; align-items: end; height: 230px; }
.ap-bip-col { display: grid; grid-template-rows: auto 1fr auto; height: 100%; text-align: center; gap: 4px; }
.ap-bip-col b { font-family: var(--display); font-weight: 900; font-size: .78rem; }
.ap-bip-stack { display: flex; flex-direction: column-reverse; justify-content: flex-start; border: 2px solid var(--ink); border-radius: 6px 6px 0 0; overflow: hidden; background: var(--paper); }
.ap-bip-stack i { display: block; width: 100%; }
.ap-bip-stack .ps, .ap-bip-leg i.ps { background: #e3101f; }
.ap-bip-stack .pp, .ap-bip-leg i.pp { background: #1e88d6; }
.ap-bip-col small { font-size: .66rem; font-weight: 800; color: var(--ink-2); white-space: nowrap; }
.ap-bip-col.mark b { color: var(--red); }
.ap-bip-col.mark .ap-bip-stack { box-shadow: 0 0 0 3px var(--yellow); }
.ap-bip-leg { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; font-size: .8rem; font-weight: 700; }
.ap-bip-leg span { display: inline-flex; align-items: center; gap: 6px; }
.ap-bip-leg i { width: 14px; height: 14px; border-radius: 4px; border: 1.5px solid var(--ink); }

.ap-leg { display: grid; gap: 12px; }
.ap-leg-filter { display: flex; flex-wrap: wrap; gap: 6px; }
.ap-leg-filter button { border: 2px solid var(--ink); background: var(--card); border-radius: 999px; padding: 6px 13px; font-weight: 800; font-size: .82rem; cursor: pointer; box-shadow: 2px 2px 0 var(--ink); }
.ap-leg-filter button::before { content: ""; display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--pc); margin-right: 6px; border: 1.5px solid var(--ink); vertical-align: 0; }
.ap-leg-filter button.on { background: var(--ink); color: var(--card); }
.ap-leg-list { display: grid; gap: 8px; }
.ap-leg-y { font-family: var(--display); font-weight: 900; font-size: 1.5rem; color: var(--card); background: var(--ink); justify-self: start; padding: 2px 12px; border-radius: 10px; margin-top: 8px; box-shadow: 3px 3px 0 var(--tone); }
.ap-leg-item { display: grid; grid-template-columns: 74px 1fr auto; gap: 12px; align-items: center; padding: 10px 14px; background: var(--card); border: 2px solid var(--ink); border-left: 7px solid var(--pc); border-radius: var(--radius-sm); }
.ap-leg-item .d { font-family: var(--display); font-weight: 900; font-size: .8rem; text-transform: uppercase; }
.ap-leg-item p { font-size: .94rem; line-height: 1.45; }
.ap-leg-item .cat { font-size: .66rem; font-weight: 900; text-transform: uppercase; letter-spacing: .06em; color: #fff; background: var(--pc); border: 1.5px solid var(--ink); border-radius: 6px; padding: 2px 7px; white-space: nowrap; }

.ap-iss { display: grid; gap: 10px; }
.ap-iss-tabs { display: flex; gap: 6px; overflow-x: auto; padding: 2px 2px 8px; scrollbar-width: none; }
.ap-iss-tabs::-webkit-scrollbar { display: none; }
.ap-iss-tabs button { flex: none; border: 2px solid var(--ink); background: var(--card); border-radius: 999px; padding: 7px 14px; font-weight: 800; font-size: .86rem; cursor: pointer; box-shadow: 2px 2px 0 var(--ink); }
.ap-iss-tabs button.on { background: var(--tone); color: #fff; text-shadow: 1px 1px 0 rgba(0, 0, 0, .3); }
.ap-iss-body.card { padding: 16px 18px; box-shadow: var(--hard); display: grid; gap: 12px; }
.ap-iss-why { font-size: 1rem; line-height: 1.5; padding: 10px 12px; background: #fff4d4; border: 2px dashed var(--ink); border-radius: var(--radius-sm); }
.ap-iss-rows { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.ap-iss-row { display: grid; grid-template-columns: 76px 1fr; gap: 10px; align-items: start; padding: 8px 10px; border: 2px solid var(--ink); border-left: 6px solid var(--pc); border-radius: 10px; background: var(--card); }
.ap-iss-row b { font-family: var(--display); font-weight: 900; font-size: .78rem; color: #fff; background: var(--pc); border: 1.5px solid var(--ink); border-radius: 6px; padding: 2px 6px; text-align: center; text-shadow: 1px 1px 0 rgba(0, 0, 0, .35); }
.ap-iss-row p { font-size: .88rem; line-height: 1.4; }

.ap-axes.card { padding: 18px; box-shadow: var(--hard); display: grid; gap: 18px; }
.ap-axis { display: grid; gap: 6px; }
.ap-axis-head b { font-family: var(--display); font-weight: 900; font-size: 1rem; text-transform: uppercase; letter-spacing: -.02em; margin-right: 8px; }
.ap-axis-head span { font-size: .86rem; color: var(--ink-2); font-weight: 600; }
.ap-axis-track { position: relative; height: calc(var(--rows) * 30px + 14px); margin: 4px 22px 0; background: linear-gradient(var(--ink), var(--ink)) 0 100% / 100% 3px no-repeat; }
.ap-axis-track.empty { height: 22px; background: linear-gradient(90deg, #e5eaff, #ffe1da) 0 100% / 100% 12px no-repeat; border-radius: 6px; }
.ap-axis-track::before, .ap-axis-track::after { content: ""; position: absolute; bottom: -5px; width: 3px; height: 13px; background: var(--ink); }
.ap-axis-track::before { left: 0; } .ap-axis-track::after { right: 0; }
.ap-axis-dot { position: absolute; bottom: calc(10px + var(--r) * 30px); transform: translateX(-50%); font-family: var(--display); font-weight: 900; font-size: .66rem; color: #fff; background: var(--pc); border: 1.5px solid var(--ink); border-radius: 6px; padding: 2px 5px; white-space: nowrap; text-shadow: 1px 1px 0 rgba(0, 0, 0, .35); }
.ap-axis-ends { display: flex; justify-content: space-between; font-size: .76rem; font-weight: 800; color: var(--ink-2); text-transform: uppercase; letter-spacing: .04em; }

.ap-fam { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.ap-fam-card { display: grid; gap: 6px; align-content: start; padding: 14px 16px; background: var(--card); border: var(--bw) solid var(--ink); border-radius: var(--radius); box-shadow: 4px 4px 0 var(--fc); }
.ap-fam-card b { font-family: var(--display); font-weight: 900; font-size: 1rem; letter-spacing: -.02em; display: flex; align-items: center; gap: 8px; }
.ap-fam-card b::before { content: ""; width: 14px; height: 14px; border-radius: 50%; background: var(--fc); border: 2px solid var(--ink); flex: none; }
.ap-fam-card p { font-size: .9rem; line-height: 1.45; color: var(--ink-2); }
.ap-fam-parties { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 2px; }
.ap-fam-parties button { font-family: var(--display); font-weight: 900; font-size: .72rem; color: #fff; background: var(--pc); border: 2px solid var(--ink); border-radius: 7px; padding: 3px 8px; cursor: pointer; box-shadow: 2px 2px 0 var(--ink); text-shadow: 1px 1px 0 rgba(0, 0, 0, .35); }
.ap-fam-parties button:hover { transform: translate(-1px, -1px); }

@media (max-width: 640px) {
  .ap-bip-chart { gap: 3px; height: 200px; }
  .ap-bip-col b { font-size: .6rem; }
  .ap-bip-col small { font-size: .5rem; }
  .ap-leg-item { grid-template-columns: 1fr auto; gap: 4px 10px; }
  .ap-leg-item .d { grid-column: 1; }
  .ap-leg-item .cat { grid-column: 2; grid-row: 1; justify-self: end; }
  .ap-leg-item p { grid-column: 1 / -1; }
  .ap-iss-rows { grid-template-columns: 1fr; }
  .ap-iss-row { grid-template-columns: 64px 1fr; }
  .ap-fam { grid-template-columns: 1fr; }
  .ap-axis-track { margin: 4px 14px 0; height: calc(var(--rows) * 26px + 12px); }
  .ap-axis-dot { bottom: calc(9px + var(--r) * 26px); font-size: .58rem; padding: 1px 4px; }
  .ap-pres-list { grid-template-columns: 1fr 1fr; }
}

.legal-table.two .lt-row { grid-template-columns: 1.4fr 1fr; }
.ap-iss-row { grid-template-columns: 86px 1fr; }
.ap-iss-row b { font-size: .72rem; overflow-wrap: anywhere; }
@media (max-width: 640px) { .ap-iss-row { grid-template-columns: 76px 1fr; } }

/* =========================================================
   Actualitat: titulars amb tema, partits i recomptes propis
   ========================================================= */
.news { display: grid; gap: 16px; }
.nw-loading { display: flex; gap: 8px; align-items: center; font-weight: 700; color: var(--ink-2); padding: 20px 0; }
.nw-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.nw-live { display: inline-flex; align-items: center; gap: 8px; background: var(--red); color: #fff; font-family: var(--display); font-weight: 900; font-size: .76rem; text-transform: uppercase; letter-spacing: .06em; padding: 6px 12px; border-radius: 999px; border: 2px solid var(--ink); box-shadow: 2px 2px 0 var(--ink); }
.nw-live .dot-live { background: #fff; }
.nw-count { font-weight: 600; color: var(--ink-2); font-size: .9rem; }
.nw-count b { font-family: var(--display); color: var(--ink); }

.nw-ticker { overflow: hidden; background: var(--ink); border: var(--bw) solid var(--ink); border-radius: 12px; box-shadow: var(--hard-sm); -webkit-mask-image: linear-gradient(90deg, transparent, #000 3%, #000 97%, transparent); mask-image: linear-gradient(90deg, transparent, #000 3%, #000 97%, transparent); }
.nw-ticker-in { display: flex; width: max-content; animation: nwTicker 110s linear infinite; }
.nw-ticker:hover .nw-ticker-in, .nw-ticker:focus-within .nw-ticker-in { animation-play-state: paused; }
.nw-ticker a { display: inline-flex; align-items: center; gap: 8px; padding: 11px 0 11px 22px; color: var(--card); text-decoration: none; font-weight: 700; font-size: .88rem; white-space: nowrap; }
.nw-ticker a:hover { color: var(--yellow); }
.nw-ticker a b { font-family: var(--display); font-weight: 900; font-size: .62rem; text-transform: uppercase; color: #fff; background: var(--oc); border: 1.5px solid var(--card); border-radius: 5px; padding: 1px 6px; }
.nw-ticker a::after { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--yellow); margin-left: 14px; }
@keyframes nwTicker { to { transform: translateX(-50%); } }

.nw-dash { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.nw-panel { background: var(--card); border: var(--bw) solid var(--ink); border-radius: var(--radius); box-shadow: var(--hard); padding: 16px; display: grid; gap: 12px; align-content: start; }
.nw-panel header { display: grid; gap: 2px; }
.nw-panel header h3 { font-family: var(--display); font-weight: 900; text-transform: uppercase; letter-spacing: -.02em; font-size: 1.02rem; }
.nw-panel header span { font-size: .78rem; color: var(--muted); font-weight: 600; }
.nw-who { display: grid; gap: 6px; }
.nw-whorow { display: grid; grid-template-columns: 76px 1fr 34px; gap: 10px; align-items: center; background: none; border: 0; padding: 3px 4px; border-radius: 8px; cursor: pointer; font: inherit; color: inherit; text-align: left; }
.nw-whorow:hover, .nw-whorow.on { background: #fff4d4; }
.nw-whorow .sig { font-family: var(--display); font-weight: 900; font-size: .7rem; color: #fff; background: var(--pc); border: 1.5px solid var(--ink); border-radius: 6px; padding: 2px 6px; text-align: center; text-shadow: 1px 1px 0 rgba(0, 0, 0, .35); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nw-whorow .track { height: 14px; background: var(--paper); border: 2px solid var(--ink); border-radius: 99px; overflow: hidden; }
.nw-whorow .track i { display: block; height: 100%; background: var(--pc); transition: width .6s var(--ease); }
.nw-whorow b { font-family: var(--display); font-weight: 900; font-size: .9rem; text-align: right; }
.nw-topics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.nw-topic { display: grid; grid-template-columns: 30px 1fr auto; align-items: center; gap: 8px; padding: 7px 10px 7px 7px; border: 2px solid var(--ink); border-radius: 10px; background: color-mix(in srgb, var(--tc) 12%, var(--card)); font: inherit; font-weight: 800; font-size: .86rem; color: var(--ink); text-align: left; cursor: pointer; box-shadow: 2px 2px 0 var(--ink); }
.nw-topic:hover { transform: translate(-1px, -1px); }
.nw-topic svg { width: 30px; height: 30px; padding: 5px; border-radius: 8px; background: var(--tc); color: #fff; border: 1.5px solid var(--ink); }
.nw-topic b { font-family: var(--display); font-weight: 900; }
.nw-topic span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nw-topic.on { background: var(--tc); color: #fff; text-shadow: 1px 1px 0 rgba(0, 0, 0, .3); }

.nw-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.nw-select { display: flex; align-items: center; gap: 8px; text-transform: none; letter-spacing: normal; font-size: .86rem; color: var(--ink); font-weight: 800; }
.nw-select select { font: inherit; font-weight: 700; padding: 8px 12px; border: 2px solid var(--ink); border-radius: 10px; background: var(--card); box-shadow: 2px 2px 0 var(--ink); color: var(--ink); }
.nw-active { display: flex; gap: 6px; flex-wrap: wrap; }
.nw-active button { border: 2px solid var(--ink); background: var(--yellow); border-radius: 999px; padding: 5px 12px; font: inherit; font-weight: 800; font-size: .82rem; cursor: pointer; }
.nw-n { margin-left: auto; font-weight: 800; font-size: .86rem; color: var(--muted); }

.nw-card { --tc: var(--red); display: grid; grid-template-rows: auto 1fr; text-decoration: none; color: inherit; background: var(--card); border: var(--bw) solid var(--ink); border-radius: var(--radius); box-shadow: 4px 4px 0 var(--tc); overflow: hidden; transition: transform .15s var(--ease), box-shadow .15s var(--ease); animation: cardIn .4s var(--ease) both; }
.nw-card:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--tc); }
.nw-art { position: relative; display: grid; place-items: center; height: 120px; background: var(--dots) 0 0 / 9px 9px, color-mix(in srgb, var(--tc) 20%, var(--card)); border-bottom: 2px dashed var(--ink); }
.nw-art > svg { height: 90px; width: 70%; }
.nw-tag { position: absolute; left: 10px; top: 10px; display: inline-flex; align-items: center; gap: 5px; font-family: var(--display); font-weight: 900; font-size: .62rem; text-transform: uppercase; letter-spacing: .04em; color: #fff; background: var(--tc); border: 1.5px solid var(--ink); border-radius: 6px; padding: 3px 7px 3px 5px; text-shadow: 1px 1px 0 rgba(0, 0, 0, .3); }
.nw-tag svg { width: 14px; height: 14px; }
.nw-body { display: grid; gap: 8px; padding: 12px 14px 14px; align-content: start; }
.nw-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: .74rem; font-weight: 700; color: var(--muted); }
.nw-out { font-family: var(--display); font-weight: 900; font-size: .62rem; text-transform: uppercase; letter-spacing: .03em; color: #fff; background: var(--oc); border: 1.5px solid var(--ink); border-radius: 5px; padding: 2px 6px; }
.nw-now { font-family: var(--display); font-weight: 900; font-size: .58rem; text-transform: uppercase; color: #fff; background: var(--red); border-radius: 999px; padding: 2px 7px; animation: nwNow 1.6s infinite; }
@keyframes nwNow { 50% { opacity: .5; } }
.nw-h { font-weight: 800; font-size: 1rem; line-height: 1.32; color: var(--ink); }
.nw-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 2px; }
.nw-ps { display: flex; flex-wrap: wrap; gap: 4px; }
.nw-pc { font-style: normal; font-family: var(--display); font-weight: 900; font-size: .6rem; color: #fff; background: var(--pc); border: 1.5px solid var(--ink); border-radius: 5px; padding: 1px 6px; text-shadow: 1px 1px 0 rgba(0, 0, 0, .35); text-decoration: none; white-space: nowrap; }
.nw-pc.big { font-size: .72rem; padding: 3px 9px; box-shadow: 2px 2px 0 var(--ink); }
.nw-pc.big b { font-weight: 900; }
.nw-go { font-size: .74rem; font-weight: 800; color: var(--ink-2); white-space: nowrap; }
.nw-card.feature { grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); grid-template-rows: auto; box-shadow: 6px 6px 0 var(--tc); }
.nw-card.feature .nw-art { height: auto; min-height: 230px; border-bottom: 0; border-right: 2px dashed var(--ink); }
.nw-card.feature .nw-art > svg { height: 150px; }
.nw-card.feature .nw-tag { font-size: .72rem; }
.nw-card.feature .nw-body { padding: 22px 24px; align-content: center; gap: 14px; }
.nw-card.feature .nw-h { font-family: var(--display); font-weight: 800; font-size: clamp(1.15rem, 2.6vw, 1.65rem); letter-spacing: -.03em; line-height: 1.2; }
.nw-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.nw-empty { padding: 20px 0; }

/* Franja de la portada */
.news-teaser { margin-top: 30px; display: grid; gap: 12px; }
.nt-head { display: flex; align-items: center; gap: 10px 14px; flex-wrap: wrap; }
.nt-head h2 { display: flex; align-items: center; gap: 10px; font-family: var(--display); font-weight: 900; text-transform: uppercase; letter-spacing: -.03em; font-size: clamp(1.3rem, 3vw, 1.7rem); }
.nt-upd { font-size: .8rem; font-weight: 700; color: var(--muted); }
.nt-all { margin-left: auto; font-weight: 800; font-size: .86rem; color: var(--ink); background: var(--card); border: 2px solid var(--ink); border-radius: 999px; padding: 6px 13px; text-decoration: none; box-shadow: 2px 2px 0 var(--ink); }
.nt-all:hover { background: var(--yellow); }
.nt-row { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(250px, 1fr); gap: 14px; overflow-x: auto; padding: 4px 8px 14px 2px; scroll-snap-type: x mandatory; scrollbar-width: thin; }
.nt-row .nw-card { scroll-snap-align: start; }
.nw-card.mini .nw-art { height: 92px; }
.nw-card.mini .nw-art > svg { height: 68px; }
.nw-card.mini .nw-h { font-size: .92rem; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.nt-who { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-weight: 800; font-size: .84rem; }

/* Comparador de partits */
.cmp-news { padding: 4px 16px 16px; display: grid; gap: 6px; border-top: 2px dashed var(--ink); margin-top: 4px; padding-top: 12px; }
.cmp-news:empty { display: none; }
.cmp-news h5 { font-size: .68rem; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.cmp-news a { display: grid; gap: 2px; text-decoration: none; color: inherit; padding: 8px 10px; border: 2px solid var(--ink); border-left: 5px solid var(--pc); border-radius: 10px; background: var(--paper); }
.cmp-news a:hover { background: #fff4d4; }
.cmp-news a span { font-weight: 700; font-size: .86rem; line-height: 1.3; }
.cmp-news a small { font-size: .72rem; color: var(--muted); font-weight: 700; }
.cmp-news .linklike { justify-self: start; font-size: .8rem; margin-top: 2px; }

/* Capítol «Què hi ha en joc» */
.ap-iss-news { display: grid; gap: 8px; margin-top: 4px; }
.ap-iss-news h5 { font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.ap-iss-news .nt-row { grid-auto-columns: minmax(230px, 1fr); }

@media (prefers-reduced-motion: reduce) { .nw-ticker-in { animation: none; } .nw-now { animation: none; } }
@media (max-width: 900px) {
  .nw-dash { grid-template-columns: 1fr; }
  .nw-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .nw-grid { grid-template-columns: 1fr; gap: 12px; }
  .nw-card.feature { grid-template-columns: 1fr; }
  .nw-card.feature .nw-art { min-height: 150px; border-right: 0; border-bottom: 2px dashed var(--ink); }
  .nw-card.feature .nw-art > svg { height: 110px; }
  .nw-card.feature .nw-body { padding: 14px 16px; }
  .nw-grid .nw-card { grid-template-columns: 92px 1fr; grid-template-rows: auto; }
  .nw-grid .nw-art { height: auto; min-height: 100%; border-bottom: 0; border-right: 2px dashed var(--ink); }
  .nw-grid .nw-art > svg { height: 54px; width: 80%; }
  .nw-grid .nw-tag { left: 6px; top: 6px; padding: 3px; gap: 0; font-size: 0; }
  .nw-grid .nw-h { font-size: .92rem; }
  .nw-grid .nw-body { padding: 10px 12px 12px; gap: 6px; }
  .nw-topic { font-size: .8rem; grid-template-columns: 26px 1fr auto; }
  .nw-topic svg { width: 26px; height: 26px; padding: 4px; }
  .nt-row { grid-auto-columns: 80%; }
  .nt-all { margin-left: 0; }
  .nw-whorow { grid-template-columns: 66px 1fr 30px; }
  .nw-n { margin-left: 0; }
}

.nw-now { font-size: .66rem; padding: 2px 8px; }

/* =========================================================
   Simulador de campanya (Campanya 29N)
   ========================================================= */
.sim-intro { display: grid; gap: 14px; margin: 22px auto 22px; max-width: 560px; text-align: left; }
.sim-modes { display: grid; gap: 8px; }
.sim-mode { position: relative; display: grid; gap: 2px; padding: 12px 14px 12px 44px; border: 2px solid var(--ink); border-radius: 12px; background: var(--card); cursor: pointer; transition: transform .12s var(--ease), box-shadow .12s var(--ease); }
.sim-mode input { position: absolute; left: 14px; top: 15px; width: 18px; height: 18px; accent-color: var(--c); }
.sim-mode b { font-family: var(--display); font-weight: 800; font-size: .92rem; }
.sim-mode small { color: var(--ink-2); font-size: .86rem; font-weight: 500; text-transform: none; letter-spacing: 0; }
.sim-mode b { text-transform: none; letter-spacing: -.01em; }
.sim-mode:has(input:checked) { box-shadow: var(--hard-sm); background: color-mix(in srgb, var(--c) 12%, var(--card)); }
.sim-mode.soon { opacity: .55; cursor: default; }
.sim-mode em { position: absolute; right: 12px; top: 12px; font-style: normal; font-size: .62rem; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; background: var(--ink); color: var(--card); padding: 3px 8px; border-radius: 99px; }
.sim-diffs { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.sim-diffs > span { font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; color: var(--ink-2); margin-right: 4px; }
.sim-diffs label { cursor: pointer; position: relative; }
.sim-diffs input { position: absolute; opacity: 0; pointer-events: none; }
.sim-diffs label span { display: inline-block; padding: 7px 14px; border: 2px solid var(--ink); border-radius: 99px; font-weight: 700; font-size: .88rem; background: var(--card); }
.sim-diffs input:checked + span { background: var(--ink); color: var(--card); }
.sim-diffs input:focus-visible + span { outline: 3px solid var(--blue); outline-offset: 2px; }
.sim-resume { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 2px dashed var(--ink); border-radius: 12px; background: var(--paper); }
.sim-resume > div { flex: 1; min-width: 0; display: grid; }
.sim-resume small { color: var(--ink-2); }
.intro .sim-fiction, .sim-fiction { font-size: .78rem; color: var(--muted); margin: 0; text-align: center; }

.sim-wrap { display: grid; gap: 16px; }
.sim-card { padding: 24px; }
.sim-kick { margin: 0; font-size: .7rem; font-weight: 800; text-transform: uppercase; letter-spacing: .12em; color: var(--ink-2); }
.sim-h { font-family: var(--display); font-weight: 900; font-size: clamp(1.35rem, 3.6vw, 1.9rem); letter-spacing: -.03em; margin: 6px 0 4px; }
.sim-sub { color: var(--ink-2); margin: 6px 0 0; }
.sim-lead { font-size: 1.06rem; margin: 8px 0 0; }
.sim-note { font-size: .78rem; color: var(--muted); margin: 10px 0 0; }
.sim-actions-row { display: flex; gap: 10px; align-items: center; justify-content: flex-end; flex-wrap: wrap; margin-top: 20px; }
.sim-count { margin-right: auto; font-weight: 700; color: var(--ink-2); }
.sim-logo { --pc: var(--ink); display: inline-grid; place-items: center; min-width: 30px; height: 30px; padding: 0 6px; border-radius: 8px; background: var(--pc); color: #fff; border: 2px solid var(--ink); font-family: var(--display); font-weight: 900; font-size: .62rem; letter-spacing: -.02em; flex: none; }
.sim-logo.xl { min-width: 64px; height: 64px; border-radius: 16px; font-size: 1.05rem; box-shadow: var(--hard-sm); }

/* Passos de la creació */
.sim-steps { list-style: none; margin: 0; padding: 0; display: flex; gap: 6px; }
.sim-steps li { flex: 1; display: flex; align-items: center; gap: 6px; padding: 6px 8px; border-radius: 99px; background: var(--paper-2); font-size: .74rem; font-weight: 700; color: var(--ink-2); min-width: 0; }
.sim-steps li i { font-style: normal; display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--card); border: 2px solid var(--ink); font-size: .66rem; font-weight: 900; flex: none; color: var(--ink); }
.sim-steps li span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sim-steps li.on { background: var(--ink); color: var(--card); }
.sim-steps li.on i { background: var(--yellow); }
.sim-steps li.done i { background: var(--ok); color: #fff; }
.sim-create { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 8px 24px; }
.sim-create .sim-actions-row { grid-column: 1 / -1; }
.sim-field { display: grid; gap: 6px; margin-top: 14px; }
.sim-field > span { font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; color: var(--ink-2); }
.sim-field input { font: inherit; font-weight: 700; font-size: 1.05rem; padding: 10px 12px; border: 2px solid var(--ink); border-radius: 10px; background: #fff; color: var(--ink); width: 100%; }
.sim-field input:focus { outline: 3px solid var(--blue); outline-offset: 1px; }
.sim-field-s input { max-width: 140px; text-transform: uppercase; }
.sim-swatches { display: flex; flex-wrap: wrap; gap: 8px; }
.sim-sw { width: 34px; height: 34px; border-radius: 50%; background: var(--pc); border: 2.5px solid var(--ink); cursor: pointer; transition: transform .12s var(--ease); }
.sim-sw.on { transform: scale(1.15); box-shadow: 0 0 0 3px var(--card), 0 0 0 6px var(--ink); }
.sim-err { color: var(--ko); font-weight: 700; min-height: 1.2em; margin: 10px 0 0; }
.sim-create-prev { display: grid; place-items: center; }
.sim-poster { --pc: var(--ink); width: 100%; max-width: 260px; aspect-ratio: 3 / 4; border: var(--bw) solid var(--ink); border-radius: 14px; box-shadow: var(--hard); background: var(--dots) 0 0 / 10px 10px, color-mix(in srgb, var(--pc) 22%, var(--card)); display: grid; place-content: center; justify-items: center; gap: 12px; padding: 20px; text-align: center; transform: rotate(2deg); }
.sim-poster b { font-family: var(--display); font-weight: 900; font-size: 1.3rem; line-height: 1.05; letter-spacing: -.03em; overflow-wrap: anywhere; }
.sim-poster small { font-size: .7rem; font-weight: 800; text-transform: uppercase; letter-spacing: .12em; color: var(--ink-2); }
.sim-poster.big { aspect-ratio: auto; max-width: none; transform: none; padding: 26px; }

.sim-dil { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 24px; align-items: center; }
.sim-dil-opts { display: grid; gap: 10px; margin-top: 16px; }
.sim-opt { display: flex; gap: 12px; align-items: flex-start; text-align: left; font: inherit; font-weight: 600; font-size: 1rem; color: var(--ink); padding: 14px 16px; background: var(--card); border: 2px solid var(--ink); border-radius: 12px; cursor: pointer; box-shadow: var(--hard-sm); transition: transform .12s var(--ease), box-shadow .12s var(--ease), background .12s; }
.sim-opt i { font-style: normal; flex: none; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; background: var(--ink); color: var(--card); font-family: var(--display); font-weight: 900; font-size: .74rem; }
.sim-opt:hover:not(:disabled) { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--ink); background: color-mix(in srgb, var(--c) 10%, var(--card)); }
.sim-opt:active:not(:disabled) { transform: translate(2px, 2px); box-shadow: 0 0 0 var(--ink); }
.sim-opt:disabled { cursor: default; opacity: .5; }
.sim-opt.picked { opacity: 1; background: var(--yellow); }
.sim-dil-skip { margin-top: 10px; font-size: .86rem; }
.sim-dil-side { display: grid; gap: 10px; }
.sim-compass { width: 100%; max-width: 280px; margin: 0 auto; display: block; }
.sim-cp-bg { fill: var(--paper); stroke: var(--ink); stroke-width: 2; }
.sim-cp-axis { stroke: var(--ink); stroke-width: 1; stroke-dasharray: 3 4; opacity: .5; }
.sim-cp-l { font-size: 8px; font-weight: 800; fill: var(--ink-2); text-transform: uppercase; letter-spacing: .06em; }
.sim-cp-r circle { stroke: var(--ink); stroke-width: 1.5; opacity: .75; }
.sim-cp-r text { font-size: 7px; font-weight: 800; fill: var(--ink-2); }
.sim-cp-me { stroke: var(--ink); stroke-width: 3; }
.sim-terbar { max-width: 280px; margin: 0 auto; width: 100%; }
.sim-terbar-track { position: relative; height: 14px; border-radius: 99px; background: linear-gradient(90deg, #cfd8ff, var(--paper-2), #ffe2a8); border: 2px solid var(--ink); }
.sim-terbar-track i { position: absolute; top: 50%; width: 9px; height: 9px; border-radius: 50%; background: var(--pc); border: 1.5px solid var(--ink); transform: translate(-50%, -50%); opacity: .8; }
.sim-terbar-track b { position: absolute; top: 50%; width: 18px; height: 18px; border-radius: 50%; background: var(--pc); border: 3px solid var(--ink); transform: translate(-50%, -50%); }
.sim-terbar-l { display: flex; justify-content: space-between; font-size: .64rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-2); margin-top: 4px; }
.sim-ideo { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 14px; }
.sim-ideo div { padding: 10px; border: 2px solid var(--ink); border-radius: 10px; background: var(--paper); display: grid; }
.sim-ideo small { font-size: .64rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-2); }
.sim-ideo b { font-size: .92rem; line-height: 1.2; }

.sim-themes { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.sim-theme { position: relative; overflow: hidden; font: inherit; font-weight: 700; font-size: .92rem; padding: 9px 14px; border: 2px solid var(--ink); border-radius: 99px; background: var(--card); color: var(--ink); cursor: pointer; }
.sim-theme.on { background: var(--ink); color: var(--card); box-shadow: 3px 3px 0 var(--c); }
.sim-attrs { display: grid; gap: 10px; margin-top: 16px; }
.sim-attr { display: flex; align-items: center; gap: 14px; justify-content: space-between; padding: 12px 14px; border: 2px solid var(--ink); border-radius: 12px; background: var(--paper); }
.sim-attr > div:first-child { display: grid; min-width: 0; }
.sim-attr small { color: var(--ink-2); font-size: .84rem; }
.sim-attr-ctl { display: flex; align-items: center; gap: 8px; flex: none; }
.sim-pm { width: 34px; height: 34px; border-radius: 10px; border: 2px solid var(--ink); background: var(--card); font-size: 1.2rem; font-weight: 900; cursor: pointer; color: var(--ink); line-height: 1; }
.sim-pm:disabled { opacity: .3; cursor: default; }
.sim-pips { display: flex; gap: 4px; }
.sim-pips i { width: 12px; height: 22px; border-radius: 4px; border: 2px solid var(--ink); background: var(--card); }
.sim-pips i.on { background: var(--c); }
.sim-summary { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.3fr); gap: 24px; align-items: center; }
.sim-sum-list { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 6px; }
.sim-sum-list li { display: grid; grid-template-columns: 110px 1fr; gap: 10px; padding: 8px 0; border-bottom: 1.5px dashed var(--paper-2); font-size: .92rem; }
.sim-sum-list b { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-2); padding-top: 2px; }

/* Campanya */
.sim-daybar { position: sticky; top: 70px; z-index: 6; display: flex; align-items: center; gap: 12px 18px; padding: 12px 14px 12px 16px; border: var(--bw) solid var(--ink); border-radius: var(--radius); background: var(--ink); color: var(--card); box-shadow: 5px 5px 0 var(--c); }
.sim-daybar .sim-logo { border-color: var(--card); min-width: 40px; height: 40px; border-radius: 10px; font-size: .7rem; }
.sim-daybar [data-endday] { margin-left: auto; white-space: nowrap; border-color: var(--card); box-shadow: 3px 3px 0 var(--card); }
.sim-daybar [data-endday].armed { background: var(--yellow); color: var(--ink); }
.sim-day { display: grid; }
.sim-day small, .sim-slots small { font-size: .62rem; font-weight: 800; text-transform: uppercase; letter-spacing: .12em; opacity: .75; }
.sim-day b { font-family: var(--display); font-weight: 900; font-size: 1.5rem; line-height: 1.1; }
.sim-day b span { font-size: .9rem; opacity: .7; }
.sim-slots { display: grid; gap: 4px; }
.sim-slots span { display: flex; gap: 6px; }
.sim-slots i { width: 22px; height: 22px; border-radius: 50%; background: var(--yellow); border: 2px solid var(--card); }
.sim-slots i.used { background: transparent; opacity: .45; }
.sim-meters { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.sim-meter { padding: 10px 12px; border: 2px solid var(--ink); border-radius: 12px; background: var(--card); display: grid; gap: 2px; }
.sim-meter small { font-size: .62rem; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; color: var(--ink-2); }
.sim-meter b { font-family: var(--display); font-weight: 900; font-size: 1.15rem; font-variant-numeric: tabular-nums; }
.sim-meter span { height: 6px; border-radius: 99px; background: var(--paper-2); overflow: hidden; }
.sim-meter span i { display: block; height: 100%; background: var(--ok); border-radius: inherit; transition: width .4s var(--ease); }
.sim-meter.warn span i { background: var(--ko); }
.sim-meter.warn b { color: var(--ko); }
.sim-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.sim-grid2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.sim-side { display: grid; gap: 16px; }
.sim-grid .card, .sim-grid2 .card { padding: 16px; box-shadow: var(--hard); }
.sim-cardhead { display: grid; gap: 2px; margin-bottom: 12px; }
.sim-cardhead h4, .sim-acts h4 { font-family: var(--display); font-weight: 800; font-size: .95rem; }
.sim-cardhead small { color: var(--ink-2); font-size: .8rem; }
.sim-tiles { gap: 3px; }
.sim-tile { --k: 0%; background: color-mix(in srgb, var(--pc) var(--k), var(--card)); position: relative; }
.sim-tile.dark { color: #fff; }
.sim-tile .sim-mk { position: absolute; top: -6px; right: -4px; font-size: .55rem; line-height: 1; color: var(--ink); background: var(--yellow); border-radius: 99px; padding: 1px 3px; border: 1.5px solid var(--ink); letter-spacing: -.05em; }
.sim-tile .sim-mk:empty { display: none; }
.sim-tile.sel { outline: 3px solid var(--ink); outline-offset: 2px; transform: scale(1.12); z-index: 3; }
.sim-legend { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 18px; font-size: .72rem; font-weight: 700; color: var(--ink-2); }
.sim-legend i { width: 70px; height: 10px; border-radius: 99px; border: 1.5px solid var(--ink); background: linear-gradient(90deg, var(--card), var(--pc)); }
.sim-legend em { font-style: normal; margin-left: auto; }
.sim-prov h4 { font-family: var(--display); font-weight: 900; font-size: 1.25rem; letter-spacing: -.02em; }
.sim-prov-head { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.sim-prov-seats { text-align: center; display: grid; line-height: 1; padding: 6px 10px; border: 2px solid var(--ink); border-radius: 10px; background: var(--yellow); }
.sim-prov-seats b { font-family: var(--display); font-weight: 900; font-size: 1.4rem; }
.sim-prov-seats small { font-size: .6rem; font-weight: 800; text-transform: uppercase; }
.sim-prov-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 10px; }
.sim-prov-tags span { font-size: .72rem; font-weight: 700; padding: 3px 8px; border-radius: 99px; background: var(--paper); border: 1.5px solid var(--ink); }
.sim-prov-aw { font-size: .86rem; margin: 10px 0 0; }
.sim-prov-seg { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: .8rem; margin: 6px 0 0; color: var(--ink-2); }
.sim-prov-seg small { width: 100%; font-size: .62rem; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; }
.sim-prov-btns, .sim-act-list { display: grid; gap: 8px; margin-top: 12px; }
.sim-act { position: relative; display: grid; gap: 2px; text-align: left; font: inherit; color: var(--ink); padding: 10px 52px 10px 12px; border: 2px solid var(--ink); border-radius: 12px; background: var(--card); cursor: pointer; box-shadow: var(--hard-sm); transition: transform .12s var(--ease), box-shadow .12s var(--ease); }
.sim-act b { font-size: .95rem; }
.sim-act small { font-size: .78rem; color: var(--ink-2); line-height: 1.3; }
.sim-act em { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); font-style: normal; font-family: var(--display); font-weight: 900; font-size: .85rem; background: var(--yellow); border: 2px solid var(--ink); border-radius: 99px; min-width: 32px; padding: 3px 6px; text-align: center; }
.sim-act:hover:not(:disabled) { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--ink); }
.sim-act:active:not(:disabled) { transform: translate(2px, 2px); box-shadow: 0 0 0 var(--ink); }
.sim-act:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; }
.sim-themepick { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; padding-top: 12px; border-top: 2px dashed var(--paper-2); }
.sim-themepick > small { width: 100%; font-weight: 700; color: var(--ink-2); }
.sim-themepick .sim-theme { font-size: .82rem; padding: 7px 12px 9px; }
.sim-themepick .sim-theme i { position: absolute; left: 0; bottom: 0; height: 4px; background: var(--c); }
.sim-themepick .sim-theme.prio { border-color: var(--c); box-shadow: inset 0 0 0 1px var(--c); }
.sim-bars { display: grid; gap: 6px; }
.sim-bar { display: grid; grid-template-columns: 46px 1fr 56px 34px; gap: 8px; align-items: center; font-size: .84rem; }
.sim-bar-n { font-weight: 800; font-size: .74rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sim-bar-t { height: 14px; border-radius: 4px; background: var(--paper); overflow: hidden; }
.sim-bar-t i { display: block; height: 100%; background: var(--pc); border-right: 2px solid var(--ink); transition: width .5s var(--ease); }
.sim-bar b { text-align: right; font-variant-numeric: tabular-nums; }
.sim-bar small { font-size: .7rem; font-weight: 800; color: var(--muted); }
.sim-bar small.up { color: var(--ok); }
.sim-bar small.down { color: var(--ko); }
.sim-bar.me { background: color-mix(in srgb, var(--yellow) 45%, transparent); border-radius: 6px; padding: 2px 4px; margin: 0 -4px; }
.sim-feed ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.sim-feed li { font-size: .86rem; padding: 8px 10px; border-left: 4px solid var(--ok); background: var(--paper); border-radius: 0 8px 8px 0; }
.sim-feed li.bad { border-color: var(--ko); }
.sim-feed li.empty { border-color: var(--paper-2); color: var(--muted); }
.sim-feed li small { display: block; font-size: .62rem; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.sim-feed li.fresh { animation: simIn .5s var(--ease); }
@keyframes simIn { from { opacity: 0; transform: translateY(-8px); background: var(--yellow); } }
.sim-endbar { display: flex; justify-content: center; }
.sim-endbar .btn { min-width: 260px; }
.btn.pulse { animation: simPulse 1.4s var(--ease) infinite; }
@keyframes simPulse { 50% { transform: translate(-2px, -2px) scale(1.04); } }

/* Resum del dia, imprevistos i debat */
.sim-moves { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 8px; }
.sim-moves li { display: flex; gap: 10px; align-items: center; font-size: .92rem; }
.sim-attacks { display: grid; gap: 8px; margin-top: 14px; }
.sim-attacks p { display: flex; gap: 10px; align-items: center; margin: 0; padding: 10px 12px; border-radius: 10px; background: var(--ko-soft); border: 2px solid var(--ko); font-weight: 600; }
.sim-newpoll { margin-top: 18px; padding-top: 16px; border-top: 2px dashed var(--paper-2); }
.sim-newpoll h4 { font-family: var(--display); font-weight: 800; font-size: .95rem; margin-bottom: 10px; }
.sim-event { overflow: hidden; }
.sim-event-stamp { position: absolute; right: -14px; top: -14px; width: 96px; height: 96px; border-radius: 50%; background: var(--yellow); border: var(--bw) solid var(--ink); display: grid; place-items: center; font-family: var(--display); font-weight: 900; font-size: 2.6rem; transform: rotate(12deg); }
.sim-event .sim-h, .sim-event .sim-lead { padding-right: 70px; }
.sim-outcome { margin-top: 16px; padding: 14px 16px; border-radius: 12px; background: var(--ink); color: var(--card); display: grid; gap: 12px; justify-items: start; animation: simIn .4s var(--ease); }
.sim-outcome p { margin: 0; font-weight: 600; }
.sim-deb-top { display: flex; align-items: center; gap: 10px; }
.sim-onair { font-size: .62rem; font-weight: 900; text-transform: uppercase; letter-spacing: .14em; color: #fff; background: var(--ko); padding: 3px 9px; border-radius: 4px; animation: simBlink 1.6s steps(2) infinite; }
@keyframes simBlink { 50% { opacity: .55; } }
.sim-deb-stage { display: flex; justify-content: center; align-items: flex-end; gap: 10px; margin: 18px 0 6px; padding: 16px 10px 0; border-radius: 12px; background: linear-gradient(180deg, var(--ink) 0 70%, var(--paper-2) 70%); }
.sim-podium { display: grid; place-items: center; width: 52px; height: 40px; background: var(--pc); color: #fff; font-family: var(--display); font-weight: 900; font-size: .6rem; border: 2px solid var(--card); border-bottom: none; border-radius: 8px 8px 0 0; }
.sim-podium.me { height: 52px; box-shadow: 0 0 0 3px var(--yellow); }
.sim-q { margin: 14px 0 0; font-family: var(--display); font-weight: 800; font-size: clamp(1.05rem, 2.8vw, 1.35rem); line-height: 1.25; padding-left: 14px; border-left: 5px solid var(--c); }
.sim-scores { display: grid; gap: 12px; margin-top: 16px; }
.sim-scores div { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; }
.sim-scores small { font-weight: 700; color: var(--ink-2); }
.sim-scores b { font-family: var(--display); }
.sim-scores span { grid-column: 1 / -1; height: 10px; border-radius: 99px; background: var(--paper-2); overflow: hidden; }
.sim-scores i { display: block; height: 100%; background: var(--c); }
.sim-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; margin-top: 14px; }
.sim-stats div { padding: 12px; border: 2px solid var(--ink); border-radius: 12px; background: var(--paper); display: grid; gap: 2px; align-content: start; }
.sim-stats b { font-family: var(--display); font-weight: 900; font-size: 1.3rem; font-variant-numeric: tabular-nums; }
.sim-stats small { font-size: .78rem; color: var(--ink-2); line-height: 1.25; }

/* Nit electoral */
.sim-night-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; padding: 16px 18px; border-radius: var(--radius); background: var(--ink); color: var(--card); border: var(--bw) solid var(--ink); box-shadow: 5px 5px 0 var(--c); }
.sim-night-head .sim-kick { color: var(--yellow); }
.sim-night-head .sim-h { margin: 2px 0 0; }
.sim-esc { display: grid; gap: 4px; min-width: 180px; }
.sim-esc small { font-size: .62rem; font-weight: 800; text-transform: uppercase; letter-spacing: .12em; opacity: .75; }
.sim-esc b { font-family: var(--display); font-weight: 900; font-size: 1.6rem; font-variant-numeric: tabular-nums; line-height: 1; }
.sim-esc span { height: 8px; border-radius: 99px; background: rgba(255, 255, 255, .2); overflow: hidden; }
.sim-esc span i { display: block; height: 100%; width: 0; background: var(--yellow); transition: width .2s linear; }
.sim-hemicard .hemicycle circle { transition: fill .25s; }
.sim-tally { display: grid; gap: 4px; margin-top: 14px; }
.sim-trow { display: grid; grid-template-columns: auto 1fr auto 36px; gap: 10px; align-items: center; font-size: .88rem; padding: 3px 4px; border-radius: 8px; }
.sim-trow span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.sim-trow small { color: var(--ink-2); font-variant-numeric: tabular-nums; }
.sim-trow b { font-family: var(--display); font-weight: 900; text-align: right; font-variant-numeric: tabular-nums; }
.sim-trow.me { background: color-mix(in srgb, var(--yellow) 50%, transparent); }
.sim-tiles.night .sim-tile { --pc: var(--card); background: var(--paper); cursor: default; opacity: .5; transition: background .3s, opacity .3s; }
.sim-tiles.night .sim-tile:hover { transform: none; }
.sim-tiles.night .sim-tile.in { background: var(--pc); color: #fff; opacity: 1; animation: simPop .35s var(--ease); }
@keyframes simPop { 40% { transform: scale(1.3); } }
.sim-ticker ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; min-height: 120px; align-content: start; }
.sim-ticker li { font-size: .84rem; padding: 6px 10px; border-radius: 8px; background: var(--paper); animation: simIn .35s var(--ease); }
.sim-ticker li.me { background: var(--yellow); font-weight: 700; }

/* Informe final */
.sim-report { text-align: left; margin-top: 26px; padding-top: 22px; border-top: 2px dashed var(--ink); display: grid; gap: 12px; }
.sim-report h4 { font-family: var(--display); font-weight: 900; font-size: 1.05rem; margin-top: 14px; }
.sim-rep-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 14px; border-radius: 14px; background: color-mix(in srgb, var(--pc) 16%, var(--card)); border: 2px solid var(--ink); }
.sim-rep-head > div { display: grid; flex: 1; min-width: 160px; }
.sim-rep-head b { font-family: var(--display); font-weight: 900; font-size: 1.15rem; }
.sim-rep-head span { color: var(--ink-2); font-size: .9rem; }
.sim-rep-head em { font-style: normal; font-weight: 800; font-size: .8rem; padding: 6px 12px; border-radius: 99px; border: 2px solid var(--ink); }
.sim-rep-head em.ok { background: var(--ok); color: #fff; }
.sim-rep-head em.ko { background: var(--ko-soft); }
.sim-restable { display: grid; gap: 4px; }
.sim-rrow { display: grid; grid-template-columns: auto minmax(0, 1.3fr) auto auto minmax(40px, 1fr) 34px; gap: 10px; align-items: center; font-size: .86rem; padding: 4px; border-radius: 8px; }
.sim-rrow .n { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sim-rrow .v, .sim-rrow .pc { font-variant-numeric: tabular-nums; color: var(--ink-2); text-align: right; }
.sim-rrow .bar { height: 12px; border-radius: 4px; background: var(--paper); overflow: hidden; }
.sim-rrow .bar i { display: block; height: 100%; background: var(--pc); }
.sim-rrow b { font-family: var(--display); font-weight: 900; text-align: right; }
.sim-rrow.me { background: color-mix(in srgb, var(--yellow) 50%, transparent); }
.sim-close { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.sim-close li { padding: 10px 12px; border-radius: 10px; background: var(--paper); border-left: 4px solid var(--blue); font-size: .9rem; }
.sim-close li.hold { border-color: var(--ok); }
.sim-coal { display: grid; gap: 8px; }
.sim-coal > div { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; padding: 10px 12px; border: 2px solid var(--ink); border-radius: 12px; background: var(--card); }
.sim-coal > div.me { background: color-mix(in srgb, var(--yellow) 40%, var(--card)); }
.sim-coal b { font-family: var(--display); font-weight: 900; margin-left: 4px; }
.sim-coal small { margin-left: auto; color: var(--ink-2); font-size: .78rem; }
.sim-learn { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.sim-learn a { font-weight: 700; color: var(--ink); text-decoration: none; padding: 8px 14px; border: 2px solid var(--ink); border-radius: 99px; background: var(--paper); }
.sim-learn a::after { content: " →"; }
.sim-learn a:hover { background: var(--yellow); }

@media (max-width: 760px) {
  .sim-create, .sim-dil, .sim-summary, .sim-grid, .sim-grid2 { grid-template-columns: minmax(0, 1fr); }
  .sim-create-prev { order: -1; }
  .sim-create-prev .sim-poster { aspect-ratio: auto; max-width: none; transform: none; padding: 14px; grid-auto-flow: column; justify-content: start; text-align: left; }
  .sim-create-prev .sim-poster small { display: none; }
  .sim-dil-side { order: -1; grid-template-columns: 1fr 1fr; align-items: center; }
  .sim-dil-side .sim-compass { max-width: 170px; }
  .sim-meters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sim-steps li span { display: none; }
  .sim-steps li { justify-content: center; }
  .sim-steps li.on span { display: inline; }
  .sim-card { padding: 18px; }
  .sim-ideo { grid-template-columns: 1fr; }
  .sim-rrow { grid-template-columns: auto minmax(0, 1fr) auto 34px; }
  .sim-rrow .v, .sim-rrow .bar { display: none; }
  .sim-endbar .btn { min-width: 0; width: 100%; }
  .sim-daybar { top: 62px; gap: 10px; padding: 10px; }
  .sim-daybar .sim-logo { display: none; }
  .sim-day b { font-size: 1.15rem; }
  .sim-slots small { display: none; }
  .sim-slots i { width: 16px; height: 16px; }
  .sim-daybar [data-endday] { padding: 9px 12px; font-size: .86rem; }
  .sim-tile .sim-mk { font-size: .45rem; }
}
@media (prefers-reduced-motion: reduce) {
  .btn.pulse, .sim-onair, .sim-feed li.fresh, .sim-ticker li, .sim-tiles.night .sim-tile.in { animation: none; }
}

/* Joc destacat a tota la fila (simulador) */
.games-grid .game-card.gc-hero { grid-column: 1 / -1; }
@media (min-width: 601px) {
  .game-card.gc-hero .gc-art { flex-basis: 30%; }
  .game-card.gc-hero .gc-tag { max-width: 62ch; }
}

/* =========================================================
   Simulador del 29N · fases 3 a 5: creació ampliada, mapa d'enquesta, govern i legislatura
   ========================================================= */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.sim-mode b em { font-style: normal; font-family: var(--sans); font-weight: 700; font-size: .72rem; margin-left: 6px; padding: 2px 8px; border-radius: 99px; background: var(--paper-2); color: var(--ink-2); vertical-align: 2px; }
.sim-mode small strong { color: var(--ok); }
.sim-diffnote { width: 100%; font-size: .74rem; color: var(--muted); }
.record.sub { padding: 6px 12px 6px 28px; font-size: .86rem; font-weight: 600; border-style: dashed; }
.record.sub .rc-dot { width: 8px; height: 8px; }

/* Creació: noms suggerits, lema, forma del logo */
.sim-names { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.sim-chipbtn { font: inherit; font-size: .78rem; font-weight: 700; padding: 4px 10px; border-radius: 99px; border: 1.5px solid var(--ink); background: var(--paper); color: var(--ink); cursor: pointer; }
.sim-chipbtn:hover { background: var(--yellow); }
.sim-field-row { display: grid; grid-template-columns: 140px 1fr; gap: 12px; }
.sim-field-row .sim-field-s input { max-width: none; }
.sim-shapes { display: flex; gap: 8px; }
.sim-shape { width: 46px; height: 46px; padding: 8px; border: 2px solid var(--ink); border-radius: 12px; background: var(--card); color: var(--ink-2); cursor: pointer; }
.sim-shape svg { width: 100%; height: 100%; display: block; }
.sim-shape.on { background: var(--ink); color: var(--yellow); box-shadow: 3px 3px 0 var(--c); }
.sim-poster i { font-size: .95rem; color: var(--ink-2); }
.sim-logosvg { display: block; flex: none; overflow: visible; }
.sim-cp-tu { font-size: 7px; font-weight: 900; fill: var(--ink); }
.sim-banner { margin: 0; padding: 10px 14px; border-radius: 12px; border: 2px dashed var(--ink); background: var(--paper); font-weight: 600; }
.sim-banner.ok { border-style: solid; background: var(--ok-soft); }

/* Selector segmentat (mapa, fórmules de suport) */
.sim-seg { display: inline-flex; border: 2px solid var(--ink); border-radius: 99px; overflow: hidden; background: var(--card); flex: none; }
.sim-seg button { font: inherit; font-size: .8rem; font-weight: 700; padding: 6px 12px; border: 0; background: none; color: var(--ink); cursor: pointer; }
.sim-seg button + button { border-left: 2px solid var(--ink); }
.sim-seg button.on { background: var(--ink); color: var(--card); }
.sim-seg.sm button { font-size: .74rem; padding: 5px 9px; }

/* Mapa de campanya: notorietat o enquesta */
.sim-maphead { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.sim-legend i.grad { width: 70px; height: 10px; border-radius: 99px; border: 1.5px solid var(--ink); background: linear-gradient(90deg, var(--card), var(--pc)); }
.sim-legend .sim-lg .sim-logo { min-width: 0; height: 20px; font-size: .5rem; padding: 0 4px; border-radius: 5px; }
.sim-tile.pollmode .sim-mk { background: var(--card); color: var(--ink); font-weight: 900; font-size: .6rem; padding: 1px 4px; }
.sim-pill { display: inline-block; margin-top: 8px; padding: 4px 10px; border-radius: 99px; background: var(--paper-2); font-size: .8rem; font-weight: 700; }
.sim-pill.ok { background: var(--ok-soft); color: #0b6b3d; }
.sim-moves li span { display: grid; }
.sim-moves li small { color: var(--muted); font-size: .76rem; }

/* Tutorial */
.sim-tuto { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 16px; background: rgba(23, 23, 61, .55); animation: pop .25s var(--ease); }
.sim-tuto-card { max-width: 420px; width: 100%; }
.sim-tuto-card p:not(.sim-kick) { margin: 10px 0 0; }

/* Explicacions i lliçons */
.sim-why { margin-top: 16px; padding: 12px 14px; border-radius: 12px; background: color-mix(in srgb, var(--blue) 8%, var(--card)); border: 2px solid var(--ink); border-left-width: 6px; border-left-color: var(--blue); }
.sim-why > b { display: block; font-size: .7rem; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; color: var(--blue); }
.sim-why p { margin: 4px 0 0; }
.sim-why a { display: inline-block; margin-top: 6px; font-weight: 700; font-size: .86rem; color: var(--ink); }
.sim-why a::after, .sim-lessons a::after { content: " →"; }
.sim-h4 { font-family: var(--display); font-weight: 800; font-size: 1rem; margin: 22px 0 10px; }
.sim-h4 span { font-family: var(--sans); font-size: .8rem; color: var(--muted); font-weight: 700; }
.sim-lessons { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; counter-reset: lesson; }
.sim-lessons li { position: relative; padding: 10px 12px 10px 44px; border-radius: 12px; background: var(--paper); font-size: .92rem; counter-increment: lesson; }
.sim-lessons li::before { content: counter(lesson); position: absolute; left: 10px; top: 10px; width: 24px; height: 24px; border-radius: 50%; background: var(--ink); color: var(--yellow); display: grid; place-items: center; font-family: var(--display); font-weight: 900; font-size: .74rem; }
.sim-lessons a { font-weight: 700; font-size: .82rem; color: var(--ink); white-space: nowrap; }
.sim-night-sum { width: 100%; text-align: center; margin: 0 0 10px; font-size: 1.02rem; }
.sim-endbar { flex-wrap: wrap; }

/* Votacions */
.sim-vbar { margin-top: 12px; }
.sim-vbar-t { position: relative; display: flex; height: 26px; border: 2px solid var(--ink); border-radius: 8px; overflow: hidden; background: var(--paper); }
.sim-vbar-t i { display: block; height: 100%; transition: width .6s var(--ease); }
.sim-vbar-t i.si { background: var(--ok); }
.sim-vbar-t i.abs { background: repeating-linear-gradient(45deg, #c9bfa6 0 6px, #ddd3bd 6px 12px); }
.sim-vbar-t i.no { background: var(--ko); margin-left: auto; }
.sim-vbar-m { position: absolute; top: -4px; bottom: -4px; width: 3px; background: var(--ink); transform: translateX(-50%); }
.sim-vbar-m::after { content: "176"; position: absolute; top: -18px; left: 50%; transform: translateX(-50%); font-size: .62rem; font-weight: 900; }
.sim-vbar-l { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 6px; font-size: .82rem; }
.sim-vbar-l span::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; border: 1.5px solid var(--ink); vertical-align: -1px; }
.sim-vbar-l .si::before { background: var(--ok); }
.sim-vbar-l .abs::before { background: #ddd3bd; }
.sim-vbar-l .no::before { background: var(--ko); }
.sim-verdict { margin: 10px 0 0; padding: 10px 12px; border-radius: 10px; font-weight: 700; background: var(--paper); }
.sim-verdict.ok { background: var(--ok-soft); color: #0b6b3d; }
.sim-verdict.mid { background: #fff1c4; }
.sim-verdict.ko { background: var(--ko-soft); color: #9c1a2b; }
.sim-vrows { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 6px; }
.sim-vrows li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; gap: 10px; align-items: center; padding: 6px 8px; border-radius: 10px; background: var(--paper); }
.sim-vrows li.me { background: color-mix(in srgb, var(--yellow) 45%, var(--paper)); }
.sim-vrows .n { display: grid; min-width: 0; }
.sim-vrows .n small { color: var(--ink-2); font-size: .78rem; line-height: 1.3; }
.sim-vrows .seats { font-family: var(--display); font-weight: 900; font-size: .85rem; }
em.v { font-style: normal; font-weight: 800; font-size: .74rem; padding: 3px 9px; border-radius: 99px; border: 1.5px solid var(--ink); white-space: nowrap; }
em.v.si { background: var(--ok); color: #fff; }
em.v.abs { background: #ddd3bd; }
em.v.no { background: var(--ko); color: #fff; }
.sim-vround { margin-top: 18px; animation: simIn .4s var(--ease); }
.sim-vround h4 { font-family: var(--display); font-weight: 800; font-size: 1rem; display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; }
.sim-vround h4 small { font-family: var(--sans); font-size: .8rem; font-weight: 600; color: var(--muted); }
.sim-votedetail { margin-top: 14px; }
.sim-votedetail summary { cursor: pointer; font-weight: 700; }

/* Consultes i negociació */
.sim-attempts { display: grid; gap: 6px; margin-top: 12px; }
.sim-attempts p { display: flex; gap: 10px; align-items: center; margin: 0; padding: 8px 10px; border-radius: 10px; background: var(--ko-soft); font-size: .88rem; }
.sim-choices { display: grid; gap: 8px; margin-top: 14px; }
.sim-choice { display: grid; gap: 2px; text-align: left; font: inherit; color: var(--ink); padding: 12px 14px; border: 2px solid var(--ink); border-radius: 12px; background: var(--card); cursor: pointer; box-shadow: var(--hard-sm); transition: transform .12s var(--ease), box-shadow .12s var(--ease); }
.sim-choice b { font-size: 1rem; }
.sim-choice small { color: var(--ink-2); font-size: .84rem; }
.sim-choice.primary { background: var(--yellow); }
.sim-choice:hover:not(:disabled) { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--ink); }
.sim-choice:disabled { opacity: .5; cursor: not-allowed; box-shadow: none; }
.sim-pcards { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.sim-pcard { padding: 12px; border: 2px solid var(--ink); border-radius: 12px; background: var(--card); display: grid; gap: 6px; align-content: start; }
.sim-pcard.me { background: color-mix(in srgb, var(--yellow) 30%, var(--card)); }
.sim-pcard-h, .sim-partner-h { display: flex; align-items: center; gap: 8px; }
.sim-pcard-h b, .sim-partner-h b { flex: 1; min-width: 0; font-size: .92rem; line-height: 1.15; }
.seats { font-family: var(--display); font-weight: 900; }
.sim-pcard p { margin: 0; font-size: .8rem; line-height: 1.35; }
.sim-pcard p small { display: block; font-size: .62rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-2); }
.sim-pcard p.red small { color: var(--ko); }
.sim-pcard .dist { color: var(--muted); font-weight: 700; }
.sim-measures { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.sim-measures.compact { display: flex; flex-wrap: wrap; gap: 6px; }
.sim-mgroup { display: grid; gap: 6px; align-content: start; }
.sim-mgroup > small { font-size: .64rem; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; color: var(--ink-2); }
.sim-mchip { display: grid; gap: 2px; text-align: left; font: inherit; font-size: .84rem; font-weight: 600; color: var(--ink); padding: 8px 10px; border: 2px solid var(--ink); border-radius: 10px; background: var(--card); cursor: pointer; }
.sim-mchip.on { background: var(--ink); color: var(--card); box-shadow: 3px 3px 0 var(--c); }
.sim-mchip:disabled { opacity: .4; cursor: not-allowed; }
.sim-mchip em { font-style: normal; font-size: .7rem; font-weight: 800; }
.sim-mchip em.fan { color: var(--ok); }
.sim-mchip em.red { color: var(--ko); }
.sim-mchip.on em.fan { color: #8ff0b8; }
.sim-mchip.on em.red { color: #ffb3bc; }
.sim-neg-preview { position: sticky; top: 70px; z-index: 4; margin-top: 14px; padding: 12px; border: 2px solid var(--ink); border-radius: 12px; background: var(--card); box-shadow: var(--hard-sm); }
.sim-partners { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; }
.sim-partner { display: grid; gap: 8px; padding: 12px; border: 2px solid var(--ink); border-radius: 12px; background: var(--card); }
.sim-partner > small { color: var(--ink-2); font-size: .78rem; line-height: 1.3; }
.sim-aideal { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px; }
.sim-aideal > div { padding: 12px; border-radius: 12px; background: var(--paper); }
.sim-aideal small { font-size: .64rem; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; color: var(--ink-2); }
.sim-aideal ul { margin: 6px 0 0; padding-left: 18px; font-size: .88rem; }
.sim-aideal p { margin: 6px 0 0; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: .84rem; }
.sim-answer { margin-top: 16px; padding: 14px; border-radius: 12px; border: 2px solid var(--ink); background: var(--card); animation: simIn .4s var(--ease); }
.sim-answer h4 { font-family: var(--display); font-weight: 800; font-size: .95rem; }
.sim-answer ul { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 6px; }
.sim-answer li { padding: 8px 10px; border-radius: 8px; font-size: .9rem; }
.sim-answer li.ok { background: var(--ok-soft); }
.sim-answer li.ok::before { content: "✓ "; font-weight: 900; }
.sim-answer li.ko { background: var(--ko-soft); }
.sim-answer li.ko::before { content: "✕ "; font-weight: 900; }
.sim-votebtns { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.sim-govbox { display: grid; gap: 10px; margin-top: 14px; }
.sim-govbox > div { padding: 12px; border-radius: 12px; background: var(--paper); }
.sim-govbox small { font-size: .64rem; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; color: var(--ink-2); }
.sim-govbox p { margin: 6px 0 0; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.sim-govbox em { font-style: normal; color: var(--muted); }
.sim-deal { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.sim-deal li { padding: 8px 12px; border-radius: 10px; background: var(--paper); font-size: .92rem; }
.sim-deal li.mine { background: color-mix(in srgb, var(--yellow) 45%, var(--paper)); font-weight: 700; }
.sim-deal li em { font-style: normal; font-size: .74rem; color: var(--ink-2); }

/* Legislatura */
.sim-leghead { display: flex; justify-content: space-between; align-items: flex-end; gap: 14px; flex-wrap: wrap; padding: 16px 18px; border-radius: var(--radius); background: var(--ink); color: var(--card); border: var(--bw) solid var(--ink); box-shadow: 5px 5px 0 var(--c); }
.sim-leghead .sim-kick { color: var(--yellow); }
.sim-leghead .sim-sub { color: rgba(255, 250, 240, .8); }
.sim-quarters { list-style: none; margin: 0; padding: 0; display: flex; gap: 5px; }
.sim-quarters li { width: 26px; height: 26px; border-radius: 7px; display: grid; place-items: center; font-weight: 900; font-size: .74rem; border: 2px solid rgba(255, 250, 240, .5); }
.sim-quarters li.done { background: rgba(255, 250, 240, .25); border-color: transparent; }
.sim-quarters li.on { background: var(--yellow); color: var(--ink); border-color: var(--yellow); }
.sim-inds { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.sim-ind { padding: 10px; border: 2px solid var(--ink); border-radius: 12px; background: var(--card); display: grid; gap: 2px; }
.sim-ind small { font-size: .6rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-2); line-height: 1.2; }
.sim-ind b { font-family: var(--display); font-weight: 900; font-size: 1.15rem; display: flex; align-items: baseline; gap: 6px; }
.sim-ind b em { font-style: normal; font-family: var(--sans); font-size: .74rem; font-weight: 800; }
.sim-ind b em.up { color: var(--ok); }
.sim-ind b em.down { color: var(--ko); }
.sim-ind span { height: 6px; border-radius: 99px; background: var(--paper-2); overflow: hidden; }
.sim-ind span i { display: block; height: 100%; background: var(--blue); transition: width .5s var(--ease); }
.sim-ind.low span i { background: var(--ko); }
.sim-ind.high span i { background: var(--ok); }
.sim-govpick { margin-top: 12px; padding: 12px 14px; border-radius: 12px; background: var(--paper); display: grid; }
.sim-govpick small { font-size: .64rem; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; color: var(--ink-2); }
.sim-result { margin-top: 16px; display: grid; gap: 10px; animation: simIn .4s var(--ease); }
.sim-reacts { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; font-size: .82rem; font-weight: 700; }
.sim-reacts > span { display: inline-flex; align-items: center; gap: 6px; padding: 3px 8px 3px 3px; border-radius: 99px; background: var(--paper); }
.sim-reacts > span.up { background: var(--ok-soft); }
.sim-reacts > span.down { background: var(--ko-soft); }
.sim-rule { margin: 8px 0 0; font-size: .86rem; font-weight: 700; color: var(--blue); }
.sim-alert { margin-top: 14px; padding: 14px; border-radius: 12px; border: 3px solid var(--ko); background: var(--ko-soft); }
.sim-alert h4 { font-family: var(--display); font-weight: 900; color: #9c1a2b; }
.sim-alert p { margin: 6px 0 0; }

/* Resultat final */
.sim-final { text-align: left; margin-top: 26px; padding-top: 22px; border-top: 2px dashed var(--ink); display: grid; gap: 12px; }
.sim-final h4 { font-family: var(--display); font-weight: 900; font-size: 1.05rem; }
.sim-scorebox ul { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 4px; }
.sim-scorebox li { display: flex; justify-content: space-between; gap: 10px; padding: 6px 10px; border-radius: 8px; background: var(--paper); font-size: .9rem; }
.sim-scorebox li b { font-family: var(--display); }
.sim-govline p { margin: 0; padding: 12px 14px; border-radius: 12px; background: color-mix(in srgb, var(--yellow) 35%, var(--card)); border: 2px solid var(--ink); }
.sim-quiz ol { margin: 10px 0 0; padding-left: 20px; display: grid; gap: 6px; }
.sim-quiz summary { cursor: pointer; font-weight: 700; }
.sim-quiz details p { margin: 6px 0 0; color: var(--ink-2); }
.sim-sharebox { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding: 14px; border-radius: 12px; background: var(--paper); }
.sim-sharebox small { color: var(--muted); }
.sim-stats div.me { background: color-mix(in srgb, var(--yellow) 40%, var(--paper)); }
.sim-report .sim-h4, .sim-card .sim-report { margin-top: 0; }

@media (max-width: 760px) {
  .sim-field-row { grid-template-columns: 1fr; }
  .sim-inds { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sim-inds .sim-ind:last-child { grid-column: span 2; }
  .sim-aideal { grid-template-columns: 1fr; }
  .sim-maphead { flex-direction: column; }
  .sim-neg-preview { top: 62px; padding: 10px; }
  .sim-vrows li { grid-template-columns: auto minmax(0, 1fr) auto; }
  .sim-vrows .seats { display: none; }
  .sim-partners, .sim-pcards { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .sim-vround, .sim-answer, .sim-result, .sim-tuto { animation: none; }
}

/* Aprèn: «Posa-ho en pràctica» porta al simulador */
.ap-play { display: grid; grid-template-columns: 160px 1fr; gap: 18px; align-items: center; margin: 22px 0; padding: 16px; border: var(--bw) solid var(--ink); border-radius: var(--radius); background: var(--blue); color: #fff; box-shadow: var(--hard); }
.ap-play-art svg { width: 100%; height: auto; display: block; }
.ap-play b { font-family: var(--display); font-weight: 900; font-size: 1.1rem; }
.ap-play p { margin: 6px 0 12px; }
.ap-play .term { color: #fff; background: rgba(255, 255, 255, .18); border-bottom-color: #fff; }
.ap-play .btn.primary { background: var(--yellow); color: var(--ink); }
@media (max-width: 600px) { .ap-play { grid-template-columns: 1fr; } .ap-play-art { max-width: 180px; } }
.sim-duelbox small { line-height: 1.35; }
.dh-sim { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 10px; padding: 8px 12px; border: 2px solid var(--ink); border-radius: 12px; background: var(--card); color: var(--ink); text-decoration: none; font-weight: 700; font-size: .86rem; }
.dh-sim b { font-family: var(--display); font-size: .8rem; white-space: nowrap; }
.dh-sim:hover { background: var(--yellow); }
.duel-grid .duel-card:nth-child(3) { grid-column: 1 / -1; }
.sim-podium { flex: 0 1 52px; min-width: 0; overflow: hidden; }
@media (max-width: 400px) { .sim-deb-stage { gap: 6px; padding: 12px 6px 0; } .sim-podium { font-size: .5rem; } }

/* =========================================================
   Inici: repte d'avui, simulador, mostra de minijocs i accessos
   ========================================================= */
.home-sim { display: grid; grid-template-columns: 300px 1fr; margin: 0 0 36px; border: var(--bw) solid var(--ink); border-radius: var(--radius); box-shadow: var(--hard); overflow: hidden; background: var(--card); }
.home-sim-art { background: var(--dots) 0 0 / 10px 10px, var(--blue); display: grid; place-items: center; padding: 18px; border-right: var(--bw) solid var(--ink); }
.home-sim-art svg { width: 100%; max-width: 260px; height: auto; }
.home-sim-body { padding: 22px 24px; display: grid; gap: 10px; align-content: center; }
.home-sim-body h2 { font-family: var(--display); font-weight: 900; text-transform: uppercase; font-size: clamp(1.6rem, 4vw, 2.3rem); letter-spacing: -.04em; text-shadow: 3px 3px 0 var(--blue); }
.home-sim-body p { margin: 0; color: var(--ink-2); }
.home-sim-save { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 12px; background: color-mix(in srgb, var(--yellow) 40%, var(--card)); }
.home-sim-modes { display: flex; flex-wrap: wrap; gap: 6px; }
.home-sim-modes a { font-size: .8rem; font-weight: 700; padding: 5px 11px; border-radius: 99px; border: 1.5px solid var(--ink); background: var(--paper); color: var(--ink); text-decoration: none; }
.home-sim-modes a:hover { background: var(--yellow); }
.home-sim .row { margin-top: 4px; }
.home-more { font-weight: 800; color: var(--ink); text-decoration: none; padding: 8px 14px; border: 2px solid var(--ink); border-radius: 99px; background: var(--card); }
.home-more::after { content: " →"; }
.home-more:hover { background: var(--yellow); }
.home-games-row { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(230px, 1fr); gap: 16px; overflow-x: auto; padding: 4px 8px 14px 4px; margin: 0 -8px 26px -4px; scroll-snap-type: x mandatory; scrollbar-width: thin; }
.home-games-row .game-card { scroll-snap-align: start; }
.home-links { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-bottom: 36px; }
.home-link { display: grid; gap: 4px; padding: 16px 18px; border: var(--bw) solid var(--ink); border-radius: var(--radius); background: color-mix(in srgb, var(--c) 18%, var(--card)); box-shadow: var(--hard-sm); color: var(--ink); text-decoration: none; transition: transform .12s var(--ease), box-shadow .12s var(--ease); }
.home-link b { font-family: var(--display); font-weight: 900; font-size: 1.15rem; }
.home-link b::after { content: " →"; }
.home-link span { color: var(--ink-2); font-size: .9rem; }
.home-link:hover { transform: translate(-2px, -2px); box-shadow: var(--hard); }
.nav { gap: 0; }
.nav a { padding-left: 11px; padding-right: 11px; }

/* Simulador: la secció pròpia */
.sim-home { display: grid; gap: 18px; }
.sim-hero { display: grid; grid-template-columns: 260px 1fr; gap: 24px; align-items: center; }
.sim-hero-art { border: var(--bw) solid var(--ink); border-radius: var(--radius); background: var(--dots) 0 0 / 10px 10px, var(--blue); box-shadow: var(--hard); padding: 14px; }
.sim-hero-art svg { width: 100%; height: auto; display: block; }
.sim-hero-copy p:not(.kicker) { color: var(--ink-2); max-width: 60ch; }
.sim-home .section-title.sm { margin: 12px 0 0; }
.sim-modecards { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.sim-modecard { display: grid; gap: 6px; align-content: start; text-align: left; font: inherit; color: var(--ink); padding: 14px 16px; border: var(--bw) solid var(--ink); border-radius: var(--radius); background: var(--card); cursor: pointer; box-shadow: var(--hard-sm); transition: transform .12s var(--ease), box-shadow .12s var(--ease), background .12s; }
.sim-modecard:hover { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--ink); }
.sim-modecard.on { background: color-mix(in srgb, var(--blue) 14%, var(--card)); box-shadow: 5px 5px 0 var(--blue); }
.sim-mc-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.sim-mc-top b { font-family: var(--display); font-weight: 900; font-size: 1rem; }
.sim-mc-top em { font-style: normal; font-size: .72rem; font-weight: 800; padding: 2px 8px; border-radius: 99px; background: var(--paper-2); white-space: nowrap; }
.sim-modecard small { color: var(--ink-2); font-size: .86rem; line-height: 1.35; }
.sim-mc-rec { font-size: .74rem; font-weight: 800; color: var(--muted); }
.sim-home-go { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; }
.sim-howto { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; counter-reset: how; }
.sim-howto li { position: relative; display: grid; gap: 4px; padding: 14px 14px 14px 50px; border: 2px solid var(--ink); border-radius: 12px; background: var(--card); counter-increment: how; }
.sim-howto li::before { content: counter(how); position: absolute; left: 12px; top: 13px; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--ink); color: var(--yellow); font-family: var(--display); font-weight: 900; font-size: .8rem; }
.sim-howto span { font-size: .84rem; color: var(--ink-2); }
.sim-home .sim-resume { padding: 14px 16px; }

@media (max-width: 900px) {
  .sim-howto { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .home-links { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .home-sim { grid-template-columns: 1fr; }
  .home-sim-art { border-right: 0; border-bottom: var(--bw) solid var(--ink); padding: 10px; }
  .home-sim-art svg { max-width: 200px; }
  .home-sim-body { padding: 16px; }
  .sim-hero { grid-template-columns: 1fr; gap: 14px; }
  .sim-hero-art { max-width: 260px; }
  .sim-howto { grid-template-columns: 1fr; }
  .home-games-row { grid-auto-columns: 72%; }
}
.sim-pcard-h b small.cand, .sim-partner-h b small.cand { display: block; font-family: var(--sans); font-size: .74rem; font-weight: 600; color: var(--ink-2); }
.sim-govbox p em { font-style: normal; color: var(--muted); }

/* =========================================================
   Social, perfil d'usuari, venda del compte i recorregut inicial
   ========================================================= */
.social-tabs { display: inline-flex; gap: 0; border: var(--bw) solid var(--ink); border-radius: 99px; overflow: hidden; background: var(--card); box-shadow: var(--hard-sm); justify-self: start; }
.social-tabs a { padding: 9px 20px; font-weight: 800; color: var(--ink); text-decoration: none; }
.social-tabs a + a { border-left: var(--bw) solid var(--ink); }
.social-tabs a.on { background: var(--ink); color: var(--yellow); }

/* Venda del compte */
.pitch { display: grid; gap: 10px; }
.pitch h3 { font-family: var(--display); font-weight: 900; font-size: clamp(1.3rem, 3.4vw, 1.8rem); letter-spacing: -.03em; }
.pitch-sub { margin: 0; color: var(--ink-2); font-weight: 600; }
.pitch-list { list-style: none; margin: 4px 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.pitch-list li { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 12px; background: var(--paper); }
.pitch-list li > span { flex: none; width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: var(--yellow); border: 2px solid var(--ink); font-size: .95rem; }
.pitch-list li div { display: grid; min-width: 0; }
.pitch-list li small { color: var(--ink-2); font-size: .8rem; line-height: 1.3; }
.pitch-list.compact { grid-template-columns: 1fr; margin: 12px 0; }
.pitch-list.compact li { padding: 6px 10px; align-items: center; }
.pitch-list.compact li > span { width: 24px; height: 24px; background: var(--ok); color: #fff; }
.pitch .google-btn { justify-self: start; }
.pitch-fine { margin: 0; font-size: .78rem; color: var(--muted); }
.home-pitch { margin: 0 0 36px; }
.account-card.pitch-card { display: block; }
.gate { max-width: 720px; margin: 0 auto; display: grid; gap: 14px; }
.gate > .btn { justify-self: start; }
.guest-note { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 18px 0 0; padding: 12px 14px; border: 2px dashed var(--ink); border-radius: 12px; background: color-mix(in srgb, var(--yellow) 30%, var(--card)); text-align: left; }
.guest-note > div { display: grid; }
.guest-note small { color: var(--ink-2); }
.ac-btns { display: flex; gap: 8px; flex-wrap: wrap; }

/* Editor del perfil */
.pf-modal { position: fixed; inset: 0; z-index: 95; display: grid; place-items: center; padding: 16px; background: rgba(23, 23, 61, .55); overflow-y: auto; animation: pop .25s var(--ease); }
.pf-card { width: min(560px, 100%); display: grid; gap: 12px; }
.pf-card h3 { font-family: var(--display); font-weight: 900; font-size: 1.6rem; letter-spacing: -.03em; }
.pf-top { display: flex; gap: 16px; align-items: flex-start; }
.pf-preview { width: 84px; height: 84px; border-radius: 50%; border: var(--bw) solid var(--ink); object-fit: cover; flex: none; background: var(--paper); box-shadow: var(--hard-sm); }
.pf-name { flex: 1; min-width: 0; display: grid; gap: 4px; }
.pf-name .sim-field { margin-top: 0; }
.pf-name small, .pf-note { color: var(--muted); font-size: .8rem; }
.pf-label { margin: 4px 0 0; font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; color: var(--ink-2); }
.pf-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(54px, 1fr)); gap: 8px; }
.pf-ph { width: 100%; aspect-ratio: 1; padding: 0; border: 2.5px solid var(--ink); border-radius: 50%; overflow: hidden; background: var(--paper); cursor: pointer; display: grid; place-items: center; }
.pf-ph img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pf-ph.on { box-shadow: 0 0 0 3px var(--card), 0 0 0 6px var(--red); }
.pf-up { border-style: dashed; align-content: center; gap: 0; }
.pf-up span { font-size: 1.3rem; font-weight: 900; line-height: 1; }
.pf-up small { font-size: .6rem; font-weight: 800; }
.pf-err { margin: 0; min-height: 1.2em; color: var(--ko); font-weight: 700; }
.pf-card .row { justify-content: flex-end; }

/* Recorregut de la primera visita */
.onb { position: fixed; inset: 0; z-index: 96; display: grid; place-items: center; padding: 16px; background: rgba(23, 23, 61, .6); animation: pop .25s var(--ease); }
.onb-card { width: min(640px, 100%); display: grid; grid-template-columns: 220px 1fr; gap: 0; padding: 0; overflow: hidden; }
.onb-art { background: var(--dots) 0 0 / 10px 10px, var(--blue); border-right: var(--bw) solid var(--ink); display: grid; place-items: center; padding: 14px; }
.onb-art svg { width: 100%; height: auto; }
.onb-body { padding: 22px; display: grid; gap: 8px; align-content: start; }
.onb-body h3 { font-family: var(--display); font-weight: 900; font-size: 1.45rem; letter-spacing: -.03em; line-height: 1.1; }
.onb-body > p:not(.kicker) { margin: 0; color: var(--ink-2); }
.onb-dots { display: flex; gap: 6px; margin-top: 6px; }
.onb-dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--paper-2); }
.onb-dots i.on { background: var(--red); width: 22px; border-radius: 99px; }
.onb-body .row { justify-content: space-between; margin-top: 6px; }
.onb-note { display: block; margin-top: 6px; color: var(--muted); font-size: .8rem; }
/* Novetats */
.nov-card { width: min(560px, 100%); max-height: calc(100dvh - 32px); overflow-y: auto; display: grid; gap: 12px; padding: 0 0 18px; }
.nov-head { display: grid; grid-template-columns: 96px 1fr; gap: 14px; align-items: center; padding: 16px 20px; background: var(--dots) 0 0 / 10px 10px, color-mix(in srgb, var(--yellow) 55%, var(--card)); border-bottom: var(--bw) solid var(--ink); }
.nov-art svg { width: 100%; height: auto; display: block; }
.nov-head h3 { margin: 2px 0 0; font-family: var(--display); font-weight: 900; font-size: 1.4rem; letter-spacing: -.03em; line-height: 1.1; }
.nov-list { list-style: none; margin: 0; padding: 0 20px; display: grid; gap: 10px; }
.nov-list li { display: grid; grid-template-columns: 40px 1fr; gap: 12px; align-items: start; }
.nov-ico { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; border: 2px solid var(--ink); background: var(--card); font-size: 1.25rem; box-shadow: 2px 2px 0 var(--ink); }
.nov-list b { display: block; font-family: var(--display); font-weight: 800; letter-spacing: -.02em; font-size: .98rem; }
.nov-list li span:not(.nov-ico) { display: block; font-size: .88rem; line-height: 1.4; color: var(--ink-2); }
.nov-list.sm li { grid-template-columns: 32px 1fr; gap: 10px; }
.nov-list.sm .nov-ico { width: 32px; height: 32px; font-size: 1rem; border-radius: 10px; box-shadow: none; }
.nov-list.sm b { font-size: .9rem; }
.nov-list.sm li span:not(.nov-ico) { font-size: .82rem; }
.nov-sub { margin: 6px 20px 0; padding-top: 12px; border-top: 2px dashed color-mix(in srgb, var(--ink) 18%, transparent); font-size: .74rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.nov-btns { justify-content: space-between; padding: 6px 20px 0; flex-wrap: wrap; gap: 10px; }
@media (max-width: 520px) {
  .nov-head { grid-template-columns: 70px 1fr; padding: 14px 16px; }
  .nov-list, .nov-sub { padding-inline: 16px; margin-inline: 0; }
  .nov-sub { margin-inline: 16px; padding-inline: 0; }
  .nov-btns { padding-inline: 16px; }
  .nov-btns .btn { flex: 1; justify-content: center; }
  .nov-card { gap: 10px; }
  .nov-head h3 { font-size: 1.2rem; }
  .nov-list { gap: 8px; }
  .nov-list li { grid-template-columns: 34px 1fr; gap: 10px; }
  .nov-ico { width: 34px; height: 34px; font-size: 1.05rem; border-radius: 10px; }
  .nov-list b { font-size: .92rem; }
  .nov-list li span:not(.nov-ico) { font-size: .82rem; line-height: 1.35; }
  .nov-list.sm li span:not(.nov-ico) { font-size: .78rem; }
}
@media (max-width: 600px) {
  .onb-card { grid-template-columns: 1fr; }
  .onb-art { border-right: 0; border-bottom: var(--bw) solid var(--ink); max-height: 150px; }
  .onb-art svg { max-width: 220px; }
  .pitch-list { grid-template-columns: 1fr; }
  .pf-top { flex-direction: column; align-items: center; }
  .pf-name { width: 100%; }
  .social-tabs { justify-self: stretch; }
  .social-tabs a { flex: 1; text-align: center; }
}
@media (prefers-reduced-motion: reduce) { .pf-modal, .onb { animation: none; } }

/* =========================================================
   Aprèn: idees clau, cercador, respostes ràpides, examen final i camins d'un govern sense majoria
   ========================================================= */
.ap-key { margin: 6px 0 26px; padding: 16px 18px 16px 20px; border: var(--bw) solid var(--ink); border-left-width: 8px; border-left-color: var(--tone, var(--blue)); border-radius: var(--radius-sm); background: color-mix(in srgb, var(--tone, var(--blue)) 10%, var(--card)); box-shadow: var(--hard-sm); }
.ap-key ul { margin: 6px 0 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.ap-key li { position: relative; padding-left: 26px; font-weight: 600; line-height: 1.4; }
.ap-key li::before { content: "✓"; position: absolute; left: 0; top: 1px; width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; background: var(--ink); color: var(--yellow); font-size: .62rem; font-weight: 900; }

.ap-search { margin: 6px 0 28px; display: grid; gap: 10px; }
.ap-search .dict-search { max-width: none; }
.ap-sres { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.ap-sres a { display: grid; grid-template-columns: auto 1fr; gap: 0 10px; align-items: baseline; padding: 10px 14px; border: 2px solid var(--ink); border-radius: 12px; background: var(--card); color: var(--ink); text-decoration: none; }
.ap-sres a:hover { background: color-mix(in srgb, var(--yellow) 30%, var(--card)); }
.ap-sres em { grid-row: span 2; align-self: start; font-style: normal; font-size: .62rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; padding: 3px 8px; border-radius: 99px; background: var(--paper-2); color: var(--ink-2); }
.ap-sres b { font-size: .95rem; }
.ap-sres small { color: var(--ink-2); font-size: .82rem; line-height: 1.35; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }

.ap-faq { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; align-items: start; margin-bottom: 26px; }
.ap-faq-item { border: 2px solid var(--ink); border-radius: 12px; background: var(--card); box-shadow: var(--hard-sm); }
.ap-faq-item summary { cursor: pointer; list-style: none; padding: 13px 44px 13px 16px; font-weight: 800; position: relative; }
.ap-faq-item summary::-webkit-details-marker { display: none; }
.ap-faq-item summary::after { content: "+"; position: absolute; right: 14px; top: 50%; transform: translateY(-50%); width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--yellow); border: 2px solid var(--ink); font-weight: 900; }
.ap-faq-item[open] summary::after { content: "−"; background: var(--ink); color: var(--yellow); }
.ap-faq-item p { margin: 0; padding: 0 16px 8px; color: var(--ink-2); line-height: 1.5; }
.ap-faq-item a { display: inline-block; margin: 0 16px 14px; font-weight: 800; font-size: .84rem; color: var(--blue); }

.ap-exam { display: flex; align-items: center; gap: 16px; margin: 6px 0 34px; padding: 18px 20px; border: var(--bw) solid var(--ink); border-radius: var(--radius); background: var(--dots) 0 0 / 10px 10px, var(--yellow); box-shadow: var(--hard); color: var(--ink); text-decoration: none; transition: transform .12s var(--ease), box-shadow .12s var(--ease); }
.ap-exam:hover { transform: translate(-2px, -2px); box-shadow: 7px 7px 0 var(--ink); }
.ap-exam > span:nth-child(2) { flex: 1; display: grid; gap: 2px; min-width: 0; }
.ap-exam b { font-family: var(--display); font-weight: 900; font-size: 1.1rem; letter-spacing: -.02em; }
.ap-exam small { color: var(--ink-2); font-weight: 600; }
.ap-exam-ico, .ap-exam-big { flex: none; display: grid; place-items: center; width: 58px; height: 58px; border-radius: 16px; background: var(--ink); color: var(--yellow); font-family: var(--display); font-weight: 900; font-size: 1.3rem; transform: rotate(-6deg); box-shadow: 3px 3px 0 var(--red); }
.ap-exam-big { width: 110px; height: 110px; font-size: 2.4rem; border-radius: 26px; }
.ap-exam-head .ap-ch-headart { display: grid; place-items: center; }
.ap-repas { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 14px 0 4px; }
.ap-repas .kicker { width: 100%; margin: 0; }
.ap-repas a { font-weight: 800; font-size: .86rem; color: var(--ink); text-decoration: none; padding: 6px 12px; border: 2px solid var(--ink); border-radius: 99px; background: var(--paper); }

.ap-gopt { display: grid; gap: 12px; margin: 10px 0 22px; }
.ap-gopt-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.ap-gopt-tabs button { position: relative; display: grid; gap: 4px; align-content: start; text-align: left; font: inherit; color: var(--ink); padding: 12px 14px; border: 2px solid var(--ink); border-radius: 12px; background: var(--card); cursor: pointer; box-shadow: var(--hard-sm); transition: transform .12s var(--ease), background .12s; }
.ap-gopt-tabs button b { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--gt); color: #fff; border: 2px solid var(--ink); font-family: var(--display); font-size: .8rem; }
.ap-gopt-tabs button span { font-weight: 800; line-height: 1.25; }
.ap-gopt-tabs button em { font-style: normal; font-size: .66rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--red); }
.ap-gopt-tabs button.on { background: color-mix(in srgb, var(--gt) 16%, var(--card)); box-shadow: 4px 4px 0 var(--gt); transform: translate(-1px, -1px); }
.ap-gopt-body { padding: 18px; border-top: 6px solid var(--gt); display: grid; gap: 8px; }
.ap-gopt-body h4 { font-family: var(--display); font-weight: 900; font-size: 1.15rem; }
.ap-gopt-body p { margin: 0; line-height: 1.55; }
.ap-gopt-pc { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 4px; }
.ap-gopt-pc > div { display: grid; gap: 2px; padding: 10px 12px; border-radius: 10px; }
.ap-gopt-pc .pro { background: var(--ok-soft); }
.ap-gopt-pc .con { background: var(--ko-soft); }
.ap-gopt-pc b { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; }
.ap-gopt-real { padding: 10px 12px; border-radius: 10px; background: color-mix(in srgb, var(--yellow) 40%, var(--card)); font-weight: 700; }

@media (max-width: 760px) {
  .ap-faq { grid-template-columns: 1fr; }
  .ap-gopt-tabs { grid-template-columns: 1fr; }
  .ap-gopt-pc { grid-template-columns: 1fr; }
  .ap-exam { flex-wrap: wrap; }
  .ap-exam-big { width: 80px; height: 80px; font-size: 1.8rem; }
}

/* =========================================================
   Simulador: mapa real d'Espanya, agenda de mitjans, entrevistes i jugades dels rivals
   ========================================================= */
.sim-mapbox { position: relative; border-radius: 12px; background: #dcebf3; border: 2px solid var(--ink); overflow: hidden; }
.sim-map { display: block; width: 100%; height: auto; }
.sim-map-bg { fill: #efe6d2; stroke: #c9bc9f; stroke-width: 1; }
.sim-map-can { fill: #dcebf3; stroke: var(--ink); stroke-width: 1.5; stroke-dasharray: 5 4; }
.sim-map-cant { font: 800 13px var(--sans); fill: var(--ink-2); text-transform: uppercase; letter-spacing: .08em; }
.sim-pg { cursor: pointer; outline: none; }
.sim-pg path, .sim-pg circle { fill: var(--f, var(--card)); stroke: var(--ink); stroke-width: 1; stroke-linejoin: round; transition: fill .3s; }
.sim-pg circle { stroke-width: 1.5; }
.sim-pg:hover path, .sim-pg:hover circle { stroke-width: 2.4; }
.sim-pg:focus-visible path, .sim-pg:focus-visible circle { stroke: var(--blue); stroke-width: 3.5; }
.sim-pg.sel path, .sim-pg.sel circle { stroke: var(--ink); stroke-width: 4; }
.sim-pg text { font-family: var(--display); font-weight: 900; text-anchor: middle; fill: var(--t, var(--ink)); pointer-events: none; paint-order: stroke; stroke: color-mix(in srgb, var(--f, var(--card)) 70%, transparent); stroke-width: 3px; }
.sim-pg-n { font-size: 15px; }
.sim-pg-mk { font-size: 13px; letter-spacing: -1px; }
.sim-map.night .sim-pg path, .sim-map.night .sim-pg circle { fill: var(--f, #efe6d2); }
.sim-map.night .sim-pg:not(.in) path, .sim-map.night .sim-pg:not(.in) circle { fill: var(--card); }
.sim-map.night .sim-pg.in path { animation: simFlash .45s var(--ease); }
@keyframes simFlash { 40% { stroke-width: 4; } }
.sim-provselect { display: flex; align-items: center; gap: 10px; margin-top: 10px; font-size: .8rem; font-weight: 700; color: var(--ink-2); }
.sim-provselect select { flex: 1; min-width: 0; font: inherit; font-weight: 700; color: var(--ink); padding: 8px 10px; border: 2px solid var(--ink); border-radius: 10px; background: var(--card); }

/* Agenda */
.sim-offers { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.sim-offer { display: grid; grid-template-columns: auto 1fr; gap: 6px 10px; align-items: start; padding: 10px; border: 2px solid var(--ink); border-radius: 12px; background: var(--card); }
.sim-offer[data-type="cara"] { background: color-mix(in srgb, var(--red) 10%, var(--card)); }
.sim-offer.done { opacity: .6; }
.sim-offer-ico { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--yellow); border: 2px solid var(--ink); font-size: 1.05rem; }
.sim-offer > div:nth-child(2) { display: grid; gap: 1px; min-width: 0; }
.sim-offer em { font-style: normal; font-size: .62rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-2); }
.sim-offer em.hard { color: var(--red); }
.sim-offer b { font-size: .9rem; line-height: 1.25; }
.sim-offer small { font-size: .78rem; color: var(--ink-2); line-height: 1.3; }
.sim-offer-btns { grid-column: 2; display: flex; gap: 6px; }
.sim-offer-btns .btn { padding: 6px 14px; font-size: .84rem; }
.sim-offer-st { grid-column: 2; font-size: .74rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }

/* Entrevistes, fòrums i cara a cara */
.sim-media-top { display: flex; align-items: center; gap: 10px; }
.sim-media-set { display: flex; align-items: center; gap: 12px; margin: 16px 0 6px; padding: 14px; border-radius: 12px; background: var(--ink); color: var(--card); }
.sim-media-set small { display: block; color: rgba(255, 250, 240, .7); }
.sim-mic { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: var(--red); font-size: 1.4rem; border: 2px solid var(--card); flex: none; }
.sim-media.cara .sim-media-set { justify-content: center; gap: 18px; padding-bottom: 0; }
.sim-media-vs { font-family: var(--display); font-weight: 900; color: var(--yellow); font-size: 1.2rem; padding-bottom: 12px; }
.sim-opt span b { display: block; }
.sim-opt span small { display: block; font-weight: 500; color: var(--ink-2); font-size: .86rem; margin-top: 2px; }
.sim-react { margin-top: 14px; padding: 12px 14px; border-radius: 12px; background: var(--paper); display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; animation: simIn .35s var(--ease); }
.sim-react p { margin: 0; font-weight: 700; }
.sim-react.ok { background: var(--ok-soft); }
.sim-react.ko { background: var(--ko-soft); }

/* Final del dia */
.sim-plays { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.sim-plays li { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; background: var(--paper); }
.sim-plays li.attack { background: var(--ko-soft); }
.sim-plays li > span:last-child { display: grid; }
.sim-plays small { color: var(--muted); font-size: .76rem; }
.sim-play-ico { width: 28px; text-align: center; font-size: 1.1rem; }
.sim-sum-map { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; align-items: start; margin-top: 6px; }
.sim-mapbox.mini .sim-pg-n { display: none; }
.sim-mapbox.mini .sim-pg-mk { font-size: 22px; }

@media (max-width: 760px) {
  .sim-sum-map { grid-template-columns: 1fr; }
  .sim-pg-n:not(.big) { display: none; }
  .sim-pg-n.big { font-size: 22px; }
  .sim-pg-mk { font-size: 20px; }
  .sim-map-cant { font-size: 18px; }
}
@media (prefers-reduced-motion: reduce) { .sim-map.night .sim-pg.in path, .sim-react { animation: none; } }

/* =========================================================
   Notícies: portada, el dia en 1 minut, diverses mirades, termòmetre i ticker de l'inici
   ========================================================= */
.nx { display: grid; grid-template-columns: minmax(0, 1fr); gap: 30px; padding-top: 6px; }
.nx > *, .nx-sec, .nx-tsec { min-width: 0; }
.nx .btn.sm { padding: 7px 14px; font-size: .84rem; }
.nx-head { display: flex; align-items: end; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.nx-head h2 { font-family: var(--display); font-weight: 900; text-transform: uppercase; letter-spacing: -.03em; font-size: clamp(1.15rem, 2.6vw, 1.55rem); line-height: 1.1; }
.nx-head p { margin-top: 4px; font-size: .88rem; font-weight: 600; color: var(--muted); }
.nx-sub { font-size: .8rem; font-weight: 600; color: var(--muted); line-height: 1.4; }

/* Capçalera */
.nx-mast { position: relative; overflow: hidden; display: grid; gap: 18px; padding: 22px 24px 18px; border-radius: 22px; background: var(--ink); color: var(--card); border: var(--bw) solid var(--ink); box-shadow: 6px 6px 0 var(--red); }
.nx-mast::before { content: ""; position: absolute; inset: 0; background: radial-gradient(circle, rgba(255, 250, 240, .07) 1px, transparent 1.7px) 0 0 / 10px 10px; pointer-events: none; }
.nx-mast > * { position: relative; }
.nx-mast .kicker { color: var(--yellow); display: flex; align-items: center; gap: 8px; }
.nx-title { font-family: var(--display); font-weight: 900; text-transform: uppercase; letter-spacing: -.05em; font-size: clamp(2.4rem, 7vw, 4.2rem); line-height: .95; color: var(--card); text-shadow: 4px 4px 0 var(--red); margin: 6px 0 8px; }
.nx-date { font-weight: 600; color: rgba(255, 250, 240, .78); font-size: .95rem; }
.nx-date::first-letter { text-transform: uppercase; }
.nx-date b { color: var(--card); font-family: var(--display); }
.nx-count { flex: none; display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: 16px; background: var(--yellow); color: var(--ink); border: 2px solid var(--card); transform: rotate(2deg); box-shadow: 4px 4px 0 var(--red); }
.nx-count b { font-family: var(--display); font-weight: 900; font-size: clamp(2rem, 5vw, 2.8rem); line-height: 1; letter-spacing: -.04em; }
.nx-count span { font-weight: 800; font-size: .78rem; line-height: 1.15; text-transform: uppercase; letter-spacing: .02em; }
.nx-next { font-size: .86rem; color: rgba(255, 250, 240, .85); border-top: 1px dashed rgba(255, 250, 240, .25); padding-top: 12px; }
.nx-next b { color: var(--yellow); }

/* El dia en 1 minut: bombolles */
.nx-stories { display: flex; gap: 14px; overflow-x: auto; padding: 4px 4px 10px; margin: -6px -4px -10px; scrollbar-width: none; }
.nx-stories::-webkit-scrollbar { display: none; }
.nx-bub { flex: none; width: 84px; display: grid; justify-items: center; gap: 6px; background: none; border: 0; padding: 0; cursor: pointer; font: inherit; color: var(--ink); text-align: center; }
.nx-bub-c { position: relative; width: 76px; height: 76px; border-radius: 50%; display: grid; place-items: center; overflow: hidden; background: color-mix(in srgb, var(--tc, var(--red)) 22%, var(--card)); border: 3px solid var(--card); box-shadow: 0 0 0 3px var(--red), 0 0 0 5px var(--yellow); transition: transform .25s var(--ease); }
.nx-bub-c svg { width: 92%; height: auto; }
.nx-bub:hover .nx-bub-c { transform: scale(1.06) rotate(-3deg); }
.nx-bub.seen .nx-bub-c { box-shadow: 0 0 0 3px var(--paper-2), 0 0 0 4px var(--muted); }
.nx-bub.main .nx-bub-c { background: var(--ink); }
.nx-bub.main .nx-bub-c svg { width: 32px; fill: var(--yellow); }
.nx-bub b { font-size: .74rem; font-weight: 800; line-height: 1.15; }
.nx-bub small { margin-top: -4px; font-family: var(--display); font-weight: 900; font-size: .6rem; color: #fff; background: var(--tc); border: 1.5px solid var(--ink); border-radius: 99px; padding: 1px 7px; }
.nx-fresh { display: flex; align-items: center; gap: 10px; width: 100%; padding: 12px 16px; border: var(--bw) solid var(--ink); border-radius: 14px; background: var(--yellow); box-shadow: var(--hard-sm); font: inherit; font-weight: 600; color: var(--ink); cursor: pointer; text-align: left; }
.nx-fresh b { font-family: var(--display); font-weight: 900; }
.nx-fresh span[aria-hidden] { margin-left: auto; font-weight: 900; }
.nx-fresh:hover { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--ink); }

/* Portada */
.nx-front { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.nx-lead { --tc: var(--red); padding: 0; overflow: hidden; box-shadow: 7px 7px 0 var(--tc); }
.nx-lead-art { position: relative; display: grid; place-items: center; height: 170px; background: var(--dots) 0 0 / 9px 9px, color-mix(in srgb, var(--tc) 26%, var(--card)); border-bottom: var(--bw) solid var(--ink); }
.nx-lead-art > svg { height: 140px; width: auto; }
.nx-lead-art .nw-tag { font-size: .74rem; left: 14px; top: 14px; }
.nx-lead-body { display: grid; gap: 12px; padding: 18px 22px 22px; }
.nx-lead-k { font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-2); }
.nx-lead-k b { color: var(--red); }
.nx-lead-h { font-family: var(--display); font-weight: 800; font-size: clamp(1.25rem, 2.8vw, 1.85rem); line-height: 1.15; letter-spacing: -.03em; color: var(--ink); text-decoration: none; }
.nx-lead-h:hover { text-decoration: underline; text-decoration-thickness: 3px; text-decoration-color: var(--tc); }
.nx-lead-src { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: .78rem; font-weight: 700; color: var(--muted); }
.nx-lead-more { list-style: none; display: grid; gap: 2px; margin: 0; padding: 10px 0 0; border-top: 2px dashed var(--paper-2); }
.nx-lead-more a, .nx-mirada li a, .nxs-more a { display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: baseline; padding: 7px 6px; border-radius: 8px; color: var(--ink); text-decoration: none; font-weight: 700; font-size: .9rem; line-height: 1.3; }
.nx-lead-more a:hover, .nx-mirada li a:hover { background: #fff4d4; }
.nx-lead .nx-term { justify-self: start; }
.nx-latest { display: grid; gap: 8px; padding: 16px 16px 10px; }
.nx-latest h3 { display: flex; align-items: center; gap: 8px; font-family: var(--display); font-weight: 900; text-transform: uppercase; font-size: .95rem; letter-spacing: -.02em; }
.nx-rows { list-style: none; margin: 0; padding: 0; display: grid; }
.nx-rows li + li { border-top: 1px solid var(--paper-2); }
.nx-rows a { display: grid; grid-template-columns: 44px 1fr; gap: 10px; padding: 9px 4px; color: var(--ink); text-decoration: none; border-radius: 8px; }
.nx-rows a:hover { background: #fff4d4; }
.nx-row-t { font-family: var(--display); font-weight: 900; font-size: .72rem; color: var(--tc); padding-top: 2px; }
.nx-row-b { display: grid; gap: 4px; justify-items: start; }
.nx-row-b b { font-weight: 700; font-size: .88rem; line-height: 1.3; }

/* Targetes amb enllaç i botó «Què vol dir?» */
.nx-newtag { font-family: var(--display); font-weight: 900; font-size: .56rem; text-transform: uppercase; color: var(--ink); background: var(--yellow); border: 1.5px solid var(--ink); border-radius: 99px; padding: 1px 7px; }
.term.nx-term { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px 4px 5px; border: 1.5px solid var(--ink); border-radius: 99px; background: var(--card); font-size: .72rem; font-weight: 800; line-height: 1.2; white-space: nowrap; cursor: pointer; box-shadow: 2px 2px 0 var(--ink); text-align: left; }
.term.nx-term i { flex: none; width: 17px; height: 17px; border-radius: 50%; display: grid; place-items: center; background: var(--blue); color: #fff; font-style: normal; font-family: var(--display); font-weight: 900; font-size: .62rem; }
.term.nx-term:hover, .term.nx-term:focus-visible { background: var(--yellow); }

/* La mateixa notícia, diverses mirades */

/* Per a tu */
.nx-follow-card { padding: 18px; background: linear-gradient(135deg, #fff4d4, var(--card) 60%); }
.nx-follow { display: grid; gap: 8px; }
.nx-follow > p { font-size: .7rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-2); margin-top: 4px; }
.nx-follow > div { display: flex; flex-wrap: wrap; gap: 8px; }
.nx-fchip { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border: 2px solid var(--ink); border-radius: 99px; background: var(--card); font: inherit; font-weight: 800; font-size: .84rem; color: var(--ink); cursor: pointer; box-shadow: 2px 2px 0 var(--ink); transition: transform .15s var(--ease); }
.nx-fchip svg { width: 16px; height: 16px; color: var(--pc); }
.nx-fchip:hover { transform: translate(-1px, -1px); }
.nx-fchip.on { background: var(--pc); color: #fff; text-shadow: 1px 1px 0 rgba(0, 0, 0, .35); }
.nx-fchip.on svg { color: #fff; }
.nx-fchip.on::before { content: "✓"; font-weight: 900; }

/* Termòmetre */
.nx-pulse-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.nx-thermo, .nx-rising { display: grid; gap: 12px; padding: 18px; }
.nx-thermo h3, .nx-rising h3 { font-family: var(--display); font-weight: 900; font-size: 1rem; letter-spacing: -.02em; }
.nx-tchips { display: flex; flex-wrap: wrap; gap: 6px; }
.nx-tchip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border: 1.5px solid var(--ink); border-radius: 99px; background: var(--card); font: inherit; font-weight: 800; font-size: .76rem; color: var(--ink-2); cursor: pointer; }
.nx-tchip i { width: 10px; height: 10px; border-radius: 50%; background: var(--pc); border: 1.5px solid var(--ink); opacity: .35; }
.nx-tchip small { font-weight: 700; color: var(--muted); }
.nx-tchip.on { color: var(--ink); background: color-mix(in srgb, var(--pc) 16%, var(--card)); box-shadow: 2px 2px 0 var(--ink); }
.nx-tchip.on i { opacity: 1; }
.nx-chart { position: relative; }
.nx-chart svg { display: block; width: 100%; height: auto; touch-action: pan-y; }
.nx-grid { stroke: var(--paper-2); stroke-width: 1; }
.nx-ax { font: 700 11px var(--sans); fill: var(--muted); }
.nx-line { fill: none; stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.nx-dot { stroke: var(--card); stroke-width: 2; }
.nx-lab { font: 800 12px var(--sans); fill: var(--ink); }
.nx-cross { stroke: var(--ink); stroke-width: 1; stroke-dasharray: 3 3; }
.nx-hit { fill: transparent; cursor: crosshair; }
.nx-tip { position: absolute; top: 4px; z-index: 3; display: grid; gap: 3px; min-width: 128px; padding: 9px 11px; background: var(--ink); color: var(--card); border-radius: 10px; font-size: .78rem; pointer-events: none; box-shadow: 3px 3px 0 var(--red); }
.nx-tip b { font-family: var(--display); font-size: .74rem; text-transform: capitalize; margin-bottom: 2px; }
.nx-tip span { display: flex; align-items: center; gap: 6px; font-weight: 700; }
.nx-tip span i { width: 9px; height: 9px; border-radius: 50%; border: 1px solid var(--card); }
.nx-tip em { margin-left: auto; font-style: normal; font-weight: 900; padding-left: 10px; }
.nx-tip small { color: rgba(255, 250, 240, .65); margin-top: 2px; }
.nx-table summary { cursor: pointer; font-size: .8rem; font-weight: 800; color: var(--blue); }
.nx-table table { width: 100%; margin-top: 8px; border-collapse: collapse; font-size: .78rem; }
.nx-table th, .nx-table td { padding: 4px 6px; text-align: right; border-bottom: 1px solid var(--paper-2); }
.nx-table th:first-child, .nx-table td:first-child { text-align: left; }
.nx-up { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; padding: 12px; border: 2px solid var(--ink); border-radius: 14px; background: color-mix(in srgb, var(--tc) 14%, var(--card)); box-shadow: 3px 3px 0 var(--tc); }
.nx-up-i svg, .nx-tl-i svg { width: 34px; height: 34px; padding: 6px; border-radius: 10px; background: var(--tc); color: #fff; border: 1.5px solid var(--ink); }
.nx-up small { display: block; font-size: .64rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-2); }
.nx-up b { display: block; font-family: var(--display); font-weight: 900; font-size: 1.1rem; letter-spacing: -.02em; }
.nx-up span { font-size: .8rem; font-weight: 600; color: var(--ink-2); }
.nx-up em { font-style: normal; color: var(--muted); }
.nx-up-arrow { font-family: var(--display); font-weight: 900; font-size: 1.8rem; color: var(--ok); animation: nxUp 1.6s var(--ease) infinite; }
@keyframes nxUp { 50% { transform: translateY(-4px); } }
.nx-tlist { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.nx-tlist button { width: 100%; display: grid; grid-template-columns: auto minmax(0, 1fr) 70px 26px; gap: 10px; align-items: center; padding: 5px 6px; background: none; border: 0; border-radius: 10px; font: inherit; font-weight: 800; font-size: .86rem; color: var(--ink); cursor: pointer; text-align: left; }
.nx-tlist button:hover { background: #fff4d4; }
.nx-tl-i svg { width: 28px; height: 28px; padding: 5px; border-radius: 8px; }
.nx-tlist span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nx-tl-bar { height: 10px; border-radius: 99px; background: var(--paper); border: 1.5px solid var(--ink); overflow: hidden; }
.nx-tl-bar i { display: block; height: 100%; background: var(--tc); }
.nx-tlist b { font-family: var(--display); font-weight: 900; text-align: right; }

/* Quiz */
.nx-quiz { display: grid; grid-template-columns: 130px 1fr auto; gap: 18px; align-items: center; padding: 14px 22px 14px 14px; border: var(--bw) solid var(--ink); border-radius: 20px; background: linear-gradient(120deg, var(--yellow), #ffe58a); box-shadow: 6px 6px 0 var(--ink); color: var(--ink); text-decoration: none; transition: transform .15s var(--ease), box-shadow .15s var(--ease); }
.nx-quiz:hover { transform: translate(-2px, -2px); box-shadow: 8px 8px 0 var(--ink); }
.nx-quiz-art { display: grid; place-items: center; background: var(--card); border: 2px solid var(--ink); border-radius: 14px; padding: 6px; transform: rotate(-3deg); }
.nx-quiz-art svg { width: 100%; height: auto; }
.nx-quiz-b { display: grid; gap: 3px; }
.nx-quiz-b small { font-size: .7rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: var(--red); }
.nx-quiz-b b { font-family: var(--display); font-weight: 900; font-size: clamp(1.05rem, 2.4vw, 1.4rem); letter-spacing: -.03em; line-height: 1.1; }
.nx-quiz-b span { font-size: .88rem; font-weight: 600; color: var(--ink-2); }
.nxq-h { font-weight: 800; line-height: 1.35; }
.nxq-mask { display: inline-block; padding: 0 8px; border-radius: 6px; background: var(--ink); color: var(--yellow); font-family: var(--display); font-weight: 900; letter-spacing: .1em; }
.nxq-src { margin-top: 8px; font-size: .8rem; font-weight: 700; color: var(--muted); }

/* Per temes */
.nx-tlinks { list-style: none; margin: 0; padding: 0; display: grid; }
.nx-tlinks li + li { border-top: 1px solid var(--paper-2); }
.nx-tlinks a { display: grid; gap: 5px; padding: 11px 8px; border-radius: 10px; color: var(--ink); text-decoration: none; }
.nx-tlinks a:hover { background: color-mix(in srgb, var(--tc) 10%, var(--card)); }
.nx-tlinks b { font-weight: 800; font-size: .96rem; line-height: 1.3; }
.nx-tlinks-more { padding: 10px 8px 0; }

/* Tots els titulars */
.nx-filters { display: grid; gap: 12px; padding: 14px; margin-bottom: 16px; }
.nx-search { display: flex; align-items: center; gap: 10px; padding: 0 14px; border: 2px solid var(--ink); border-radius: 12px; background: #fff; box-shadow: 2px 2px 0 var(--ink); }
.nx-search svg { width: 20px; height: 20px; fill: none; stroke: var(--ink-2); stroke-width: 2.4; stroke-linecap: round; flex: none; }
.nx-search input { flex: 1; min-width: 0; border: 0; outline: none; padding: 12px 0; font: inherit; font-weight: 600; font-size: 1rem; background: transparent; color: var(--ink); }
.nx-search:focus-within { outline: 3px solid var(--blue); outline-offset: 2px; }
.nx-fparties { display: flex; flex-wrap: wrap; gap: 6px; }
.nx-frow { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }

/* Ticker de l'inici */
#home-ticker { margin-bottom: 16px; }
.home-ticker { display: flex; align-items: stretch; overflow: hidden; border: var(--bw) solid var(--ink); border-radius: 14px; background: var(--ink); box-shadow: var(--hard-sm); text-decoration: none; color: var(--card); }
.ht-label { flex: none; display: flex; align-items: center; gap: 8px; padding: 0 14px; background: var(--red); font-family: var(--display); font-weight: 900; font-size: .7rem; text-transform: uppercase; letter-spacing: .06em; color: #fff; }
.ht-label .dot-live { background: #fff; }
.ht-track { flex: 1; min-width: 0; overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent); mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent); }
.ht-in { display: flex; width: max-content; animation: nwTicker 120s linear infinite; }
.home-ticker:hover .ht-in, .home-ticker:focus-visible .ht-in { animation-play-state: paused; }
.ht-item { display: inline-flex; align-items: center; gap: 8px; padding: 11px 0 11px 22px; font-weight: 700; font-size: .86rem; white-space: nowrap; }
.ht-item::after { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--yellow); margin-left: 14px; }
.ht-item b { font-family: var(--display); font-weight: 900; font-size: .58rem; text-transform: uppercase; color: #fff; background: var(--oc); border: 1.5px solid var(--card); border-radius: 5px; padding: 1px 6px; }
.ht-go { flex: none; display: grid; place-items: center; width: 40px; background: var(--yellow); color: var(--ink); font-weight: 900; font-size: 1.1rem; }
.home-ticker:hover .ht-go { background: var(--card); }

/* Punt de titulars nous a la navegació */
.nav a[data-nav="noticies"], .tabbar a[data-nav="noticies"] { position: relative; }
.nav a.has-new::after { content: ""; position: absolute; top: 5px; right: 4px; width: 8px; height: 8px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 2px var(--ink); }
.tabbar a.has-new::after { content: ""; position: absolute; top: 7px; left: calc(50% + 7px); width: 9px; height: 9px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 2px #fff; }

/* El dia en 1 minut: visor d'històries */
body.nx-lock { overflow: hidden; }
.nxs { --tc: var(--red); position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; background: rgba(23, 23, 61, .9); animation: nxsFade .2s ease; }
@keyframes nxsFade { from { opacity: 0; } }
.nxs-frame { position: relative; width: min(440px, 100%); height: min(820px, 100dvh); display: grid; grid-template-rows: auto auto 1fr; overflow: hidden; border-radius: 24px; color: #fff; background: radial-gradient(120% 70% at 80% 0%, color-mix(in srgb, var(--tc) 75%, transparent), transparent 70%), linear-gradient(170deg, color-mix(in srgb, var(--tc) 55%, var(--ink)), var(--ink) 75%); box-shadow: 0 30px 80px rgba(0, 0, 0, .45); transition: background .4s; touch-action: pan-y; }
.nxs-frame::before { content: ""; position: absolute; inset: 0; background: radial-gradient(circle, rgba(255, 255, 255, .08) 1px, transparent 1.7px) 0 0 / 11px 11px; pointer-events: none; }
.nxs-bars { position: relative; z-index: 3; display: flex; gap: 4px; padding: 12px 14px 0; }
.nxs-bars i { flex: 1; height: 3px; border-radius: 3px; background: rgba(255, 255, 255, .3); overflow: hidden; }
.nxs-bars b { display: block; height: 100%; width: 0; background: #fff; }
.nxs-bars i.done b { width: 100%; }
.nxs-bars i.cur b { animation: nxsBar 9s linear forwards; }
.nxs.paused .nxs-bars i.cur b { animation-play-state: paused; }
@keyframes nxsBar { from { width: 0; } to { width: 100%; } }
.nxs-top { position: relative; z-index: 3; display: flex; align-items: center; gap: 6px; padding: 10px 10px 0 16px; }
.nxs-brand { margin-right: auto; display: flex; align-items: center; gap: 8px; font-family: var(--display); font-weight: 900; font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; }
.nxs-brand .dot-live { background: var(--yellow); }
.nxs-btn { width: 40px; height: 40px; display: grid; place-items: center; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .14); cursor: pointer; }
.nxs-btn svg { width: 20px; height: 20px; fill: none; stroke: #fff; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.nxs-btn svg path[d^="M8 5l"] { fill: #fff; }
.nxs-btn:hover { background: rgba(255, 255, 255, .26); }
.nxs-stage { position: relative; z-index: 2; min-height: 0; overflow-y: auto; pointer-events: none; }
.nxs-stage a, .nxs-stage button { pointer-events: auto; }
.nxs-nav { position: absolute; z-index: 1; top: 90px; bottom: 0; border: 0; background: transparent; cursor: pointer; }
.nxs-nav.prev { left: 0; width: 32%; }
.nxs-nav.next { right: 0; width: 68%; }
.nxs-slide { display: grid; align-content: center; gap: 14px; min-height: 100%; padding: 18px 26px 34px; animation: nxsIn .35s var(--ease); }
@keyframes nxsIn { from { opacity: 0; transform: translateY(14px); } }
.nxs-k { display: flex; align-items: center; gap: 8px; font-size: .74rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: rgba(255, 255, 255, .8); }
.nxs-k::first-letter { text-transform: uppercase; }
.nxs-k svg { width: 18px; height: 18px; }
.nxs-slide h2 { font-family: var(--display); font-weight: 900; text-transform: uppercase; letter-spacing: -.05em; font-size: clamp(2.2rem, 10vw, 3.2rem); line-height: .95; text-shadow: 4px 4px 0 var(--red); }
.nxs-slide.nxs-intro h2 { text-shadow: 4px 4px 0 var(--red); }
.nxs-big { font-size: 1.05rem; font-weight: 600; color: rgba(255, 255, 255, .85); }
.nxs-big b { font-family: var(--display); color: var(--yellow); font-size: 1.3rem; }
.nxs-topics { display: flex; flex-wrap: wrap; gap: 8px; }
.nxs-topics span { display: inline-flex; align-items: center; gap: 6px; padding: 6px 11px 6px 7px; border-radius: 99px; background: var(--tc); border: 2px solid #fff; font-weight: 800; font-size: .84rem; text-shadow: 1px 1px 0 rgba(0, 0, 0, .3); }
.nxs-topics svg { width: 18px; height: 18px; }
.nxs-left { margin-top: 10px; font-size: .95rem; font-weight: 700; }
.nxs-left b { font-family: var(--display); font-size: 1.4rem; color: var(--yellow); }
.nxs-hint { font-size: .78rem; color: rgba(255, 255, 255, .6); font-weight: 600; }
.nxs-art { justify-self: start; display: grid; place-items: center; width: 150px; height: 110px; border-radius: 20px; background: var(--card); border: 3px solid var(--ink); box-shadow: 5px 5px 0 rgba(0, 0, 0, .35); transform: rotate(-3deg); }
.nxs-art svg { width: 92%; height: auto; }
.nxs-h { font-family: var(--display); font-weight: 800; font-size: clamp(1.25rem, 5.4vw, 1.6rem); line-height: 1.18; letter-spacing: -.03em; color: #fff; text-decoration: none; }
.nxs-h:hover { text-decoration: underline; text-decoration-color: var(--yellow); text-decoration-thickness: 3px; }
.nxs-h::after { content: " ↗"; color: var(--yellow); }
.nxs-src { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: .82rem; font-weight: 700; color: rgba(255, 255, 255, .78); }
.nxs-more { list-style: none; margin: 4px 0 0; padding: 10px 0 0; border-top: 1px solid rgba(255, 255, 255, .22); display: grid; gap: 2px; }
.nxs-more a { color: #fff; font-size: .88rem; }
.nxs-more a:hover { background: rgba(255, 255, 255, .1); }
.nxs-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 4px; }
.nxs .term.nx-term { color: var(--ink); }
.nxs ul.nxs-who { all: unset; display: grid; gap: 10px; margin-top: 6px; }
.nxs ul.nxs-who li { display: grid; grid-template-columns: 74px 1fr 34px; gap: 10px; align-items: center; font-weight: 800; animation: nxsIn .4s var(--ease) both; animation-delay: calc(var(--i) * 80ms); }
.nxs ul.nxs-who li > span:first-child { font-family: var(--display); font-weight: 900; font-size: .74rem; padding: 4px 8px; border-radius: 7px; background: var(--pc); border: 2px solid #fff; text-align: center; text-shadow: 1px 1px 0 rgba(0, 0, 0, .35); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nxs-track { height: 16px; border-radius: 99px; background: rgba(255, 255, 255, .16); overflow: hidden; }
.nxs-track i { display: block; height: 100%; border-radius: inherit; background: var(--pc); box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .5); animation: nxsGrow .8s var(--ease) both; animation-delay: calc(var(--i) * 80ms + 150ms); transform-origin: left; }
@keyframes nxsGrow { from { transform: scaleX(0); } }
.nxs ul.nxs-who b { font-family: var(--display); font-weight: 900; text-align: right; }
.nxs-note { font-size: .78rem; color: rgba(255, 255, 255, .65); }
.nxs-slide.nxs-end { justify-items: center; text-align: center; }
.nxs-slide.nxs-end .nxs-art { justify-self: center; width: 180px; height: 140px; }
.nxs-slide.nxs-end p { font-size: 1rem; color: rgba(255, 255, 255, .85); }
.nxs-cta { display: grid; gap: 10px; width: 100%; margin-top: 8px; }
.nxs-cta .btn.ghost { background: transparent; color: #fff; border-color: #fff; box-shadow: none; }
.nxs .term-pop, body .term-pop { z-index: 95; }

@media (max-width: 900px) {
  .nx-front, .nx-pulse-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .nx { gap: 24px; }
  .nx-mast { padding: 18px 16px 14px; border-radius: 18px; box-shadow: 4px 4px 0 var(--red); }
  .nx-count { order: -1; position: absolute; right: -4px; top: -6px; padding: 6px 10px; gap: 6px; border-radius: 12px; box-shadow: 3px 3px 0 var(--red); }
  .nx-count b { font-size: 1.5rem; }
  .nx-count span { font-size: .54rem; }
  .nx-title { font-size: 2.3rem; text-shadow: 3px 3px 0 var(--red); }
  .nx-ax { font-size: 19px; }
  .nx-lab { font-size: 21px; }
  .nx-line { stroke-width: 4; }
  .nx-dot { r: 6; }
  .nx-lead-art { height: 130px; }
  .nx-lead-art > svg { height: 104px; }
  .nx-lead-body { padding: 16px; }
  .nx-quiz { grid-template-columns: 76px 1fr; padding: 12px; gap: 12px; }
  .nx-quiz .btn { grid-column: 1 / -1; justify-self: stretch; text-align: center; }
  .nx-head { flex-wrap: wrap; align-items: start; }
  .ht-item { font-size: .8rem; padding: 10px 0 10px 18px; }
  .ht-label { padding: 0 10px; font-size: .6rem; }
  .nxs-frame { width: 100%; height: 100dvh; border-radius: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .ht-in { animation: none; }
  .ht-track { overflow-x: auto; }
  .nxs-slide, .nxs ul.nxs-who li, .nxs-track i, .nx-up-arrow { animation: none; }
}

/* =========================================================
   Inici: apartat de l'Aprèn
   ========================================================= */
.home-apren { margin: 40px 0 36px; }
.home-apren .section-head .kicker { margin-bottom: 4px; }
.ha-grid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.ha-main { display: grid; gap: 16px; min-width: 0; }
.ha-next { --tone: var(--blue); position: relative; display: grid; grid-template-columns: 190px minmax(0, 1fr); padding: 0; overflow: hidden; text-decoration: none; color: var(--ink); box-shadow: 6px 6px 0 var(--tone); transition: transform .15s var(--ease), box-shadow .15s var(--ease); }
.ha-next:hover { transform: translate(-2px, -2px); box-shadow: 8px 8px 0 var(--tone); }
.ha-next-art { display: grid; place-items: center; padding: 14px; background: var(--dots) 0 0 / 9px 9px, color-mix(in srgb, var(--tone) 24%, var(--card)); border-right: var(--bw) solid var(--ink); }
.ha-next-art svg { width: 100%; height: auto; max-height: 150px; }
.ha-next-body { display: grid; align-content: center; gap: 8px; padding: 20px 96px 20px 22px; }
.ha-next-k { font-size: .7rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-2); }
.ha-next-body b { font-family: var(--display); font-weight: 900; font-size: clamp(1.25rem, 2.6vw, 1.7rem); letter-spacing: -.03em; line-height: 1.1; }
.ha-next-body small { font-size: .92rem; color: var(--ink-2); font-weight: 600; }
.ha-next-body .btn { justify-self: start; margin-top: 4px; }
.ha-next.done { grid-template-columns: 1fr; background: linear-gradient(120deg, #d3f2df, var(--card)); }
.ha-next.done .ha-next-body { padding-right: 22px; }
.ha-ring { position: absolute; right: 16px; top: 16px; width: 70px; height: 70px; display: grid; place-items: center; }
.ha-ring svg { position: absolute; inset: 0; transform: rotate(-90deg); }
.ha-ring circle { fill: none; stroke-width: 8; }
.ha-ring .bg { stroke: var(--paper-2); }
.ha-ring .fg { stroke: var(--ok); stroke-linecap: round; transition: stroke-dashoffset .8s var(--ease); }
.ha-ring span { position: relative; font-size: .78rem; font-weight: 800; color: var(--muted); }
.ha-ring b { font-family: var(--display); font-size: 1.15rem; color: var(--ink); }
.ha-chs { display: grid; grid-auto-flow: column; grid-auto-columns: 168px; gap: 12px; overflow-x: auto; padding: 4px 8px 14px 2px; scroll-snap-type: x mandatory; scrollbar-width: thin; }
.ha-ch { --tone: var(--blue); position: relative; scroll-snap-align: start; display: grid; grid-template-rows: auto 1fr auto; gap: 6px; padding: 10px 10px 12px; border: 2px solid var(--ink); border-radius: 14px; background: var(--card); box-shadow: 3px 3px 0 var(--ink); text-decoration: none; color: var(--ink); transition: transform .15s var(--ease); }
.ha-ch:hover { transform: translate(-1px, -2px); }
.ha-ch-art { display: grid; place-items: center; height: 82px; border-radius: 10px; background: color-mix(in srgb, var(--tone) 22%, var(--card)); border: 1.5px solid var(--ink); }
.ha-ch-art svg { height: 70px; width: auto; max-width: 100%; }
.ha-ch-n { position: absolute; left: 16px; top: 14px; font-family: var(--display); font-weight: 900; font-size: .7rem; background: var(--card); border: 1.5px solid var(--ink); border-radius: 6px; padding: 1px 6px; }
.ha-ch b { font-weight: 800; font-size: .9rem; line-height: 1.25; }
.ha-st { justify-self: start; align-self: end; font-size: .68rem; font-weight: 800; color: var(--muted); background: var(--paper); border-radius: 99px; padding: 2px 8px; }
.ha-st.ok { color: #fff; background: var(--ok); }
.ha-st.retry { color: var(--ink); background: var(--yellow); }
.ha-ch.is-done .ha-ch-art { filter: saturate(.6); }
.ha-side { display: grid; gap: 14px; }
.ha-word { display: grid; gap: 6px; padding: 18px; text-decoration: none; color: var(--ink); background: linear-gradient(135deg, #fff4d4, var(--card) 70%); }
.ha-word b { font-family: var(--display); font-weight: 900; font-size: 1.35rem; letter-spacing: -.02em; }
.ha-word span:last-child { font-size: .9rem; line-height: 1.45; color: var(--ink-2); }
.ha-word:hover { transform: translate(-1px, -1px); }
.ha-faq { padding: 16px 18px; }
.ha-faq summary { display: grid; gap: 4px; cursor: pointer; list-style: none; padding-right: 26px; position: relative; }
.ha-faq summary::-webkit-details-marker { display: none; }
.ha-faq summary::after { content: "+"; position: absolute; right: 0; top: 50%; transform: translateY(-50%); width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--ink); color: var(--card); font-weight: 900; }
.ha-faq[open] summary::after { content: "−"; }
.ha-faq summary b { font-weight: 800; font-size: 1rem; line-height: 1.3; }
.ha-faq p { margin-top: 10px; font-size: .9rem; line-height: 1.5; color: var(--ink-2); }
.ha-faq > a { display: inline-block; margin-top: 8px; font-size: .84rem; font-weight: 800; color: var(--blue); }
.ha-exam { display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: center; padding: 12px 14px; border: var(--bw) solid var(--ink); border-radius: var(--radius); background: var(--ink); color: var(--card); text-decoration: none; box-shadow: 4px 4px 0 var(--red); }
.ha-exam:hover { transform: translate(-1px, -1px); }
.ha-exam-ico { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--yellow); color: var(--ink); font-family: var(--display); font-weight: 900; }
.ha-exam b { display: block; font-family: var(--display); font-weight: 900; font-size: 1rem; }
.ha-exam small { color: rgba(255, 250, 240, .75); font-weight: 600; }
.ha-tools { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.ha-tools a { --tone: var(--blue); display: grid; justify-items: center; gap: 6px; padding: 12px 6px; border: 2px solid var(--ink); border-radius: 12px; background: color-mix(in srgb, var(--tone) 14%, var(--card)); color: var(--ink); text-decoration: none; text-align: center; font-weight: 800; font-size: .78rem; line-height: 1.2; box-shadow: 2px 2px 0 var(--ink); }
.ha-tools a:hover { transform: translate(-1px, -1px); }
.ha-tools svg { width: 26px; height: 26px; color: var(--tone); }
@media (max-width: 900px) {
  .ha-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .ha-next { grid-template-columns: 1fr; }
  .ha-next-art { border-right: 0; border-bottom: var(--bw) solid var(--ink); padding: 10px; }
  .ha-next-art svg { max-height: 110px; width: auto; }
  .ha-next-body { padding: 16px; }
  .ha-ring { top: 10px; right: 10px; width: 60px; height: 60px; background: var(--card); border-radius: 50%; }
  .ha-chs { grid-auto-columns: 150px; }
}

/* =========================================================
   Aprèn: la guia en quatre blocs
   ========================================================= */
.ap-index { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin: 26px 0 8px; }
.ap-idx { --tone: var(--blue); position: relative; display: grid; align-content: start; gap: 6px; padding: 16px 16px 14px; border: var(--bw) solid var(--ink); border-radius: var(--radius); background: color-mix(in srgb, var(--tone) 10%, var(--card)); box-shadow: 4px 4px 0 var(--tone); font: inherit; color: var(--ink); text-align: left; cursor: pointer; transition: transform .15s var(--ease), box-shadow .15s var(--ease); }
.ap-idx:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--tone); }
.ap-idx-n { position: absolute; right: 14px; top: 10px; font-family: var(--display); font-weight: 900; font-size: 2.4rem; line-height: 1; color: color-mix(in srgb, var(--tone) 35%, transparent); }
.ap-idx-ico svg { width: 38px; height: 38px; padding: 7px; border-radius: 11px; background: var(--tone); color: #fff; border: 2px solid var(--ink); }
.ap-idx b { font-family: var(--display); font-weight: 900; font-size: 1rem; letter-spacing: -.02em; line-height: 1.15; margin-top: 4px; }
.ap-idx small { font-size: .84rem; font-weight: 700; color: var(--ink-2); }
.ap-idx-meta { font-size: .72rem; font-weight: 700; color: var(--muted); margin-top: 2px; }
.ap-idx-bar { height: 8px; border-radius: 99px; background: var(--card); border: 1.5px solid var(--ink); overflow: hidden; margin-top: 4px; }
.ap-idx-bar i { display: block; height: 100%; background: var(--tone); }

.ap-block { margin-top: 46px; scroll-margin-top: 90px; }
.ap-block-head { display: grid; grid-template-columns: auto 1fr auto; gap: 16px; align-items: center; margin-bottom: 18px; padding-bottom: 14px; border-bottom: 3px solid var(--tone); }
.ap-block-n { width: 58px; height: 58px; border-radius: 16px; display: grid; place-items: center; background: var(--tone); color: #fff; border: var(--bw) solid var(--ink); box-shadow: 3px 3px 0 var(--ink); font-family: var(--display); font-weight: 900; font-size: 1.7rem; }
.ap-block-head .kicker { color: var(--ink-2); }
.ap-block-head h2 { font-family: var(--display); font-weight: 900; text-transform: uppercase; letter-spacing: -.04em; font-size: clamp(1.3rem, 3vw, 1.8rem); line-height: 1.05; margin: 2px 0 4px; }
.ap-block-head p:not(.kicker) { color: var(--ink-2); font-weight: 600; font-size: .95rem; }
.ap-block-prog { align-self: start; font-size: .76rem; font-weight: 800; padding: 5px 11px; border-radius: 99px; border: 2px solid var(--ink); background: var(--card); white-space: nowrap; }
.ap-block .ap-chapters { grid-template-columns: repeat(var(--cols, 4), minmax(0, 1fr)); }
.ap-block-extra { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 22px; margin-top: 20px; align-items: start; }
.ap-block-extra.solo { grid-template-columns: 1fr; }
.ap-block-extra h3 { font-size: .74rem; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; color: var(--ink-2); margin-bottom: 10px; }
.ap-block .ap-faq { grid-template-columns: 1fr; margin-bottom: 0; }
.ap-block-tools .ap-tools { grid-template-columns: 1fr; gap: 10px; }
.ap-block-extra.solo .ap-tools { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ap-review .ap-block-n { background: var(--yellow); color: var(--ink); }
.ap-review-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; align-items: stretch; }
.ap-review-grid .ap-exam, .ap-review-grid .ap-word { margin: 0; }
.ap-review-grid .ap-word small { margin-top: 6px; font-weight: 800; color: var(--yellow); }

@media (max-width: 900px) {
  .ap-index { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ap-block .ap-chapters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ap-block-extra, .ap-review-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .ap-index { grid-template-columns: 1fr; gap: 8px; }
  .ap-idx { grid-template-columns: auto minmax(0, 1fr); column-gap: 12px; row-gap: 5px; align-items: center; padding: 10px 52px 10px 10px; box-shadow: 3px 3px 0 var(--tone); }
  .ap-idx-ico { grid-row: span 2; }
  .ap-idx-ico svg { width: 34px; height: 34px; padding: 6px; }
  .ap-idx b { margin: 0; font-size: .92rem; }
  .ap-idx-bar { margin: 0; }
  .ap-idx-n { top: 50%; transform: translateY(-50%); font-size: 1.6rem; }
  .ap-idx small, .ap-idx-meta { display: none; }
  .ap-block-head { grid-template-columns: auto 1fr; gap: 12px; }
  .ap-block-n { width: 46px; height: 46px; font-size: 1.3rem; border-radius: 12px; }
  .ap-block-prog { grid-column: 1 / -1; justify-self: start; }
  .ap-block .ap-chapters { grid-template-columns: 1fr; }
  .ap-block-extra.solo .ap-tools { grid-template-columns: 1fr; }
}
.ap-faq-more { margin-top: 10px; font-size: .86rem; }

/* =========================================================
   Notícies (v2): capçalera compacta, pestanyes, llistes i històries
   ========================================================= */
.nx { gap: 22px; }
.nx-mast { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 20px 24px; }
.nx-title { font-size: clamp(2rem, 5vw, 3.1rem); margin: 4px 0 6px; }
.nx-mast-r { display: grid; justify-items: end; gap: 10px; max-width: 330px; }
.nx-next { border: 0; padding: 0; text-align: right; font-size: .8rem; line-height: 1.35; color: rgba(255, 250, 240, .8); }
.nx-next b { display: block; color: var(--yellow); font-size: .68rem; text-transform: uppercase; letter-spacing: .08em; }

/* Pestanyes */
.nx-tabs { position: sticky; top: calc(64px + env(safe-area-inset-top)); z-index: 5; display: flex; gap: 4px; padding: 5px; border: var(--bw) solid var(--ink); border-radius: 999px; background: var(--card); box-shadow: var(--hard-sm); overflow-x: auto; scrollbar-width: none; }
.nx-tabs::-webkit-scrollbar { display: none; }
.nx-tabs button { flex: 1 0 auto; padding: 9px 16px; border: 0; border-radius: 999px; background: none; font: inherit; font-weight: 800; font-size: .9rem; color: var(--ink-2); cursor: pointer; white-space: nowrap; }
.nx-tabs button:hover { background: var(--paper); }
.nx-tabs button.on { background: var(--ink); color: var(--card); }
#nx-tab { display: grid; gap: 22px; min-width: 0; animation: nxsFade .25s ease; }

/* Llistes compactes */
.nx-items { list-style: none; margin: 0; padding: 0; display: grid; border: var(--bw) solid var(--ink); border-radius: var(--radius); background: var(--card); box-shadow: var(--hard-sm); overflow: hidden; }
.nx-item { position: relative; display: grid; gap: 6px; padding: 13px 16px 13px 20px; }
.nx-item + .nx-item { border-top: 1px solid var(--paper-2); }
.nx-item::before { content: ""; position: absolute; left: 0; top: 12px; bottom: 12px; width: 5px; border-radius: 0 4px 4px 0; background: var(--tc); }
.nx-item:hover { background: color-mix(in srgb, var(--tc) 6%, var(--card)); }
.nx-item-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: .72rem; font-weight: 700; color: var(--muted); }
.nx-item-t { display: inline-flex; align-items: center; gap: 4px; font-size: .64rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--tc); }
.nx-item-t svg { width: 14px; height: 14px; }
.nx-item-h { font-weight: 800; font-size: 1rem; line-height: 1.32; color: var(--ink); text-decoration: none; }
.nx-item-h:hover { text-decoration: underline; text-decoration-color: var(--tc); text-decoration-thickness: 2px; }
.nx-item-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.term.nx-term { box-shadow: none; padding: 3px 9px 3px 4px; font-size: .7rem; }

/* Portada */
.nx-front { gap: 20px; }
.nx-latest .linklike { justify-self: start; font-size: .84rem; margin: 2px 0 6px; }
.nx-other { border-top: 2px dashed var(--paper-2); padding-top: 10px; }
.nx-other summary { cursor: pointer; font-size: .8rem; font-weight: 800; color: var(--blue); list-style: none; }
.nx-other summary::-webkit-details-marker { display: none; }
.nx-other summary::before { content: "▸ "; }
.nx-other[open] summary::before { content: "▾ "; }
.nx-other ul { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 2px; }
.nx-other a { display: grid; gap: 4px; justify-items: start; padding: 7px 6px; border-radius: 8px; color: var(--ink); text-decoration: none; font-weight: 700; font-size: .88rem; line-height: 1.3; }
.nx-other a:hover { background: #fff4d4; }
.nx-why { display: grid; gap: 4px; padding: 12px 14px; border-radius: 12px; background: #e5eaff; border: 2px solid var(--ink); }
.nx-why > b { font-size: .66rem; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; color: var(--blue); }
.nx-why p { font-size: .88rem; line-height: 1.45; }
.nx-why a { font-size: .84rem; font-weight: 800; color: var(--blue); }
.nx-stories-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.nx-story { --tc: var(--red); display: grid; gap: 8px; padding: 16px 18px; box-shadow: 5px 5px 0 var(--tc); }
.nx-story header { display: flex; align-items: center; gap: 8px; }
.nx-story-n { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--ink); color: var(--card); font-family: var(--display); font-weight: 900; font-size: .74rem; }
.nx-cov { margin-left: auto; font-size: .68rem; font-weight: 800; color: #fff; background: var(--tc); border: 1.5px solid var(--ink); border-radius: 99px; padding: 2px 8px; }
.nx-story h3 { font-family: var(--display); font-weight: 900; font-size: 1.05rem; letter-spacing: -.02em; line-height: 1.15; }
.nx-story-h { font-weight: 800; font-size: 1rem; line-height: 1.32; color: var(--ink); text-decoration: none; }
.nx-story-h:hover { text-decoration: underline; text-decoration-color: var(--tc); }
.nx-story-src { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: .74rem; font-weight: 700; color: var(--muted); }
.nx-quiz { margin-top: 4px; }

/* Temes */
.nx-topicbar { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 8px; scrollbar-width: thin; }
.nx-tpill { flex: none; display: inline-flex; align-items: center; gap: 7px; padding: 8px 12px 8px 9px; border: 2px solid var(--ink); border-radius: 99px; background: var(--card); font: inherit; font-weight: 800; font-size: .86rem; color: var(--ink); cursor: pointer; }
.nx-tpill svg { width: 18px; height: 18px; color: var(--tc); }
.nx-tpill b { font-family: var(--display); font-size: .72rem; background: var(--paper); border-radius: 99px; padding: 1px 7px; }
.nx-tpill.on { background: var(--tc); color: #fff; box-shadow: 2px 2px 0 var(--ink); }
.nx-tpill.on svg { color: #fff; }
.nx-tpill.on b { background: rgba(255, 255, 255, .25); }
.nx-topic { display: grid; gap: 16px; }
.nx-topic-head { display: flex; align-items: center; gap: 16px; padding-bottom: 12px; border-bottom: 3px solid var(--tc); }
.nx-topic-art { flex: none; width: 110px; height: 76px; display: grid; place-items: center; border-radius: 14px; border: 2px solid var(--ink); background: var(--dots) 0 0 / 9px 9px, color-mix(in srgb, var(--tc) 22%, var(--card)); }
.nx-topic-art svg { width: 92%; height: auto; }
.nx-topic-head h2 { font-family: var(--display); font-weight: 900; text-transform: uppercase; letter-spacing: -.03em; font-size: clamp(1.3rem, 3vw, 1.7rem); }
.nx-topic-head p { color: var(--muted); font-weight: 700; font-size: .86rem; }

/* Històries: bombolles amb el nom de cada notícia */
.nx-bub b { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* Històries: visor */
.nxs { gap: 18px; }
.nxs-arrow { display: none; }
@media (min-width: 700px) {
  .nxs { grid-template-columns: auto auto auto; justify-content: center; align-items: center; }
  .nxs-arrow { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .5); background: rgba(255, 255, 255, .12); cursor: pointer; }
  .nxs-arrow:hover { background: rgba(255, 255, 255, .25); }
  .nxs-arrow svg { width: 24px; height: 24px; fill: none; stroke: #fff; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
  .nxs-hint-touch { display: none; }
}
@media (max-width: 699px) { .nxs-hint-keys { display: none; } }
.nxs.waiting .nxs-bars i.cur b { animation-play-state: paused; }
.nxs-slide { align-content: start; padding-top: 22px; }
.nxs-slide.back { animation-name: nxsInBack; }
@keyframes nxsInBack { from { opacity: 0; transform: translateX(-24px); } }
.nxs-slide.fwd { animation-name: nxsInFwd; }
@keyframes nxsInFwd { from { opacity: 0; transform: translateX(24px); } }
.nxs-cover, .nxs-end, .nxs-who-s { align-content: center; }
.nxs-index { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 8px; }
.nxs-index li { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 12px; background: rgba(255, 255, 255, .1); border-left: 5px solid var(--tc); animation: nxsIn .4s var(--ease) both; }
.nxs-index li:nth-child(2) { animation-delay: .06s; }
.nxs-index li:nth-child(3) { animation-delay: .12s; }
.nxs-index li:nth-child(4) { animation-delay: .18s; }
.nxs-index li:nth-child(5) { animation-delay: .24s; }
.nxs-index li > span svg { width: 20px; height: 20px; }
.nxs-index b { font-weight: 800; font-size: .98rem; line-height: 1.2; }
.nxs-index small { font-size: .7rem; font-weight: 800; color: rgba(255, 255, 255, .7); white-space: nowrap; }
.nxs-top-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.nxs-tag { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px 5px 7px; border-radius: 99px; background: var(--tc); border: 2px solid #fff; font-weight: 800; font-size: .8rem; text-shadow: 1px 1px 0 rgba(0, 0, 0, .3); }
.nxs-tag svg { width: 16px; height: 16px; }
.nxs-count { font-family: var(--display); font-weight: 900; font-size: .8rem; color: rgba(255, 255, 255, .75); }
.nxs-story .nxs-art { width: 120px; height: 84px; }
.nxs-label { font-family: var(--display); font-weight: 900; text-transform: uppercase; letter-spacing: -.02em; font-size: .9rem; color: var(--yellow); }
.nxs-story .nxs-h { font-size: clamp(1.2rem, 5vw, 1.5rem); }
.nxs-alt { margin: 0; display: grid; gap: 4px; padding: 10px 12px; border-left: 4px solid rgba(255, 255, 255, .5); background: rgba(0, 0, 0, .15); border-radius: 0 10px 10px 0; }
.nxs-alt span { font-size: .68rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: rgba(255, 255, 255, .7); }
.nxs-alt a { color: #fff; font-weight: 700; font-size: .92rem; line-height: 1.35; text-decoration: none; }
.nxs-why { display: grid; gap: 4px; padding: 11px 13px; border-radius: 12px; background: var(--card); color: var(--ink); text-decoration: none; }
.nxs-why b { font-size: .66rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: var(--blue); }
.nxs-why p { font-size: .88rem; line-height: 1.4; }
.nxs-foot { justify-content: space-between; }
.nxs-read { padding: 9px 16px; border-radius: 99px; background: #fff; color: var(--ink); font-weight: 800; font-size: .88rem; text-decoration: none; border: 2px solid var(--ink); box-shadow: 3px 3px 0 rgba(0, 0, 0, .3); }
.nxs-read:hover { background: var(--yellow); }
.nxs-quiz { align-content: center; }
.nxs-slide h2.nxs-q { font-weight: 800; text-transform: none; letter-spacing: -.03em; font-size: clamp(1.25rem, 5vw, 1.55rem); line-height: 1.2; text-shadow: none; }
.nxs-opts { display: grid; gap: 8px; }
.nxs-opts button { padding: 12px 14px; border-radius: 12px; border: 2px solid #fff; background: rgba(255, 255, 255, .12); color: #fff; font: inherit; font-weight: 800; font-size: .92rem; line-height: 1.3; text-align: left; cursor: pointer; transition: background .15s; }
.nxs-opts button:hover:not(:disabled) { background: rgba(255, 255, 255, .25); }
.nxs-opts button.ok { background: var(--ok); }
.nxs-opts button.ko { background: var(--ko); }
.nxs-opts button:disabled:not(.ok):not(.ko) { opacity: .55; }
.nxs-qres { padding: 12px 14px; border-radius: 12px; background: var(--card); color: var(--ink); font-size: .9rem; line-height: 1.45; animation: nxsIn .3s var(--ease); }
.nxs-qres a { font-weight: 800; color: var(--blue); }

@media (max-width: 760px) {
  .nx-stories-grid { grid-template-columns: 1fr; }
  .nx-tabs { top: 58px; }
}
@media (max-width: 640px) {
  .nx-mast { flex-direction: column; align-items: start; padding: 16px; }
  .nx-mast-r { justify-items: start; max-width: none; }
  .nx-count { position: absolute; right: 12px; top: 14px; padding: 6px 10px; gap: 6px; border-radius: 12px; box-shadow: 3px 3px 0 var(--red); }
  .nx-count b { font-size: 1.5rem; }
  .nx-count span { font-size: .54rem; }
  .nx-mast .kicker { max-width: calc(100% - 120px); }
  .nx-next { text-align: left; }
  .nx-tabs button { padding: 8px 12px; font-size: .84rem; }
  .nx-item { padding: 12px 12px 12px 16px; }
  .nx-topic-art { width: 84px; height: 60px; }
  .nxs-story .nxs-art { display: none; }
}
@media (prefers-reduced-motion: reduce) { .nxs-slide.back, .nxs-slide.fwd, .nxs-index li, #nx-tab { animation: none; } }
.nxs-nav:focus, .nxs-nav:focus-visible { outline: none; }
.nx-lead-art { height: 118px; }
.nx-lead-art > svg { height: 96px; }
@media (max-width: 640px) {
  .nx-mast-r { position: static; }
  .nx-mast-l { padding-right: 112px; }
}
@media (max-width: 440px) {
  .nx-tabs { gap: 2px; padding: 4px; }
  .nx-tabs button { flex: 1 1 auto; padding: 8px 8px; font-size: .74rem; }
}

/* =========================================================
   Barra inferior: vidre líquid (mòbil i tauleta)
   Capes, de baix a dalt: el vidre (.lg-body: difuminat, saturat i, a Chrome, refracció SVG), la gota de la pestanya
   activa (.tab-indicator), les pestanyes, i el reflex especular de la vora (.lg-rim). Clara o fosca (.on-dark)
   segons el que hi ha a sota; més petita en baixar la pàgina (.min). La física de la gota és a app.js.
   ========================================================= */
@media (max-width: 900px) {
  .tabbar {
    --lx: 50%; --la: 0deg;
    --g-tint: rgba(255, 255, 255, .5); --g-tint2: rgba(255, 255, 255, .3);
    --g-ink: rgba(23, 23, 61, .74); --g-on: var(--red); --g-pill: rgba(23, 23, 61, .075);
    --g-rim: rgba(255, 255, 255, .95); --g-rim2: rgba(255, 255, 255, .28);
    --tb-h: 66px;
    display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); align-items: stretch;
    position: fixed; z-index: 40; left: 50%; transform: translateX(-50%) translateZ(0);
    bottom: max(10px, calc(env(safe-area-inset-bottom) - 12px));
    width: min(500px, calc(100% - 20px)); height: var(--tb-h); padding: 6px; box-sizing: border-box;
    border-radius: 999px; border: 0; background: transparent; overflow: visible;
    touch-action: none; user-select: none; -webkit-user-select: none; -webkit-tap-highlight-color: transparent;
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "DM Sans", system-ui, sans-serif;
    box-shadow: 0 18px 40px -16px rgba(12, 12, 40, .42), 0 4px 14px -6px rgba(12, 12, 40, .16);
    transition: height .5s cubic-bezier(.32, 1.25, .5, 1), width .5s cubic-bezier(.32, 1.25, .5, 1), transform .45s cubic-bezier(.3, 1.5, .5, 1), box-shadow .4s;
  }
  .tabbar.pressing { transform: translateX(-50%) translateZ(0) scale(1.03, 1.06); }
  .tabbar.min { --tb-h: 52px; width: min(400px, calc(100% - 44px)); }
  .tabbar.on-dark {
    --g-tint: rgba(30, 30, 58, .5); --g-tint2: rgba(30, 30, 58, .36);
    --g-ink: rgba(255, 255, 255, .86); --g-on: #ff8a6b; --g-pill: rgba(255, 255, 255, .16);
    --g-rim: rgba(255, 255, 255, .7); --g-rim2: rgba(255, 255, 255, .12);
    box-shadow: 0 18px 40px -16px rgba(0, 0, 0, .6), 0 4px 14px -6px rgba(0, 0, 0, .3);
  }

  /* El vidre */
  .lg-body {
    position: absolute; inset: 0; z-index: 0; border-radius: inherit; pointer-events: none;
    background: linear-gradient(180deg, var(--g-tint), var(--g-tint2));
    -webkit-backdrop-filter: blur(14px) saturate(1.9) brightness(1.06);
    backdrop-filter: blur(14px) saturate(1.9) brightness(1.06);
    box-shadow:
      inset 0 1px 1px rgba(255, 255, 255, .55),
      inset 0 -1px 1px rgba(255, 255, 255, .22),
      inset 0 0 14px rgba(255, 255, 255, .16),
      inset 0 -12px 22px -18px rgba(12, 12, 40, .35);
    transition: background .45s;
  }
  .on-dark .lg-body { -webkit-backdrop-filter: blur(14px) saturate(1.7) brightness(.9); backdrop-filter: blur(14px) saturate(1.7) brightness(.9); }
  /* Chrome/Android: refracció de debò a les vores (mapa de desplaçament generat a app.js) */
  .lg-svg .lg-body { backdrop-filter: url(#lg-refract) brightness(1.06); }
  .lg-svg .on-dark .lg-body { backdrop-filter: url(#lg-refract) brightness(.92); }

  /* Reflex especular de la vora: dos punts de llum oposats que giren amb el desplaçament */
  .lg-rim {
    position: absolute; inset: 0; z-index: 4; border-radius: inherit; pointer-events: none; padding: 1px;
    background: conic-gradient(from calc(var(--la) + 200deg), var(--g-rim) 0deg, var(--g-rim2) 55deg, var(--g-rim2) 125deg, var(--g-rim) 180deg, var(--g-rim2) 235deg, var(--g-rim2) 305deg, var(--g-rim) 360deg);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor; mask-composite: exclude;
  }
  .lg-rim::after {
    /* Reflex suau que segueix el dit */
    content: ""; position: absolute; inset: -1px; border-radius: inherit; opacity: 0; transition: opacity .3s;
    background: radial-gradient(34% 120% at var(--lx) 0%, rgba(255, 255, 255, .55), transparent 70%);
  }
  .pressing .lg-rim::after { opacity: 1; }

  /* La gota de la pestanya activa */
  .tab-indicator {
    --w: 0px;
    position: absolute; z-index: 1; left: 0; top: 6px; bottom: 6px; width: var(--w);
    border-radius: 999px; pointer-events: none; transform-origin: 50% 50%; will-change: transform;
    background: var(--g-pill);
    transition: opacity .25s, background .3s, box-shadow .3s;
  }
  .tabbar.on-home:not(.pressing) .tab-indicator { opacity: 0; }
  /* En prémer: lupa de vidre clar, elevada */
  .tabbar.pressing .tab-indicator {
    background: radial-gradient(120% 90% at 30% 10%, rgba(255, 255, 255, .5), rgba(255, 255, 255, .06) 55%, rgba(255, 255, 255, .14));
    -webkit-backdrop-filter: blur(.5px) saturate(1.6) brightness(1.1);
    backdrop-filter: blur(.5px) saturate(1.6) brightness(1.1);
    box-shadow:
      0 10px 24px -8px rgba(12, 12, 40, .4),
      inset 0 1.5px 1px rgba(255, 255, 255, .95),
      inset 0 -1.5px 1px rgba(255, 255, 255, .45),
      inset 2px 0 3px -2px rgba(255, 90, 110, .6),
      inset -2px 0 3px -2px rgba(80, 140, 255, .6),
      inset 0 0 12px rgba(255, 255, 255, .35);
  }
  .lg-svg .tabbar.pressing .tab-indicator { backdrop-filter: url(#lg-lens) brightness(1.08); }

  /* Pestanyes */
  .tabbar a {
    position: relative; z-index: 2; min-width: 0; display: grid; place-items: center; align-content: center; gap: 3px;
    text-decoration: none; color: var(--g-ink); font-size: 10px; font-weight: 600; letter-spacing: -.01em; border-radius: 999px;
    transition: color .3s;
  }
  .tabbar a > span:last-child {
    max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.1;
    transition: opacity .25s, max-height .4s cubic-bezier(.32, 1.25, .5, 1), transform .4s cubic-bezier(.32, 1.25, .5, 1); max-height: 14px;
  }
  .tabbar svg {
    width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linejoin: round; stroke-linecap: round;
    transition: transform .45s cubic-bezier(.3, 1.6, .5, 1), stroke .3s;
  }
  .tabbar a.active { color: var(--g-on); font-weight: 700; }
  .tabbar a.active svg { stroke-width: 2.15; }
  .tabbar.dragging a.active:not(.hover) { color: var(--g-ink); font-weight: 600; }
  .tabbar a.hover { color: var(--g-on); }
  .tabbar a.hover svg { transform: scale(1.16); }
  .tabbar a:active svg { transform: scale(.9); }
  .tabbar a.pop svg { animation: tbPop .55s cubic-bezier(.3, 1.6, .5, 1); }
  @keyframes tbPop { 0% { transform: scale(.82); } 55% { transform: scale(1.14); } 100% { transform: scale(1); } }
  .tabbar a:focus-visible { outline: 2px solid var(--g-on); outline-offset: -3px; }

  /* Inici: disc de vidre tenyit al centre */
  .tabbar a.tab-home { color: var(--g-ink); }
  .tab-orb {
    position: absolute; left: 50%; top: 50%; width: 36px; height: 36px; margin: -26px 0 0 -18px; border-radius: 50%; z-index: -1;
    background:
      radial-gradient(90% 70% at 32% 18%, rgba(255, 255, 255, .55), rgba(255, 255, 255, 0) 50%),
      radial-gradient(80% 60% at 50% 115%, rgba(255, 207, 61, .45), rgba(255, 207, 61, 0) 60%),
      linear-gradient(165deg, #3a3a86, var(--ink) 75%);
    box-shadow: 0 8px 16px -8px rgba(12, 12, 40, .7), inset 0 1.5px 1px rgba(255, 255, 255, .55), inset 0 -4px 8px rgba(0, 0, 0, .35), 0 0 0 .5px rgba(255, 255, 255, .4);
    transition: background .35s, box-shadow .35s, transform .45s cubic-bezier(.3, 1.6, .5, 1), width .45s cubic-bezier(.32, 1.25, .5, 1), height .45s cubic-bezier(.32, 1.25, .5, 1), margin .45s cubic-bezier(.32, 1.25, .5, 1);
  }
  .tabbar a.tab-home svg { position: relative; top: -2px; stroke: var(--yellow); stroke-width: 2.1; width: 19px; height: 19px; margin-bottom: 2px; }
  .tabbar a.tab-home > span:last-child { transform: translateY(3px); }
  .tabbar a.tab-home.active .tab-orb {
    background:
      radial-gradient(90% 70% at 32% 18%, rgba(255, 255, 255, .6), rgba(255, 255, 255, 0) 50%),
      radial-gradient(80% 60% at 50% 115%, rgba(255, 207, 61, .55), rgba(255, 207, 61, 0) 60%),
      linear-gradient(165deg, #ff7d5e, var(--red) 55%, #d4321a);
    box-shadow: 0 8px 18px -6px rgba(255, 75, 43, .7), inset 0 1.5px 1px rgba(255, 255, 255, .6), inset 0 -4px 8px rgba(120, 20, 0, .35), 0 0 0 .5px rgba(255, 255, 255, .5);
  }
  .tabbar a.tab-home.active svg { stroke: #fff; }
  .tabbar a.tab-home.hover .tab-orb, .tabbar a.tab-home:active .tab-orb { transform: scale(1.1); }
  .tabbar a.tab-home.hover svg { transform: scale(1.1); }

  /* Encongida: només icones */
  .tabbar.min a > span:last-child { opacity: 0; max-height: 0; transform: scale(.6); }
  .tabbar.min a { gap: 0; }
  .tabbar.min svg { width: 22px; height: 22px; }
  .tabbar.min .tab-orb { width: 36px; height: 36px; margin: -18px 0 0 -18px; }
  .tabbar.min a.tab-home svg { top: 0; width: 19px; height: 19px; margin: 0; }

  .tabbar a.has-new::after { top: 6px; left: calc(50% + 6px); box-shadow: 0 0 0 2px rgba(255, 255, 255, .9); }
}
@media (max-width: 380px) {
  .tabbar { padding: 5px; --tb-h: 62px; }
  .tabbar a { font-size: 9px; gap: 2px; }
  .tabbar svg { width: 22px; height: 22px; }
  .tab-orb { width: 34px; height: 34px; margin: -25px 0 0 -17px; }
}
@media (max-width: 340px) { .tabbar a { font-size: 8px; letter-spacing: -.03em; } }
@media (prefers-reduced-transparency: reduce) {
  .lg-body, .lg-svg .lg-body { background: rgba(255, 250, 240, .97); backdrop-filter: none; -webkit-backdrop-filter: none; }
  .on-dark .lg-body { background: rgba(23, 23, 61, .96); }
}
@media (prefers-reduced-motion: reduce) {
  .tabbar, .tabbar a, .tabbar svg, .tab-orb, .tabbar a > span:last-child { transition: none; }
  .tabbar a.pop svg { animation: none; }
}

/* =========================================================
   Simulador de debat electoral
   ========================================================= */
/* Targeta a la secció Simulador */
.db-promo { display: grid; grid-template-columns: 200px 1fr auto; gap: 18px; align-items: center; margin: 22px 0 8px; padding: 14px 22px 14px 14px; border: var(--bw) solid var(--ink); border-radius: 20px; background: linear-gradient(120deg, #1b1f6a, var(--ink) 60%); color: var(--card); box-shadow: 6px 6px 0 var(--blue); text-decoration: none; transition: transform .15s var(--ease), box-shadow .15s var(--ease); }
.db-promo:hover { transform: translate(-2px, -2px); box-shadow: 8px 8px 0 var(--blue); }
.db-promo-art { position: relative; height: 120px; border-radius: 14px; overflow: hidden; background: radial-gradient(80% 70% at 50% 0%, #4b2aa8, #0b0c26 75%); border: 2px solid rgba(255, 255, 255, .2); }
.db-promo-led { position: absolute; left: 10%; right: 10%; top: 12px; padding: 6px 0; border-radius: 6px; background: linear-gradient(90deg, #1b1f7a, #7a1f4f); text-align: center; font-family: var(--display); font-weight: 900; font-size: .7rem; letter-spacing: .06em; }
.db-pod { position: absolute; bottom: 14px; width: 26%; height: 44px; border-radius: 4px 4px 2px 2px; background: #14153a; border-bottom: 5px solid var(--c, var(--red)); }
.db-pod::before { content: ""; position: absolute; left: 50%; bottom: 100%; width: 22px; height: 30px; margin-left: -11px; border-radius: 11px 11px 4px 4px; background: #2b2f55; }
.db-pod.a { left: 6%; --c: var(--blue); } .db-pod.b { left: 37%; --c: var(--yellow); } .db-pod.c { left: 68%; --c: var(--red); }
.db-promo-b { display: grid; gap: 4px; }
.db-promo-b small { font-size: .7rem; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; color: var(--yellow); }
.db-promo-b b { font-family: var(--display); font-weight: 900; font-size: clamp(1.05rem, 2.4vw, 1.35rem); letter-spacing: -.03em; line-height: 1.12; }
.db-promo-b > span { font-size: .88rem; color: rgba(255, 250, 240, .8); font-weight: 600; }

/* Pantalles de preparació */
.db-wrap { max-width: 860px; margin: 0 auto; }
.db-card { display: grid; gap: 12px; padding: 24px; }
.db-h { font-family: var(--display); font-weight: 900; font-size: clamp(1.3rem, 3vw, 1.75rem); letter-spacing: -.03em; line-height: 1.1; }
.db-h3 { font-size: .74rem; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; color: var(--ink-2); margin-top: 10px; }
.db-lead { color: var(--ink-2); font-weight: 600; line-height: 1.45; }
.db-setup { display: grid; grid-template-columns: minmax(0, 1fr) 220px; gap: 20px; align-items: start; }
.db-form { display: grid; gap: 10px; }
.db-form label { display: grid; gap: 5px; font-size: .78rem; font-weight: 800; color: var(--ink-2); }
.db-form input { font: inherit; font-size: 1rem; font-weight: 700; color: var(--ink); padding: 10px 12px; border: 2px solid var(--ink); border-radius: 10px; background: #fff; min-width: 0; }
.db-in { display: flex; gap: 8px; }
.db-in input { flex: 1; }
.db-dice { width: 46px; border: 2px solid var(--ink); border-radius: 10px; background: var(--yellow); font-size: 1.2rem; cursor: pointer; }
.db-colors { display: flex; flex-wrap: wrap; gap: 8px; }
.db-colors button { width: 34px; height: 34px; border-radius: 50%; border: 3px solid var(--card); background: var(--c); box-shadow: 0 0 0 2px var(--ink); cursor: pointer; }
.db-colors button.on { box-shadow: 0 0 0 2px var(--ink), 0 0 0 5px var(--yellow); }
.db-colors.sm { gap: 6px; }
.db-colors.sm button { width: 28px; height: 28px; border-width: 2px; }
.db-looks { display: flex; flex-wrap: wrap; gap: 6px; }
.db-looks button { font: inherit; font-size: 13px; font-weight: 700; padding: 7px 12px; border-radius: 999px; border: 2px solid var(--ink); background: var(--card); color: var(--ink); cursor: pointer; }
.db-looks button.on { background: var(--ink); color: var(--card); }
.db-tones { display: grid; grid-template-columns: auto 1fr; gap: 10px 12px; align-items: center; margin-top: 12px; font-size: 13px; font-weight: 700; }
.db-preview { position: relative; height: 210px; border-radius: 16px; overflow: hidden; background: radial-gradient(80% 60% at 50% 0%, #4b2aa8, #0b0c26 75%); border: var(--bw) solid var(--ink); box-shadow: var(--hard-sm); }
.db-prev-led { position: absolute; left: 12%; right: 12%; top: 16px; padding: 8px 0; border-radius: 6px; background: linear-gradient(90deg, #1b1f7a, #7a1f4f); color: #fff; text-align: center; font-family: var(--display); font-weight: 900; font-size: .8rem; }
.db-prev-pod { position: absolute; left: 50%; bottom: 18px; width: 120px; transform: translateX(-50%); display: grid; place-items: center; gap: 2px; padding: 16px 8px 10px; border-radius: 8px 8px 4px 4px; background: #14153a; border-bottom: 8px solid var(--c); color: #fff; }
.db-prev-pod::before { content: ""; position: absolute; left: 50%; bottom: 100%; width: 46px; height: 58px; margin-left: -23px; border-radius: 23px 23px 6px 6px; background: linear-gradient(#f1c7a5 0 40%, #2b2f55 40%); }
.db-prev-pod b { font-family: var(--display); font-weight: 900; font-size: 1.3rem; }
.db-prev-pod small { font-size: .7rem; font-weight: 700; opacity: .85; text-align: center; }
.db-seg { display: flex; flex-wrap: wrap; gap: 4px; padding: 4px; border: 2px solid var(--ink); border-radius: 999px; background: var(--card); width: fit-content; max-width: 100%; }
.db-seg button { padding: 8px 14px; border: 0; border-radius: 999px; background: none; font: inherit; font-weight: 800; font-size: .86rem; color: var(--ink-2); cursor: pointer; }
.db-seg button.on { background: var(--ink); color: var(--card); }
.db-choices { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.db-choice { display: grid; gap: 4px; align-content: start; padding: 12px 14px; border: 2px solid var(--ink); border-radius: 14px; background: var(--card); font: inherit; color: var(--ink); text-align: left; cursor: pointer; box-shadow: 2px 2px 0 var(--ink); transition: transform .15s var(--ease); }
.db-choice:hover { transform: translate(-1px, -1px); }
.db-choice b { font-weight: 800; font-size: .95rem; }
.db-choice small { font-size: .8rem; color: var(--ink-2); line-height: 1.35; }
.db-choice.on { background: #e5eaff; box-shadow: 3px 3px 0 var(--blue); border-color: var(--blue); }
.db-actions { display: flex; justify-content: space-between; gap: 10px; margin-top: 10px; flex-wrap: wrap; }
.db-actions .btn.primary { margin-left: auto; }
.db-invites { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.db-invite { display: grid; gap: 6px; align-content: start; padding: 14px 16px; border: var(--bw) solid var(--ink); border-radius: 16px; background: var(--card); font: inherit; color: var(--ink); text-align: left; cursor: pointer; box-shadow: 4px 4px 0 var(--blue); transition: transform .15s var(--ease); }
.db-invite:hover:not(:disabled) { transform: translate(-2px, -2px); }
.db-invite.off { opacity: .55; box-shadow: none; cursor: not-allowed; background: var(--paper); }
.db-inv-net { font-size: .7rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-2); }
.db-invite b { font-family: var(--display); font-weight: 900; font-size: 1.1rem; }
.db-invite small { font-size: .84rem; color: var(--ink-2); line-height: 1.4; }
.db-invite em { font-style: normal; font-size: .76rem; font-weight: 800; color: var(--red); }
.db-inv-faces { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 2px; }
.db-inv-faces i { font-style: normal; font-family: var(--display); font-weight: 900; font-size: .6rem; color: #fff; background: var(--pc); border: 1.5px solid var(--ink); border-radius: 5px; padding: 2px 6px; }
.db-inv-faces i.me { box-shadow: 0 0 0 2px var(--yellow); }
.db-note { font-size: .84rem; color: var(--ink-2); font-weight: 600; padding: 10px 12px; border-radius: 10px; background: var(--paper); }
.db-fiction { font-size: .76rem; color: var(--muted); }
.db-prep { display: grid; gap: 8px; }
.db-prep-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 14px; border: 2px solid var(--ink); border-radius: 14px; background: var(--card); }
.db-prep-row b { display: block; font-weight: 800; }
.db-prep-row small { font-size: .82rem; color: var(--ink-2); }
.db-step { display: flex; align-items: center; gap: 8px; flex: none; }
.db-step button { width: 34px; height: 34px; border-radius: 50%; border: 2px solid var(--ink); background: var(--yellow); font: inherit; font-weight: 900; font-size: 1.1rem; cursor: pointer; }
.db-step button:disabled { background: var(--paper); opacity: .5; cursor: not-allowed; }
.db-step span { font-size: 1.1rem; letter-spacing: 2px; color: var(--blue); min-width: 58px; text-align: center; }

/* ---------- El plató ---------- */
body.db-lock { overflow: hidden; }
.db-theater { position: fixed; inset: 0; z-index: 96; overflow: hidden; background: #05061a; color: #fff; font-family: var(--sans); animation: nxsFade .3s ease; }
.db-stage { position: absolute; inset: 0; overflow: hidden; }
.db-canvas { position: absolute; inset: 0; width: 100% !important; height: 100% !important; display: block; }
.db-stage.db-cut::after { content: ""; position: absolute; inset: 0; background: #000; animation: dbCut .22s ease forwards; pointer-events: none; }
@keyframes dbCut { from { opacity: .85; } to { opacity: 0; } }
.db-flash { position: absolute; inset: 0; pointer-events: none; background: radial-gradient(circle at 50% 40%, rgba(255, 207, 61, .45), transparent 60%); opacity: 0; z-index: 2; }
.db-flash.go { animation: dbFlash 1s ease; }
@keyframes dbFlash { 20% { opacity: 1; } }
.db-loading { position: absolute; inset: 0; display: grid; place-items: center; font-weight: 800; color: rgba(255, 255, 255, .8); }
.db-loading .dot-live { display: inline-block; margin-right: 8px; }
/* Barra superior */
.db-top { position: absolute; z-index: 5; top: 14px; left: 16px; right: 16px; display: flex; align-items: center; gap: 10px; }
.db-live { display: inline-flex; align-items: center; gap: 7px; padding: 5px 11px; border-radius: 6px; background: #e3101f; font-family: var(--display); font-weight: 900; font-size: .68rem; letter-spacing: .08em; }
.db-live i { width: 8px; height: 8px; border-radius: 50%; background: #fff; animation: nwNow 1.4s infinite; }
.db-net { font-family: var(--display); font-weight: 800; font-size: .7rem; letter-spacing: .04em; text-transform: uppercase; color: rgba(255, 255, 255, .85); text-shadow: 0 1px 4px rgba(0, 0, 0, .6); }
.db-blockname:empty { visibility: hidden; }
.db-blockname { margin-left: auto; padding: 6px 12px; border-radius: 99px; background: rgba(10, 12, 40, .6); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border: 1px solid rgba(255, 255, 255, .2); font-weight: 800; font-size: .8rem; }
.db-x { width: 38px; height: 38px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .3); background: rgba(10, 12, 40, .6); color: #fff; font-size: 1rem; cursor: pointer; }
/* Indicadors */
.db-meters { position: absolute; z-index: 4; top: 64px; left: 16px; width: 236px; display: grid; gap: 10px; padding: 12px; border-radius: 16px; background: rgba(10, 12, 40, .62); -webkit-backdrop-filter: blur(14px) saturate(1.4); backdrop-filter: blur(14px) saturate(1.4); border: 1px solid rgba(255, 255, 255, .16); box-shadow: 0 18px 40px -20px rgba(0, 0, 0, .8); }
.db-m-h { display: block; font-size: .6rem; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; color: rgba(255, 255, 255, .65); }
.db-curve { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 2px 10px; }
.db-curve .db-m-h { grid-column: 1 / -1; }
.db-curve svg { width: 100%; height: 40px; }
.db-curve path { fill: none; stroke: var(--yellow); stroke-width: 2.2; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.db-curve b { font-family: var(--display); font-weight: 900; font-size: 1.5rem; color: var(--yellow); line-height: 1; }
.db-segs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.db-segc { display: grid; gap: 1px; padding: 6px 7px; border-radius: 10px; background: rgba(255, 255, 255, .08); }
.db-segc small { font-size: .58rem; font-weight: 800; color: rgba(255, 255, 255, .65); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.db-segc b { font-family: var(--display); font-weight: 900; font-size: 1rem; }
.db-segc em { font-style: normal; font-size: .64rem; font-weight: 800; }
.db-segc.up em { color: #5fe39a; } .db-segc.down em { color: #ff7a6b; }
.db-segc.up { box-shadow: inset 0 0 0 1px rgba(95, 227, 154, .5); } .db-segc.down { box-shadow: inset 0 0 0 1px rgba(255, 122, 107, .5); }
.db-time { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 4px 10px; }
.db-time .db-m-h { grid-column: 1 / -1; }
.db-bar { height: 8px; border-radius: 99px; background: rgba(255, 255, 255, .14); overflow: hidden; }
.db-bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #5fe39a, #ffcf3d); transition: width .6s var(--ease); }
.db-bar.low i { background: #ff5a4a; }
.db-bar.nerves i { background: linear-gradient(90deg, #ffcf3d, #ff4b2b); }
.db-time b { font-family: var(--display); font-weight: 900; font-size: .82rem; }
.db-reps { display: flex; align-items: center; justify-content: space-between; }
.db-reps span:last-child { color: var(--yellow); letter-spacing: 3px; }
/* Rètol inferior, com a la tele */
.db-lower { position: absolute; z-index: 4; left: 16px; bottom: 58px; width: min(640px, calc(100% - 470px)); display: grid; animation: dbLower .35s var(--ease); }
@keyframes dbLower { from { opacity: 0; transform: translateY(12px); } }
.db-who { justify-self: start; display: flex; align-items: center; gap: 8px; padding: 7px 14px 7px 0; border-radius: 6px 6px 0 0; background: #fff; color: var(--ink); overflow: hidden; }
.db-who i { width: 8px; align-self: stretch; margin: -7px 4px -7px 0; background: var(--c); }
.db-who b { font-family: var(--display); font-weight: 900; font-size: .92rem; letter-spacing: -.02em; }
.db-who small { font-size: .74rem; font-weight: 800; color: var(--ink-2); }
.db-say { margin: 0; padding: 12px 16px; border-radius: 0 10px 10px 10px; background: rgba(10, 12, 40, .84); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border-left: 8px solid var(--c); font-size: 1.04rem; font-weight: 600; line-height: 1.45; min-height: 3.2em; }
.db-theater.db-mute .db-say { opacity: .4; }
/* Panell de decisions */
.db-panel { position: absolute; z-index: 5; top: auto; max-height: calc(100% - 132px); right: 16px; bottom: 56px; width: 420px; overflow-y: auto; display: flex; flex-direction: column; justify-content: flex-end; gap: 10px; padding: 14px; border-radius: 18px; background: rgba(10, 12, 40, .7); -webkit-backdrop-filter: blur(16px) saturate(1.4); backdrop-filter: blur(16px) saturate(1.4); border: 1px solid rgba(255, 255, 255, .16); box-shadow: 0 18px 50px -20px rgba(0, 0, 0, .9); }
.db-panel:empty { display: none; }
.db-cont { align-self: flex-end; }
.db-ask { display: grid; gap: 10px; }
.db-ask-t { font-family: var(--display); font-weight: 900; font-size: 1.15rem; letter-spacing: -.02em; color: var(--yellow); }
.db-ask-s { font-size: .86rem; color: rgba(255, 255, 255, .78); font-weight: 600; margin-top: -4px; }
.db-opts { display: grid; gap: 8px; }
.db-opt { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: start; padding: 11px 12px; border-radius: 14px; border: 1.5px solid rgba(255, 255, 255, .28); background: rgba(255, 255, 255, .07); color: #fff; font: inherit; text-align: left; cursor: pointer; transition: background .15s, border-color .15s, transform .15s; }
.db-opt:hover:not(:disabled) { background: rgba(255, 255, 255, .16); border-color: var(--yellow); transform: translateX(-2px); }
.db-opt:disabled { opacity: .45; cursor: not-allowed; }
.db-opt-i { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: rgba(255, 255, 255, .12); font-size: 1rem; }
.db-opt-b { display: grid; gap: 3px; min-width: 0; }
.db-opt-b b { font-weight: 800; font-size: .95rem; }
.db-opt-b small { font-size: .8rem; color: rgba(255, 255, 255, .72); line-height: 1.35; }
.db-opt-b q { font-size: .82rem; line-height: 1.4; color: rgba(255, 255, 255, .85); font-style: italic; quotes: "«" "»"; }
.db-opt-s { font-family: var(--display); font-weight: 900; font-size: .68rem; padding: 3px 7px; border-radius: 99px; background: rgba(255, 255, 255, .14); white-space: nowrap; }
.db-opt-s.over { background: #e3101f; }
.db-fb { display: grid; gap: 10px; padding: 12px 14px; border-radius: 14px; background: rgba(95, 227, 154, .12); border: 1px solid rgba(95, 227, 154, .45); animation: dbLower .3s var(--ease); }
.db-fb.bad { background: rgba(255, 90, 74, .12); border-color: rgba(255, 90, 74, .5); }
.db-fb p { margin: 0; font-weight: 700; line-height: 1.45; }
.db-fb-exp { font-weight: 600 !important; font-size: .88rem; color: rgba(255, 255, 255, .85); padding: 8px 10px; border-radius: 10px; background: rgba(255, 255, 255, .08); }
.db-fb-exp b { color: var(--yellow); }
.db-fb-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.db-fb-chips span { font-size: .74rem; font-weight: 800; padding: 3px 9px; border-radius: 99px; }
.db-fb-chips .up { background: rgba(95, 227, 154, .2); color: #8ff0b8; }
.db-fb-chips .down { background: rgba(255, 90, 74, .22); color: #ffa79c; }
/* Minut d'or */
.db-qte { display: grid; justify-items: center; gap: 10px; text-align: center; }
.db-tally { width: 120px; height: 120px; border-radius: 50%; border: 4px solid rgba(255, 255, 255, .3); background: radial-gradient(circle at 40% 35%, #3a3d5c, #12142c); cursor: pointer; display: grid; place-items: center; }
.db-tally i { width: 40px; height: 40px; border-radius: 50%; background: #4a1414; box-shadow: inset 0 2px 6px rgba(0, 0, 0, .6); transition: background .08s, box-shadow .08s; }
.db-tally.on i { background: #ff2020; box-shadow: 0 0 30px 10px rgba(255, 32, 32, .7), inset 0 2px 4px rgba(255, 255, 255, .5); }
.db-qte-r { min-height: 1.4em; font-weight: 800; color: var(--yellow); }
/* Xarxes */
.db-ticker { position: absolute; z-index: 5; left: 0; right: 0; bottom: 0; height: 42px; display: flex; align-items: center; gap: 12px; padding: 0 16px; background: rgba(5, 6, 26, .92); border-top: 1px solid rgba(255, 255, 255, .12); overflow: hidden; }
.db-tick-h { flex: none; font-family: var(--display); font-weight: 900; font-size: .64rem; text-transform: uppercase; letter-spacing: .1em; color: var(--ink); background: var(--yellow); padding: 3px 8px; border-radius: 5px; }
.db-tick { display: flex; gap: 22px; white-space: nowrap; overflow: hidden; font-size: .82rem; font-weight: 600; color: rgba(255, 255, 255, .85); }
.db-tick b { color: #7fb2ff; }
.db-tick .bad b { color: #ff8a7d; }
/* Plató pla, si no hi ha 3D */
.db-stage.flat { background: radial-gradient(90% 70% at 50% 0%, #3b2490, #07081a 70%); }
.db-flat { position: absolute; inset: 70px 460px 140px 280px; display: grid; align-content: center; gap: 30px; }
.db-flat-led { justify-self: center; padding: 14px 34px; border-radius: 10px; background: linear-gradient(90deg, #1b1f7a, #7a1f4f); font-family: var(--display); font-weight: 900; font-size: 1.3rem; }
.db-flat-row { display: flex; justify-content: center; gap: 14px; flex-wrap: wrap; }
.db-flat-pod { position: relative; display: grid; place-items: center; width: 70px; height: 80px; border-radius: 8px 8px 3px 3px; background: #14153a; border-bottom: 6px solid var(--c); font-family: var(--display); font-weight: 900; font-size: .74rem; transition: transform .3s; }
.db-flat-pod i { position: absolute; bottom: 100%; width: 34px; height: 44px; border-radius: 17px 17px 4px 4px; background: linear-gradient(#f1c7a5 0 40%, #2b2f55 40%); }
.db-flat-pod.on { transform: scale(1.12); box-shadow: 0 0 40px 6px rgba(255, 207, 61, .45); }

/* Resultat */
.db-result { display: grid; gap: 12px; margin-top: 18px; text-align: left; }
.db-poll { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.db-poll li { display: grid; grid-template-columns: minmax(110px, 180px) 1fr 78px; gap: 10px; align-items: center; padding: 6px 8px; border-radius: 10px; }
.db-poll li.me { background: #fff4d4; box-shadow: inset 0 0 0 2px var(--yellow); }
.db-poll li > span:first-child { display: grid; font-weight: 800; font-size: .88rem; line-height: 1.15; }
.db-poll small { font-size: .7rem; color: var(--muted); font-weight: 800; }
.db-poll-t { height: 14px; border-radius: 99px; background: var(--paper); border: 1.5px solid var(--ink); overflow: hidden; }
.db-poll-t i { display: block; height: 100%; background: var(--pc); }
.db-poll b { font-family: var(--display); font-weight: 900; text-align: right; white-space: nowrap; }
.db-res-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.db-res-grid > div { display: grid; gap: 2px; padding: 10px; border: 2px solid var(--ink); border-radius: 12px; background: var(--card); }
.db-res-grid small { font-size: .68rem; font-weight: 800; color: var(--ink-2); }
.db-res-grid b { font-family: var(--display); font-weight: 900; font-size: 1.05rem; }
.db-res-grid b.up { color: var(--ok); } .db-res-grid b.down { color: var(--ko); }
.db-moment { display: grid; gap: 2px; padding: 10px 12px; border-radius: 12px; font-weight: 700; }
.db-moment b { font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; }
.db-moment.good { background: var(--ok-soft); } .db-moment.good b { color: var(--ok); }
.db-moment.bad { background: var(--ko-soft); } .db-moment.bad b { color: var(--ko); }
.db-lessons { margin: 0; padding-left: 20px; display: grid; gap: 6px; font-size: .92rem; line-height: 1.45; color: var(--ink-2); }

@media (max-width: 900px) {
  .db-promo { grid-template-columns: 140px 1fr; }
  .db-promo .btn { grid-column: 1 / -1; text-align: center; }
  .db-promo-art { height: 100px; }
  .db-setup { grid-template-columns: 1fr; }
  .db-preview { height: 170px; }
  .db-choices, .db-invites { grid-template-columns: 1fr; }
  .db-res-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  /* Plató en vertical: imatge a dalt, decisions a baix */
  .db-stage { bottom: auto; height: 44%; }
  .db-top { top: 10px; left: 10px; right: 10px; gap: 6px; }
  .db-net { display: none; }
  .db-blockname { font-size: .72rem; padding: 5px 10px; }
  .db-meters { top: auto; bottom: calc(56% + 8px); left: 10px; width: 150px; padding: 8px 10px; gap: 6px; border-radius: 12px; }
  .db-segs, .db-reps { display: none; }
  .db-curve svg { height: 26px; }
  .db-curve b { font-size: 1.2rem; }
  .db-lower { left: 170px; right: 10px; width: auto; bottom: calc(56% + 8px); }
  .db-who { padding: 5px 10px 5px 0; }
  .db-who b { font-size: .8rem; }
  .db-who small { display: none; }
  .db-say { font-size: .86rem; padding: 8px 10px; min-height: 0; max-height: 7.2em; overflow-y: auto; }
  .db-panel { top: 44%; left: 0; right: 0; bottom: 40px; width: auto; border-radius: 18px 18px 0 0; padding: 12px; justify-content: flex-start; background: rgba(10, 12, 40, .96); }
  .db-ticker { height: 40px; }
  .db-flat { inset: 50px 10px 10px 10px; }
}
@media (max-width: 520px) {
  .db-lower { left: 10px; bottom: calc(56% + 62px); }
  .db-meters { width: auto; right: 10px; grid-template-columns: 1fr 1fr; align-items: end; }
  .db-curve { grid-template-columns: 1fr auto; }
  .db-curve svg { display: none; }
  .db-time .db-m-h, .db-curve .db-m-h { font-size: .54rem; }
  .db-poll li { grid-template-columns: 96px 1fr 70px; }
}
@media (prefers-reduced-motion: reduce) { .db-flash.go, .db-lower, .db-fb { animation: none; } }

/* Plató en mòbil: indicadors en una franja a dalt i rètol a baix de la imatge */
@media (max-width: 900px) {
  .db-meters { top: 54px; bottom: auto; left: 10px; right: 10px; width: auto; grid-template-columns: auto minmax(0, 1fr) minmax(0, 1fr); gap: 12px; align-items: center; padding: 7px 12px; border-radius: 12px; }
  .db-curve { grid-template-columns: auto; gap: 0; }
  .db-curve svg { display: none; }
  .db-curve .db-m-h, .db-time .db-m-h { font-size: .52rem; }
  .db-curve b { font-size: 1.15rem; }
  .db-time { gap: 2px 8px; }
  .db-time b { font-size: .72rem; }
  .db-lower { left: 10px; right: 10px; width: auto; bottom: calc(56% + 8px); }
  .db-say { font-size: .84rem; max-height: 5.6em; }
}

/* Plató en mòbil: el plató creix i el panell s'ajusta al que hi ha */
@media (max-width: 900px) {
  .db-theater { display: flex; flex-direction: column; }
  .db-stage { position: relative; inset: auto; flex: 1 1 auto; height: auto; min-height: 40%; }
  .db-panel { position: relative; inset: auto; flex: 0 1 auto; max-height: 58%; width: auto; justify-content: flex-start; border-radius: 18px 18px 0 0; }
  .db-ticker { position: relative; flex: none; }
  .db-lower { left: 10px; right: 10px; bottom: 10px; width: auto; }
}

/* Debat: rellotges de cada candidat, medidor en directe i l'endemà */
.db-clocks { position: absolute; z-index: 5; top: 62px; right: 16px; max-width: calc(100% - 300px); display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; pointer-events: none; }
.db-clk { display: inline-flex; align-items: center; gap: 7px; padding: 4px 10px 4px 0; border-radius: 6px; background: rgba(5, 6, 26, .84); border: 1px solid rgba(255, 255, 255, .14); overflow: hidden; transition: background .2s, color .2s, box-shadow .2s; }
.db-clk i { width: 5px; align-self: stretch; margin: -4px 2px -4px 0; background: var(--c); }
.db-clk b { font-weight: 900; font-size: .7rem; letter-spacing: .02em; }
.db-clk em { font-style: normal; font-family: var(--display); font-weight: 900; font-size: .86rem; font-variant-numeric: tabular-nums; }
.db-clk.me b::after { content: " · tu"; font-weight: 700; opacity: .7; }
.db-clk.on { background: #fff; color: var(--ink); box-shadow: 0 0 0 2px var(--c); }
.db-clk.on em::before { content: "● "; color: #e3262f; font-size: .62rem; vertical-align: 2px; animation: dbBlink 1s steps(2) infinite; }
.db-clk.low em { color: #ffcf3d; } .db-clk.on.low em { color: #b45309; }
.db-clk.out { opacity: .5; } .db-clk.out em { color: #ff7a6b; text-decoration: line-through; }
@keyframes dbBlink { 50% { opacity: 0; } }
.db-curve .db-dl-mid { stroke: rgba(255, 255, 255, .2); stroke-width: 1; stroke-dasharray: 3 3; }
.db-curve .db-dl-base { stroke: #ffcf3d; stroke-width: 1.8; }
.db-curve .db-dl-indecisos { stroke: #fff; stroke-width: 2.2; }
.db-curve .db-dl-rivals { stroke: #ff7a6b; stroke-width: 1.6; }
.db-sw { display: inline-block; width: 9px; height: 3px; margin-right: 4px; vertical-align: 2px; border-radius: 2px; background: #fff; }
[data-seg="base"] .db-sw { background: #ffcf3d; } [data-seg="rivals"] .db-sw { background: #ff7a6b; }
.db-ficha { margin: 6px 0 0; font-size: .74rem; color: var(--muted); }
.db-after { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 8px; margin: 14px 0 4px; }
.db-after > div { display: grid; gap: 4px; align-content: start; padding: 10px 12px; border: 2px solid var(--ink); border-radius: 12px; background: var(--card); }
.db-after small { font-size: .7rem; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.db-aud b { font-family: var(--display); font-weight: 900; font-size: 1.3rem; line-height: 1.1; }
.db-aud span { font-size: .8rem; color: var(--ink-2); }
.db-byseg { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.db-byseg small { grid-column: 1 / -1; }
.db-byseg span { display: grid; gap: 1px; }
.db-byseg em { font-style: normal; font-size: .72rem; color: var(--ink-2); }
.db-byseg b { font-family: var(--display); font-weight: 900; font-size: 1rem; }
.db-byseg i { font-style: normal; font-size: .72rem; color: var(--muted); }
.db-papers { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 8px; }
.db-paper { display: grid; gap: 6px; align-content: start; padding: 10px 12px 12px; border: 1.5px solid var(--ink); border-radius: 4px; background: #fbf8f1; color: #1b1a17; box-shadow: 3px 3px 0 var(--ink); }
.db-paper small { padding-bottom: 5px; border-bottom: 3px double #1b1a17; font-family: Georgia, "Times New Roman", serif; font-weight: 700; font-size: .9rem; font-style: italic; text-align: center; }
.db-paper b { font-family: Georgia, "Times New Roman", serif; font-size: 1.02rem; line-height: 1.22; }
.db-facts, .db-clockres { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.db-facts li { display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: start; padding: 8px 10px; border-radius: 10px; background: var(--card); border: 1.5px solid var(--line, rgba(0, 0, 0, .12)); font-size: .86rem; }
.db-facts small { display: block; margin-top: 3px; color: var(--ink-2); font-size: .78rem; }
.db-fact-tag { padding: 3px 8px; border-radius: 6px; font-size: .7rem; font-weight: 900; text-transform: uppercase; color: #fff; background: #0f9d58; }
.db-facts li.ko .db-fact-tag { background: #d93025; }
.db-clockres li { display: flex; justify-content: space-between; gap: 10px; padding: 5px 8px; border-radius: 8px; font-size: .86rem; }
.db-clockres li.me { background: #fff4d4; }
.db-clockres b { font-weight: 800; white-space: nowrap; }
@media (max-width: 900px) {
  .db-clocks { top: 104px; left: 10px; right: 10px; max-width: none; flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; scrollbar-width: none; }
  .db-clk { flex: none; gap: 5px; padding: 3px 7px 3px 0; }
  .db-clk b { font-size: .62rem; } .db-clk em { font-size: .74rem; }
  .db-clk.me b::after { content: none; }
  .db-curve { grid-template-columns: auto auto; align-items: center; gap: 0 6px; }
  .db-curve .db-m-h { grid-column: 1 / -1; }
  .db-curve svg { display: block; width: 58px; height: 22px; }
  .db-after { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { .db-clk.on em::before { animation: none; } }

/* ---------- Simuladors: els dos amb el mateix pes ---------- */
.simduo-head { margin: 4px 0 18px; display: grid; gap: 6px; }
.simduo-head p:not(.kicker) { margin: 0; max-width: 62ch; color: var(--ink-2); }
.simduo { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; margin-bottom: 30px; }
.simcard { display: grid; grid-template-rows: auto 1fr; border: var(--bw) solid var(--ink); border-radius: var(--radius); box-shadow: var(--hard); overflow: hidden; background: var(--card); }
.simcard-art { position: relative; height: 170px; display: grid; place-items: center; border-bottom: var(--bw) solid var(--ink); overflow: hidden; }
.simcard-el .simcard-art { background: var(--dots) 0 0 / 10px 10px, var(--blue); }
.simcard-el .simcard-art svg { height: 150px; width: auto; max-width: 90%; }
.simcard-db .simcard-art { background: radial-gradient(80% 90% at 50% 0%, #4b2aa8, #0b0c26 75%); }
.simcard-db .db-pod { bottom: 18px; width: 20%; height: 58px; }
.simcard-db .db-pod.a { left: 12%; } .simcard-db .db-pod.b { left: 40%; } .simcard-db .db-pod.c { left: 68%; }
.simcard-db .db-promo-led { top: 18px; left: 18%; right: 18%; color: var(--card); font-size: .8rem; }
.simcard-b { padding: 18px 20px 20px; display: grid; gap: 9px; align-content: start; }
.simcard-k { margin: 0; font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .12em; color: var(--blue); }
.simcard-db .simcard-k { color: #7b3fe4; }
.simcard h3 { margin: 0; font-family: var(--display); font-weight: 900; font-size: clamp(1.25rem, 2.6vw, 1.6rem); letter-spacing: -.035em; line-height: 1.08; }
.simcard-b > p { margin: 0; color: var(--ink-2); }
.simcard-facts { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.simcard-facts li { font-size: .78rem; font-weight: 700; padding: 4px 10px; border-radius: 99px; border: 1.5px solid var(--ink); background: var(--paper); }
.simcard-rec { font-size: .82rem; font-weight: 700; color: var(--ink-2); }
.simcard-save { margin: 0; display: flex; align-items: center; gap: 8px; padding: 7px 10px; border-radius: 12px; font-size: .85rem; background: color-mix(in srgb, var(--yellow) 40%, var(--card)); }
.simcard-go { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.simsec { margin: 8px 0 30px; padding-top: 6px; }
.simsec-k { margin: 0 0 2px; font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .12em; color: var(--ink-2); }
.simsec-h3 { margin: 22px 0 8px; font-family: var(--display); font-weight: 900; font-size: 1.1rem; }
.simsec-save { margin: 0 0 10px; font-weight: 700; }
.simsec-go { margin-top: 14px; }
.home-simduo { margin: 0 0 36px; }
.home-simduo .simduo { margin-bottom: 0; }
.home-simduo .simcard-art { height: 130px; }
.home-simduo .simcard-el .simcard-art svg { height: 112px; }
.home-simduo .simcard-db .db-pod, .simcard-db .db-pod { height: 44px; bottom: 14px; }
.simcard-db .db-pod::before { width: 20px; height: 24px; margin-left: -10px; }
@media (max-width: 760px) {
  .simduo { grid-template-columns: 1fr; gap: 14px; }
  .simcard-art { height: 96px; }
  .simcard-el .simcard-art svg { height: 84px; }
  .simcard-db .db-promo-led { top: 10px; padding: 4px 0; font-size: .7rem; }
  .simcard-db .db-pod, .home-simduo .simcard-db .db-pod { height: 30px; bottom: 10px; }
  .simcard-db .db-pod::before { height: 18px; }
  .simcard-b { padding: 14px 16px 16px; gap: 7px; }
  .simcard-b > p { font-size: .9rem; }
  .home-simduo .simcard-b > p:not(.simcard-k):not(.simcard-save) { display: none; }
  .home-simduo .simcard-art { height: 96px; }
  .home-simduo .simcard-el .simcard-art svg { height: 84px; }
}

/* ---------- Convida'm a un cafè (enllaç discret) ---------- */
.coffee-link { font-weight: 800; color: var(--ink); text-decoration: underline; text-underline-offset: 3px; white-space: nowrap; }
.coffee-link.btn { text-decoration: none; white-space: nowrap; }
.coffee-note { margin: 14px auto 0; font-size: .82rem; color: var(--muted); font-weight: 600; text-align: center; }
.coffee-card { display: flex; align-items: center; gap: 14px; margin: 18px 0; padding: 16px 18px; }
.coffee-card p { margin: 2px 0 0; font-size: .88rem; color: var(--ink-2); }
.coffee-card > div { flex: 1; }
.coffee-cup { font-size: 1.8rem; }
@media (max-width: 560px) { .coffee-card { flex-wrap: wrap; } .coffee-card .btn { width: 100%; text-align: center; } }

/* ---------- Especial del 29N ---------- */
.esp-preview { margin: 0 0 12px; padding: 8px 12px; border-radius: 12px; background: #ffd5cc; border: 2px solid var(--red); font-size: .82rem; font-weight: 800; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.esp-preview button { margin-left: auto; font: inherit; border: 2px solid var(--ink); background: var(--card); border-radius: 99px; padding: 3px 12px; cursor: pointer; }
.esp-home { position: relative; margin: 0 0 26px; padding: 20px 22px; border: var(--bw) solid var(--ink); border-radius: var(--radius); box-shadow: var(--hard); background: linear-gradient(120deg, #1b1f6a, var(--ink) 65%); color: var(--card); display: grid; gap: 10px; }
.esp-home.esp-previa { background: linear-gradient(120deg, #2b2f55, #17173d 70%); }
.esp-home h2 { margin: 0; font-family: var(--display); font-weight: 900; text-transform: uppercase; letter-spacing: -.04em; font-size: clamp(1.7rem, 5vw, 2.6rem); line-height: 1; text-shadow: 3px 3px 0 var(--blue); }
.esp-home p { margin: 0; color: rgba(255, 250, 240, .86); }
.esp-k { display: flex; align-items: center; gap: 8px; font-size: .75rem !important; font-weight: 800; text-transform: uppercase; letter-spacing: .12em; color: var(--yellow) !important; }
.esp-go { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.esp-home .btn:not(.primary) { background: transparent; color: var(--card); border-color: var(--card); }
.esp-msg { margin: 0 0 6px; padding: 8px 12px; border-radius: 12px; background: var(--yellow); color: var(--ink) !important; font-weight: 800; }
.esp-mini { display: flex; align-items: center; gap: 16px; }
.esp-mini svg { width: 200px; max-width: 55%; }
.esp-mini b { display: block; font-family: var(--display); font-size: 1.8rem; }
.esp-mini small { color: rgba(255, 250, 240, .7); font-weight: 700; }
.esp-part { display: flex; flex-wrap: wrap; gap: 10px; }
.esp-part > div { padding: 8px 12px; border-radius: 12px; background: rgba(255, 255, 255, .1); display: grid; gap: 2px; }
.card .esp-part > div { background: var(--paper); }
.esp-part small { font-size: .72rem; font-weight: 700; opacity: .8; }
.esp-part b { font-family: var(--display); font-size: 1.3rem; }
.esp-part span { font-size: .75rem; font-weight: 700; }
.up { color: #1d9a5b; } .down { color: #d23c2a; }
.esp-home .up { color: #7dffb6; } .esp-home .down { color: #ffb0a3; }
.esp-head .esp-sim { color: var(--red); }
.esp-wait p { margin: 0 0 10px; }
.esp-score { margin-bottom: 16px; }
.esp-score p { margin: 8px 0 0; }
.esp-bar { height: 14px; border-radius: 99px; background: var(--paper); border: 2px solid var(--ink); overflow: hidden; }
.esp-bar span { display: block; height: 100%; background: var(--blue); transition: width .6s; }
.esp-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
.esp-hemi .hemicycle { width: 100%; max-width: 460px; display: block; margin: 0 auto; }
.esp-maj { text-align: center; margin: 4px 0 10px; font-weight: 700; }
.esp-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.esp-table th { text-align: left; font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 4px 6px; }
.esp-table td { padding: 5px 6px; border-top: 1px solid color-mix(in srgb, var(--ink) 12%, transparent); }
.esp-table td i, .esp-prov-s i, .esp-porra-cmp i, .esp-pr i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--c); margin-right: 6px; vertical-align: middle; }
.esp-note { font-size: .78rem; margin-top: 8px; }
.esp-map .sim-pg path { fill: var(--f); stroke: #fff; stroke-width: 1; }
.esp-map .sim-pg.sel path { stroke: var(--ink); stroke-width: 3; }
.esp-map .sim-pg-n { fill: var(--t); }
.esp-prov h3 { margin: 10px 0 6px; }
.esp-prov h3 small { font-size: .78rem; color: var(--muted); font-weight: 700; }
.esp-prov-s, .esp-porra-cmp { display: flex; flex-wrap: wrap; gap: 6px 12px; margin-bottom: 6px; font-weight: 700; }
.esp-air ol { margin: 8px 0 0; padding-left: 20px; display: grid; gap: 6px; }
.esp-air, .esp-coal, .esp-porra { margin-bottom: 16px; }
.esp-coal-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 12px; }
.esp-coal-chips button { font: inherit; font-weight: 800; font-size: .85rem; padding: 6px 12px; border-radius: 99px; border: 2px solid var(--c); background: var(--card); cursor: pointer; }
.esp-coal-chips button.on { background: var(--c); color: #fff; }
.esp-coal-bar { position: relative; height: 18px; border-radius: 99px; background: var(--paper); border: 2px solid var(--ink); overflow: hidden; }
.esp-coal-bar span { display: block; height: 100%; background: var(--blue); }
.esp-coal-bar i { position: absolute; top: 0; bottom: 0; width: 3px; background: var(--ink); }
.esp-coal-res { margin: 8px 0 0; }
.esp-porra-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; margin: 10px 0; }
.esp-pr { display: grid; grid-template-columns: auto minmax(0, 1fr) 32px 48px 32px; align-items: center; gap: 4px; padding: 6px 8px; border: 2px solid var(--ink); border-radius: 12px; background: var(--card); }
.esp-pr button { font: inherit; font-weight: 900; border: 2px solid var(--ink); border-radius: 8px; background: var(--paper); height: 32px; cursor: pointer; }
.esp-pr input { width: 100%; text-align: center; font: inherit; font-weight: 800; border: 2px solid var(--ink); border-radius: 8px; height: 32px; }
.esp-porra-tot { font-weight: 700; }
.esp-porra-res { font-size: 1.1rem; }
@media (max-width: 760px) { .esp-grid { grid-template-columns: 1fr; } .esp-home { padding: 16px; } }

/* ---------- Sala de control ---------- */
.ctl { display: grid; gap: 16px; }
.ctl-gate { max-width: 520px; margin: 30px auto; text-align: center; display: grid; gap: 12px; justify-items: center; }
.ctl ul { margin: 6px 0; padding-left: 20px; display: grid; gap: 4px; }
.ctl-warn { color: var(--red); font-weight: 800; }
.ctl-form label, .ctl-prev label { display: grid; gap: 4px; font-weight: 800; font-size: .85rem; margin: 10px 0; }
.ctl select, .ctl input { font: inherit; font-weight: 600; padding: 9px 10px; border: 2px solid var(--ink); border-radius: 10px; background: var(--card); }
.ctl fieldset { border: 2px dashed color-mix(in srgb, var(--ink) 35%, transparent); border-radius: 12px; margin: 12px 0; padding: 10px 12px; }
.ctl legend { font-weight: 900; padding: 0 6px; }
.ctl-part { display: grid; grid-template-columns: 60px 1fr 1fr; gap: 8px; align-items: center; margin: 6px 0; font-weight: 800; }
.ctl-help ol { margin: 6px 0 0; padding-left: 20px; display: grid; gap: 6px; }

/* ---------- Nit electoral v2: plató de TV + joc ---------- */
.esp-nit { display: grid; gap: 16px; }
.esp-live { position: relative; overflow: hidden; border: var(--bw) solid var(--ink); border-radius: var(--radius); box-shadow: var(--hard); color: var(--card); padding: 18px 22px 16px; background: radial-gradient(120% 140% at 85% 0%, #3b2aa8 0%, #1b1f6a 38%, #0c0d2a 75%); }
.esp-live::after { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(0deg, rgba(255,255,255,.03) 0 2px, transparent 2px 4px); pointer-events: none; }
.esp-live-top { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; }
.esp-onair { display: inline-flex; align-items: center; gap: 6px; background: var(--red); color: #fff; padding: 4px 10px; border-radius: 6px; }
.esp-simtag { background: var(--yellow); color: var(--ink); padding: 4px 10px; border-radius: 6px; }
.esp-upd { margin-left: auto; opacity: .7; }
.esp-live-main { display: flex; align-items: center; gap: 18px; justify-content: space-between; margin-top: 10px; }
.esp-live-t h1 { margin: 2px 0 6px; font-family: var(--display); font-weight: 900; text-transform: uppercase; letter-spacing: -.045em; font-size: clamp(2rem, 6vw, 3.6rem); line-height: .95; text-shadow: 4px 4px 0 var(--red); }
.esp-lead { margin: 0; font-size: 1.05rem; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.esp-lead i, .esp-mini-l i { width: 12px; height: 12px; border-radius: 50%; display: inline-block; }
.esp-live-ring { position: relative; width: 130px; flex: none; }
.esp-live-ring > div { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.esp-live-ring b { font-family: var(--display); font-size: 1.5rem; }
.esp-live-ring small { font-size: .7rem; opacity: .75; font-weight: 700; }
.esp-ring { width: 100%; transform: rotate(-90deg); display: block; }
.esp-ring circle { fill: none; stroke-width: 10; }
.esp-ring .bg { stroke: rgba(255,255,255,.15); }
.esp-ring .fg { stroke: var(--yellow); stroke-linecap: round; transition: stroke-dashoffset 1s ease; }
.esp-live-strip { position: relative; z-index: 1; display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 12px; padding-top: 10px; border-top: 1px solid rgba(255,255,255,.15); font-size: .85rem; }
.esp-live-strip span { opacity: .85; }
.esp-live .esp-msg { margin-top: 10px; display: inline-block; }
.esp-cols { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; align-items: start; }
.esp-main { display: grid; gap: 16px; min-width: 0; }
.esp-rail { position: sticky; top: calc(76px + env(safe-area-inset-top)); display: grid; gap: 16px; }
.esp-main > .card, .esp-rail .card, .esp-main .esp-grid > .card { margin: 0; }
.esp-main .esp-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 0; }
.esp-race-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.esp-race-list { display: grid; gap: 6px; margin-top: 8px; }
.esp-rr { display: grid; grid-template-columns: 78px minmax(0, 1fr) 62px 44px 58px; align-items: center; gap: 8px; padding: 5px 6px; border-radius: 10px; }
.esp-rr-n { font-weight: 800; display: flex; align-items: center; gap: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.esp-rr-n i { width: 10px; height: 10px; border-radius: 50%; background: var(--c); flex: none; }
.esp-rr-bar { height: 16px; border-radius: 99px; background: color-mix(in srgb, var(--ink) 8%, transparent); overflow: hidden; }
.esp-rr-bar span { display: block; height: 100%; background: var(--c); border-radius: 99px; }
.esp-rr-s { font-family: var(--display); font-size: 1.2rem; text-align: right; }
.esp-rr-s small { font-size: .65rem; margin-left: 3px; font-family: var(--sans); }
.esp-rr-d, .esp-rr-v { font-size: .82rem; font-weight: 700; text-align: right; }
.esp-rr.flash-up { animation: espUp 2.4s ease; }
.esp-rr.flash-down { animation: espDown 2.4s ease; }
@keyframes espUp { 0%, 40% { background: color-mix(in srgb, #1d9a5b 22%, transparent); } 100% { background: transparent; } }
@keyframes espDown { 0%, 40% { background: color-mix(in srgb, #d23c2a 18%, transparent); } 100% { background: transparent; } }
.esp-feed ol { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 8px; }
.esp-feed li { display: grid; grid-template-columns: 44px 1fr; gap: 8px; font-size: .9rem; padding: 6px 8px; border-radius: 10px; background: var(--paper); border-left: 4px solid var(--muted); }
.esp-feed li time { font-weight: 800; font-size: .78rem; color: var(--muted); }
.esp-feed li.k-puja { border-color: #1d9a5b; } .esp-feed li.k-baixa { border-color: #d23c2a; } .esp-feed li.k-lider, .esp-feed li.k-gir { border-color: var(--yellow); } .esp-feed li.k-fita { border-color: var(--blue); }
.esp-mapwrap { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 16px; align-items: center; }
.esp-prov { padding: 12px; border-radius: 14px; background: var(--paper); }
.esp-prov h3 { margin: 0; font-family: var(--display); }
.esp-prov p { margin: 4px 0; }
.esp-prov-air { font-size: .9rem; }
.esp-air-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; margin-top: 10px; }
.esp-ac { display: grid; gap: 6px; padding: 12px; border: 2px solid var(--ink); border-radius: 14px; background: var(--card); }
.esp-ac-vs { display: flex; align-items: center; gap: 5px; font-weight: 800; font-size: .9rem; }
.esp-ac-vs i { width: 10px; height: 10px; border-radius: 50%; }
.esp-ac-vs em { font-style: normal; color: var(--muted); font-size: .75rem; }
.esp-ac-m { height: 8px; border-radius: 99px; background: color-mix(in srgb, var(--ink) 10%, transparent); overflow: hidden; }
.esp-ac-m span { display: block; height: 100%; background: linear-gradient(90deg, var(--yellow), var(--red)); }
.esp-ac small { color: var(--ink-2); }
.esp-skel { display: grid; gap: 8px; margin-top: 10px; }
.esp-skel span { height: 16px; border-radius: 8px; background: linear-gradient(90deg, var(--paper), color-mix(in srgb, var(--ink) 8%, var(--paper)), var(--paper)); background-size: 200% 100%; animation: espSk 1.4s infinite; }
@keyframes espSk { to { background-position: -200% 0; } }
.esp-pred { background: linear-gradient(160deg, color-mix(in srgb, var(--yellow) 35%, var(--card)), var(--card) 55%); }
.esp-pred-list { display: grid; gap: 12px; margin-top: 10px; }
.esp-q b { display: block; font-size: .92rem; margin-bottom: 6px; }
.esp-q-o { display: flex; flex-wrap: wrap; gap: 6px; }
.esp-q-o button { font: inherit; font-weight: 800; font-size: .85rem; padding: 7px 12px; border-radius: 99px; border: 2px solid var(--ink); background: var(--card); cursor: pointer; }
.esp-q-o button.on { background: var(--ink); color: var(--card); }
.esp-q-o button.ok { background: #1d9a5b; border-color: #1d9a5b; color: #fff; }
.esp-q-o button.ko { background: #d23c2a; border-color: #d23c2a; color: #fff; }
.esp-q-o button:disabled { cursor: default; opacity: .85; }
.esp-play-list { display: grid; gap: 8px; margin: 10px 0 12px; }
.esp-play-list a { display: grid; grid-template-columns: 40px 1fr; gap: 10px; align-items: center; padding: 8px; border: 2px solid var(--ink); border-radius: 14px; background: var(--card); color: var(--ink); text-decoration: none; transition: transform .15s var(--ease), box-shadow .15s var(--ease); }
.esp-play-list a:hover { transform: translate(-2px, -2px); box-shadow: 4px 4px 0 var(--c); }
.esp-play-i { width: 40px; height: 40px; border-radius: 10px; background: var(--c); color: #fff; display: grid; place-items: center; font-size: 1.2rem; }
.esp-play-i svg { width: 22px; height: 22px; }
.esp-play-list b { display: block; font-size: .9rem; }
.esp-play-list small { color: var(--ink-2); font-size: .76rem; display: block; line-height: 1.25; }
.esp-play .btn { width: 100%; }
.esp-rail .esp-porra-list { grid-template-columns: 1fr; }
.esp-mini-f { margin-top: 6px !important; font-size: .82rem; }
.esp-mini-l { margin: 6px 0 0 !important; font-weight: 800; display: flex; align-items: center; gap: 6px; }
@media (max-width: 980px) {
  .esp-cols { grid-template-columns: 1fr; }
  .esp-rail { position: static; }
}
@media (max-width: 640px) {
  .esp-live { padding: 14px 16px; }
  .esp-live-ring { width: 96px; }
  .esp-live-ring b { font-size: 1.15rem; }
  .esp-main .esp-grid, .esp-mapwrap { grid-template-columns: 1fr; }
  .esp-rr { grid-template-columns: 62px minmax(0, 1fr) 52px 36px; }
  .esp-rr-v { display: none; }
}

/* ---------- Sala de control v2 ---------- */
.ctl { display: grid; gap: 16px; padding-bottom: 90px; }
.ctl .card { margin: 0; }
.ctl-gate-i { font-size: 2.6rem; }
.ctl-head { display: flex; justify-content: space-between; align-items: end; gap: 12px; flex-wrap: wrap; }
.ctl-head .page-title { margin: 0; }
.ctl-conn { font-size: .8rem; font-weight: 800; padding: 6px 12px; border-radius: 99px; border: 2px solid var(--ink); background: #ffe1c2; }
.ctl-conn.on { background: #c9f2da; }
.ctl-status { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.ctl-st { display: grid; gap: 4px; align-content: start; padding: 14px 16px; border: var(--bw) solid var(--ink); border-radius: 16px; background: var(--ink); color: var(--card); box-shadow: 4px 4px 0 var(--blue); }
.ctl-st small { font-size: .7rem; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; opacity: .7; }
.ctl-st b { font-family: var(--display); font-size: 1.15rem; line-height: 1.15; }
.ctl-st b.bad { color: #ffb0a3; }
.ctl-st .linklike { color: var(--yellow); justify-self: start; font-size: .78rem; }
.ctl-tag { justify-self: start; font-size: .7rem; font-weight: 800; padding: 2px 8px; border-radius: 99px; background: rgba(255,255,255,.15); }
.ctl-tag.warn { background: var(--yellow); color: var(--ink); }
.ctl-steps { list-style: none; margin: 10px 0; padding: 0; display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; }
.ctl-steps li { position: relative; padding: 10px 8px 8px; border-radius: 12px; background: var(--paper); border: 2px solid transparent; display: grid; gap: 2px; }
.ctl-steps li b { font-size: .82rem; }
.ctl-steps li small { font-size: .72rem; color: var(--muted); }
.ctl-steps li.past { opacity: .5; }
.ctl-steps li.next { border-color: var(--ink); background: color-mix(in srgb, var(--yellow) 45%, var(--card)); }
.ctl-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
.ctl-col { display: grid; gap: 16px; }
.ctl-seg { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 8px; margin-top: 10px; }
.ctl-seg button { font: inherit; text-align: left; display: grid; gap: 2px; padding: 10px 12px; border: 2px solid var(--ink); border-radius: 12px; background: var(--card); cursor: pointer; transition: transform .1s; }
.ctl-seg button:hover { transform: translateY(-1px); }
.ctl-seg button b { font-size: .9rem; }
.ctl-seg button small { font-size: .72rem; color: var(--muted); }
.ctl-seg button.on { background: var(--ink); color: var(--card); box-shadow: 3px 3px 0 var(--blue); }
.ctl-seg button.on small { color: rgba(255,250,240,.7); }
.ctl-alert { margin: 10px 0 0; padding: 8px 12px; border-radius: 10px; background: #ffe1c2; font-weight: 700; font-size: .85rem; }
.ctl textarea, .ctl input { font: inherit; font-weight: 600; padding: 9px 10px; border: 2px solid var(--ink); border-radius: 10px; background: var(--card); width: 100%; box-sizing: border-box; }
.ctl-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0; }
.ctl-chips button { font: inherit; font-size: .78rem; font-weight: 700; padding: 6px 10px; border-radius: 99px; border: 1.5px solid var(--ink); background: var(--paper); cursor: pointer; text-align: left; }
.ctl-chips button.on { background: var(--ink); color: var(--card); }
.ctl-chips button.ko { background: #ffd5cc; }
.ctl-msgprev small { font-size: .72rem; font-weight: 800; color: var(--muted); }
.ctl-parts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }
.ctl-pc { display: grid; gap: 6px; padding: 12px; border-radius: 14px; background: var(--paper); }
.ctl-pc > b { font-family: var(--display); font-size: 1.1rem; }
.ctl-pc label { display: grid; gap: 2px; font-size: .75rem; font-weight: 800; }
.ctl-pc span { font-size: .8rem; font-weight: 800; }
.ctl-sim .esp-bar { margin: 8px 0 4px; }
.ctl-pvs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 10px; }
.ctl-pvs button { font: inherit; display: grid; gap: 4px; justify-items: start; text-align: left; padding: 14px; border: 2px solid var(--ink); border-radius: 14px; background: var(--card); cursor: pointer; transition: transform .15s, box-shadow .15s; }
.ctl-pvs button:hover { transform: translate(-2px, -2px); box-shadow: 4px 4px 0 var(--ink); }
.ctl-pvs span { font-size: 1.6rem; }
.ctl-pvs small { color: var(--muted); font-size: .75rem; }
.ctl-log ol { margin: 8px 0; padding-left: 20px; display: grid; gap: 4px; font-size: .88rem; }
.ctl-log time { font-weight: 800; color: var(--muted); margin-right: 6px; }
.ctl-help { padding-left: 20px; display: grid; gap: 4px; }
.ctl-bar { position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 60; width: min(760px, calc(100% - 24px)); display: flex; align-items: center; gap: 10px; padding: 12px 14px; border: var(--bw) solid var(--ink); border-radius: 18px; background: var(--yellow); box-shadow: var(--hard); }
.ctl-bar > div { flex: 1; display: grid; min-width: 0; }
.ctl-bar small { font-size: .78rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 900px) {
  .ctl-status { grid-template-columns: 1fr 1fr; }
  .ctl-cols { grid-template-columns: 1fr; }
  .ctl-steps { grid-template-columns: repeat(3, 1fr); }
  .ctl-pvs { grid-template-columns: 1fr 1fr; }
  .ctl-bar { bottom: 96px; }
}
@media (max-width: 520px) { .ctl-parts { grid-template-columns: 1fr; } }

/* ---------- Lliga de pronòstics ---------- */
.pron-hero { display: flex; gap: 18px; align-items: center; justify-content: space-between; padding: 20px 22px; border: var(--bw) solid var(--ink); border-radius: var(--radius); box-shadow: var(--hard); background: linear-gradient(120deg, #3b1f6a, var(--ink) 70%); color: var(--card); margin-bottom: 14px; }
.pron-hero h1 { margin: 2px 0 8px; font-family: var(--display); font-weight: 900; text-transform: uppercase; letter-spacing: -.045em; font-size: clamp(1.8rem, 5vw, 3rem); line-height: .95; text-shadow: 4px 4px 0 #7b3fe4; }
.pron-hero p { margin: 0 0 6px; color: rgba(255,250,240,.86); max-width: 60ch; }
.pron-status { font-weight: 700; color: var(--yellow) !important; }
.pron-wallet { flex: none; display: grid; justify-items: center; padding: 14px 18px; border-radius: 18px; background: var(--yellow); color: var(--ink); border: 3px solid var(--card); box-shadow: 0 0 0 3px var(--ink); min-width: 150px; text-align: center; }
.pron-wallet small { font-size: .7rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.pron-wallet b { font-family: var(--display); font-size: 2.2rem; line-height: 1.05; }
.pron-wallet span { font-weight: 800; font-size: .85rem; }
.pron-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 0 0 14px; }
.pron-tabs button { font: inherit; font-weight: 800; padding: 8px 14px; border-radius: 99px; border: 2px solid var(--ink); background: var(--card); cursor: pointer; }
.pron-tabs button.on { background: var(--ink); color: var(--card); }
.pron-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; padding-bottom: 90px; }
.pron-m { margin: 0; display: grid; gap: 10px; align-content: start; }
.pron-m.has { box-shadow: 6px 6px 0 #7b3fe4; }
.pron-m header { display: flex; justify-content: space-between; gap: 10px; align-items: start; }
.pron-m h3 { margin: 0; font-size: 1rem; line-height: 1.25; }
.pron-x { flex: none; font-family: var(--display); font-weight: 900; padding: 2px 10px; border-radius: 99px; background: var(--yellow); border: 2px solid var(--ink); }
.pron-hint { margin: -4px 0 0; font-size: .8rem; }
.pron-opts { display: flex; flex-wrap: wrap; gap: 6px; }
.pron-opts button { font: inherit; font-weight: 800; font-size: .88rem; padding: 8px 12px; border-radius: 12px; border: 2px solid var(--ink); background: var(--card); cursor: pointer; }
.pron-opts button.on { background: #7b3fe4; color: #fff; border-color: #7b3fe4; }
.pron-opts button.win { box-shadow: 0 0 0 3px #1d9a5b; }
.pron-opts button:disabled { cursor: default; }
.pron-stake { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-weight: 700; font-size: .85rem; }
.pron-stake.off { opacity: .45; pointer-events: none; }
.pron-stake button { font: inherit; font-weight: 900; width: 34px; height: 32px; border: 2px solid var(--ink); border-radius: 8px; background: var(--paper); cursor: pointer; }
.pron-stake input { width: 64px; height: 32px; text-align: center; font: inherit; font-weight: 800; border: 2px solid var(--ink); border-radius: 8px; }
.pron-ret { margin-left: auto; }
.pron-res { margin: 0; font-size: .9rem; }
.pron-bar { position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 60; width: min(720px, calc(100% - 24px)); display: flex; align-items: center; gap: 10px; padding: 12px 14px; border: var(--bw) solid var(--ink); border-radius: 18px; background: var(--yellow); box-shadow: var(--hard); }
.pron-bar.bad { background: #ffb0a3; }
.pron-bar > div { flex: 1; display: grid; }
.pron-bar small { font-size: .78rem; }
.pron-soon, .pron-login, .pron-empty { margin-bottom: 14px; }
.pron-lg-pick { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 12px; }
.pron-lg-pick button { font: inherit; font-weight: 800; padding: 6px 12px; border-radius: 99px; border: 2px solid var(--ink); background: var(--card); cursor: pointer; }
.pron-lg-pick button.on { background: var(--ink); color: var(--card); }
.pron-lg-pick small { opacity: .7; }
.pron-lg-pick .linklike { margin-left: auto; }
.pron-rank { list-style: none; margin: 10px 0; padding: 0; display: grid; gap: 6px; }
.pron-rank li { display: grid; grid-template-columns: 28px 36px 1fr auto; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 12px; background: var(--paper); }
.pron-rank li.me { background: color-mix(in srgb, var(--yellow) 45%, var(--card)); border: 2px solid var(--ink); }
.pron-rank img, .pron-av { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; }
.pron-av { display: grid; place-items: center; background: #7b3fe4; color: #fff; font-weight: 900; }
.pron-pos { font-family: var(--display); font-weight: 900; text-align: center; }
.pron-nm { display: grid; min-width: 0; }
.pron-nm small { color: var(--ink-2); font-size: .76rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pron-pts { font-family: var(--display); }
.pron-nit-n { margin: 6px 0 10px; }
.pron-nit-n b { font-family: var(--display); font-size: 1.8rem; }
.pron-nit .btn { width: 100%; }
.esp-home.esp-pron { background: linear-gradient(120deg, #3b1f6a, var(--ink) 70%); }
.ctl-h3 { margin: 16px 0 4px; font-family: var(--display); font-size: 1rem; }
.ctl-pres { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; margin: 10px 0; }
.ctl-pres label { display: grid; gap: 4px; font-size: .82rem; font-weight: 700; }
.ctl-pres select { font: inherit; padding: 8px; border: 2px solid var(--ink); border-radius: 10px; background: var(--card); }
@media (max-width: 640px) {
  .pron-hero { flex-direction: column; align-items: stretch; padding: 16px; }
  .pron-wallet { justify-self: start; }
  .pron-bar { bottom: 96px; }
  .pron-list { grid-template-columns: 1fr; }
}

.pron-bar.ok { background: #c9f2da; }

/* ---------- Sala de control: pestanyes ---------- */
.ctl-tabs { display: flex; gap: 6px; overflow-x: auto; padding: 4px 2px 8px; position: sticky; top: calc(64px + env(safe-area-inset-top)); z-index: 5; background: var(--paper); scrollbar-width: none; }
.ctl-tabs button { position: relative; flex: none; font: inherit; font-weight: 800; font-size: .88rem; padding: 9px 14px; border-radius: 12px; border: 2px solid var(--ink); background: var(--card); cursor: pointer; }
.ctl-tabs button.on { background: var(--ink); color: var(--card); box-shadow: 3px 3px 0 var(--blue); }
.ctl-dot { position: absolute; top: -4px; right: -4px; width: 12px; height: 12px; border-radius: 50%; background: var(--red); border: 2px solid var(--card); }
.ctl-panel { display: grid; gap: 16px; }
.ctl-intro { margin: 0; font-weight: 700; color: var(--ink-2); }
.ctl-todo ol, .ctl-flow { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 8px; }
.ctl-todo li { display: grid; grid-template-columns: 26px 1fr auto; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 12px; background: var(--paper); }
.ctl-todo li p { margin: 0; font-weight: 700; }
.ctl-todo li span { font-weight: 900; font-size: 1.1rem; }
.ctl-todo li.done { opacity: .6; }
.ctl-todo li.done span { color: #1d9a5b; }
.ctl-flow > li { padding: 14px; border-radius: 14px; border: 2px dashed color-mix(in srgb, var(--ink) 30%, transparent); display: grid; gap: 6px; }
.ctl-flow > li.done { border-style: solid; border-color: #1d9a5b; background: color-mix(in srgb, #1d9a5b 8%, var(--card)); }
.ctl-flow > li > b { font-family: var(--display); }
.ctl-flow > li .btn { justify-self: start; }
.ctl-file { margin: 12px 0 0; font-size: .9rem; }
.ctl-file.bad b { color: #d23c2a; }
.ctl-helpbox ul, .ctl-helpbox ol { padding-left: 20px; display: grid; gap: 6px; margin: 8px 0 16px; }

/* ---------- Avís de la Lliga de pronòstics ---------- */
.esp-avis-art { background: linear-gradient(160deg, #3b1f6a, var(--ink)) !important; color: var(--yellow); display: grid; place-content: center; text-align: center; gap: 0; }
.esp-avis-art span { font-size: 3.4rem; }
.esp-avis-art b { font-family: var(--display); font-size: 2.6rem; line-height: 1; }
.esp-avis-art small { font-weight: 800; text-transform: uppercase; letter-spacing: .12em; color: var(--card); }
.esp-avis-steps { margin: 4px 0 8px; padding-left: 20px; display: grid; gap: 4px; font-size: .9rem; }
.ctl-ok { margin: 4px 0; font-weight: 800; color: #1d9a5b; }

/* ---------- App instal·lable ---------- */
.install-card { display: flex; align-items: center; gap: 14px; margin: 18px 0; padding: 16px 18px; }
.install-card > span { font-size: 1.8rem; }
.install-card > div { flex: 1; }
.install-card p { margin: 2px 0 0; font-size: .88rem; color: var(--ink-2); }
.install-bar { display: flex; align-items: center; gap: 10px; margin: 0 0 14px; padding: 10px 12px; border: 2px solid var(--ink); border-radius: 14px; background: var(--card); }
.install-bar p { flex: 1; margin: 0; font-size: .88rem; }
.install-x { font: inherit; border: 0; background: none; font-size: 1rem; cursor: pointer; padding: 4px 6px; }
.install-ios { width: min(420px, 100%); display: grid; gap: 10px; }
.install-ios h3 { margin: 0; }
.install-ios ol { margin: 0; padding-left: 20px; display: grid; gap: 6px; }
.ios-share { display: inline-block; padding: 0 5px; border: 1.5px solid var(--ink); border-radius: 6px; font-size: .8rem; }
@media (min-width: 900px) { .install-bar { display: none; } }
@media (max-width: 560px) { .install-card { flex-wrap: wrap; } .install-card .btn { width: 100%; } }

/* App instal·lada a l'iPhone: la barra d'estat queda damunt la capçalera (fons fosc), no damunt del contingut */
.topbar { padding-top: env(safe-area-inset-top); }
/* Plató del debat a pantalla completa: respecta la barra d'estat i l'indicador d'inici de l'iPhone */
.db-theater { padding-top: env(safe-area-inset-top); padding-bottom: env(safe-area-inset-bottom); box-sizing: border-box; }
.db-top { top: calc(14px + env(safe-area-inset-top)); }
@media (max-width: 760px) { .db-top { top: calc(10px + env(safe-area-inset-top)); } }

/* ---------- Notificacions ---------- */
.notif-card { display: flex; align-items: flex-start; gap: 14px; margin: 18px 0; padding: 16px 18px; }
.notif-card > div { flex: 1; display: grid; gap: 6px; }
.notif-card p { margin: 0; font-size: .88rem; color: var(--ink-2); }
.notif-i { font-size: 1.8rem; }
.notif-topics { display: grid; gap: 8px; margin: 4px 0; }
.notif-topics label { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; }
.notif-topics input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--ink); }
.notif-topics span { display: grid; }
.notif-topics small { color: var(--muted); font-size: .78rem; }
.notif-card .linklike { justify-self: start; }
.notif-note { display: flex; align-items: center; gap: 10px; margin: 14px auto 0; padding: 10px 12px; border-radius: 14px; background: color-mix(in srgb, var(--yellow) 35%, var(--card)); border: 2px solid var(--ink); text-align: left; }
.notif-note p { flex: 1; margin: 0; font-weight: 700; font-size: .9rem; }
.ctl-push label, .ctl-inline { display: grid; gap: 4px; font-weight: 800; font-size: .85rem; margin: 8px 0; }
.ctl-inline { grid-auto-flow: column; justify-content: start; align-items: center; gap: 8px; }
.ctl select { font: inherit; padding: 8px; border: 2px solid var(--ink); border-radius: 10px; background: var(--card); }
.ctl-push-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.push-prev { display: grid; grid-template-columns: 38px 1fr auto; gap: 10px; align-items: start; margin: 12px 0; padding: 12px; border-radius: 18px; background: #e9e9ee; color: #111; font-family: -apple-system, system-ui, sans-serif; max-width: 420px; }
.push-prev img { width: 38px; height: 38px; border-radius: 9px; }
.push-prev b { font-size: .9rem; }
.push-prev p { margin: 2px 0 0; font-size: .85rem; }
.push-prev small { color: #666; font-size: .75rem; }
.push-hist { list-style: none; margin: 8px 0; padding: 0; display: grid; gap: 6px; }
.push-hist li { display: grid; grid-template-columns: 100px 1fr; gap: 10px; padding: 8px 10px; border-radius: 12px; background: var(--paper); font-size: .88rem; }
.push-hist small { display: block; color: var(--muted); }
@media (max-width: 560px) { .ctl-push-row { grid-template-columns: 1fr; } .notif-card { flex-wrap: wrap; } .notif-card .btn { width: 100%; } }

.notif-ask-card { width: min(380px, 100%); display: grid; gap: 10px; justify-items: center; text-align: center; padding: 28px 22px; }
.notif-ask-card h3 { margin: 0; font-family: var(--display); font-size: 1.4rem; }
.notif-ask-card p { margin: 0; color: var(--ink-2); }
.notif-ask-i { font-size: 3rem; animation: notifRing 1.6s ease 0.4s 2; transform-origin: 50% 10%; }
@keyframes notifRing { 0%, 100% { transform: rotate(0); } 15% { transform: rotate(14deg); } 30% { transform: rotate(-12deg); } 45% { transform: rotate(8deg); } 60% { transform: rotate(-4deg); } }

/* ---------- Monedes i botiga ---------- */
.coin-chip { display: flex; align-items: center; gap: 6px; height: 40px; padding: 0 12px; border-radius: 999px; border: 2px solid var(--yellow); color: var(--card); text-decoration: none; font-family: var(--display); font-weight: 800; font-size: .82rem; white-space: nowrap; }
.coin-chip:hover { background: rgba(255, 250, 240, .1); }
@media (max-width: 430px) { .coin-chip { padding: 0 9px; height: 36px; gap: 4px; font-size: .74rem; } .top-actions { gap: 7px; } }
.rbadge.coin { background: var(--yellow); color: var(--ink); text-decoration: none; transform: rotate(-2deg); }
.rbadge.coin::before { content: "🪙 "; }
/* Marcs de la botiga al voltant de la foto */
.avatar.fr-campanya { box-shadow: 0 0 0 3px var(--yellow), 0 0 0 6px var(--red); }
.avatar.fr-neo { border-color: #00e5ff; box-shadow: 0 0 0 2px #00e5ff, 0 0 10px 3px rgba(0, 229, 255, .7); }
.avatar.fr-or { border: 3px solid transparent; background: linear-gradient(var(--paper-2), var(--paper-2)) padding-box, conic-gradient(#f9d976, #b8860b, #fff3b0, #d4a017, #f9d976) border-box; box-shadow: 0 0 0 2px var(--ink); }
.avatar.fr-hemi { border: 3px solid transparent; background: linear-gradient(var(--paper-2), var(--paper-2)) padding-box, conic-gradient(#ff4b2b, #ffcf3d, #0f9d58, #3554ff, #7b3fe4, #ff4b2b) border-box; box-shadow: 0 0 0 2px var(--ink); }
.shop-ti { display: inline-block; padding: 3px 10px; border-radius: 999px; background: var(--ink); color: var(--yellow); font-weight: 800; font-size: .78rem; letter-spacing: .02em; }
.shop-ti.sm { font-size: .68rem; padding: 2px 8px; margin-left: 8px; vertical-align: middle; }
.wallet-card { display: flex; align-items: center; gap: 14px; text-decoration: none; color: inherit; margin: 18px 0; }
.wallet-card > div { flex: 1; }
.wallet-card b { font-family: var(--display); font-size: 1.1rem; }
.wallet-card p { margin: 4px 0 0; color: var(--ink-2); }
.wallet-i { font-size: 2.2rem; }
@media (max-width: 560px) { .wallet-card { flex-wrap: wrap; } .wallet-card .btn { width: 100%; } }
.shop { display: grid; gap: 22px; }
.shop-hero { display: flex; gap: 20px; align-items: center; justify-content: space-between; }
.shop-hero p { margin: 6px 0 0; max-width: 560px; color: var(--ink-2); }
.shop-wallet { display: grid; justify-items: center; padding: 14px 22px; border-radius: 18px; background: var(--ink); color: var(--card); box-shadow: 4px 4px 0 var(--yellow); flex: none; }
.shop-wallet small, .shop-wallet span { font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; opacity: .75; }
.shop-wallet b { font-family: var(--display); font-size: 2rem; color: var(--yellow); line-height: 1.1; }
.shop-how { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.shop-how > div { display: flex; gap: 10px; align-items: center; padding: 12px 14px; border-radius: 14px; border: 2px dashed var(--ink); background: var(--card); }
.shop-how span { font-size: 1.6rem; }
.shop-how p { margin: 0; font-size: .88rem; color: var(--ink-2); }
.shop-how b { display: block; color: var(--ink); }
.shop-sec .muted { margin: -4px 0 12px; }
.shop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.shop-item { display: grid; gap: 8px; justify-items: center; text-align: center; padding: 14px 12px; }
.shop-item.on { box-shadow: 4px 4px 0 var(--yellow); border-color: var(--ink); }
.shop-item b { font-size: .92rem; line-height: 1.2; min-height: 2.3em; display: grid; place-items: center; }
.shop-item .btn { width: 100%; padding-inline: 8px; font-size: .86rem; }
.shop-item .linklike { font-size: .8rem; }
.shop-pv { height: 84px; display: grid; place-items: center; }
.shop-av { width: 72px; height: 72px; border-radius: 50%; border: 2px solid var(--ink); object-fit: cover; }
.shop-cf { display: flex; gap: 5px; }
.shop-cf i { width: 12px; height: 18px; background: var(--c); border: 1.5px solid var(--ink); transform: rotate(calc(var(--k, 1) * 18deg)); }
.shop-cf i:nth-child(2n) { --k: -1; margin-top: 14px; }
.shop-cf i.star { width: 16px; height: 16px; clip-path: polygon(50% 0, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%); border: 0; }
.shop-cf i.ballot { width: 16px; height: 21px; }
@media (max-width: 700px) { .shop-hero { flex-direction: column; align-items: stretch; } .shop-how { grid-template-columns: 1fr; } .shop-grid { grid-template-columns: repeat(2, 1fr); } }
.pf-ph.pf-shop { display: grid; place-items: center; text-decoration: none; color: var(--ink); background: var(--yellow); }
.pf-ph.pf-shop span { font-size: 1.3rem; line-height: 1; }
.pf-ph.pf-shop small { font-size: .62rem; font-weight: 800; }
.pron-extra { display: flex; gap: 16px; align-items: center; justify-content: space-between; flex-wrap: wrap; border-style: dashed; }
.pron-extra > div:first-child { flex: 1 1 280px; }
.pron-extra p { margin: 4px 0 0; color: var(--ink-2); font-size: .9rem; }

/* ---------- Centre de control · Usuaris ---------- */
.ctu-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.ctu-range { grid-template-columns: repeat(3, auto); }
.ctu-kpis { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 760px) { .ctu-kpis { grid-template-columns: repeat(2, 1fr); } }
.ctu-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 760px) { .ctu-grid { grid-template-columns: 1fr; } }
.ctu-card { display: grid; gap: 10px; align-content: start; min-width: 0; }
.ctu-card .muted { margin: 0; }
.ctu-legend { display: flex; gap: 16px; font-size: .82rem; font-weight: 700; color: var(--ink-2); }
.ctu-legend span { display: flex; align-items: center; gap: 6px; }
.ctu-sw { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.ctu-sw.torna, .ctu-stack i.torna { background: var(--blue); }
.ctu-sw.nous, .ctu-stack i.nous { background: var(--red); }
.ctu-cols { display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); gap: 3px; height: 190px; align-items: end; border-bottom: 1px solid rgba(23, 23, 61, .25); padding-bottom: 2px; overflow: hidden; }
.ctu-col { height: 100%; display: grid; grid-template-rows: auto 1fr auto; align-items: end; justify-items: center; min-width: 0; }
.ctu-cv { font-size: .62rem; font-weight: 800; color: var(--ink-2); }
.ctu-stack { width: min(100%, 22px); display: flex; flex-direction: column; gap: 2px; align-self: end; border-radius: 4px 4px 0 0; overflow: hidden; min-height: 0; }
.ctu-stack i { display: block; min-height: 0; }
.ctu-col small { font-size: .56rem; color: var(--muted); line-height: 1.1; text-align: center; padding-top: 4px; height: 2.4em; }
@media (max-width: 560px) { .ctu-cv { display: none; } .ctu-col small { font-size: .5rem; } }
.ctu-hbars { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
.ctu-hbars li { display: grid; grid-template-columns: minmax(90px, 38%) 1fr auto; gap: 10px; align-items: center; font-size: .86rem; }
.ctu-hl { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-2); font-weight: 700; }
.ctu-ht { height: 10px; background: rgba(23, 23, 61, .06); border-radius: 4px; overflow: hidden; }
.ctu-ht i { display: block; height: 100%; background: var(--blue); border-radius: 0 4px 4px 0; }
.ctu-hbars b { font-variant-numeric: tabular-nums; }
.ctu-hours { display: grid; grid-template-columns: repeat(24, minmax(0, 1fr)); gap: 2px; height: 110px; align-items: end; }
.ctu-hours div { height: 100%; display: grid; grid-template-rows: 1fr auto; align-items: end; justify-items: center; }
.ctu-hours i { width: 100%; background: var(--blue); border-radius: 3px 3px 0 0; display: block; min-height: 1px; }
.ctu-hours small { font-size: .58rem; color: var(--muted); height: 1.3em; }
.ctu-table { width: 100%; border-collapse: collapse; font-size: .86rem; }
.ctu-table th { text-align: right; font-size: .7rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 4px 6px; }
.ctu-table th:first-child, .ctu-table td:first-child { text-align: left; }
.ctu-table td { text-align: right; padding: 6px; border-top: 1px solid rgba(23, 23, 61, .1); font-variant-numeric: tabular-nums; }
.ctu-kv { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.ctu-kv li { display: flex; justify-content: space-between; gap: 10px; padding-bottom: 6px; border-bottom: 1px solid rgba(23, 23, 61, .1); font-size: .9rem; }
@media (max-width: 560px) {
  .coin-chip { height: 32px; padding: 0 8px; gap: 3px; border-width: 1.5px; font-size: .72rem; }
  .coin-chip span[aria-hidden] { font-size: .8rem; }
}
@media (max-width: 380px) { .coin-chip { padding: 0 6px; font-size: .66rem; } }
/* Mòbil: no hi cap un xip més a la barra; les monedes van en una etiqueta sobre el nivell */
.level-chip { position: relative; }
@media (max-width: 560px) {
  .coin-chip { display: none; }
  .level-chip[data-coins]::after { content: "🪙 " attr(data-coins); position: absolute; right: -6px; bottom: -7px; padding: 1px 6px; border-radius: 99px; background: var(--yellow); color: var(--ink); border: 1.5px solid var(--ink); font-family: var(--display); font-weight: 800; font-size: .56rem; line-height: 1.3; white-space: nowrap; }
}
.profile-top > * { min-width: 0; }
.lc-body { min-width: 0; }
@media (max-width: 430px) { .lc-body h3 { font-size: clamp(1.25rem, 7vw, 2rem); overflow-wrap: anywhere; } }
.shop-ti-pv { display: grid; gap: 5px; justify-items: center; }
.shop-ti-pv b { font-family: var(--display); font-size: .9rem; min-height: 0 !important; }
.wallet-card { margin: 18px 0 6px; }

/* ---------- Perfil: capçalera i pestanyes ---------- */
.pf-hero { display: grid; gap: 16px; padding: 22px; }
.pf-id { display: flex; gap: 18px; align-items: center; }
.pf-av { width: 84px; height: 84px; flex: none; border-radius: 50%; }
.pf-lv { display: grid; place-items: center; background: var(--red); color: #fff; border: 3px solid var(--ink); font-family: var(--display); font-weight: 900; font-size: 2.2rem; box-shadow: 3px 3px 0 var(--ink); }
.pf-who { flex: 1; min-width: 0; display: grid; gap: 6px; justify-items: start; }
.pf-who h2 { margin: 0; font-family: var(--display); font-size: 1.5rem; line-height: 1.1; overflow-wrap: anywhere; }
.pf-who .xpbar { width: 100%; height: 12px; }
.pf-lvl { margin: 0; display: grid; gap: 1px; }
.pf-lvl b { font-size: .95rem; }
.pf-lvl span { font-size: .82rem; color: var(--muted); }
.pf-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.pf-stats > * { display: grid; gap: 2px; justify-items: center; text-align: center; padding: 10px 6px; border-radius: 14px; background: var(--paper); border: 2px solid var(--ink); color: var(--ink); text-decoration: none; font: inherit; cursor: default; }
.pf-stats > a, .pf-stats > button { cursor: pointer; }
.pf-stats > a:hover, .pf-stats > button:hover { background: var(--yellow); }
.pf-stats b { font-family: var(--display); font-size: 1.15rem; line-height: 1.1; }
.pf-stats small { font-size: .7rem; font-weight: 800; color: var(--ink-2); }
.pf-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.pf-guest { margin: 0; font-size: .86rem; }
.pf-tabs { display: flex; gap: 6px; margin: 18px 0 14px; overflow-x: auto; scrollbar-width: none; scroll-margin-top: 90px; }
.pf-tabs::-webkit-scrollbar { display: none; }
.pf-tabs button { flex: none; padding: 9px 16px; border-radius: 999px; border: 2px solid var(--ink); background: var(--card); color: var(--ink); font: inherit; font-weight: 800; font-size: .9rem; cursor: pointer; }
.pf-tabs button.on { background: var(--ink); color: var(--yellow); }
.pf-panel { display: grid; gap: 14px; }
.pf-panel .section-title.sm { margin-top: 6px; }
.pf-today { display: flex; gap: 14px; align-items: center; border-color: var(--red); box-shadow: 4px 4px 0 var(--red); }
.pf-today.done { border-color: var(--ok); box-shadow: 4px 4px 0 var(--ok); }
.pf-today > div { flex: 1; }
.pf-today p { margin: 2px 0 0; color: var(--ink-2); font-size: .9rem; }
.pf-today-i { font-size: 2rem; }
.pf-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.pf-box { display: grid; gap: 10px; align-content: start; }
.pf-box h3 { margin: 0; font-size: 1rem; }
.pf-box .muted { margin: 0; }
.pf-box .linklike { justify-self: start; font-size: .85rem; }
.pf-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.pf-list li { display: grid; gap: 1px; padding-left: 12px; border-left: 3px solid var(--paper-2); }
.pf-list li.on { border-left-color: var(--yellow); }
.pf-list a { color: var(--ink); }
.pf-list small { color: var(--muted); font-size: .82rem; }
.pf-filter { display: flex; gap: 6px; flex-wrap: wrap; }
.pf-filter button { padding: 6px 12px; border-radius: 999px; border: 2px solid var(--ink); background: var(--card); font: inherit; font-weight: 700; font-size: .84rem; cursor: pointer; }
.pf-filter button.on { background: var(--yellow); }
.pf-rec { display: grid; gap: 10px; }
.pf-unplayed summary { cursor: pointer; font-weight: 700; color: var(--ink-2); font-size: .88rem; padding: 4px 0; }
.pf-unplayed .records { margin-top: 8px; opacity: .75; }
.pf-set { display: grid; gap: 10px; }
.pf-set .card { margin: 0; }
.pf-set .muted { margin: 0; font-size: .85rem; }
.pf-row { display: flex; gap: 14px; align-items: center; text-decoration: none; color: inherit; }
.pf-row > span:first-child { font-size: 1.6rem; }
.pf-row > div { flex: 1; min-width: 0; }
.pf-row p { margin: 2px 0 0; font-size: .86rem; color: var(--ink-2); }
.pf-danger .card { border-style: dashed; box-shadow: none; }
@media (max-width: 700px) {
  .pf-grid { grid-template-columns: 1fr; }
  .pf-stats { grid-template-columns: repeat(2, 1fr); }
  .pf-hero { padding: 18px 16px; }
  .pf-av { width: 64px; height: 64px; }
  .pf-lv { font-size: 1.7rem; }
  .pf-who h2 { font-size: 1.2rem; }
  .pf-row { flex-wrap: wrap; }
  .pf-row .btn { width: 100%; }
  .pf-actions .btn { flex: 1; }
}
@media (max-width: 560px) {
  .pf-tabs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; }
  .pf-tabs button { padding: 8px 2px; font-size: .74rem; }
}

/* ---------- Pestanya Simuladors: selector + panell ---------- */
.sh { gap: 16px; }
.sh .simduo-head { margin-bottom: 0; }
.sh-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.sh-tab { display: flex; align-items: center; gap: 12px; text-align: left; padding: 14px 16px; border: var(--bw) solid var(--ink); border-radius: var(--radius); background: var(--card); color: var(--ink); font: inherit; cursor: pointer; box-shadow: var(--hard-sm); transition: transform .12s var(--ease), box-shadow .12s var(--ease), background .12s; }
.sh-tab:hover { transform: translate(-1px, -1px); }
.sh-tab b { display: block; font-family: var(--display); font-size: 1rem; letter-spacing: -.02em; }
.sh-tab small { display: block; color: var(--ink-2); font-size: .84rem; margin-top: 2px; }
.sh-ico { font-size: 1.8rem; flex: none; width: 48px; height: 48px; display: grid; place-items: center; border-radius: 12px; border: 2px solid var(--ink); background: var(--paper); }
.sh-tab.sh-electoral.on { background: var(--blue); color: var(--card); box-shadow: 5px 5px 0 var(--ink); }
.sh-tab.sh-debat.on { background: #2a1a6e; color: var(--card); box-shadow: 5px 5px 0 var(--ink); }
.sh-tab.on small { color: rgba(255, 250, 240, .8); }
.sh-tab.on .sh-ico { background: var(--card); }
.sh-panel { display: grid; gap: 18px; animation: viewIn .3s var(--ease); }
.sh-intro { grid-template-rows: none; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); }
.sh-intro .simcard-art { height: auto; min-height: 210px; border-bottom: 0; border-right: var(--bw) solid var(--ink); }
.sh-intro h2 { margin: 0; font-family: var(--display); font-weight: 900; font-size: clamp(1.35rem, 2.8vw, 1.8rem); letter-spacing: -.035em; line-height: 1.08; }
.sh-save { display: flex; align-items: center; gap: 14px; background: color-mix(in srgb, var(--yellow) 35%, var(--card)); }
.sh-save > div { flex: 1; min-width: 0; }
.sh-save p { margin: 2px 0 0; color: var(--ink-2); font-size: .9rem; }
.sh-step { display: grid; gap: 10px; }
.sh-step h3 { margin: 0; display: flex; align-items: center; gap: 10px; font-family: var(--display); font-size: 1.05rem; letter-spacing: -.02em; }
.sh-step h3 i { font-style: normal; width: 28px; height: 28px; flex: none; display: grid; place-items: center; border-radius: 50%; background: var(--ink); color: var(--yellow); font-size: .8rem; }
.sh-go { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; padding: 14px 16px; border: 2px solid var(--ink); border-radius: var(--radius); background: var(--card); }
.sh .sim-diffnote { margin: 0; }
.sh .sim-modecards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.sh-how { border: 2px dashed var(--ink); border-radius: var(--radius); padding: 12px 16px; background: var(--card); }
.sh-how summary { cursor: pointer; font-weight: 800; }
.sh-how .sim-howto { margin-top: 12px; }
@media (max-width: 760px) {
  .sh-tabs { gap: 8px; }
  .sh-tab { flex-direction: column; align-items: flex-start; gap: 8px; padding: 12px; }
  .sh-tab b { font-size: .86rem; }
  .sh-tab small { font-size: .74rem; }
  .sh-ico { width: 40px; height: 40px; font-size: 1.4rem; }
  .sh-intro { grid-template-columns: 1fr; }
  .sh-intro .simcard-art { min-height: 140px; height: 140px; border-right: 0; border-bottom: var(--bw) solid var(--ink); }
  .sh .sim-modecards { grid-template-columns: 1fr; }
  .sh-go .btn { width: 100%; }
  .sh-save { flex-wrap: wrap; }
  .sh-save .btn { width: 100%; }
  .sim-howto { grid-template-columns: 1fr; }
}

/* ---------- Simuladors v2: els botons per jugar, primer de tot ---------- */
.sh2 { gap: 18px; }
.sh2-head { display: grid; gap: 4px; }
.sh2-head p { margin: 0; color: var(--ink-2); }
.sh2-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.sh2-card { display: grid; grid-template-rows: auto 1fr; border: var(--bw) solid var(--ink); border-radius: var(--radius); box-shadow: var(--hard); overflow: hidden; background: var(--card); }
.sh2-art { position: relative; height: 120px; display: grid; place-items: center; border-bottom: var(--bw) solid var(--ink); overflow: hidden; }
.sh2-el .sh2-art { background: var(--dots) 0 0 / 10px 10px, var(--blue); }
.sh2-el .sh2-art svg { height: 110px; width: auto; max-width: 90%; }
.sh2-db .sh2-art { background: radial-gradient(80% 90% at 50% 0%, #4b2aa8, #0b0c26 75%); }
.sh2-db .db-pod { bottom: 12px; width: 20%; height: 44px; }
.sh2-db .db-pod.a { left: 12%; } .sh2-db .db-pod.b { left: 40%; } .sh2-db .db-pod.c { left: 68%; }
.sh2-db .db-promo-led { top: 12px; left: 18%; right: 18%; color: var(--card); font-size: .74rem; }
.sh2-db .simcard-k { color: #7b3fe4; }
.sh2-b { padding: 16px 18px 18px; display: grid; gap: 8px; align-content: start; }
.sh2-b h2 { margin: 0; font-family: var(--display); font-weight: 900; font-size: clamp(1.25rem, 2.6vw, 1.6rem); letter-spacing: -.035em; line-height: 1.08; }
.sh2-d { margin: 0; color: var(--ink-2); }
.sh2-play { width: 100%; justify-content: center; margin-top: 4px; font-size: 1.1rem; }
.sh2-meta { margin: 0; font-size: .84rem; color: var(--ink-2); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.sh2-meta .linklike { font-size: .84rem; }
.sh2-opts { display: grid; gap: 12px; padding-top: 6px; scroll-margin-top: 90px; }
.sh2-opts .section-title.sm { margin: 0; }
.sh2 .sim-modecards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.sh2 .sim-diffnote { margin: 0; }
@media (max-width: 760px) {
  .sh2-cards { grid-template-columns: 1fr; gap: 14px; }
  .sh2-card { grid-template-rows: none; grid-template-columns: 92px 1fr; }
  .sh2-art { height: auto; border-bottom: 0; border-right: var(--bw) solid var(--ink); }
  .sh2-el .sh2-art svg { height: 70px; }
  .sh2-db .sh2-art .db-promo-led { display: none; }
  .sh2-db .db-pod { height: 30px; width: 22%; } .sh2-db .db-pod.a { left: 6%; } .sh2-db .db-pod.b { left: 39%; } .sh2-db .db-pod.c { left: 72%; }
  .sh2-b { padding: 12px 14px 14px; gap: 6px; }
  .sh2-d { font-size: .88rem; }
  .sh2-play { font-size: 1rem; }
  .sh2 .sim-modecards { grid-template-columns: 1fr; }
  .sh2 .sh-go .btn { width: 100%; }
}
@media (max-width: 760px) and (max-height: 760px) {
  .sh2-head p:not(.kicker), .sh2-d, .sh2-b .simcard-k { display: none; }
  .sh2-b { gap: 6px; }
}
.nxs-ed { margin: 0; font-size: .8rem; font-weight: 700; opacity: .75; }
.ctl-news { margin: 0; padding-left: 20px; display: grid; gap: 10px; }
.ctl-news li { display: grid; gap: 2px; }
.ctl-news small { color: var(--muted); }

/* ---------- Centre de control · Equip ---------- */
.ctl-team-add { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) auto; gap: 12px; align-items: end; }
.ctl-team-add label { display: grid; gap: 4px; font-size: .82rem; font-weight: 700; color: var(--ink-2); }
.ctl-team-add input, .ctl-team-add select, .ctl-team select { font: inherit; padding: 9px 10px; border: 2px solid var(--ink); border-radius: 10px; background: var(--card); color: var(--ink); }
.ctl-team { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.ctl-team li { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 2px solid var(--ink); border-radius: 12px; background: var(--card); flex-wrap: wrap; }
.ctl-team li > div { flex: 1; min-width: 180px; display: grid; }
.ctl-team li b { overflow-wrap: anywhere; }
.ctl-team li small { color: var(--muted); }
.ctl-team li.owner { background: color-mix(in srgb, var(--yellow) 35%, var(--card)); }
.ctl-roles { margin: 0; display: grid; grid-template-columns: max-content 1fr; gap: 8px 16px; }
.ctl-roles dt { font-weight: 800; }
.ctl-roles dd { margin: 0; color: var(--ink-2); }
.ctl-locked { opacity: .45; cursor: not-allowed !important; }
@media (max-width: 700px) { .ctl-team-add { grid-template-columns: 1fr; } .ctl-roles { grid-template-columns: 1fr; } .ctl-roles dd { margin-bottom: 6px; } }

/* ---------- Avisa d'un error ---------- */
.rpt-card { width: min(520px, 100%); display: grid; gap: 12px; text-align: left; }
.rpt-card h3 { margin: 0; font-family: var(--display); font-size: 1.3rem; }
.rpt-card .muted { margin: 0; }
.rpt-f { display: grid; gap: 6px; font-weight: 700; font-size: .9rem; }
.rpt-f small { font-weight: 500; color: var(--muted); }
.rpt-f textarea, .rpt-f input { font: inherit; font-weight: 500; padding: 10px 12px; border: 2px solid var(--ink); border-radius: 12px; background: var(--card); color: var(--ink); resize: vertical; }
.rpt-ctx { margin: 0; font-size: .8rem; color: var(--muted); }
.rpt-err { margin: 0; color: var(--ko); font-weight: 700; font-size: .88rem; }
.rpt-err:empty { display: none; }
.rpt-card .row { justify-content: flex-end; }
.ctl-rpts { display: grid; gap: 12px; }
.ctl-rpt { display: grid; gap: 8px; }
.ctl-rpt.nou { border-color: var(--red); }
.ctl-rpt header { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ctl-rpt header .ctl-tag { background: var(--paper-2); color: var(--ink); }
.ctl-rpt header .ctl-tag.warn { background: var(--yellow); }
.ctl-rpt header small { color: var(--muted); }
.ctl-rpt-t { margin: 0; white-space: pre-wrap; font-size: 1rem; }
.ctl-rpt-d { margin: 0; font-size: .82rem; }
.ctl-rpt pre { white-space: pre-wrap; font-size: .78rem; background: var(--paper); padding: 8px; border-radius: 8px; }

/* ---------- Debat: interrompre, compte enrere i explicació del plató ---------- */
.db-cont-row { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.db-int { background: #ffcf3d; color: #17173d; border-color: #17173d; font-weight: 800; animation: dbIntPulse 1.2s ease-in-out infinite; }
.db-int small { font-weight: 700; opacity: .7; }
@keyframes dbIntPulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(255, 207, 61, .55); } 50% { box-shadow: 0 0 0 8px rgba(255, 207, 61, 0); } }
.db-timer { height: 6px; border-radius: 99px; background: rgba(255, 255, 255, .15); overflow: hidden; }
.db-timer i { display: block; height: 100%; width: 100%; background: #ffcf3d; transform-origin: left; animation: dbTimer var(--s) linear forwards; }
@keyframes dbTimer { from { transform: scaleX(1); } 70% { background: #ffcf3d; } to { transform: scaleX(0); background: #ff4b2b; } }
.db-ask-clock { display: inline-grid; place-items: center; min-width: 1.7em; height: 1.7em; margin-left: 6px; border-radius: 99px; background: rgba(255, 255, 255, .15); color: #fff; font-size: .8rem; vertical-align: middle; }
.db-ask-clock.hot { background: #ff4b2b; }
.db-tuto { display: grid; gap: 10px; color: #fff; }
.db-tuto ul { margin: 0; padding-left: 18px; display: grid; gap: 6px; font-size: .86rem; line-height: 1.4; color: rgba(255, 255, 255, .88); }
.db-tuto b { color: #ffcf3d; }
@media (prefers-reduced-motion: reduce) { .db-int { animation: none; } }

/* ---------- Centre de control › Premsa ---------- */
.ctl-press label { display: grid; gap: 4px; font-weight: 800; font-size: .85rem; margin: 8px 0; }
.ctl-press textarea { resize: vertical; line-height: 1.5; }
.ctl .ctl-check { display: flex; align-items: center; gap: 8px; font-weight: 700; }
.ctl .ctl-check input { width: auto; }
.ctl-press-photo { display: grid; grid-template-columns: 180px 1fr; gap: 14px; align-items: start; margin: 12px 0; padding: 12px; border: 2px dashed var(--ink); border-radius: 12px; }
.ctl-press-photo > img { width: 100%; border-radius: 10px; border: 2px solid var(--ink); }
.ctl-press-photo > span { display: grid; place-items: center; min-height: 100px; border-radius: 10px; background: var(--paper); }
.ctl-press-photo .btn { cursor: pointer; }
.ctl-mailprev { border-radius: 12px; overflow: hidden; border: 2px solid var(--ink); max-height: 720px; overflow-y: auto; }
.ctl-mailprev img { max-width: 100%; height: auto; }
.ctl-press-add { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)) auto; gap: 10px; align-items: end; }
.ctl-press-add label { display: grid; gap: 4px; font-size: .82rem; font-weight: 700; color: var(--ink-2); }
.ctl-press-filter { display: grid; grid-template-columns: 1fr auto auto; gap: 10px; margin-bottom: 12px; }
.ctl-press-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.ctl-press-list li { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 220px) auto; gap: 10px; align-items: center; padding: 10px 12px; border: 2px solid var(--ink); border-radius: 12px; background: var(--card); }
.ctl-press-list li.off { opacity: .6; }
.ctl-press-list code { font-size: .8rem; overflow-wrap: anywhere; }
.ctl-press-list small { color: var(--muted); }
.ctl-tag.ok { background: var(--ok-soft); color: var(--ink); }
.ctl-tag.ko { background: var(--ko-soft); color: var(--ink); }
.ctl-sends { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 2px; font-size: .85rem; max-height: 260px; overflow-y: auto; }
.ctl-sends li.ko { color: var(--ko); }
.ctl-sends small { color: var(--muted); }
@media (max-width: 760px) {
  .ctl-press-add, .ctl-press-filter { grid-template-columns: 1fr; }
  .ctl-press-list li { grid-template-columns: 1fr auto; }
  .ctl-press-list li input { grid-column: 1 / -1; grid-row: 2; }
  .ctl-press-photo { grid-template-columns: 1fr; }
}

/* ---------- Sala de premsa (#premsa) i baixa (#baixa) ---------- */
.pr { max-width: 760px; margin: 0 auto; }
.pr-list { display: grid; gap: 14px; }
.pr-item { display: grid; grid-template-columns: 160px 1fr; gap: 14px; align-items: start; text-decoration: none; color: inherit; }
.pr-item img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 10px; border: 2px solid var(--ink); }
.pr-item h2 { margin: 2px 0 6px; font-size: 1.1rem; }
.pr-item p { margin: 0; color: var(--ink-2); }
.pr-item small, .pr-note .pr-date { color: var(--muted); font-size: .82rem; font-weight: 700; }
.pr-note h1 { font-family: var(--display); font-size: clamp(1.4rem, 4vw, 2rem); line-height: 1.2; margin: 6px 0 12px; }
.pr-note .pr-lead { font-weight: 800; font-size: 1.08rem; color: var(--ink-2); }
.pr-note figure { margin: 18px 0; }
.pr-note figure img { width: 100%; border-radius: 12px; border: 2px solid var(--ink); }
.pr-note figcaption { font-size: .85rem; color: var(--muted); margin-top: 6px; }
.pr-note .pr-body p { line-height: 1.65; }
.pr-note .pr-about { margin-top: 20px; padding-top: 14px; border-top: 2px solid var(--paper-2); font-size: .92rem; color: var(--ink-2); }
.pr-kicker { color: var(--red); font-weight: 900; letter-spacing: .1em; text-transform: uppercase; font-size: .78rem; margin: 0; }
.pr-unsub { text-align: center; }
@media (max-width: 560px) { .pr-item { grid-template-columns: 1fr; } }

/* ---------- Repte diari: 3a partida amb vídeo ---------- */
.daily-ad { display: grid; gap: 10px; justify-items: center; margin-top: 8px; padding: 14px 16px; border: 2px dashed var(--ink); border-radius: var(--radius-sm); background: color-mix(in srgb, var(--yellow) 22%, var(--card)); text-align: center; }
.daily-ad p { margin: 0; }
.daily-ad .muted { font-size: .82rem; max-width: 46ch; }
.daily-ad.out { background: var(--paper); }

/* =========================================================
   APRÈN · LA RUTA, LES LLIÇONS PAS A PAS I EL PLA PER VOTAR
   ========================================================= */
/* Durant una lliçó, res no distreu: sense barra inferior ni peu */
body.lesson .tabbar, body.lesson .site-foot { display: none; }

/* ---------- Carcassa pas a pas ---------- */
.ls { --tone: var(--blue); max-width: 760px; margin: 0 auto; display: grid; grid-template-rows: auto 1fr auto; min-height: calc(100vh - 140px); }
.ls-top { position: sticky; top: calc(64px + env(safe-area-inset-top)); z-index: 8; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; padding: 10px 0 12px; background: var(--paper); }
.ls-x { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; border: 2px solid var(--ink); background: var(--card); color: var(--ink); text-decoration: none; font-weight: 900; box-shadow: 2px 2px 0 var(--ink); }
.ls-x:hover { background: var(--yellow); }
.ls-bar { display: flex; gap: 4px; }
.ls-bar i { flex: 1; height: 9px; border-radius: 99px; background: color-mix(in srgb, var(--ink) 13%, transparent); transition: background .25s; }
.ls-bar i.done { background: var(--tone); }
.ls-bar i.on { background: var(--ink); }
.ls-n { font-weight: 800; font-size: .8rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.ls-stage { padding: 6px 0 18px; min-width: 0; }
.ls-step { animation: lsIn .32s var(--ease); }
.ls-step.back { animation-name: lsBack; }
@keyframes lsIn { from { opacity: 0; transform: translateX(28px); } to { opacity: 1; transform: none; } }
@keyframes lsBack { from { opacity: 0; transform: translateX(-28px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .ls-step { animation: none; } }
.ls-nav { position: sticky; bottom: 0; z-index: 8; display: grid; grid-template-columns: auto 1fr; gap: 10px; padding: 12px 0 calc(14px + env(safe-area-inset-bottom)); background: linear-gradient(to bottom, transparent, var(--paper) 30%); }
.ls-nav[hidden] { display: none; }
.ls-prev { width: 56px; padding-inline: 0; font-size: 1.2rem; justify-content: center; }
.ls-next { width: 100%; justify-content: center; }

/* ---------- Visor d'històries ---------- */
body.lesson { overflow: hidden; }
body.lesson .toast { z-index: 97; }
.ls.sv { position: fixed; inset: 0; z-index: 90; max-width: none; min-height: 0; margin: 0; display: grid; grid-template-columns: auto auto auto; grid-template-rows: none; justify-content: center; align-items: center; gap: 22px; background: radial-gradient(90% 70% at 50% 40%, color-mix(in srgb, var(--tone) 38%, #10112e), #0b0c24); animation: nxsFade .2s ease; }
.sv-frame { --tone: var(--blue); position: relative; width: min(480px, calc((100dvh - 36px) * .5625), 100vw); height: min(860px, calc(100dvh - 36px)); display: grid; grid-template-rows: auto auto 1fr auto; overflow: hidden; border-radius: 22px; background: linear-gradient(180deg, color-mix(in srgb, var(--tone) 26%, var(--paper)) 0, var(--paper) 230px); box-shadow: 0 30px 90px rgba(0, 0, 0, .5); transition: background .35s; animation: svOpen .32s var(--ease); }
@keyframes svOpen { from { opacity: 0; transform: scale(.94); } }
.sv-frame.cover { color: #fff; background: radial-gradient(120% 70% at 80% 0%, color-mix(in srgb, var(--tone) 78%, transparent), transparent 70%), linear-gradient(170deg, color-mix(in srgb, var(--tone) 58%, var(--ink)), var(--ink) 78%); }
.sv-frame.cover::before { content: ""; position: absolute; inset: 0; background: radial-gradient(circle, rgba(255, 255, 255, .08) 1px, transparent 1.7px) 0 0 / 11px 11px; pointer-events: none; }
/* Barres de progrés per pas */
.sv-bars { position: relative; z-index: 3; display: flex; gap: 4px; padding: 10px 12px 0; transition: opacity .2s; }
.sv-bars i { flex: 1; height: 3px; border-radius: 3px; background: color-mix(in srgb, var(--ink) 18%, transparent); overflow: hidden; }
.sv-bars b { display: block; height: 100%; width: 0; background: var(--ink); }
.cover .sv-bars i { background: rgba(255, 255, 255, .3); }
.cover .sv-bars b { background: #fff; }
.sv-bars i.done b { width: 100%; }
.sv-bars i.cur b { animation: nxsBar var(--dur, 8s) linear forwards; }
.sv.paused .sv-bars i.cur b, .sv.hold .sv-bars i.cur b { animation-play-state: paused; }
/* Capçalera: avatar del capítol, títol, aturar i sortir */
.sv-top { position: relative; z-index: 3; display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; gap: 9px; padding: 9px 8px 6px 12px; transition: opacity .2s; }
.sv-av { display: grid; place-items: center; width: 34px; height: 34px; box-sizing: border-box; border-radius: 50%; background: var(--tone); color: #fff; border: 2px solid var(--ink); box-shadow: 0 0 0 2px var(--card); font-family: var(--display); font-weight: 900; font-size: .82rem; text-shadow: 1px 1px 0 rgba(0, 0, 0, .35); }
.cover .sv-av { border-color: #fff; box-shadow: 0 0 0 2px color-mix(in srgb, var(--tone) 60%, transparent); }
.sv-who { display: grid; min-width: 0; line-height: 1.15; }
.sv-who b { font-family: var(--display); font-weight: 800; font-size: .8rem; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sv-who small { font-size: .7rem; font-weight: 700; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cover .sv-who small { color: rgba(255, 255, 255, .72); }
.sv-btn { display: grid; place-items: center; width: 38px; height: 38px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: inherit; cursor: pointer; text-decoration: none; }
.sv-btn:hover { background: color-mix(in srgb, currentColor 12%, transparent); }
.sv-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.sv-btn svg path[d^="M8 5l"] { fill: currentColor; }
.sv .ls-x { border: 0; box-shadow: none; background: transparent; color: inherit; }
.sv .ls-x:hover { background: color-mix(in srgb, currentColor 12%, transparent); }
/* Contingut del pas: es desplaça dins la pantalla */
.sv .ls-stage { position: relative; z-index: 2; min-height: 0; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; padding: 10px 20px 22px; container: sv / inline-size; scrollbar-width: thin; cursor: pointer; -webkit-user-select: text; user-select: text; }
.sv .ls-stage :is(a, button, input, select, label, .ap-w, .choice) { cursor: auto; }
.sv .ls-stage :is(a, button, .choice) { cursor: pointer; }
.sv .ls-step { min-height: 100%; }
/* El pas i el capítol ja surten a la capçalera */
.sv .ls-content > .kicker:first-child { display: none; }
.sv .ls-nav { position: relative; z-index: 3; padding: 10px 14px calc(12px + env(safe-area-inset-bottom)); background: linear-gradient(to bottom, transparent, var(--paper) 40%); transition: opacity .2s; }
.cover .ls-nav { background: none; }
.sv .ls-prev { width: 48px; height: 48px; border-radius: 50%; }
.sv .ls-next { border-radius: 99px; }
.cover .ls-prev { background: rgba(255, 255, 255, .14); color: #fff; border-color: rgba(255, 255, 255, .55); box-shadow: none; }
.cover .ls-prev:disabled { opacity: .35; }
/* La barra s'ha omplert: el botó convida a passar */
.sv-frame.ready .ls-next:not(:disabled) { animation: svNudge 1.6s var(--ease) infinite; }
@keyframes svNudge { 0%, 70%, 100% { transform: none; } 80% { transform: translateX(5px); } 90% { transform: translateX(-2px); } }
/* Mantenir premut: només queda el contingut */
.sv.hold .sv-bars, .sv.hold .sv-top, .sv.hold .ls-nav { opacity: 0; }
/* Fletxes a banda i banda (pantalles grans) */
.sv-arrow { display: grid; place-items: center; width: 52px; height: 52px; padding: 0; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .5); background: rgba(255, 255, 255, .12); cursor: pointer; transition: opacity .2s, background .2s; }
.sv-arrow:hover:not(:disabled) { background: rgba(255, 255, 255, .25); }
.sv-arrow:disabled { opacity: .25; cursor: default; }
.sv-arrow svg { width: 24px; height: 24px; fill: none; stroke: #fff; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
@media (max-width: 699px) {
  .ls.sv { grid-template-columns: 1fr; gap: 0; background: var(--ink); }
  .sv-arrow { display: none; }
  .sv-frame { width: 100vw; height: 100dvh; border-radius: 0; padding-top: env(safe-area-inset-top); box-sizing: border-box; animation-name: svOpenM; }
  @keyframes svOpenM { from { opacity: 0; transform: translateY(24px); } }
}
@media (prefers-reduced-motion: reduce) { .sv-frame, .ls.sv { animation: none; } .sv-frame.ready .ls-next { animation: none; } }

/* Portades (introducció, essencials i resultat) */
.cover .kicker { color: rgba(255, 255, 255, .78); }
.cover .ls-intro { align-content: center; min-height: 100%; }
.cover .ls-art { box-shadow: 6px 6px 0 rgba(0, 0, 0, .35); border-color: var(--ink); color: var(--ink); }
.cover .ls-title { color: #fff; text-shadow: 4px 4px 0 var(--tone); font-size: clamp(2rem, 11cqi, 2.8rem); }
.cover .ls-lead { color: rgba(255, 255, 255, .88); }
.cover .ls-lead .term { color: #fff; }
.cover .ls-key, .cover .ls-meta span, .cover .ls-practice { color: var(--ink); }
.cover .ls-meta span { border-color: transparent; }
.cover .ls-key .kicker, .cover .ls-practice .kicker { color: var(--muted); }
.cover .ls-alt { color: rgba(255, 255, 255, .7); }
.cover .ls-alt a, .cover .ls-alt .linklike, .cover .ls-back { color: #fff; }
.cover .ls-end { border: 0; background: none; box-shadow: none; padding: 18px 0; align-content: center; min-height: 100%; box-sizing: border-box; }
.cover .ls-end > p { color: rgba(255, 255, 255, .88); }
.cover .ls-score { color: var(--ink); }
.cover .ls-end .btn:not(.primary) { background: transparent; color: #fff; border-color: #fff; box-shadow: none; }
/* Essencials: cada targeta, una història */
.cover .ls-ess { border: 0; background: none; box-shadow: none; padding: 6px 0; align-content: center; min-height: 100%; box-sizing: border-box; gap: 12px; }
.cover .ls-ess-art { height: 180px; border: 3px solid var(--ink); background: var(--dots) 0 0 / 9px 9px, color-mix(in srgb, var(--tone) 30%, var(--card)); box-shadow: 6px 6px 0 rgba(0, 0, 0, .35); transform: rotate(-2deg); color: var(--ink); }
.cover .ls-ess-art svg { height: 150px; }
.cover .ls-ess .ls-h { color: #fff; font-size: clamp(1.7rem, 9cqi, 2.3rem); text-transform: uppercase; letter-spacing: -.045em; line-height: 1; text-shadow: 3px 3px 0 var(--tone); }
.cover .ls-ess-list li { font-size: 1.04rem; }
.cover .ls-ess-list li::before { background: var(--tone); color: #fff; box-shadow: 0 0 0 2px #fff; }
.cover .ls-ess-list .term { color: #fff; }
.cover .ls-ess-more { color: #fff; }

/* El contingut dels capítols, a l'amplada de la pantalla vertical */
@container sv (max-width: 560px) {
  .num-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .vote-types, .hondt-steps, .ap-compare, .ap-cards, .ap-cards.four, .ap-steps, .ap-steps.wide { grid-template-columns: 1fr; }
  .choices.two { grid-template-columns: 1fr; }
  .ls-h { font-size: clamp(1.35rem, 7.4cqi, 1.8rem); }
  .ls-qh { font-size: clamp(1.15rem, 6cqi, 1.45rem); }
}

/* ---------- Portada: fila de capítols en format història ---------- */
.apx-stories { display: flex; gap: 14px; overflow-x: auto; margin: 4px -4px 18px; padding: 6px 4px 8px; scrollbar-width: none; scroll-snap-type: x proximity; }
.apx-stories::-webkit-scrollbar { display: none; }
.apx-st { flex: none; width: 78px; display: grid; justify-items: center; gap: 6px; text-decoration: none; color: var(--ink); scroll-snap-align: start; }
.apx-st-ring { position: relative; display: grid; place-items: center; width: 74px; height: 74px; border-radius: 50%; background: conic-gradient(var(--tone) calc(var(--p, 1) * 1turn), color-mix(in srgb, var(--ink) 14%, transparent) 0); transition: transform .15s var(--ease); }
.apx-st:hover .apx-st-ring { transform: scale(1.05); }
.apx-st.st-ok .apx-st-ring { background: color-mix(in srgb, var(--ink) 22%, transparent); }
.apx-st-in { display: grid; place-items: center; width: 64px; height: 64px; box-sizing: border-box; border-radius: 50%; border: 3px solid var(--paper); background: var(--dots) 0 0 / 7px 7px, color-mix(in srgb, var(--tone) 26%, var(--card)); overflow: hidden; }
.apx-st-in svg { width: 120%; height: auto; flex: none; }
.apx-st-txt { font-size: 1.7rem; }
.apx-st.st-ok .apx-st-in { filter: saturate(.55); }
.apx-st-ok, .apx-st-now { position: absolute; bottom: -3px; left: 50%; transform: translateX(-50%); font-style: normal; font-weight: 900; border: 2px solid var(--paper); border-radius: 99px; line-height: 1; }
.apx-st-ok { right: auto; width: 22px; height: 22px; display: grid; place-items: center; padding: 0; background: var(--ok); color: #fff; font-size: .7rem; left: auto; transform: none; right: 0; bottom: 0; }
.apx-st-now { padding: 3px 7px; background: var(--red); color: #fff; font-size: .6rem; text-transform: uppercase; letter-spacing: .06em; }
.apx-st small { width: 100%; text-align: center; font-size: .72rem; font-weight: 700; line-height: 1.2; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.apx-st.st-ok small { color: var(--muted); }
.apx-st:focus-visible { outline: none; }
.apx-st:focus-visible .apx-st-ring { outline: 3px solid var(--blue); outline-offset: 3px; }

/* Introducció de la lliçó */
.ls-intro { display: grid; justify-items: center; text-align: center; gap: 10px; }
.ls-art { display: grid; place-items: center; width: min(240px, 70vw); height: 160px; border: var(--bw) solid var(--ink); border-radius: var(--radius); box-shadow: 6px 6px 0 var(--tone); background: var(--dots) 0 0 / 9px 9px, color-mix(in srgb, var(--tone) 24%, var(--card)); transform: rotate(-2deg); margin: 8px 0 10px; }
.ls-art svg { width: 82%; height: 130px; }
.ls-art-big { font-size: 4.4rem; }
.ls-title { font-family: var(--display); font-weight: 900; text-transform: uppercase; letter-spacing: -.045em; line-height: 1; font-size: clamp(1.8rem, 6.4vw, 2.9rem); margin: 0; text-shadow: 3px 3px 0 var(--tone); overflow-wrap: anywhere; }
.ls-lead { font-size: 1.08rem; line-height: 1.5; max-width: 54ch; margin: 4px 0 0; color: var(--ink-2); }
.ls-key { width: 100%; text-align: left; margin: 10px 0 4px; padding: 16px 18px 16px 20px; border: var(--bw) solid var(--ink); border-left-width: 8px; border-left-color: var(--tone); border-radius: var(--radius-sm); background: color-mix(in srgb, var(--tone) 10%, var(--card)); box-shadow: var(--hard-sm); }
.ls-key ul, .ls-ess-list { margin: 6px 0 0; padding: 0; list-style: none; display: grid; gap: 9px; }
.ls-key li, .ls-ess-list li { position: relative; padding-left: 28px; font-weight: 600; line-height: 1.42; }
.ls-key li::before, .ls-ess-list li::before { content: "✓"; position: absolute; left: 0; top: 1px; width: 19px; height: 19px; border-radius: 50%; display: grid; place-items: center; background: var(--ink); color: var(--yellow); font-size: .62rem; font-weight: 900; }
.ls-meta { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: 6px 0 0; }
.ls-meta span { padding: 4px 11px; border: 2px solid var(--ink); border-radius: 99px; background: var(--card); font-weight: 800; font-size: .78rem; }
.ls-meta .ok { background: var(--ok-soft); }
.ls-resume { margin-top: 6px; }
.ls-alt { font-size: .86rem; color: var(--muted); margin: 6px 0 0; }
.ls-alt a, .ls-alt .linklike { color: var(--ink); font-weight: 700; }

/* Un apartat */
.ls-content .ap-body { margin-top: 4px; }
.ls-h { font-family: var(--display); font-weight: 900; letter-spacing: -.035em; line-height: 1.08; font-size: clamp(1.45rem, 4.6vw, 2rem); margin: 4px 0 14px; }

/* Preguntes */
.ls-q { padding-top: 6px; }
.ls-qh { font-family: var(--display); font-weight: 800; letter-spacing: -.03em; line-height: 1.2; font-size: clamp(1.25rem, 4vw, 1.6rem); margin: 6px 0 4px; }
.ls-exp:empty { display: none; }
.ls-exp .explain { margin-top: 14px; }

/* Resultat */
.ls-end { display: grid; justify-items: center; text-align: center; gap: 10px; padding: 26px 18px; border: var(--bw) solid var(--ink); border-radius: var(--radius); background: var(--card); box-shadow: 6px 6px 0 var(--tone); }
.ls-end h2 { font-family: var(--display); font-weight: 900; letter-spacing: -.035em; font-size: clamp(1.5rem, 5vw, 2.1rem); margin: 4px 0 0; }
.ls-end > p { margin: 0; max-width: 46ch; color: var(--ink-2); }
.ls-score { display: flex; justify-content: center; align-items: baseline; gap: 2px; padding-top: 34px; box-sizing: border-box; width: 120px; height: 120px; border-radius: 50%; border: var(--bw) solid var(--ink); background: var(--ok-soft); box-shadow: 4px 4px 0 var(--ink); font-family: var(--display); font-weight: 900; }
.ls-end.ko .ls-score { background: #ffe1c2; }
.ls-score b { font-size: 3rem; line-height: 1; }
.ls-score span { font-size: 1.1rem; color: var(--muted); }
.ls-score-ico { font-size: 3rem; padding-top: 26px; }
.ls-xp { display: inline-block; padding: 2px 10px; border-radius: 99px; background: var(--yellow); border: 2px solid var(--ink); }
.ls-end .ls-key { max-width: 560px; }
.ls-end-btns { display: grid; gap: 10px; width: 100%; max-width: 460px; margin-top: 6px; }
.ls-end-btns .btn { width: 100%; justify-content: center; }
.ls-practice { display: grid; gap: 2px; width: 100%; max-width: 460px; box-sizing: border-box; padding: 14px 16px; text-align: left; text-decoration: none; color: inherit; background: var(--dots) 0 0 / 10px 10px, color-mix(in srgb, var(--tone) 14%, var(--card)); border: 2px solid var(--ink); border-radius: var(--radius-sm); box-shadow: var(--hard-sm); }
.ls-practice b { font-family: var(--display); font-weight: 800; letter-spacing: -.02em; }
.ls-practice small { color: var(--ink-2); }
.ls-back { margin-top: 4px; font-weight: 700; color: var(--ink); }

/* Essencials */
.ls-ess { display: grid; gap: 8px; padding: 22px 20px; border: var(--bw) solid var(--ink); border-radius: var(--radius); background: var(--card); box-shadow: 6px 6px 0 var(--tone); }
.ls-ess-art { display: grid; place-items: center; height: 120px; border-radius: var(--radius-sm); border: 2px solid var(--ink); background: var(--dots) 0 0 / 9px 9px, color-mix(in srgb, var(--tone) 22%, var(--card)); }
.ls-ess-art svg { height: 100px; width: 70%; }
.ls-ess .ls-h { margin-bottom: 4px; }
.ls-ess-more { display: inline-block; margin-top: 10px; font-weight: 800; color: var(--ink); }

/* ---------- Portada de l'Aprèn ---------- */
.apx-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 420px); gap: 28px; align-items: end; margin-bottom: 20px; }
.apx-head .lede { margin-top: 10px; max-width: 44ch; }
.apx-prog { display: grid; gap: 12px; padding: 18px; }
.apx-prog-top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 4px 12px; font-weight: 600; }
.apx-prog-top b { font-family: var(--display); font-weight: 900; letter-spacing: -.02em; }
.apx-prog-top .apx-days { font-size: .8rem; font-weight: 800; color: var(--red); text-transform: uppercase; letter-spacing: .05em; }
.apx-bar { height: 12px; border: 2px solid var(--ink); border-radius: 99px; background: var(--paper); overflow: hidden; }
.apx-bar i { display: block; height: 100%; background: var(--ok); transition: width .6s var(--ease); }
.apx-prog-go { display: grid; gap: 6px; }
.apx-prog-go .btn { width: 100%; justify-content: center; text-align: center; }
.apx-prog-go small { text-align: center; color: var(--muted); font-weight: 600; font-size: .82rem; }
.apx-search { margin: 0 0 6px; }

.apx-sec { margin-top: 34px; }
.apx-sec-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 4px 12px; margin-bottom: 14px; }
.apx-sec-head .section-title { margin: 0; }
.apx-sec-head > span { font-size: .84rem; font-weight: 700; color: var(--muted); }

.apx-parts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.apx-part { --tone: var(--blue); border: var(--bw) solid var(--ink); border-radius: var(--radius); background: var(--card); box-shadow: 4px 4px 0 var(--tone); overflow: hidden; }
.apx-part > header { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 14px 16px; background: color-mix(in srgb, var(--tone) 11%, var(--card)); border-bottom: 2px solid var(--ink); }
.apx-part-n { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 11px; background: var(--tone); color: #fff; border: 2px solid var(--ink); font-family: var(--display); font-weight: 900; font-size: 1.1rem; }
.apx-part.done .apx-part-n { background: var(--ok); }
.apx-part header small { display: block; font-size: .7rem; font-weight: 800; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); }
.apx-part h3 { margin: 1px 0 0; font-family: var(--display); font-weight: 900; letter-spacing: -.03em; font-size: 1.12rem; line-height: 1.15; }
.apx-part-p { padding: 3px 10px; border: 2px solid var(--ink); border-radius: 99px; background: var(--card); font-weight: 800; font-size: .78rem; font-variant-numeric: tabular-nums; }
.apx-chs { list-style: none; margin: 0; padding: 6px; }
.apx-chs li + li { border-top: 1.5px solid color-mix(in srgb, var(--ink) 10%, transparent); }
.apx-ch { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px; border-radius: 10px; text-decoration: none; color: inherit; }
.apx-ch:hover { background: #fff4d4; }
.apx-ch-n { display: grid; place-items: center; width: 32px; height: 32px; box-sizing: border-box; border-radius: 50%; border: 2px solid var(--ink); background: var(--card); font-family: var(--display); font-weight: 900; font-size: .86rem; }
.apx-ch.st-ok .apx-ch-n { background: var(--ok); color: #fff; }
.apx-ch.st-go .apx-ch-n { background: color-mix(in srgb, var(--tone) 32%, var(--card)); }
.apx-ch.st-retry .apx-ch-n { background: var(--yellow); }
.apx-ch.is-next { background: color-mix(in srgb, var(--tone) 9%, var(--card)); }
.apx-ch.is-next .apx-ch-n { background: var(--ink); color: var(--yellow); }
.apx-ch-t { display: grid; gap: 1px; }
.apx-ch-t b { font-family: var(--display); font-weight: 800; letter-spacing: -.02em; font-size: .97rem; line-height: 1.2; }
.apx-ch-t small { font-size: .78rem; font-weight: 600; color: var(--muted); }
.apx-ch.st-ok .apx-ch-t small { color: var(--ok); }
.apx-ch-go { font-weight: 900; color: var(--muted); }
.apx-ch.is-next .apx-ch-go { padding: 3px 9px; border-radius: 99px; border: 2px solid var(--ink); background: var(--red); color: #fff; font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; }

.apx-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.apx-card { display: flex; align-items: center; gap: 14px; padding: 16px; text-decoration: none; color: inherit; background: var(--card); border: var(--bw) solid var(--ink); border-radius: var(--radius); box-shadow: var(--hard-sm); transition: transform .12s var(--ease), box-shadow .12s var(--ease); }
.apx-card:hover { transform: translate(-2px, -2px); box-shadow: 5px 5px 0 var(--ink); }
.apx-card.off { box-shadow: none; opacity: .75; }
.apx-card-t { flex: 1; display: grid; gap: 3px; min-width: 0; }
.apx-card-t b { font-family: var(--display); font-weight: 800; letter-spacing: -.02em; font-size: 1.02rem; }
.apx-card-t small { color: var(--ink-2); font-size: .86rem; line-height: 1.35; }
.apx-ico { flex: none; display: grid; place-items: center; width: 46px; height: 46px; border-radius: 12px; background: var(--ink); color: var(--yellow); }
.apx-ico svg { width: 24px; height: 24px; }
.apx-ico-txt { font-family: var(--display); font-weight: 900; font-size: 1.05rem; }
.apx-plan { background: color-mix(in srgb, var(--red) 9%, var(--card)); }
.apx-plan .apx-ico { background: var(--red); color: #fff; }
.apx-go { font-weight: 900; font-size: 1.15rem; }

.apx-tools { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.apx-tool { display: flex; align-items: center; gap: 12px; padding: 12px 14px; text-decoration: none; color: inherit; background: var(--card); border: 2px solid var(--ink); border-radius: var(--radius-sm); box-shadow: var(--hard-sm); }
.apx-tool:hover { background: #fff4d4; }
.apx-tool .ap-tool-ico { flex: none; width: 40px; height: 40px; border-radius: 11px; box-shadow: none; }
.apx-tool .ap-tool-ico svg { width: 22px; height: 22px; }
.apx-tool > span:last-child { display: grid; gap: 1px; min-width: 0; }
.apx-tool b { font-family: var(--display); font-weight: 800; letter-spacing: -.02em; font-size: .95rem; }
.apx-tool small { font-size: .8rem; color: var(--ink-2); line-height: 1.3; }

.apx-word { display: grid; gap: 4px; margin-top: 14px; padding: 18px 20px; text-decoration: none; background: var(--ink); color: var(--card); border-radius: var(--radius); border: var(--bw) solid var(--ink); box-shadow: 4px 4px 0 var(--yellow); }
.apx-word .kicker { color: var(--yellow); }
.apx-word b { font-family: var(--display); font-weight: 900; font-size: 1.4rem; letter-spacing: -.03em; }
.apx-word > span:not(.kicker) { opacity: .9; }
.apx-word small { margin-top: 4px; font-weight: 700; color: var(--yellow); }

.apx-faq { display: grid; gap: 8px; }
.apx-faq-i { border: 2px solid var(--ink); border-radius: var(--radius-sm); background: var(--card); }
.apx-faq-i > summary { list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 13px 16px; font-weight: 800; cursor: pointer; }
.apx-faq-i > summary::-webkit-details-marker { display: none; }
.apx-faq-i > summary::after { content: "+"; flex: none; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--ink); font-weight: 900; }
.apx-faq-i[open] > summary::after { content: "−"; background: var(--yellow); }
.apx-faq-i > div { padding: 0 16px 14px; }
.apx-faq-i p { margin: 0 0 8px; line-height: 1.5; }
.apx-faq-i a { font-weight: 800; font-size: .88rem; color: var(--ink); }
.apx-faq-more { margin-top: 10px; }

@media (max-width: 900px) {
  .apx-head { grid-template-columns: 1fr; gap: 16px; }
  .apx-parts { grid-template-columns: 1fr; }
  .apx-tools { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .apx-two { grid-template-columns: 1fr; }
  .apx-tools { grid-template-columns: 1fr; }
  .apx-sec { margin-top: 28px; }
}

/* ---------- El meu pla per votar ---------- */
.pla { max-width: 760px; margin: 0 auto; }
.pla-q { display: grid; gap: 12px; padding: 22px 20px; box-shadow: 6px 6px 0 var(--red); }
.pla-q .ls-bar { margin-bottom: 6px; --tone: var(--red); }
.pla-opts { display: grid; gap: 10px; margin-top: 4px; }
.pla-opt { font: inherit; font-weight: 800; font-size: 1.02rem; text-align: left; padding: 16px 18px; border: var(--bw) solid var(--ink); border-radius: var(--radius-sm); background: var(--card); box-shadow: var(--hard-sm); cursor: pointer; color: var(--ink); }
.pla-opt:hover { background: #fff4d4; transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--ink); }
.pla-opt.on { background: var(--yellow); }
.pla-head { margin-bottom: 18px; }
.pla-head .row { margin-top: 12px; flex-wrap: wrap; }
.pla-next { display: inline-block; margin: 2px 0 0; padding: 8px 14px; border-radius: 12px; background: var(--ink); color: var(--card); font-weight: 600; }
.pla-next b { color: var(--yellow); }
.pla-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.pla-item { display: grid; grid-template-columns: 36px 1fr; gap: 12px; padding: 14px 16px; border: var(--bw) solid var(--ink); border-radius: var(--radius-sm); background: var(--card); box-shadow: var(--hard-sm); }
.pla-item b { font-family: var(--display); font-weight: 800; letter-spacing: -.02em; font-size: 1.02rem; }
.pla-item p { margin: 4px 0 6px; line-height: 1.45; color: var(--ink-2); }
.pla-item a { font-weight: 800; font-size: .86rem; color: var(--ink); }
.pla-date { display: block; font-size: .74rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--red); margin-bottom: 2px; }
.pla-item.past { background: color-mix(in srgb, var(--paper) 70%, var(--card)); box-shadow: none; }
.pla-item.past .pla-date { color: var(--muted); }
.pla-item.done { opacity: .6; }
.pla-item.done b { text-decoration: line-through; }
.pla-check { position: relative; display: block; width: 32px; height: 32px; cursor: pointer; }
.pla-check input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.pla-check span { display: grid; place-items: center; width: 32px; height: 32px; box-sizing: border-box; border-radius: 9px; border: 2.5px solid var(--ink); background: var(--card); }
.pla-check input:checked + span { background: var(--ok); }
.pla-check input:checked + span::after { content: "✓"; color: #fff; font-weight: 900; }
.pla-check input:focus-visible + span { outline: 3px solid var(--blue); outline-offset: 2px; }
.pla-note { margin-top: 16px; font-size: .84rem; }

@media (max-width: 560px) {
  .ls-top { gap: 10px; }
  .ls-art { height: 130px; }
  .ls-art svg { height: 106px; }
}

/* ---------- Comparador de partits: pestanyes i dades plegades ---------- */
.cmp-tabs { display: flex; gap: 4px; margin: 0 0 16px; padding: 4px; overflow-x: auto; scrollbar-width: none; border: var(--bw) solid var(--ink); border-radius: 14px; background: var(--card); box-shadow: var(--hard-sm); }
.cmp-tabs::-webkit-scrollbar { display: none; }
.cmp-tabs button { flex: 1 0 auto; font: inherit; font-weight: 800; font-size: .88rem; padding: 10px 14px; border: 0; border-radius: 10px; background: transparent; color: var(--ink); cursor: pointer; white-space: nowrap; }
.cmp-tabs button:hover { background: #fff4d4; }
.cmp-tabs button.on { background: var(--ink); color: var(--yellow); }
.cmp-panel > .face, .cmp-panel > .args { margin-top: 0; }
.cmp-more { margin: 4px 14px 14px; border: 2px solid var(--ink); border-radius: var(--radius-sm); background: var(--paper); }
.cmp-more > summary { list-style: none; display: flex; justify-content: space-between; align-items: center; padding: 10px 14px; font-weight: 800; font-size: .88rem; cursor: pointer; }
.cmp-more > summary::-webkit-details-marker { display: none; }
.cmp-more > summary::after { content: "+"; font-weight: 900; }
.cmp-more[open] > summary::after { content: "−"; }
.cmp-more .cmp-rows { margin: 0; border-top: 2px solid var(--ink); }
#view-calendari .ap-tool-head { max-width: 820px; }
/* Les pàgines de l'Aprèn no s'eixamplen pel contingut (p. ex. les pestanyes del comparador al mòbil) */
.learn > .ap-page { min-width: 0; }

/* =========================================================
   Simulador del 29N · v4: quarter general de campanya, informatiu del vespre i nit electoral
   ========================================================= */
#view-joc[data-game="simulador"] { max-width: 1180px; }
.btn.sm { padding: 6px 12px; font-size: .8rem; border-radius: 10px; box-shadow: 2px 2px 0 var(--ink); gap: 6px; }
.btn.sm:hover { box-shadow: 3px 3px 0 var(--ink); }

/* ---------- Quarter general ---------- */
.hq {
  --hq-bg: #121236; --hq-line: rgba(255, 250, 240, .14); --hq-mute: #b9b6dc; --hq-panel: rgba(255, 255, 255, .055);
  position: relative; gap: 12px; padding: 14px; border-radius: 22px; color: var(--card);
  background: radial-gradient(900px 420px at 12% -8%, color-mix(in srgb, var(--pc) 30%, transparent), transparent 70%), radial-gradient(700px 380px at 100% 0%, rgba(53, 84, 255, .28), transparent 70%), linear-gradient(180deg, #1a1a4a, #0f0f30);
  border: var(--bw) solid var(--ink); box-shadow: var(--hard);
  grid-template-columns: minmax(0, 1fr);
}
.hq > *, .tv > * { min-width: 0; }
.hq h4 { font-family: var(--display); font-weight: 900; font-size: .95rem; letter-spacing: -.02em; margin: 0; color: var(--card); }
.hq-top { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 12px; padding: 10px 12px; border-radius: 16px; border: 1px solid var(--hq-line); transition: background .8s var(--ease); }
.hq[data-slot="0"] .hq-top { background: linear-gradient(100deg, rgba(255, 183, 77, .32), rgba(120, 190, 255, .16) 55%, rgba(255, 255, 255, .03)); }
.hq[data-slot="1"] .hq-top { background: linear-gradient(100deg, rgba(255, 207, 61, .3), rgba(255, 140, 90, .18) 55%, rgba(255, 255, 255, .03)); }
.hq[data-slot="2"] .hq-top { background: linear-gradient(100deg, rgba(141, 92, 255, .38), rgba(255, 90, 140, .16) 55%, rgba(255, 255, 255, .03)); }
.hq[data-slot="3"] .hq-top { background: radial-gradient(circle at 20% 30%, rgba(255, 255, 255, .5) 0 1px, transparent 1.5px) 0 0 / 36px 28px, linear-gradient(100deg, #0b0b2a, #1d1450); }
.hq-id { display: flex; align-items: center; gap: 10px; min-width: 0; }
.hq-id b { display: block; font-family: var(--display); font-weight: 900; font-size: 1.02rem; letter-spacing: -.02em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hq-id small { color: var(--hq-mute); font-weight: 700; font-size: .78rem; }
.hq-id > div { min-width: 0; }
.hq-clock { display: grid; justify-items: center; gap: 2px; text-align: center; }
.hq-clock > small { font-size: .68rem; font-weight: 800; text-transform: uppercase; letter-spacing: .12em; color: var(--hq-mute); }
.hq-clock > b { font-family: var(--display); font-weight: 900; font-size: 1.5rem; letter-spacing: -.03em; line-height: 1; }
.hq-clock > b span { font-size: .8rem; color: var(--hq-mute); }
.hq-slots { list-style: none; margin: 4px 0 0; padding: 0; display: flex; gap: 6px; }
.hq-slots li { display: flex; align-items: center; gap: 5px; padding: 4px 10px 4px 7px; border-radius: 99px; border: 1.5px solid var(--hq-line); font-size: .74rem; font-weight: 800; color: var(--hq-mute); transition: all .35s var(--ease); }
.hq-slots li i { font-style: normal; }
.hq-slots li.done { opacity: .45; text-decoration: line-through; }
.hq-slots li.now { color: var(--ink); background: var(--yellow); border-color: var(--yellow); box-shadow: 0 0 0 3px rgba(255, 207, 61, .25), 0 0 18px rgba(255, 207, 61, .45); }
.hq-end { justify-self: end; background: var(--yellow); color: var(--ink); }
.hq-end.armed { background: var(--red); color: #fff; }
.hq-gauges { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.hq-g { display: flex; gap: 8px; align-items: center; padding: 8px 10px; border-radius: 14px; background: var(--hq-panel); border: 1px solid var(--hq-line); min-width: 0; }
.hq-g-i { font-size: 1.15rem; flex: none; }
.hq-g > div { flex: 1; min-width: 0; display: grid; }
.hq-g small { font-size: .62rem; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; color: var(--hq-mute); }
.hq-g b { font-family: var(--display); font-weight: 900; font-size: 1rem; line-height: 1.1; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hq-g i { display: block; height: 4px; border-radius: 99px; background: rgba(255, 255, 255, .12); margin-top: 4px; overflow: hidden; }
.hq-g i em { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--ok), #6ee7a8); transition: width .6s var(--ease); }
.hq-g.warn { border-color: rgba(255, 75, 43, .7); background: rgba(255, 75, 43, .14); }
.hq-g.warn i em { background: var(--red); }
.hq-g.mom.up b { color: #6ee7a8; }
.hq-g.mom.down b { color: #ff8a73; }

/* Teletip */
.hq-ticker { display: flex; align-items: stretch; border-radius: 12px; overflow: hidden; background: var(--card); color: var(--ink); border: 2px solid var(--ink); cursor: pointer; min-height: 38px; }
.hq-ticker:focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; }
.hq-tk-l { flex: none; display: grid; place-items: center; padding: 0 12px; background: var(--red); color: #fff; font-family: var(--display); font-weight: 900; font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; }
.hq-tk-win { flex: 1; min-width: 0; overflow: hidden; display: flex; align-items: center; mask-image: linear-gradient(90deg, transparent, #000 3%, #000 97%, transparent); }
.hq-tk-track { display: flex; gap: 30px; white-space: nowrap; padding-left: 14px; animation: hqTicker calc(var(--n) * 5.5s) linear infinite; }
.hq-ticker:hover .hq-tk-track { animation-play-state: paused; }
.hq-tk-track.still { animation: none; overflow: hidden; }
.hq-tk-track span { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: .86rem; }
.hq-tk-track span.bad { color: var(--ko); }
.hq-tk-track span em { font-style: normal; }
.hq-tk-track .sim-logo { height: 20px; min-width: 22px; font-size: .5rem; border-width: 1.5px; border-radius: 6px; }
.hq-tk-gap { width: 30px; }
@keyframes hqTicker { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* Mapa */
.hq-main { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 12px; align-items: start; }
.hq-mapcard, .hq-side, .hq-deck { background: var(--hq-panel); border: 1px solid var(--hq-line); border-radius: 18px; padding: 12px; min-width: 0; }
.hq-maptop { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.hq-agenda { display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px 5px 8px; border-radius: 99px; background: rgba(255, 207, 61, .14); border: 1.5px solid rgba(255, 207, 61, .6); min-height: 34px; }
.hq-agenda:empty { display: none; }
.hq-agenda > span { font-size: 1.2rem; }
.hq-agenda small { font-size: .6rem; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; color: var(--yellow); display: block; line-height: 1; }
.hq-agenda b { font-weight: 900; font-size: .9rem; }
.hq-agenda em { font-style: normal; font-size: .66rem; font-weight: 800; padding: 2px 7px; border-radius: 99px; background: var(--yellow); color: var(--ink); margin-left: 2px; }
.hq-seg, .hq-tabs, .hq-cats { display: inline-flex; padding: 3px; gap: 2px; border-radius: 12px; background: rgba(0, 0, 0, .28); border: 1px solid var(--hq-line); }
.hq-seg button, .hq-tabs button, .hq-cats button { font: inherit; font-weight: 800; font-size: .78rem; color: var(--hq-mute); background: none; border: 0; padding: 6px 10px; border-radius: 9px; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.hq-seg button.on, .hq-tabs button.on, .hq-cats button.on { background: var(--card); color: var(--ink); }
.hq-tabs button em { font-style: normal; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px; background: var(--red); color: #fff; font-size: .66rem; display: inline-grid; place-items: center; }
.hq-tabs button em:empty { display: none; }
.hq-mapbox { position: relative; border-radius: 14px; overflow: hidden; background: radial-gradient(120% 90% at 30% 30%, #183a6b, #0c1f40); border: 1px solid var(--hq-line); }
.hq-mapbox.ping { animation: hqPing .7s var(--ease); }
@keyframes hqPing { 30% { box-shadow: 0 0 0 4px var(--yellow), 0 0 26px rgba(255, 207, 61, .6); } }
.hq-svg .sim-map-bg { fill: #2a3766; stroke: #44528a; }
.hq-svg .sim-map-can { fill: rgba(255, 255, 255, .05); stroke: rgba(255, 250, 240, .4); }
.hq-svg .sim-map-cant { fill: var(--hq-mute); }
.hq-svg .sim-pg path, .hq-svg .sim-pg circle { stroke: #121236; }
.hq-svg .sim-pg.sel path, .hq-svg .sim-pg.sel circle { stroke: var(--yellow); stroke-width: 4; filter: drop-shadow(0 0 6px rgba(255, 207, 61, .9)); }
.hq-route line { stroke-linecap: round; fill: none; pointer-events: none; }
.hq-route line.leg { stroke: var(--card); stroke-width: 3.2; stroke-dasharray: 1 7; opacity: .9; }
.hq-route line.leg.vol { stroke-dasharray: 10 8; opacity: .7; }
.hq-route line.next { stroke: var(--yellow); stroke-width: 3; stroke-dasharray: 6 7; animation: hqDash 1s linear infinite; }
@keyframes hqDash { to { stroke-dashoffset: -26; } }
.hq-token { pointer-events: none; }
.hq-token circle { stroke: #fffaf0; stroke-width: 3.5; filter: drop-shadow(0 2px 4px rgba(0, 0, 0, .55)); }
.hq-token text { font: 900 15px var(--display); text-anchor: middle; }
.hq-token circle.halo { fill: none; stroke: var(--yellow); stroke-width: 3; filter: none; transform-box: fill-box; transform-origin: center; animation: hqHalo 1.9s ease-out infinite; }
@keyframes hqHalo { from { transform: scale(1); opacity: .9; } to { transform: scale(2.8); opacity: 0; } }
.hq-legend { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; font-size: .72rem; font-weight: 700; color: var(--hq-mute); margin-top: 8px; }
.hq-legend .grad { width: 70px; height: 10px; border-radius: 99px; background: linear-gradient(90deg, color-mix(in srgb, var(--pc) 10%, var(--card)), color-mix(in srgb, var(--pc) 92%, var(--card))); border: 1px solid var(--hq-line); }
.hq-legend em { font-style: normal; flex-basis: 100%; }
.hq-provselect { display: flex; align-items: center; gap: 8px; margin-top: 8px; font-size: .74rem; font-weight: 800; color: var(--hq-mute); text-transform: uppercase; letter-spacing: .06em; }
.hq-provselect select { flex: 1; min-width: 0; font: inherit; text-transform: none; letter-spacing: 0; font-weight: 700; font-size: .9rem; color: var(--card); background: rgba(0, 0, 0, .3); border: 1px solid var(--hq-line); border-radius: 10px; padding: 7px 10px; }
.hq-provselect select option { color: var(--ink); background: var(--card); }

/* Efectes sobre el mapa */
.hq-fx { position: absolute; width: 0; height: 0; pointer-events: none; z-index: 3; }
.hq-fx i { position: absolute; left: -12px; top: -12px; width: 24px; height: 24px; border-radius: 50%; border: 3px solid var(--pc); box-shadow: 0 0 12px var(--pc); animation: hqRing 1.3s var(--ease) forwards; }
.hq-fx i + i { animation-delay: .25s; opacity: 0; }
.hq-fx.wide i { left: -30px; top: -30px; width: 60px; height: 60px; }
.hq-fx.bad i { border-color: var(--red); box-shadow: 0 0 12px var(--red); }
.hq-fx.hit i { border-color: var(--yellow); }
.hq-fx b { position: absolute; left: 0; top: -18px; transform: translate(-50%, 0); white-space: nowrap; font-family: var(--display); font-weight: 900; font-size: .86rem; padding: 3px 9px; border-radius: 99px; background: var(--pc); color: var(--pci, #fff); border: 2px solid var(--ink); animation: hqFloat 2.3s var(--ease) forwards; }
.hq-fx.bad b { background: var(--red); color: #fff; }
@keyframes hqRing { 0% { transform: scale(.4); opacity: 1; } 100% { transform: scale(4.2); opacity: 0; } }
@keyframes hqFloat { 0% { transform: translate(-50%, 6px); opacity: 0; } 15% { transform: translate(-50%, 0); opacity: 1; } 75% { opacity: 1; } 100% { transform: translate(-50%, -34px); opacity: 0; } }

/* Circumscripció triada */
.hq-prov { margin-top: 10px; padding: 12px; border-radius: 14px; background: rgba(0, 0, 0, .22); border: 1px solid var(--hq-line); }
.hq-hint { margin: 0; color: var(--hq-mute); font-size: .86rem; }
.hq-prov-h { display: flex; align-items: center; gap: 10px; }
.hq-prov-h > div:first-child { flex: 1; min-width: 0; }
.hq-prov-h small { font-size: .66rem; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; color: var(--hq-mute); }
.hq-prov-h h4 { font-size: 1.15rem; }
.hq-prov-seats { display: grid; justify-items: center; padding: 4px 12px; border-radius: 12px; background: var(--card); color: var(--ink); }
.hq-prov-seats b { font-family: var(--display); font-weight: 900; font-size: 1.3rem; line-height: 1; }
.hq-prov-seats small { font-size: .62rem; font-weight: 800; }
.hq-x { font: inherit; font-size: 1.2rem; line-height: 1; width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--hq-line); background: none; color: var(--card); cursor: pointer; }
.hq-pill { display: inline-block; margin-top: 8px; padding: 4px 10px; border-radius: 99px; background: rgba(255, 255, 255, .1); font-size: .78rem; font-weight: 800; }
.hq-pill.ok { background: rgba(15, 157, 88, .3); color: #b9f5d3; }
.hq-travel { margin: 8px 0 0; font-size: .8rem; font-weight: 700; color: var(--hq-mute); display: flex; gap: 6px; align-items: center; }
.hq-travel.vol { color: #ffd88a; }
.hq-prov-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.hq-prov-tags span { font-size: .72rem; font-weight: 800; padding: 3px 8px; border-radius: 99px; border: 1px solid var(--hq-line); }
.hq-prov-aw, .hq-prov-seg { margin: 8px 0 0; font-size: .8rem; color: var(--hq-mute); display: flex; flex-wrap: wrap; gap: 4px 10px; }
.hq-prov-aw b, .hq-prov-seg b { color: var(--card); }
.hq-prov-seg small { width: 100%; font-size: .64rem; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; }

/* Panell lateral */
.hq-side { display: grid; gap: 10px; align-content: start; }
.hq-tabs { width: 100%; }
.hq-tabs button { flex: 1; justify-content: center; }
.hq-panel { max-height: 560px; overflow: auto; overscroll-behavior: contain; padding-right: 2px; }
.hq-empty { margin: 4px 0; color: var(--hq-mute); font-size: .86rem; }
.hq-offers { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.hq-offer { display: flex; gap: 10px; padding: 10px; border-radius: 14px; background: var(--card); color: var(--ink); border: 2px solid var(--ink); }
.hq-offer.replica { background: #ffe9e2; }
.hq-offer.done { opacity: .55; }
.hq-offer-i { flex: none; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; background: var(--yellow); border: 2px solid var(--ink); font-size: 1rem; }
.hq-offer > div { min-width: 0; display: grid; gap: 2px; }
.hq-offer em { font-style: normal; font-size: .62rem; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; color: var(--ink-2); }
.hq-offer em.hard { color: var(--red); }
.hq-offer b { font-size: .9rem; line-height: 1.25; }
.hq-offer small { font-size: .76rem; color: var(--ink-2); }
.hq-offer-st { justify-self: start; margin-top: 4px; font-size: .72rem; font-weight: 800; padding: 2px 8px; border-radius: 99px; background: var(--paper-2); }
.hq-rep-btns { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }

/* Enquestes */
.hq-trk { width: 100%; display: block; background: rgba(0, 0, 0, .22); border-radius: 12px; border: 1px solid var(--hq-line); }
.hq-trk line { stroke: rgba(255, 255, 255, .1); }
.hq-trk text { fill: var(--hq-mute); font: 700 8px var(--sans); }
.hq-trk .ban { fill: rgba(255, 75, 43, .14); }
.hq-trk .banl { fill: #ff8a73; font-size: 7.5px; font-weight: 800; }
.hq-trk .ln polyline { fill: none; stroke: var(--pc); stroke-width: 1.8; stroke-linejoin: round; opacity: .85; }
.hq-trk .ln circle { fill: var(--pc); stroke: #121236; stroke-width: 1; }
.hq-trk .ln circle.int { fill: #121236; stroke: var(--pc); stroke-width: 1.5; }
.hq-trk .ln.me polyline { stroke-width: 3.4; opacity: 1; filter: drop-shadow(0 0 4px var(--pc)); }
.hq-trk-l { display: flex; flex-wrap: wrap; gap: 4px 10px; margin: 6px 0 0; font-size: .7rem; font-weight: 800; }
.hq-trk-l span { display: inline-flex; align-items: center; gap: 4px; }
.hq-trk-l span::before { content: ""; width: 12px; height: 3px; border-radius: 9px; background: var(--pc, var(--hq-mute)); }
.hq-trk-l span.me { color: var(--yellow); }
.hq-trk-l span.int::before { display: none; }
.hq-pollhead { display: grid; margin-top: 10px; }
.hq-pollhead small { color: var(--hq-mute); font-size: .74rem; }
.hq-ptab-h { display: grid; grid-template-columns: 1fr auto auto; gap: 8px; margin-top: 8px; font-size: .62rem; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; color: var(--hq-mute); padding: 0 4px; }
.hq-ptab-h span:nth-child(2) { width: 96px; text-align: right; }
.hq-ptab-h span:nth-child(3) { width: 56px; text-align: right; }
.hq-ptab { display: grid; gap: 4px; margin-top: 4px; }
.hq-prow { display: grid; grid-template-columns: 72px minmax(0, 1fr) 52px 40px 56px; align-items: center; gap: 6px; padding: 4px; border-radius: 10px; }
.hq-prow.me { background: rgba(255, 207, 61, .16); box-shadow: inset 0 0 0 1.5px rgba(255, 207, 61, .6); }
.hq-prow .t { height: 10px; border-radius: 99px; background: rgba(255, 255, 255, .08); overflow: hidden; }
.hq-prow .t i { display: block; height: 100%; border-radius: inherit; background: var(--pc); transition: width .9s var(--ease); }
.hq-prow b { font-variant-numeric: tabular-nums; font-size: .82rem; text-align: right; }
.hq-prow small { font-size: .68rem; font-weight: 800; color: var(--hq-mute); text-align: left; }
.hq-prow small.up { color: #6ee7a8; }
.hq-prow small.down { color: #ff8a73; }
.hq-prow em { font-style: normal; font-family: var(--display); font-weight: 900; font-size: .92rem; text-align: right; display: grid; line-height: 1.05; }
.hq-prow em small { font-family: var(--sans); font-size: .62rem; text-align: right; }
.hq-ban { margin: 10px 0 0; padding: 8px 10px; border-radius: 10px; background: rgba(255, 75, 43, .16); border: 1px solid rgba(255, 75, 43, .5); font-size: .78rem; font-weight: 700; }
.hq-note { margin: 10px 0 0; font-size: .72rem; color: var(--hq-mute); }

/* Diari */
.hq-diary + .hq-diary { margin-top: 10px; }
.hq-diary h5 { margin: 0 0 6px; font-size: .66rem; font-weight: 800; text-transform: uppercase; letter-spacing: .12em; color: var(--yellow); }
.hq-diary ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 5px; }
.hq-diary li { display: flex; align-items: flex-start; gap: 6px; font-size: .82rem; line-height: 1.3; padding: 5px 6px; border-radius: 8px; }
.hq-diary li.me { background: rgba(255, 207, 61, .12); }
.hq-diary li.bad { color: #ffb4a6; }
.hq-diary li em { font-style: normal; flex: none; }
.hq-diary .sim-logo { height: 20px; min-width: 22px; font-size: .5rem; border-width: 1.5px; border-radius: 6px; flex: none; }

/* Accions: les cartes */
.hq-deck-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.hq-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.hq-card { position: relative; display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto 1fr auto; gap: 4px 10px; text-align: left; font: inherit; color: var(--ink); padding: 12px; border-radius: 16px; border: 2.5px solid var(--ink); background: var(--card); box-shadow: 4px 4px 0 #000; cursor: pointer; transition: transform .14s var(--ease), box-shadow .14s var(--ease); overflow: hidden; }
.hq-card::before { content: ""; position: absolute; inset: 0 0 auto; height: 6px; background: var(--cc, var(--pc)); }
.hq-card[data-act="miting"], .hq-card[data-act="porta"], .hq-card[data-act="candidat"], .hq-card[data-act="coalicio"] { --cc: #0f9d58; }
.hq-card[data-act="xarxes"], .hq-card[data-act="anuncis"], .hq-card[data-act="agenda"], .hq-card[data-act="atac"] { --cc: var(--blue); }
.hq-card[data-act="matisar"], .hq-card[data-act="enquesta"], .hq-card[data-act="descans"] { --cc: #8d5cff; }
.hq-card:hover:not(.off) { transform: translateY(-3px) rotate(-.6deg); box-shadow: 6px 7px 0 #000; }
.hq-card:active:not(.off) { transform: translate(2px, 2px); box-shadow: 1px 1px 0 #000; }
.hq-card.off { opacity: .55; filter: saturate(.4); }
.hq-card-i { grid-row: span 2; font-size: 1.6rem; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 12px; background: color-mix(in srgb, var(--cc, var(--pc)) 18%, var(--card)); border: 2px solid var(--ink); }
.hq-card b { font-family: var(--display); font-weight: 900; font-size: .9rem; letter-spacing: -.02em; line-height: 1.15; display: grid; }
.hq-card b small { font-family: var(--sans); font-size: .72rem; font-weight: 700; color: var(--ink-2); letter-spacing: 0; }
.hq-card-d { font-size: .74rem; line-height: 1.3; color: var(--ink-2); }
.hq-cost { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 5px; margin-top: 4px; }
.hq-cost em { font-style: normal; font-size: .72rem; font-weight: 800; padding: 2px 8px; border-radius: 99px; background: var(--paper); border: 1.5px solid var(--ink); }
.hq-picker { margin-top: 10px; padding: 10px; border-radius: 14px; background: rgba(0, 0, 0, .25); border: 1px solid var(--hq-line); animation: hqIn .25s var(--ease); }
.hq-picker > p { margin: 0 0 8px; font-size: .84rem; font-weight: 700; }
.hq-picks { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 6px; }
.hq-pick { position: relative; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 2px 8px; text-align: left; font: inherit; color: var(--ink); background: var(--card); border: 2px solid var(--ink); border-radius: 12px; padding: 8px 10px 10px; cursor: pointer; overflow: hidden; }
.hq-pick:hover:not(:disabled) { background: #fff3c4; }
.hq-pick:disabled { opacity: .45; cursor: not-allowed; }
.hq-pick b { font-size: .84rem; grid-column: 2; }
.hq-pick > span { grid-row: span 2; font-size: 1.2rem; }
.hq-pick em { grid-column: 2 / -1; font-style: normal; font-size: .7rem; font-weight: 700; color: var(--ink-2); }
.hq-pick em.now { grid-column: 3; grid-row: 1; padding: 1px 6px; border-radius: 99px; background: var(--yellow); color: var(--ink); font-weight: 800; }
.hq-pick em.hot { color: var(--red); font-weight: 800; }
.hq-pick small { grid-column: 3; grid-row: 1; font-weight: 800; font-size: .74rem; }
.hq-pick.prio b::after { content: " ★"; color: #c28a00; }
.hq-pick > i { position: absolute; left: 0; bottom: 0; height: 4px; background: var(--pc); }
.hq-pick .sim-logo { grid-row: span 2; }

/* Resultat d'una acció */
.hq-result { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 70; width: min(560px, calc(100% - 24px)); pointer-events: none; }
.hq-res { pointer-events: auto; display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: 16px; background: var(--card); color: var(--ink); border: 2.5px solid var(--ink); box-shadow: var(--hard); animation: hqIn .3s var(--ease); }
.hq-res.bad { background: #ffe9e2; }
.hq-res-i { font-size: 1.5rem; flex: none; }
.hq-res > div { flex: 1; min-width: 0; }
.hq-res p { margin: 0; font-weight: 700; font-size: .9rem; }
.hq-res-d { display: grid; gap: 2px; margin-top: 6px !important; }
.hq-res-d span { font-size: .8rem; font-weight: 800; }
.hq-res-d .up { color: var(--ok); }
.hq-res-d .down { color: var(--ko); }
.hq-res small { display: block; margin-top: 4px; font-size: .74rem; font-weight: 800; color: var(--ink-2); }
.hq-res-x { flex: none; font: inherit; font-size: 1.1rem; width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--ink); background: none; cursor: pointer; }
@keyframes hqIn { from { transform: translateY(10px); opacity: 0; } to { transform: none; opacity: 1; } }

@media (max-width: 1000px) {
  .hq-main { grid-template-columns: minmax(0, 1fr); }
  .hq-panel { max-height: none; }
}
@media (max-width: 900px) {
  .hq-result { bottom: calc(96px + env(safe-area-inset-bottom)); }
}
@media (max-width: 700px) {
  .hq { padding: 10px; border-radius: 18px; }
  .hq-top { grid-template-columns: minmax(0, 1fr) auto; }
  .hq-clock { grid-column: 1 / -1; grid-row: 2; }
  .hq-gauges { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .hq-g { padding: 6px 8px; gap: 6px; }
  .hq-g-i { font-size: 1rem; }
  .hq-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .hq-card { grid-template-columns: 1fr; padding: 10px; }
  .hq-card-i { grid-row: auto; width: 36px; height: 36px; font-size: 1.25rem; }
  .hq-card-d { display: none; }
  .hq-cats { width: 100%; }
  .hq-cats button { flex: 1; justify-content: center; padding: 6px 4px; font-size: .72rem; }
  .hq-slots li span { display: none; }
  .hq-slots li { padding: 4px 8px; }
}
@media (prefers-reduced-motion: reduce) {
  .hq-fx i, .hq-fx b, .hq-route line.next, .hq-res, .hq-picker { animation: none !important; }
  .hq-fx { display: none; }
}

/* ---------- Televisió: informatiu del vespre i nit electoral ---------- */
.tv {
  --tv-line: rgba(255, 250, 240, .14); --tv-mute: #b9b6dc;
  position: relative; overflow: hidden; display: grid; gap: 14px; padding: 16px; border-radius: 22px; color: var(--card);
  background: repeating-linear-gradient(0deg, rgba(255, 255, 255, .025) 0 1px, transparent 1px 3px), radial-gradient(800px 380px at 85% -10%, rgba(255, 75, 43, .32), transparent 70%), linear-gradient(180deg, #16163f, #0b0b26);
  border: var(--bw) solid var(--ink); box-shadow: var(--hard);
  grid-template-columns: minmax(0, 1fr);
}
.tv-top { display: flex; align-items: center; gap: 12px; }
.tv-top > div { flex: 1; min-width: 0; display: grid; }
.tv-top b { font-family: var(--display); font-weight: 900; font-size: clamp(1.1rem, 3vw, 1.5rem); letter-spacing: -.03em; }
.tv-top small { color: var(--tv-mute); font-weight: 700; font-size: .78rem; }
.tv-live { flex: none; display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 6px; background: var(--red); color: #fff; font-weight: 900; font-size: .68rem; letter-spacing: .12em; text-transform: uppercase; }
.tv-live::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #fff; animation: tvBlink 1.2s steps(2) infinite; }
@keyframes tvBlink { 50% { opacity: .2; } }
.tv-logo { flex: none; }
.tv-sec { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin-bottom: 8px; }
.tv-sec b { font-family: var(--display); font-weight: 900; font-size: .95rem; letter-spacing: -.02em; }
.tv-sec small { color: var(--tv-mute); font-size: .72rem; font-weight: 700; }
.tv-lead { display: flex; gap: 14px; align-items: center; padding: 14px 16px; border-radius: 14px; background: var(--card); color: var(--ink); border-left: 10px solid var(--red); box-shadow: 0 10px 30px rgba(0, 0, 0, .35); animation: tvSlide .5s var(--ease) both; }
.tv-lead.bad { border-left-color: var(--ink); background: #ffe9e2; }
.tv-lead-i { font-size: 2rem; flex: none; }
.tv-lead small { font-size: .62rem; font-weight: 800; text-transform: uppercase; letter-spacing: .14em; color: var(--red); }
.tv-lead h3 { margin: 2px 0 4px; font-family: var(--display); font-weight: 900; font-size: clamp(1.1rem, 3vw, 1.5rem); letter-spacing: -.03em; line-height: 1.12; }
.tv-lead p { margin: 0; display: flex; gap: 6px; align-items: center; }
.tv-vs { font-size: .66rem; font-weight: 900; color: var(--ink-2); text-transform: uppercase; }
.tv-heads { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.tv-heads li { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 10px; background: rgba(255, 255, 255, .08); border: 1px solid var(--tv-line); font-weight: 700; font-size: .9rem; animation: tvSlide .45s var(--ease) both; animation-delay: calc(.25s + var(--d) * .12s); }
.tv-heads li.bad { background: rgba(255, 75, 43, .14); }
.tv-heads li em { font-style: normal; flex: none; }
.tv-heads li .tv-h-t { flex: 1; min-width: 0; }
.tv-chips { flex: none; display: inline-flex; align-items: center; gap: 6px; }
.tv-heads .tv-vs { color: var(--tv-mute); }
@keyframes tvSlide { from { transform: translateX(-24px); opacity: 0; } to { transform: none; opacity: 1; } }
.tv-poll { padding: 12px; border-radius: 16px; background: rgba(255, 255, 255, .05); border: 1px solid var(--tv-line); }
.tv-poll-g { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 12px; align-items: center; }
.tv .hq-prow small { color: var(--tv-mute); }
.tv .hq-prow .t { background: rgba(255, 255, 255, .1); }
.tv .hemi-center small { color: var(--tv-mute); }
.tv .hemi-center strong { color: var(--card); }
.tv-ban { margin: 0; padding: 10px 12px; border-radius: 12px; background: rgba(255, 75, 43, .16); border: 1px solid rgba(255, 75, 43, .55); font-weight: 700; font-size: .86rem; }
.tv-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
.tv-riv, .tv-tomorrow { padding: 12px; border-radius: 16px; background: rgba(255, 255, 255, .05); border: 1px solid var(--tv-line); min-width: 0; }
.tv-riv .sim-mapbox { background: radial-gradient(120% 90% at 30% 30%, #183a6b, #0c1f40); border-radius: 12px; }
.tv-riv .sim-map-bg { fill: #2a3766; stroke: #44528a; }
.tv-riv .sim-map-can { fill: rgba(255, 255, 255, .05); stroke: rgba(255, 250, 240, .4); }
.tv-riv details { margin-top: 8px; }
.tv-riv summary { cursor: pointer; font-weight: 800; font-size: .82rem; color: var(--tv-mute); }
.tv-riv .sim-moves small { color: var(--tv-mute); }
.tv-tema { display: flex; gap: 10px; align-items: center; margin: 0 0 8px; padding: 10px; border-radius: 12px; background: rgba(255, 207, 61, .14); border: 1.5px solid rgba(255, 207, 61, .6); }
.tv-tema > span:first-child { font-size: 1.6rem; }
.tv-tema span { display: grid; }
.tv-tema small { font-size: .62rem; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; color: var(--yellow); }
.tv-tema b { font-family: var(--display); font-weight: 900; font-size: 1.05rem; }
.tv-tema em { font-style: normal; font-size: .74rem; font-weight: 800; color: var(--yellow); }
.tv-todo { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-weight: 700; font-size: .88rem; }
.tv-tomorrow p { margin: 0; color: var(--tv-mute); }
.tv-actions { display: flex; justify-content: flex-end; }
.tv .btn.primary { background: var(--yellow); color: var(--ink); }

/* Nit electoral */
.tv-clock { flex: none; display: grid; justify-items: end; }
.tv-clock b { font-family: var(--display); font-weight: 900; font-size: clamp(1.4rem, 4vw, 2.1rem); line-height: 1; font-variant-numeric: tabular-nums; color: var(--yellow); }
.tv-clock small { color: var(--card); font-weight: 800; font-size: .78rem; }
.tv-bar { height: 8px; border-radius: 99px; background: rgba(255, 255, 255, .1); overflow: hidden; }
.tv-bar i { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, var(--yellow), var(--red)); transition: width .3s linear; }
.tv-exit { padding: 14px; border-radius: 16px; background: rgba(255, 255, 255, .05); border: 1px solid var(--tv-line); }
.tv-exit-rows { display: grid; gap: 6px; }
.tv-xrow { display: grid; grid-template-columns: 72px minmax(0, 1fr) minmax(60px, 1.4fr) 56px 76px; align-items: center; gap: 8px; padding: 5px 6px; border-radius: 10px; animation: tvSlide .4s var(--ease) both; animation-delay: calc(var(--d) * .09s); }
.tv-xrow.me { background: rgba(255, 207, 61, .16); box-shadow: inset 0 0 0 1.5px rgba(255, 207, 61, .65); }
.tv-xrow .n { font-weight: 800; font-size: .86rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tv-xrow .t { height: 12px; border-radius: 99px; background: rgba(255, 255, 255, .1); overflow: hidden; }
.tv-xrow .t i { display: block; height: 100%; width: 0; border-radius: inherit; background: var(--pc); transition: width 1s var(--ease); transition-delay: calc(.3s + var(--d) * .09s); }
.tv-xrow b { text-align: right; font-variant-numeric: tabular-nums; }
.tv-xrow em { font-style: normal; font-family: var(--display); font-weight: 900; font-size: .98rem; text-align: right; display: grid; line-height: 1; white-space: nowrap; }
.tv-xrow em small { font-family: var(--sans); font-size: .6rem; font-weight: 800; color: var(--tv-mute); }
.tv-exit-me { display: flex; align-items: center; gap: 10px; margin: 12px 0 0; padding: 10px 12px; border-radius: 12px; background: var(--card); color: var(--ink); font-weight: 700; }
.tv-night-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 12px; align-items: start; }
.tv-hemicard, .tv-mapcard, .tv-battles, .tv-feed { padding: 12px; border-radius: 16px; background: rgba(255, 255, 255, .05); border: 1px solid var(--tv-line); min-width: 0; }
.tv-side { display: grid; gap: 12px; }
.tv-tally { display: grid; gap: 4px; margin-top: 10px; }
.tv-trow { display: grid; grid-template-columns: 84px minmax(0, 1fr) 54px 40px 38px; align-items: center; gap: 8px; padding: 4px 6px; border-radius: 9px; }
.tv-trow.me { background: rgba(255, 207, 61, .16); box-shadow: inset 0 0 0 1.5px rgba(255, 207, 61, .65); }
.tv-trow span { font-weight: 800; font-size: .84rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tv-trow small { text-align: right; color: var(--tv-mute); font-weight: 700; font-variant-numeric: tabular-nums; }
.tv-trow b { text-align: right; font-family: var(--display); font-weight: 900; font-size: 1.05rem; font-variant-numeric: tabular-nums; }
.tv-trow em { font-style: normal; text-align: right; font-weight: 800; font-size: .78rem; color: var(--tv-mute); }
.tv-trow em.up { color: #6ee7a8; }
.tv-trow em.down { color: #ff8a73; }
.tv-mapcard .sim-mapbox { background: radial-gradient(120% 90% at 30% 30%, #183a6b, #0c1f40); border-radius: 12px; }
.tv-mapcard .sim-map-bg { fill: #2a3766; stroke: #44528a; }
.tv-mapcard .sim-map-can { fill: rgba(255, 255, 255, .05); stroke: rgba(255, 250, 240, .4); }
.tv-mapcard .sim-map-cant { fill: var(--tv-mute); }
.tv-battles ul, .tv-feed ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.tv-battles li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 8px; align-items: center; padding: 8px 10px; border-radius: 10px; background: rgba(255, 75, 43, .12); border: 1px solid rgba(255, 75, 43, .4); }
.tv-battles li.me { background: rgba(255, 207, 61, .16); border-color: rgba(255, 207, 61, .7); }
.tv-battles li.none { display: block; background: none; border-style: dashed; border-color: var(--tv-line); color: var(--tv-mute); font-size: .82rem; }
.tv-battles li b { font-size: .88rem; }
.tv-battles li span { display: flex; align-items: center; gap: 4px; }
.tv-battles li span em { font-style: normal; color: var(--yellow); font-weight: 900; }
.tv-battles li small { grid-column: 1 / -1; color: var(--tv-mute); font-size: .72rem; font-weight: 700; }
.tv-feed li { font-size: .82rem; font-weight: 600; display: flex; gap: 8px; animation: hqIn .3s var(--ease); }
.tv-feed li span { min-width: 0; }
.tv-feed li small { flex: none; color: var(--yellow); font-weight: 800; font-variant-numeric: tabular-nums; }
.tv-feed li.me { color: var(--yellow); }
.tv-feed li.bad { color: #ff8a73; }
.tv-feed li.hot b { color: #fff; background: var(--red); padding: 0 5px; border-radius: 4px; }
.tv-ctl { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; }
.tv-speed { display: inline-flex; padding: 3px; border-radius: 12px; background: rgba(0, 0, 0, .3); border: 1px solid var(--tv-line); }
.tv-speed button { font: inherit; font-weight: 800; font-size: .82rem; color: var(--tv-mute); background: none; border: 0; padding: 7px 12px; border-radius: 9px; cursor: pointer; }
.tv-speed button.on { background: var(--card); color: var(--ink); }
.tv-final { width: 100%; display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; padding: 12px 14px; border-radius: 14px; background: var(--card); color: var(--ink); border: 2.5px solid var(--ink); animation: hqIn .4s var(--ease); }
.tv-final.ok { background: linear-gradient(100deg, #d3f2df, var(--card)); }
.tv-final > div { display: grid; }
.tv-final small { font-size: .62rem; font-weight: 800; text-transform: uppercase; letter-spacing: .14em; color: var(--ink-2); }
.tv-final b { font-family: var(--display); font-weight: 900; font-size: 1.2rem; letter-spacing: -.02em; }
.tv-final span { font-size: .84rem; font-weight: 700; color: var(--ink-2); }
.sim-confetti { position: absolute; inset: 0; pointer-events: none; overflow: hidden; z-index: 5; }
.sim-confetti i { position: absolute; top: -12px; left: var(--x); width: 9px; height: 14px; background: var(--c); transform: rotate(var(--r)) scale(var(--s)); border-radius: 2px; animation: simFall 3.4s cubic-bezier(.3, .6, .4, 1) var(--d) forwards; }
@keyframes simFall { to { transform: translateY(110vh) rotate(calc(var(--r) + 540deg)) scale(var(--s)); } }
@media (max-width: 800px) {
  .tv { padding: 12px; }
  .tv-grid, .tv-poll-g, .tv-night-grid { grid-template-columns: minmax(0, 1fr); }
  .tv-xrow { grid-template-columns: 64px minmax(0, 1fr) 46px 66px; }
  .tv-xrow .t { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .tv-lead, .tv-heads li, .tv-xrow, .tv-feed li, .tv-final, .tv-live::before { animation: none !important; }
  .tv-xrow .t i { transition: none; }
  .sim-confetti { display: none; }
}

/* ---------- Simulador: marcador, sumes de la nit i plató ---------- */
.hq-prow > .sim-logo, .tv-xrow > .sim-logo, .tv-trow > .sim-logo { justify-self: start; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
/* Marcador: projecció d'escons de l'última enquesta i objectiu */
.hq-score { --sc-mute: #b9b6dc; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px; align-items: center; padding: 10px 12px; border-radius: 14px; background: linear-gradient(100deg, rgba(255, 207, 61, .16), rgba(255, 255, 255, .04)); border: 1.5px solid rgba(255, 207, 61, .45); color: var(--card); }
.hq-score.ok { background: linear-gradient(100deg, rgba(110, 231, 168, .2), rgba(255, 255, 255, .04)); border-color: rgba(110, 231, 168, .6); }
.hq-score-n { display: grid; justify-items: center; line-height: 1; min-width: 58px; }
.hq-score-n small, .hq-score-n span { font-size: .58rem; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; color: var(--sc-mute); }
.hq-score-n b { font-family: var(--display); font-weight: 900; font-size: 2rem; letter-spacing: -.04em; margin: 3px 0; }
.hq-score-m { display: grid; gap: 6px; min-width: 0; }
.hq-score-m > small { font-size: .72rem; font-weight: 700; color: var(--sc-mute); line-height: 1.3; }
.hq-score-bar { position: relative; height: 14px; margin-top: 16px; border-radius: 99px; background: rgba(255, 255, 255, .1); }
.hq-score-bar i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: inherit; background: var(--pc, var(--yellow)); box-shadow: inset 0 0 0 1.5px rgba(255, 250, 240, .55), 0 0 12px rgba(255, 207, 61, .35); transition: width .8s var(--ease); }
.hq-score-bar u { position: absolute; top: -3px; bottom: -3px; border-radius: 99px; background: rgba(255, 255, 255, .14); border: 1px dashed rgba(255, 250, 240, .45); }
.hq-score-bar em { position: absolute; top: -16px; bottom: -4px; width: 0; border-left: 2px solid var(--yellow); font-style: normal; }
.hq-score-bar em span { position: absolute; bottom: 100%; left: 0; transform: translateX(-50%); white-space: nowrap; font-size: .66rem; font-weight: 900; color: var(--yellow); }
.tv-tomorrow .hq-score { margin-top: 12px; }
.hq-offer-why { display: block; margin-top: 6px; font-weight: 800; color: var(--red); }
/* Les sumes de la nit electoral */
.tv-sums { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--tv-line); display: grid; gap: 10px; }
.tv-sums .tv-sec { margin-bottom: 0; }
.tv-sum { display: grid; gap: 4px; }
.tv-sum p { margin: 0; display: flex; justify-content: space-between; gap: 10px; align-items: baseline; font-size: .8rem; font-weight: 700; }
.tv-sum p b { font-family: var(--display); font-weight: 900; font-size: 1.1rem; font-variant-numeric: tabular-nums; }
.tv-sum-bar { position: relative; display: flex; gap: 1px; height: 14px; border-radius: 4px; background: rgba(255, 255, 255, .08); }
.tv-sum-bar i { height: 100%; background: var(--pc); transition: width .3s linear; }
.tv-sum-bar i:first-child { border-radius: 4px 0 0 4px; }
.tv-sum-bar i.me { background: repeating-linear-gradient(135deg, var(--pc) 0 5px, transparent 5px 8px); box-shadow: inset 0 0 0 1.5px var(--pc); }
.tv-sum-bar u { position: absolute; top: -4px; bottom: -4px; width: 0; border-left: 2px dashed var(--card); }
.tv-sum small { font-size: .7rem; font-weight: 800; color: var(--tv-mute); }
.tv-sum.ok small { color: #6ee7a8; }
.tv-sum.key small { color: var(--yellow); }
.tv-sum.key .tv-sum-bar { box-shadow: 0 0 0 1.5px rgba(255, 207, 61, .65); }
/* Plató: imprevistos, entrevistes, fòrums, debats i jornada de reflexió, amb l'estil de la televisió */
.sim-card.studio {
  --st-line: rgba(255, 250, 240, .16); --st-mute: #b9b6dc;
  position: relative; color: var(--card);
  background: repeating-linear-gradient(0deg, rgba(255, 255, 255, .025) 0 1px, transparent 1px 3px), radial-gradient(700px 320px at 90% -10%, rgba(255, 75, 43, .3), transparent 70%), linear-gradient(180deg, #16163f, #0b0b26);
}
.studio .sim-kick { color: var(--st-mute); }
.studio .sim-h { color: #fff; }
.studio .sim-lead { color: rgba(255, 250, 240, .88); }
.studio .sim-note { color: var(--st-mute); }
.studio .sim-q { color: #fff; border-left-color: var(--yellow); }
.studio .sim-opt { background: rgba(255, 255, 255, .06); color: var(--card); border-color: var(--st-line); box-shadow: none; }
.studio .sim-opt i { background: var(--yellow); color: var(--ink); }
.studio .sim-opt:hover:not(:disabled) { background: rgba(255, 255, 255, .12); border-color: var(--yellow); box-shadow: 0 0 0 1px var(--yellow); transform: translateY(-1px); }
.studio .sim-opt:active:not(:disabled) { transform: none; box-shadow: none; }
.studio .sim-opt.picked { background: var(--yellow); color: var(--ink); border-color: var(--yellow); }
.studio .sim-opt.picked i { background: var(--ink); color: var(--yellow); }
.studio .sim-opt span small { color: var(--st-mute); }
.studio .sim-opt.picked span small { color: var(--ink-2); }
.studio .sim-outcome { background: var(--card); color: var(--ink); }
.studio .sim-why { background: rgba(255, 255, 255, .06); border-color: var(--st-line); color: var(--card); }
.studio .sim-why > b, .studio .sim-why a { color: var(--yellow); }
.studio .sim-scores small { color: var(--st-mute); }
.studio .sim-scores span { background: rgba(255, 255, 255, .1); }
.studio .sim-scores i { background: var(--yellow); }
.studio .sim-stats div { background: rgba(255, 255, 255, .06); border-color: var(--st-line); }
.studio .sim-stats small { color: var(--st-mute); }
.studio .sim-newpoll { border-top-color: var(--st-line); }
.studio .sim-bar-t { background: rgba(255, 255, 255, .1); }
.studio .sim-bar-t i { border-right: 0; }
.studio .sim-bar small { color: var(--st-mute); }
.studio .sim-bar small.up { color: #6ee7a8; }
.studio .sim-bar small.down { color: #ff8a73; }
.studio .sim-bar.me { background: rgba(255, 207, 61, .16); box-shadow: inset 0 0 0 1.5px rgba(255, 207, 61, .6); }
.studio .sim-react { background: rgba(255, 255, 255, .07); border: 1px solid var(--st-line); animation: hqIn .35s var(--ease); }
.studio .sim-react.ok { background: rgba(110, 231, 168, .14); border-color: rgba(110, 231, 168, .45); }
.studio .sim-react.ko { background: rgba(255, 138, 115, .14); border-color: rgba(255, 138, 115, .45); }
.studio .sim-media-set { background: rgba(0, 0, 0, .3); border: 1px solid var(--st-line); }
.studio .sim-deb-stage { background: radial-gradient(60% 130% at 50% 0%, rgba(255, 207, 61, .28), transparent 70%), linear-gradient(180deg, rgba(0, 0, 0, .35) 0 72%, rgba(255, 255, 255, .12) 72%); border: 1px solid var(--st-line); }
.studio .sim-podium { border-color: rgba(255, 250, 240, .85); }
.sim-react-m { display: grid; gap: 6px; flex: 1; min-width: 200px; }
.sim-react-q, .sim-dmeter-row span { position: relative; display: block; height: 10px; border-radius: 99px; overflow: hidden; background: linear-gradient(90deg, #ff6b4a, #ffcf3d 55%, #45d483); }
.sim-react-q { max-width: 320px; height: 8px; }
.sim-react-q i, .sim-dmeter-row i { position: absolute; top: 0; bottom: 0; right: 0; left: var(--v); background: rgba(14, 14, 44, .86); animation: simMeter .9s var(--ease) both; }
@keyframes simMeter { from { left: 0; } to { left: var(--v); } }
/* Reacció del plató a cada resposta del debat */
.sim-dmeter { margin-top: 14px; padding: 12px 14px; border-radius: 14px; background: rgba(255, 255, 255, .07); border: 1px solid var(--st-line, rgba(255, 250, 240, .16)); display: grid; gap: 8px; animation: hqIn .35s var(--ease); }
.sim-dmeter p { margin: 0; font-weight: 700; }
.sim-dmeter-row { display: grid; grid-template-columns: 130px minmax(0, 1fr) 34px; gap: 10px; align-items: center; }
.sim-dmeter-row small { font-weight: 800; font-size: .76rem; color: var(--st-mute, #b9b6dc); }
.sim-dmeter-row b { font-family: var(--display); font-weight: 900; text-align: right; font-variant-numeric: tabular-nums; }
.sim-deb-score { display: grid; grid-template-columns: auto auto; justify-content: start; gap: 0 10px; align-items: baseline; margin-top: 4px; }
.sim-deb-score > small:first-child { font-weight: 800; font-size: .76rem; color: var(--st-mute, #b9b6dc); }
.sim-deb-score > b { font-family: var(--display); font-weight: 900; font-size: 1.5rem; color: var(--yellow); }
.sim-deb-scale { grid-column: 1 / -1; position: relative; height: 10px; width: min(420px, 100%); margin: 6px 0 4px; border-radius: 99px; background: rgba(255, 255, 255, .1); }
.sim-deb-scale u { position: absolute; top: 0; bottom: 0; border-radius: 99px; background: rgba(255, 255, 255, .3); }
.sim-deb-scale i { position: absolute; top: -4px; width: 18px; height: 18px; margin-left: -9px; border-radius: 50%; background: var(--yellow); border: 2px solid var(--ink); box-shadow: 0 0 10px rgba(255, 207, 61, .8); }
.sim-deb-l { grid-column: 1 / -1; font-size: .7rem; font-weight: 700; color: var(--st-mute, #b9b6dc); }
.sim-dmeter .btn { justify-self: end; }
@media (max-width: 560px) {
  .sim-dmeter-row { grid-template-columns: 100px minmax(0, 1fr) 30px; }
  .hq-score-n b { font-size: 1.7rem; }
  .hq-g.mom b { font-size: .78rem; }
  /* Nit electoral al mòbil: el rellotge baixa a sota del títol i el recompte només porta les sigles */
  .tv-top { flex-wrap: wrap; row-gap: 6px; }
  .tv-top > div { flex-basis: calc(100% - 130px); }
  .tv-night .tv-clock { order: 3; width: 100%; display: flex; justify-content: space-between; align-items: baseline; }
  .tv-trow { grid-template-columns: 84px minmax(0, 1fr) 40px 34px; }
  .tv-trow > span:not(.sim-logo) { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .sim-react-q i, .sim-dmeter-row i, .sim-dmeter, .studio .sim-react { animation: none !important; }
}

/* Centre de control: menú lateral per grups, capçalera de secció, indicadors i targetes més denses */
.ctl { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 24px; align-items: start; padding-bottom: 100px; }
.ctl-side { position: sticky; top: calc(84px + env(safe-area-inset-top, 0px)); display: grid; gap: 14px; padding: 16px; border-radius: 18px; background: var(--ink); color: var(--card); max-height: calc(100vh - 110px); overflow-y: auto; }
.ctl-me { display: flex; gap: 10px; align-items: center; min-width: 0; }
.ctl-me > div { min-width: 0; }
.ctl-logo { width: 40px; height: 40px; border-radius: 12px; background: var(--yellow); display: grid; place-items: center; font-size: 1.3rem; flex: none; }
.ctl-me b { display: block; font-family: var(--display); font-weight: 900; font-size: .95rem; letter-spacing: -.02em; }
.ctl-me small { display: block; font-size: .72rem; opacity: .7; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ctl-badges { display: flex; gap: 6px; flex-wrap: wrap; }
.ctl-role { font-size: .7rem; font-weight: 800; padding: 3px 9px; border-radius: 99px; background: var(--yellow); color: var(--ink); }
.ctl-side .ctl-conn { font-size: .7rem; font-weight: 800; padding: 3px 9px; border-radius: 99px; border: 0; background: rgba(255, 255, 255, .12); color: var(--card); }
.ctl-side .ctl-conn::before { content: "● "; color: #ff8a73; }
.ctl-side .ctl-conn.on::before { color: #6ee7a8; }
.ctl-nav { display: grid; gap: 14px; }
.ctl-ng { display: grid; gap: 2px; }
.ctl-ng p { margin: 0 0 4px 10px; font-size: .64rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: rgba(255, 250, 240, .5); }
.ctl-ng button { position: relative; display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border: 0; border-radius: 10px; background: none; color: rgba(255, 250, 240, .86); font: inherit; font-size: .88rem; text-align: left; cursor: pointer; }
.ctl-ng button b { font-weight: 700; flex: 1; }
.ctl-ng button:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.ctl-ng button:focus-visible { outline: 2px solid var(--yellow); outline-offset: 1px; }
.ctl-ng button.on { background: var(--card); color: var(--ink); }
.ctl-ng button.on b { font-weight: 800; }
.ctl-ng .ctl-dot { position: static; width: 9px; height: 9px; border: 0; flex: none; }
.ctl-n { font-style: normal; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px; background: var(--red); color: #fff; font-size: .7rem; font-weight: 800; display: inline-grid; place-items: center; flex: none; }
.ctl-back { font-size: .8rem; font-weight: 700; color: rgba(255, 250, 240, .7); text-decoration: none; padding: 0 10px; }
.ctl-back:hover { color: #fff; text-decoration: underline; }
.ctl-main { display: grid; gap: 16px; min-width: 0; }
.ctl-ph h1 { margin: 0; font-family: var(--display); font-weight: 900; font-size: clamp(1.4rem, 3vw, 1.9rem); letter-spacing: -.03em; }
.ctl-h2 { margin: 6px 0 -4px; font-family: var(--display); font-weight: 800; font-size: 1rem; letter-spacing: -.01em; }
.ctl .card { padding: 18px 20px; box-shadow: 3px 3px 0 var(--ink); }
.ctl .section-title { margin: 0 0 10px; text-transform: none; letter-spacing: -.01em; }
.ctl .section-title.sm { font-size: 1rem; }
.ctl-intro { font-weight: 600; }
.ctl-st { background: var(--card); color: var(--ink); border: 2px solid var(--ink); box-shadow: none; }
.ctl-st small { opacity: .6; }
.ctl-st b.bad { color: var(--red); }
.ctl-st .linklike { color: var(--blue); }
.ctl-tag { background: var(--paper-2); color: var(--ink); }
.ctl-tag.ok { background: var(--ok-soft); }
/* Indicadors del resum */
.ctl-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.ctl-kpi { font: inherit; text-align: left; display: grid; gap: 2px; align-content: start; padding: 14px 16px; border-radius: 16px; border: 2px solid var(--ink); background: var(--card); color: var(--ink); }
button.ctl-kpi { cursor: pointer; transition: transform .1s var(--ease), box-shadow .1s var(--ease); }
button.ctl-kpi:hover { transform: translateY(-1px); box-shadow: 3px 3px 0 var(--ink); }
.ctl-kpi small { font-size: .66rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.ctl-kpi b { font-family: var(--display); font-weight: 900; font-size: 1.8rem; line-height: 1.1; font-variant-numeric: tabular-nums; }
.ctl-kpi span { font-size: .78rem; color: var(--muted); font-weight: 600; }
.ctl-kpi.hot { background: #ffe1d9; border-color: var(--red); }
.ctl-kpi.hot b { color: var(--red); }
/* Properes funcions (resum) i laboratori */
.ctl-card-h { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 10px; }
.ctl-card-h h2 { margin: 0; font-family: var(--display); font-weight: 800; font-size: 1rem; }
.ctl-soon ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.ctl-soon li { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto auto; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 12px; background: var(--paper); }
.ctl-soon li span { font-size: 1.2rem; }
.ctl-soon li small { color: var(--muted); font-weight: 700; font-size: .78rem; }
.ctl-labs { display: grid; gap: 12px; }
.ctl-lab { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 16px; border: 2px solid var(--ink); border-radius: 16px; background: var(--card); }
.ctl-lab.pub { background: color-mix(in srgb, var(--ok-soft) 40%, var(--card)); }
.ctl-lab-i { width: 52px; height: 52px; border-radius: 14px; background: #efe3ff; display: grid; place-items: center; font-size: 1.6rem; }
.ctl-lab h3 { margin: 0; font-family: var(--display); font-weight: 800; font-size: 1rem; }
.ctl-lab p { margin: 4px 0 0; font-size: .86rem; color: var(--ink-2); }
.ctl-lab-when { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-weight: 700; }
.ctl-pvs button em { font-style: normal; font-size: .76rem; color: var(--ink-2); }
/* Pastilla de vista prèvia (a tota l'app) */
.feat-pill { position: fixed; z-index: 80; left: 50%; transform: translateX(-50%); bottom: calc(16px + env(safe-area-inset-bottom, 0px)); display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 14px; border-radius: 99px; background: #6b3fd6; color: #fff; box-shadow: 0 8px 24px rgba(23, 23, 61, .35); max-width: calc(100% - 24px); }
.feat-pill > span { font-size: 1.2rem; }
.feat-pill div { display: grid; min-width: 0; }
.feat-pill b { font-size: .82rem; }
.feat-pill small { font-size: .72rem; opacity: .85; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.feat-pill button { flex: none; font: inherit; font-weight: 800; font-size: .8rem; padding: 6px 14px; border-radius: 99px; border: 0; background: #fff; color: #6b3fd6; cursor: pointer; }
@media (max-width: 900px) {
  .ctl { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .ctl-side { position: static; max-height: none; padding: 12px; gap: 10px; overflow: visible; }
  .ctl-nav { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: 0 -12px; padding: 2px 12px; }
  .ctl-nav::-webkit-scrollbar { display: none; }
  .ctl-ng { display: flex; gap: 6px; }
  .ctl-ng p { display: none; }
  .ctl-ng button { flex: none; width: auto; padding: 8px 12px; background: rgba(255, 255, 255, .08); white-space: nowrap; }
  .ctl-back { display: none; }
  .ctl-kpis { grid-template-columns: 1fr 1fr; }
  .feat-pill { bottom: calc(100px + env(safe-area-inset-bottom, 0px)); }
}
@media (max-width: 560px) {
  .ctl-lab { grid-template-columns: 44px minmax(0, 1fr); }
  .ctl-lab .btn { grid-column: 1 / -1; justify-self: start; }
  .ctl-lab-i { width: 44px; height: 44px; font-size: 1.3rem; }
  .ctl-soon li { grid-template-columns: 24px minmax(0, 1fr) auto; }
  .ctl-soon li small { display: none; }
}

/* =========================================================
   Jornada i nit electoral (#nit · js/nit.js)
   ========================================================= */
.nt { display: grid; gap: 16px; }
/* Marcador */
.nt-hero { position: relative; overflow: hidden; border: var(--bw) solid var(--ink); border-radius: var(--radius); box-shadow: var(--hard); color: var(--card); padding: 18px 22px 18px; background: radial-gradient(120% 140% at 85% 0%, #3b2aa8 0%, #1b1f6a 38%, #0c0d2a 75%); }
.nt-hero::after { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(0deg, rgba(255, 255, 255, .03) 0 2px, transparent 2px 4px); pointer-events: none; }
.nt-hero-top { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; }
.nt-hero-main { display: flex; align-items: center; gap: 20px; justify-content: space-between; margin-top: 12px; }
.nt-k { margin: 0; font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .12em; color: var(--yellow); }
.nt-hero h1 { margin: 6px 0 8px; font-family: var(--display); font-weight: 900; letter-spacing: -.035em; font-size: clamp(1.6rem, 4.6vw, 2.9rem); line-height: 1.02; text-shadow: 3px 3px 0 var(--red); text-wrap: balance; }
.nt-sub { margin: 0; max-width: 60ch; font-size: clamp(.98rem, 2.2vw, 1.15rem); line-height: 1.4; color: rgba(255, 250, 240, .88); text-wrap: pretty; }
.nt-sub b { color: var(--yellow); }
.nt-ring { position: relative; width: 132px; flex: none; }
.nt-ring > div { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.nt-ring b { font-family: var(--display); font-size: 1.45rem; }
.nt-ring small { font-size: .7rem; opacity: .75; font-weight: 700; }
.nt-kpis { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; margin-top: 16px; }
.nt-kpis > * { display: grid; gap: 1px; padding: 10px 12px; border-radius: 12px; background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .12); color: inherit; text-decoration: none; }
.nt-kpis small { font-size: .66rem; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; opacity: .7; }
.nt-kpis b { font-family: var(--display); font-weight: 900; font-size: 1.45rem; letter-spacing: -.02em; }
.nt-kpis span { font-size: .78rem; font-weight: 700; opacity: .8; }
.nt-kpis span.up { color: #7ee2a8; opacity: 1; } .nt-kpis span.down { color: #ff9b85; opacity: 1; }
.nt-kpis .hot { background: color-mix(in srgb, var(--red) 30%, transparent); border-color: color-mix(in srgb, var(--red) 70%, transparent); }
.nt-kpis .hot b { color: #fff; }
.nt-kpis .hot small::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 6px; border-radius: 50%; background: #ff6b4a; vertical-align: 1px; animation: livePulse 1.4s ease-in-out infinite; }
.nt-kpis a.hot:hover { background: color-mix(in srgb, var(--red) 42%, transparent); }
.nt-tick { position: relative; z-index: 1; display: flex; gap: 10px; align-items: baseline; margin: 12px 0 0; padding: 9px 12px; border-radius: 10px; background: rgba(255, 207, 61, .12); font-size: .92rem; animation: ntTick .5s var(--ease); }
.nt-tick span { flex: none; font-size: .68rem; font-weight: 900; text-transform: uppercase; letter-spacing: .1em; color: var(--yellow); }
@keyframes ntTick { from { opacity: 0; transform: translateY(6px); } }
@keyframes livePulse { 50% { opacity: .35; } }
/* Pestanyes de secció */
.nt-tabs { position: sticky; top: calc(64px + env(safe-area-inset-top)); z-index: 6; display: flex; gap: 6px; overflow-x: auto; padding: 6px; margin: 0; scrollbar-width: none; border: var(--bw) solid var(--ink); border-radius: 999px; background: color-mix(in srgb, var(--card) 92%, transparent); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); box-shadow: var(--hard-sm); }
.nt-tabs::-webkit-scrollbar { display: none; }
.nt-tabs a { flex: none; padding: 7px 14px; border-radius: 999px; font-weight: 800; font-size: .86rem; color: var(--ink); text-decoration: none; white-space: nowrap; }
.nt-tabs a:hover { background: var(--yellow); }
.nt-tabs a b { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 5px; margin-left: 4px; border-radius: 99px; background: var(--red); color: #fff; font-size: .72rem; }
.nt-cols { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; align-items: start; }
.nt-main { display: grid; gap: 16px; min-width: 0; }
.nt-rail { position: sticky; top: calc(130px + env(safe-area-inset-top)); display: grid; gap: 16px; }
.nt-main > .card, .nt-rail .card { margin: 0; }
.nt-sec { scroll-margin-top: calc(130px + env(safe-area-inset-top)); }
.nt-sec-h { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 12px; }
.nt-sec-h .section-title { margin: 0; display: flex; align-items: center; gap: 8px; }
.nt-sec-h > .muted { font-size: .8rem; }
.nt-sec > .muted { margin: 8px 0 0; font-size: .92rem; }
.nt-count { display: inline-grid; place-items: center; min-width: 30px; height: 30px; padding: 0 8px; border-radius: 99px; background: var(--red); color: #fff; font-size: .95rem; }
.nt-note { font-size: .8rem; margin: 10px 0 0; }
.nt-empty { margin: 12px 0 0; padding: 14px; border-radius: 12px; background: var(--paper); font-weight: 600; }
.nt-pc { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px 3px 6px; border-radius: 99px; background: color-mix(in srgb, var(--c) 14%, var(--card)); border: 1.5px solid var(--c); font-weight: 800; font-size: .82rem; white-space: nowrap; }
.nt-pc i { width: 9px; height: 9px; border-radius: 50%; background: var(--c); }
.nt-pc.has { background: var(--c); color: #fff; text-shadow: 0 1px 0 rgba(0, 0, 0, .25); }
.nt-pc.has i { background: #fff; }
/* El Congrés: hemicicle i cursa amb forquilles */
.nt-congres-g { display: grid; grid-template-columns: minmax(0, 300px) minmax(0, 1fr); gap: 20px; align-items: start; margin-top: 12px; }
.nt-hemi { position: relative; }
.nt-hemi .hemicycle { width: 100%; display: block; }
.nt-hemi-maj { position: absolute; left: 50%; top: 0; height: 52%; width: 2px; background: repeating-linear-gradient(var(--ink) 0 4px, transparent 4px 7px); transform: translateX(-1px); opacity: .5; }
.nt-hemi-maj::after { content: "176"; position: absolute; top: -2px; left: 6px; font-family: var(--display); font-weight: 900; font-size: .7rem; }
.nt-hemi-c { text-align: center; margin-top: -8px; }
.nt-hemi-c b { display: block; font-family: var(--display); font-size: 1.6rem; line-height: 1; }
.nt-hemi-c small { font-size: .75rem; font-weight: 700; color: var(--muted); }
.nt-race { display: grid; gap: 4px; padding-top: 12px; }
.nt-row { font: inherit; color: inherit; width: 100%; display: grid; grid-template-columns: 74px minmax(0, 1fr) 52px 58px 34px 50px; align-items: center; gap: 8px; padding: 6px 8px; border: 0; border-radius: 10px; background: transparent; cursor: pointer; text-align: left; }
.nt-row:hover, .nt-row.on { background: color-mix(in srgb, var(--c) 10%, var(--paper)); }
.nt-row-n { font-weight: 800; display: flex; align-items: center; gap: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nt-row-n i { width: 10px; height: 10px; border-radius: 50%; background: var(--c); flex: none; }
.nt-row-bar { position: relative; height: 16px; border-radius: 99px; background: color-mix(in srgb, var(--ink) 7%, transparent); }
.nt-row-bar i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 99px; background: var(--c); transition: width .8s var(--ease); }
.nt-row-bar u { position: absolute; top: -3px; bottom: -3px; border-radius: 99px; border: 2px solid var(--c); background: color-mix(in srgb, var(--c) 18%, transparent); transition: left .8s var(--ease), width .8s var(--ease); }
.nt-row-bar::after { content: ""; position: absolute; left: var(--maj); top: -5px; bottom: -5px; width: 2px; background: var(--ink); opacity: .55; }
.nt-race > .nt-row:first-child .nt-row-bar::before { content: "176"; position: absolute; left: var(--maj); top: -18px; transform: translateX(-50%); font-family: var(--display); font-weight: 900; font-size: .62rem; opacity: .6; }
.nt-row-s { font-family: var(--display); font-size: 1.25rem; text-align: right; white-space: nowrap; }
.nt-row-s small { font-size: .62rem; margin-left: 2px; font-family: var(--sans); }
.nt-row-r { font-size: .74rem; font-weight: 800; color: var(--muted); white-space: nowrap; text-align: center; }
.nt-row-d, .nt-row-v { font-size: .8rem; font-weight: 700; text-align: right; }
.nt-row-d.up, .nt-row-s .up { color: #1d9a5b; } .nt-row-d.down, .nt-row-s .down { color: #d23c2a; }
.nt-row.flash-up { animation: espUp 2.4s ease; } .nt-row.flash-down { animation: espDown 2.4s ease; }
.nt-focus { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 2px 0 8px; padding: 12px 14px; border-radius: 12px; border: 2px solid var(--c); background: color-mix(in srgb, var(--c) 6%, var(--card)); animation: ntTick .3s var(--ease); }
.nt-focus h4 { margin: 0 0 6px; font-size: .74rem; font-weight: 900; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.nt-focus ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.nt-focus li { display: grid; grid-template-columns: 1fr auto; gap: 0 8px; font-size: .86rem; }
.nt-focus li span { grid-column: 1; color: var(--ink-2); font-size: .78rem; }
.nt-focus li em { grid-row: 1 / span 2; grid-column: 2; align-self: center; font-style: normal; font-weight: 800; text-align: right; }
.nt-focus li em small { display: block; font-weight: 600; color: var(--muted); font-size: .72rem; }
.nt-focus .muted { margin: 0; font-size: .86rem; }
/* Escons en joc */
.nt-filter { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 0; }
.nt-filter button { font: inherit; display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 99px; border: 2px solid var(--ink); background: var(--card); color: var(--ink); font-weight: 800; font-size: .82rem; cursor: pointer; }
.nt-filter button i { width: 9px; height: 9px; border-radius: 50%; background: var(--c); }
.nt-filter button.on { background: var(--ink); color: var(--card); }
.nt-duels { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; margin-top: 12px; }
.nt-duel { font: inherit; color: inherit; text-align: left; cursor: pointer; display: grid; gap: 8px; padding: 12px 13px; border: 2px solid var(--ink); border-radius: 14px; background: var(--card); box-shadow: 3px 3px 0 var(--ink); transition: transform .15s var(--ease), box-shadow .15s var(--ease); }
.nt-duel:hover { transform: translate(-2px, -2px); box-shadow: 5px 5px 0 var(--ink); }
.nt-duel.lvl-fil { box-shadow: 3px 3px 0 var(--red); border-color: var(--red); }
.nt-duel-h { display: grid; grid-template-columns: 1fr auto; gap: 0 8px; align-items: center; }
.nt-duel-h b { font-family: var(--display); font-weight: 800; font-size: 1rem; letter-spacing: -.02em; }
.nt-duel-h small { grid-column: 1; font-size: .74rem; color: var(--muted); font-weight: 700; }
.nt-badge { grid-row: 1 / span 2; grid-column: 2; font-style: normal; font-size: .66rem; font-weight: 900; text-transform: uppercase; letter-spacing: .08em; padding: 4px 8px; border-radius: 99px; background: #ffb020; color: var(--ink); }
.lvl-fil .nt-badge { background: var(--red); color: #fff; animation: livePulse 1.4s ease-in-out infinite; }
.nt-vs { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.nt-vs-a { font-weight: 900; color: var(--muted); }
.nt-need { font-size: .88rem; line-height: 1.3; }
.nt-need b { font-family: var(--display); font-size: 1.15rem; }
.nt-need small { color: var(--muted); font-weight: 700; }
.nt-tug { position: relative; height: 8px; border-radius: 99px; background: color-mix(in srgb, var(--ink) 9%, transparent); overflow: hidden; }
.nt-tug i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 99px; background: var(--c); }
.nt-tug::after { content: ""; position: absolute; right: 0; top: 0; bottom: 0; width: 3px; background: var(--ink); }
.nt-flip { font-size: .76rem; font-weight: 800; color: var(--red); }
.nt-more { margin-top: 12px; }
/* Mapa i detall */
.nt-seg { display: inline-flex; padding: 3px; border: 2px solid var(--ink); border-radius: 99px; background: var(--card); }
.nt-seg button { font: inherit; padding: 5px 12px; border: 0; border-radius: 99px; background: transparent; color: var(--ink); font-weight: 800; font-size: .82rem; cursor: pointer; }
.nt-seg button.on { background: var(--ink); color: var(--card); }
.nt-mapwrap { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 16px; align-items: start; margin-top: 12px; }
.nt-map .sim-map .sim-pg path { fill: var(--f); stroke: #fff; stroke-width: 1; }
.nt-map .sim-pg.sel path { stroke: var(--ink); stroke-width: 3.5; }
.nt-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 6px 0 0; font-size: .76rem; font-weight: 700; color: var(--ink-2); }
.nt-legend span::before { content: ""; display: inline-block; width: 11px; height: 11px; margin-right: 5px; border-radius: 3px; background: #efe7d6; border: 1px solid rgba(23, 23, 61, .2); vertical-align: -1px; }
.nt-legend .fil::before { background: #ff4b2b; border-color: #ff4b2b; } .nt-legend .ajustat::before { background: #ffb020; border-color: #ffb020; }
.nt-pd { display: grid; gap: 8px; align-content: start; }
.nt-pd h3 { margin: 0; font-family: var(--display); font-weight: 900; letter-spacing: -.02em; }
.nt-pd > .muted { margin: -6px 0 0; font-size: .82rem; }
.nt-pick { padding: 14px; border-radius: 12px; background: var(--paper); margin: 0; }
.nt-pd-s { display: flex; flex-wrap: wrap; gap: 6px; }
.nt-pd-s span { display: inline-flex; align-items: center; gap: 5px; padding: 4px 9px; border-radius: 99px; background: var(--paper); font-size: .84rem; font-weight: 700; }
.nt-pd-s i { width: 9px; height: 9px; border-radius: 50%; background: var(--c); }
.nt-pd-s small { font-size: .7rem; font-weight: 800; } .nt-pd-s .up { color: #1d9a5b; } .nt-pd-s .down { color: #d23c2a; }
.nt-ladder { display: grid; gap: 4px; padding: 10px 12px; border-radius: 12px; background: var(--paper); }
.nt-ladder-t { margin: 0 0 2px; font-size: .7rem; font-weight: 900; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.nt-lq { display: grid; grid-template-columns: 54px 1fr auto; gap: 8px; align-items: center; font-size: .84rem; }
.nt-lq > span:first-child { font-size: .72rem; font-weight: 800; color: var(--muted); }
.nt-lq .nt-pc { justify-self: start; }
.nt-lq em { font-style: normal; font-weight: 800; font-variant-numeric: tabular-nums; }
.nt-lq.out { opacity: .62; }
.nt-cut { position: relative; text-align: center; margin: 2px 0; }
.nt-cut::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; border-top: 2px dashed var(--red); }
.nt-cut span { position: relative; padding: 0 8px; background: var(--paper); font-size: .66rem; font-weight: 900; text-transform: uppercase; letter-spacing: .08em; color: var(--red); }
.nt-ladder-h { margin: 4px 0 0; font-size: .74rem; color: var(--muted); }
.nt-pd-m { margin: 0; padding: 10px 12px; border-radius: 12px; border-left: 5px solid var(--ink); background: var(--card); font-size: .9rem; line-height: 1.4; box-shadow: inset 0 0 0 1px rgba(23, 23, 61, .1); }
.nt-pd-m.lvl-fil { border-left-color: var(--red); } .nt-pd-m.lvl-ajustat { border-left-color: #ffb020; }
/* Majories */
.nt-sums { display: grid; gap: 8px; margin-top: 12px; }
.nt-sum { font: inherit; color: inherit; cursor: pointer; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; align-items: center; text-align: left; padding: 10px 12px; border: 2px solid var(--ink); border-radius: 14px; background: var(--card); }
.nt-sum:hover { background: #fff4d4; }
.nt-sum-p { display: flex; flex-wrap: wrap; gap: 5px; }
.nt-sum b { grid-row: 1 / span 2; grid-column: 2; font-family: var(--display); font-size: 1.5rem; }
.nt-sum em { font-style: normal; font-size: .76rem; font-weight: 800; color: #1d9a5b; }
.nt-sum.st-fil { border-style: dashed; } .nt-sum.st-fil em { color: #c77800; }
.nt-coal { margin-top: 16px; padding-top: 14px; border-top: 2px dashed color-mix(in srgb, var(--ink) 18%, transparent); }
.nt-coal-t { margin: 0; font-size: .9rem; }
.nt-warn { color: #c77800; font-weight: 700; }
/* Última hora */
.nt-feed { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 8px; }
.nt-feed li { display: grid; grid-template-columns: 44px 1fr; gap: 8px; font-size: .9rem; padding: 7px 10px; border-radius: 10px; background: var(--paper); border-left: 4px solid var(--muted); }
.nt-feed li time { font-weight: 800; font-size: .78rem; color: var(--muted); }
.nt-feed li.k-puja { border-color: #1d9a5b; } .nt-feed li.k-baixa { border-color: #d23c2a; } .nt-feed li.k-lider, .nt-feed li.k-gir { border-color: var(--yellow); } .nt-feed li.k-fil { border-color: var(--red); } .nt-feed li.k-fita { border-color: var(--blue); }
/* El dia: com seguir la nit */
.nt-steps { list-style: none; margin: 12px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; counter-reset: nt; }
.nt-steps li { counter-increment: nt; display: grid; gap: 4px; align-content: start; padding: 14px; border-radius: 14px; background: var(--paper); }
.nt-steps li::before { content: counter(nt); display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--ink); color: var(--yellow); font-family: var(--display); font-weight: 900; font-size: .85rem; }
.nt-steps b { font-family: var(--display); font-weight: 800; letter-spacing: -.02em; }
.nt-steps span { font-size: .86rem; color: var(--ink-2); line-height: 1.4; }
/* Inici */
.esp-tit { margin: 0 0 10px !important; font-size: 1rem; line-height: 1.4; }
.esp-tit b { color: var(--yellow); }
.esp-mini-j { margin: 6px 0 0 !important; font-weight: 800; font-size: .86rem; }
@media (max-width: 1000px) {
  .nt-cols { grid-template-columns: 1fr; }
  .nt-rail { position: static; }
  .nt-congres-g { grid-template-columns: 1fr; }
  .nt-hemi { max-width: 360px; justify-self: center; width: 100%; }
}
@media (max-width: 700px) {
  .nt-hero { padding: 14px; }
  .nt-hero-main { align-items: flex-start; }
  .nt-ring { width: 88px; }
  .nt-ring b { font-size: 1rem; }
  .nt-kpis { grid-template-columns: 1fr 1fr; }
  .nt-kpis b { font-size: 1.2rem; }
  .nt-tabs { top: calc(58px + env(safe-area-inset-top)); }
  .nt-mapwrap { grid-template-columns: 1fr; }
  .nt-steps { grid-template-columns: 1fr; }
  .nt-row { grid-template-columns: 58px minmax(0, 1fr) 40px 48px 30px; gap: 6px; padding: 6px 4px; }
  .nt-row-v { display: none; }
  .nt-focus { grid-template-columns: 1fr; }
  .nt-duels { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { .nt-kpis .hot small::before, .lvl-fil .nt-badge, .nt-tick { animation: none; } }

.nt-h3 { margin: 14px 0 0; font-size: .74rem; font-weight: 900; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.nt-blocs { display: grid; gap: 8px; margin-top: 8px; }
.nt-bloc { font: inherit; color: inherit; cursor: pointer; text-align: left; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 12px; align-items: center; padding: 10px 12px; border: 2px solid var(--ink); border-radius: 14px; background: var(--card); }
.nt-bloc:hover { background: #fff4d4; }
.nt-bloc.maj { box-shadow: 3px 3px 0 #1d9a5b; }
.nt-bloc-t { font-weight: 800; font-size: .92rem; }
.nt-bloc-t small { display: block; font-weight: 600; font-size: .76rem; color: var(--muted); }
.nt-bloc > b { font-family: var(--display); font-size: 1.6rem; }
.nt-bloc-bar { --bc: var(--red); grid-column: 1 / -1; position: relative; height: 14px; border-radius: 99px; background: color-mix(in srgb, var(--ink) 8%, transparent); }
.nt-bloc-bar i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 99px; background: var(--bc); }
.nt-bloc-bar u { position: absolute; top: -3px; bottom: -3px; border-radius: 99px; border: 2px dashed var(--ink); opacity: .5; }
.nt-bloc-bar em { position: absolute; top: -5px; bottom: -5px; width: 2px; background: var(--ink); }
.nt-bloc-s { grid-column: 1 / -1; font-size: .78rem; font-weight: 800; color: var(--ink-2); }
.nt-bloc.maj .nt-bloc-s { color: #1d9a5b; }

.nt-hemi-maj::after { top: -16px; left: 50%; transform: translateX(-50%); }
@media (max-width: 700px) {
  .nt-hero h1 { font-size: clamp(1.3rem, 6.4vw, 1.7rem); text-shadow: 2px 2px 0 var(--red); }
  .nt-sub { font-size: .95rem; }
  .nt-hemi { max-width: 300px; }
  .nt-race > .nt-row:first-child .nt-row-bar::before { display: none; }
}

@media (max-width: 700px) {
  .nt-hero-top { padding-right: 76px; }
  .nt-hero-main { display: block; margin-top: 10px; }
  .nt-ring { position: absolute; top: 12px; right: 12px; width: 66px; z-index: 1; }
  .nt-ring b { font-size: .82rem; }
  .nt-ring small { font-size: .56rem; }
}
@media (max-width: 700px) { .nt-tick { flex-direction: column; gap: 2px; } }

/* Qui pot governar */
.nt-govern { display: grid; gap: 10px; }
.nt-govern > h2 { margin: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; font-family: var(--display); font-weight: 900; letter-spacing: -.03em; font-size: clamp(1.3rem, 3vw, 1.7rem); }
.nt-govern > h2 small { font-family: var(--sans); font-size: .82rem; font-weight: 800; color: var(--muted); letter-spacing: 0; }
.nt-gv-g { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.nt-gv { --v: #8a8698; display: grid; gap: 8px; align-content: start; padding: 14px 16px; border: var(--bw) solid var(--ink); border-radius: var(--radius); background: var(--card); box-shadow: 5px 5px 0 var(--v); }
.nt-gv.v-ok { --v: #1d9a5b; } .nt-gv.v-sup { --v: #ffb020; } .nt-gv.v-fil { --v: #ffb020; } .nt-gv.v-no { --v: #d23c2a; }
.nt-gv header { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.nt-gv-p { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.nt-gv-p > b { font-weight: 900; color: var(--muted); }
.nt-gv-p .nt-pc { font-size: .95rem; padding: 4px 11px 4px 8px; }
.nt-gv header strong { font-family: var(--display); font-weight: 900; font-size: 2.4rem; line-height: 1; letter-spacing: -.03em; }
.nt-gv-bar { position: relative; height: 18px; margin-top: 14px; border-radius: 99px; background: color-mix(in srgb, var(--ink) 8%, transparent); }
.nt-gv-bar > i { position: absolute; left: 0; top: 0; bottom: 0; display: flex; overflow: hidden; border-radius: 99px; transition: width .8s var(--ease); }
.nt-gv-bar s { display: block; height: 100%; }
.nt-gv-bar > i s + s { box-shadow: inset 2px 0 0 rgba(255, 255, 255, .7); }
.nt-gv-bar u { position: absolute; top: -3px; bottom: -3px; border-radius: 99px; border: 2px dashed var(--ink); opacity: .55; }
.nt-gv-bar em { position: absolute; top: -6px; bottom: -6px; width: 3px; margin-left: -1.5px; background: var(--ink); }
.nt-gv-bar em span { position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%); font-style: normal; font-family: var(--display); font-weight: 900; font-size: .66rem; }
.nt-gv-v { margin: 0; display: flex; align-items: center; gap: 8px; font-family: var(--display); font-weight: 800; font-size: 1.05rem; letter-spacing: -.02em; }
.nt-gv-v span { display: grid; place-items: center; width: 26px; height: 26px; flex: none; border-radius: 50%; background: var(--v); color: #fff; font-size: .85rem; }
.nt-gv > p:not(.nt-gv-v) { margin: 0; font-size: .88rem; line-height: 1.4; color: var(--ink-2); }
.nt-gv-key, .nt-gv-min { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.nt-gv-key > span:not(.nt-pc), .nt-gv-min > span:not(.nt-pc) { width: 100%; font-size: .68rem; font-weight: 900; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.nt-gv-key .nt-pc { background: var(--c); color: #fff; }
.nt-gv-key .nt-pc i { background: #fff; }
.nt-gv-min em { font-style: normal; display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px; font-weight: 800; }
.nt-gv-min > i { font-style: normal; font-weight: 700; color: var(--muted); margin: 0 4px; }
.nt-gv-note { margin: 0; font-size: .76rem; color: var(--muted); }
.nt-share { margin-left: 8px; font: inherit; font-size: .7rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; padding: 5px 10px; border-radius: 6px; border: 1px solid rgba(255, 255, 255, .45); background: transparent; color: inherit; cursor: pointer; }
.nt-share:hover { background: rgba(255, 255, 255, .14); }
.nt-hero-top .esp-upd + .nt-share { margin-left: 8px; }
.nt-hero-top > .esp-onair + .nt-share { margin-left: auto; }
.esp-mini-g { margin: 4px 0 0 !important; font-size: .86rem; }
.esp-mini-g.v-maj b, .esp-mini-g.v-fil b { color: #7ee2a8; }
@media (max-width: 760px) {
  .nt-gv-g { grid-template-columns: 1fr; }
  .nt-gv header strong { font-size: 2rem; }
}
@media (max-width: 700px) { .nt-hero-top .esp-upd { display: none; } .nt-hero-top .nt-share { margin-left: 0; } .nt-kpis { margin-top: 12px; } .nt-kpis > * { padding: 8px 10px; } .nt-govern > h2 { font-size: 1.25rem; } }
.nt-barrier { font-size: .76rem; font-weight: 800; color: #b06a00; }

/* ---------- Nit electoral: marcador de la portada ---------- */
.nh { position: relative; overflow: hidden; display: grid; gap: 14px; margin: 0 0 18px; padding: 18px 22px 20px; border: var(--bw) solid var(--ink); border-radius: var(--radius); box-shadow: var(--hard); color: var(--card); background: radial-gradient(120% 140% at 90% 0%, #3b2aa8 0%, #1b1f6a 38%, #0c0d2a 78%); }
.nh::after { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(0deg, rgba(255, 255, 255, .03) 0 2px, transparent 2px 4px); pointer-events: none; }
.nh > * { position: relative; z-index: 1; }
.nh-top { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; }
.nh-k { margin-left: auto; color: var(--yellow); }
.nh-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.nh-head h2 { margin: 0; font-family: var(--display); font-weight: 900; letter-spacing: -.035em; font-size: clamp(1.5rem, 4vw, 2.6rem); line-height: 1.02; text-shadow: 3px 3px 0 var(--red); text-wrap: balance; }
.nh-esc { position: relative; width: 104px; flex: none; }
.nh-esc > div { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.nh-esc b { font-family: var(--display); font-size: 1.15rem; }
.nh-esc small { font-size: .62rem; font-weight: 700; opacity: .75; }
.nh-g { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 20px; align-items: center; }
.nh-congres { display: grid; gap: 10px; }
.nh .nt-hemi { max-width: 330px; justify-self: center; width: 100%; }
.nh .nt-hemi-maj { background: repeating-linear-gradient(#fff 0 4px, transparent 4px 7px); }
.nh .nt-hemi-c small { color: rgba(255, 250, 240, .7); }
.nh-leg { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.nh-leg li { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px 4px 7px; border-radius: 99px; background: rgba(255, 255, 255, .09); font-weight: 800; font-size: .84rem; }
.nh-leg li i { width: 10px; height: 10px; border-radius: 50%; background: var(--c); }
.nh-leg li b { font-family: var(--display); }
.nh-leg li small { font-size: .7rem; } .nh-leg .up { color: #7ee2a8; } .nh-leg .down { color: #ff9b85; }
.nh-leg li.more { opacity: .7; }
.nh-gov { display: grid; gap: 10px; }
.nh-gov-h { margin: 0; font-family: var(--display); font-weight: 900; font-size: 1.05rem; letter-spacing: -.02em; }
.nh-gv { --v: #8a8698; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 12px; align-items: center; padding: 12px 14px; border-radius: 14px; background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .14); border-left: 5px solid var(--v); color: inherit; text-decoration: none; transition: background .2s; }
.nh-gv:hover { background: rgba(255, 255, 255, .12); }
.nh-gv.v-ok { --v: #2fc27a; } .nh-gv.v-fil, .nh-gv.v-sup { --v: #ffb020; } .nh-gv.v-no { --v: #ff5a3d; }
.nh-gv-p { display: flex; align-items: center; gap: 5px; }
.nh-gv-p > b { opacity: .6; }
.nh-gv strong { font-family: var(--display); font-weight: 900; font-size: 2rem; line-height: 1; }
.nh-gv .nt-gv-bar { grid-column: 1 / -1; margin-top: 6px; height: 14px; background: rgba(255, 255, 255, .12); }
.nh-gv .nt-gv-bar em { background: #fff; }
.nh-gv .nt-gv-bar em span { color: rgba(255, 250, 240, .8); }
.nh-gv-v { grid-column: 1 / -1; display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: .95rem; }
.nh-gv-v span { display: grid; place-items: center; width: 22px; height: 22px; flex: none; border-radius: 50%; background: var(--v); color: #fff; font-size: .78rem; }
.nh-strip { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; padding: 10px 14px; border-radius: 12px; background: rgba(255, 207, 61, .1); font-size: .9rem; }
.nh-strip:empty { display: none; }
.nh-hot { display: inline-flex; align-items: center; gap: 6px; font-weight: 800; }
.nh-hot::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #ff6b4a; animation: livePulse 1.4s ease-in-out infinite; }
.nh-hot b { font-family: var(--display); color: var(--yellow); font-size: 1.1rem; }
.nh-strip b { color: var(--yellow); }
.nh-go { justify-self: start; }
.esp-home-msg { margin-bottom: 10px; }
@media (max-width: 760px) {
  .nh { padding: 14px; gap: 12px; }
  .nh-k { display: none; }
  .nh-head { align-items: flex-start; }
  .nh-head h2 { font-size: clamp(1.3rem, 6.2vw, 1.7rem); text-shadow: 2px 2px 0 var(--red); }
  .nh-esc { width: 70px; }
  .nh-esc b { font-size: .82rem; }
  .nh-g { grid-template-columns: 1fr; gap: 14px; }
  .nh-gov { order: -1; }
  .nh .nt-hemi { max-width: 250px; }
  .nh-gv strong { font-size: 1.6rem; }
  .nh-go { justify-self: stretch; justify-content: center; }
}

/* ---------- Nit electoral: pàgina en pestanyes ---------- */
.nt-body { display: grid; gap: 16px; max-width: 1060px; width: 100%; margin: 0 auto; }
.nt-tabs button { flex: none; font: inherit; padding: 8px 15px; border: 0; border-radius: 999px; background: transparent; font-weight: 800; font-size: .88rem; color: var(--ink); cursor: pointer; white-space: nowrap; }
.nt-tabs button:hover { background: color-mix(in srgb, var(--yellow) 60%, transparent); }
.nt-tabs button.on { background: var(--ink); color: var(--card); }
.nt-tabs button b { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 5px; margin-left: 4px; border-radius: 99px; background: var(--red); color: #fff; font-size: .72rem; }
.nt-kpis button { font: inherit; text-align: left; cursor: pointer; }
.nt-jg { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; align-items: start; }
.nt-jg > div:empty { display: none; }
.nt-jg .card { margin: 0; }
.nt-jugues { background: transparent; border: 0; box-shadow: none; padding: 0; }
.nt-body { max-width: none; }
.nt-off { margin: 8px 0 0; padding: 8px 10px; border-radius: 10px; background: var(--paper); font-size: .82rem; color: var(--ink-2); line-height: 1.6; }
.nt-off span { font-weight: 800; color: var(--muted); }
.nt-off b { display: inline-flex; align-items: center; gap: 4px; color: var(--ink); }
.nt-off b i { width: 8px; height: 8px; border-radius: 50%; background: var(--c); }

/* ---------- Simulador: campanya contra amics ---------- */
.sh2-two { display: flex; flex-wrap: wrap; gap: 10px; }
.sh2-two .btn { flex: 1 1 160px; }
.simmp-card { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; min-width: 0; }
.simmp-card .sim-lead { margin: 0; }
.simmp-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.simmp-two section { min-width: 0; display: grid; gap: 10px; align-content: start; padding: 16px; border: 2px solid var(--ink); border-radius: 14px; background: var(--paper); }
.simmp-two h4, .simmp-final h4 { margin: 0; font-family: var(--display); font-weight: 900; font-size: 1.05rem; }
.simmp-two small { color: var(--ink-2); }
.simmp-join { display: flex; gap: 8px; }
.simmp-join input { flex: 1; min-width: 0; padding: 10px 12px; border: 2px solid var(--ink); border-radius: 10px; background: var(--card); color: var(--ink); font: 900 1.1rem var(--display); letter-spacing: .18em; text-transform: uppercase; }
.simmp-err { margin: 0; min-height: 1.2em; color: var(--red); font-weight: 700; font-size: .86rem; }
.simmp-mine { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.simmp-mine .sim-choice { width: 100%; display: grid; gap: 2px; text-align: left; }
.simmp-code { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 12px 14px; border: 2px dashed var(--ink); border-radius: 14px; background: var(--paper); }
.simmp-code div { display: grid; margin-right: auto; }
.simmp-code small { font-size: .7rem; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; color: var(--ink-2); }
.simmp-code b { font-family: var(--display); font-weight: 900; font-size: 1.8rem; letter-spacing: .2em; }
.simmp-seats { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.simmp-seats li { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; padding: 8px 12px; border: 2px solid var(--ink); border-radius: 12px; background: var(--card); }
.simmp-seats li.me { box-shadow: inset 0 0 0 2px var(--yellow); background: #fff8e1; }
.simmp-seats li.free { border-style: dashed; opacity: .6; }
.simmp-seats li.ok em { color: #0f7a45; }
.simmp-seats span:nth-child(2) { display: grid; min-width: 0; }
.simmp-seats b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.simmp-seats small { color: var(--ink-2); font-size: .78rem; }
.simmp-seats em { font-style: normal; font-weight: 800; font-size: .8rem; text-align: right; }
.simmp-nologo { display: grid; place-items: center; width: 40px; height: 40px; border: 2px dashed var(--ink); border-radius: 50%; font-weight: 900; }
.simmp-note { margin: 0; color: var(--ink-2); font-size: .88rem; }
.simmp-wait .sim-h { margin: 0; }
.simmp-strip { position: fixed; z-index: 40; left: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); display: flex; align-items: center; gap: 6px; padding: 6px 8px; border: 2px solid var(--ink); border-radius: 99px; background: var(--card); box-shadow: 3px 3px 0 var(--ink); }
.simmp-strip-h { font-size: .9rem; }
.simmp-chip { display: inline-flex; align-items: center; gap: 5px; padding: 3px 8px 3px 4px; border-radius: 99px; background: var(--paper); font-weight: 900; font-size: .78rem; }
.simmp-chip i { width: 14px; height: 14px; border-radius: 50%; background: var(--pc); border: 1.5px solid var(--ink); }
.simmp-chip small { font-weight: 700; color: var(--ink-2); }
.simmp-chip.ok small { color: #0f7a45; }
body:not(.playing) .simmp-strip { display: none; }
.simmp-final { display: grid; gap: 10px; padding: 16px; border: 2px solid var(--ink); border-radius: 16px; background: #fff8e1; }
.simmp-final ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.simmp-final li { display: grid; grid-template-columns: 28px auto 1fr auto auto; gap: 10px; align-items: center; padding: 6px 10px; border-radius: 10px; background: var(--card); }
.simmp-final li.me { box-shadow: inset 0 0 0 2px var(--yellow); }
.simmp-final li > span { display: grid; min-width: 0; }
.simmp-final small { color: var(--ink-2); font-size: .78rem; }
.simmp-final strong { font-family: var(--display); font-weight: 900; }
.simmp-final em { font-style: normal; color: var(--ink-2); font-size: .84rem; }
.simmp-pos { font-family: var(--display); font-weight: 900; font-size: 1.2rem; text-align: center; }
@media (max-width: 640px) {
  .simmp-two { grid-template-columns: minmax(0, 1fr); }
  .simmp-final li { grid-template-columns: 24px auto 1fr auto; }
  .simmp-final em { display: none; }
}

/* Campanya contra amics: laboratori, xat dels equips, pactes i negociació */
.simmp-lab { margin: 0; padding: 10px 14px; border: 2px dashed var(--ink); border-radius: 12px; background: #e8f3ff; font-weight: 700; font-size: .9rem; }
.simmp-code b.sm { font-size: 1.1rem; letter-spacing: 0; }
.simmp-chatbtn { position: relative; display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border: 2px solid var(--ink); border-radius: 99px; background: var(--yellow); color: var(--ink); font: 900 .8rem var(--sans); cursor: pointer; }
.simmp-chatbtn b { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px; background: var(--red); color: #fff; font-size: .7rem; line-height: 18px; text-align: center; }
.simchat { position: fixed; z-index: 60; right: 16px; bottom: 16px; width: min(400px, calc(100vw - 32px)); height: min(620px, calc(100vh - 100px)); display: grid; grid-template-rows: auto auto 1fr auto auto; border: 2px solid var(--ink); border-radius: 18px; background: var(--card); box-shadow: 6px 6px 0 var(--ink); overflow: hidden; }
.simchat > header { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px; background: var(--ink); color: #fff; }
.simchat > header b { font-family: var(--display); font-weight: 900; }
.simchat-x { border: 0; background: none; color: #fff; font-size: 1.1rem; cursor: pointer; }
.simchat-tabs { display: flex; gap: 6px; padding: 8px 10px; overflow-x: auto; border-bottom: 2px solid var(--ink); background: var(--paper); scrollbar-width: none; }
.simchat-tabs button { flex: none; display: inline-flex; align-items: center; gap: 5px; padding: 5px 11px; border: 2px solid var(--ink); border-radius: 99px; background: var(--card); font: 800 .8rem var(--sans); color: var(--ink); cursor: pointer; }
.simchat-tabs button.on { background: var(--ink); color: #fff; }
.simchat-tabs i { width: 11px; height: 11px; border-radius: 50%; background: var(--pc); border: 1.5px solid currentColor; }
.simchat-tabs b { min-width: 16px; padding: 0 4px; border-radius: 99px; background: var(--red); color: #fff; font-size: .66rem; text-align: center; }
.simchat-log { overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.simchat-empty, .simchat-note { margin: 0; color: var(--ink-2); font-size: .84rem; }
.simchat-note { padding: 8px 12px; border-top: 1.5px dashed var(--ink); }
.simchat-m { max-width: 86%; align-self: flex-start; display: grid; gap: 3px; }
.simchat-m.me { align-self: flex-end; }
.simchat-m small { display: flex; align-items: center; gap: 5px; font-size: .72rem; color: var(--ink-2); }
.simchat-m small i { width: 9px; height: 9px; border-radius: 50%; background: var(--pc); }
.simchat-m p { margin: 0; padding: 8px 12px; border-radius: 14px 14px 14px 4px; background: var(--paper); border: 1.5px solid var(--ink); font-size: .9rem; line-height: 1.35; overflow-wrap: anywhere; }
.simchat-m.me p { border-radius: 14px 14px 4px 14px; background: #fff3c4; }
.simchat-form { display: flex; gap: 8px; padding: 10px; border-top: 2px solid var(--ink); }
.simchat-form input { flex: 1; min-width: 0; padding: 9px 12px; border: 2px solid var(--ink); border-radius: 12px; font: 600 .95rem var(--sans); background: var(--card); color: var(--ink); }
.simchat-pactrow { padding: 8px 10px; border-top: 1.5px dashed var(--ink); }
.simchat-pactrow .btn { width: 100%; }
.simpact { display: grid; gap: 6px; padding: 10px 12px; border: 2px solid var(--ink); border-radius: 12px; background: var(--card); font-size: .86rem; }
.simpact.ok { background: #e3f7ea; } .simpact.ko { opacity: .65; }
.simpact p, .simpact ul { margin: 0; }
.simpact ul { padding-left: 18px; }
.simpact-h { display: flex; justify-content: space-between; gap: 8px; font-weight: 900; }
.simpact-h em { font-style: normal; font-size: .76rem; }
.simpact.warn .simpact-h em { color: #b45309; } .simpact.ok .simpact-h em { color: #0f7a45; }
.simpact-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.simpact-new { display: grid; gap: 8px; max-height: 46vh; overflow-y: auto; padding: 10px 12px; border-top: 2px solid var(--ink); background: var(--paper); }
.simpact-q { margin: 4px 0 0; font-size: .74rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-2); }
.simpact-seg { display: flex; flex-wrap: wrap; gap: 6px; }
.simpact-seg button { padding: 6px 11px; border: 2px solid var(--ink); border-radius: 99px; background: var(--card); color: var(--ink); font: 800 .8rem var(--sans); cursor: pointer; }
.simpact-seg button.on { background: var(--ink); color: #fff; }
.simpact-mins { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: .85rem; }
.simpact-mins input { width: 64px; padding: 5px 8px; border: 2px solid var(--ink); border-radius: 8px; }
.simpact-ms { display: grid; gap: 5px; }
.simpact-m { display: flex; gap: 8px; align-items: flex-start; font-size: .84rem; cursor: pointer; }
.simpact-m em { font-style: normal; font-size: .72rem; font-weight: 800; color: #0f7a45; }
.simneg-hemi { max-width: 520px; margin: 0 auto; width: 100%; }
.simneg-pacts { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 8px; }
.simneg-prev { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.simneg-prev span { padding: 8px 12px; border: 2px solid var(--ink); border-radius: 10px; font-weight: 800; }
.simneg-prev span b { font-family: var(--display); font-weight: 900; font-size: 1.1rem; margin-left: 4px; }
.simneg-prev .si { background: #e3f7ea; } .simneg-prev .no { background: #fde2df; } .simneg-prev .abs { background: var(--paper); }
.simneg-prev em { font-style: normal; font-weight: 700; color: var(--ink-2); }
.simneg-why ul { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 6px; }
.simneg-why li { display: flex; gap: 10px; align-items: center; font-size: .86rem; }
.simneg-why li span { display: grid; }
.simneg-why small { color: var(--ink-2); }
.simneg-why summary, .simneg-extra summary { cursor: pointer; font-weight: 800; }
.simneg-extra { display: grid; gap: 6px; }
.simneg-vote { display: grid; gap: 10px; padding: 14px; border: 2px solid var(--ink); border-radius: 14px; background: #fff8e1; }
.simneg-tries { margin: 0; padding-left: 18px; font-size: .88rem; }
.simmp-gov { margin: 0; padding: 10px 12px; border-radius: 10px; background: var(--card); border: 2px solid var(--ink); }
@media (max-width: 640px) {
  .simchat { right: 0; left: 0; bottom: 0; width: auto; height: min(78vh, 640px); border-radius: 18px 18px 0 0; box-shadow: none; }
}
.simneg-ai { padding: 10px 12px; border: 2px dashed var(--ink); border-radius: 12px; background: #eef0ff; font-size: .9rem; }

/* Centre de control · Registrats */
.ctr-cols .ctu-col { border: 0; background: none; padding: 0; cursor: pointer; font: inherit; color: inherit; }
.ctr-cols .ctu-col.on small { font-weight: 900; color: var(--ink); }
.ctr-cols .ctu-col.on .ctu-stack { outline: 2px solid var(--ink); outline-offset: 2px; }
.ctr-dayhead { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin: 14px 0 8px; }
.ctr-dayhead h3 { margin: 0; font-family: var(--display); font-weight: 900; font-size: 1.05rem; }
.ctr-tools { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 10px; }
.ctr-tools input { flex: 1 1 200px; padding: 8px 12px; border: 2px solid var(--ink); border-radius: 10px; font: 600 .95rem var(--sans); }
.ctr-table { width: 100%; border-collapse: collapse; font-size: .88rem; display: block; overflow-x: auto; }
.ctr-table th, .ctr-table td { padding: 7px 10px; text-align: left; border-bottom: 1px solid rgba(23, 23, 61, .12); white-space: nowrap; }
.ctr-table th { font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-2); }
.ctr-table td:first-child { font-weight: 800; }
.ctl-seg.sm { display: flex; flex-wrap: wrap; grid-template-columns: none; margin-top: 0; gap: 6px; }
.ctl-seg.sm button { padding: 6px 12px; }
.simchat.composing .simchat-log, .simchat.composing .simchat-form { display: none; }
.simchat.composing { grid-template-rows: auto auto 1fr; }
.simchat.composing .simpact-new { max-height: none; height: 100%; }
.simneg-hemi { max-width: 420px; }
.simchat { z-index: 90; }
.simchat-m .simpact p { padding: 0; border: 0; border-radius: 0; background: none; font-size: .86rem; }

/* ---------- Amics: targeta d'usuari, pestanya Amics i xat privat ---------- */
[data-user] { cursor: pointer; }
.lb-row[data-user]:hover, .pron-rank li[data-user]:hover, .ami-list li:hover { background: rgba(255, 207, 61, .18); }
.nav-badge { display: inline-grid; place-items: center; min-width: 17px; height: 17px; margin-left: 4px; padding: 0 4px; border-radius: 99px; background: var(--red); color: #fff; font: 900 .66rem/1 var(--sans); font-style: normal; vertical-align: 2px; }
.tabbar a { position: relative; }
.tabbar .nav-badge { position: absolute; top: 4px; left: calc(50% + 6px); margin: 0; }
.social-tabs a[data-ami-tab][data-n]:not([data-n=""])::after { content: attr(data-n); display: inline-grid; place-items: center; min-width: 17px; height: 17px; margin-left: 6px; padding: 0 4px; border-radius: 99px; background: var(--red); color: #fff; font: 900 .66rem/1 var(--sans); }
.ami-card-wrap { position: fixed; inset: 0; z-index: 120; display: grid; place-items: center; padding: 16px; background: rgba(23, 23, 61, .45); }
.ami-card { position: relative; width: min(340px, 100%); display: grid; justify-items: center; gap: 8px; padding: 26px 20px 20px; text-align: center; }
.ami-card [data-body] { display: grid; justify-items: center; gap: 6px; }
.ami-card h3 { margin: 4px 0 0; font-family: var(--display); font-weight: 900; font-size: 1.3rem; }
.ami-card p { margin: 0; }
.ami-x { position: absolute; top: 8px; right: 10px; border: 0; background: none; font-size: 1.1rem; cursor: pointer; color: var(--ink); }
.ami-acts { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px; margin-top: 8px; }
.ami-ok { font-weight: 800; color: #0f7a45; font-size: .9rem; }
.ami-invite { display: grid; gap: 10px; }
.ami-invite p { margin: 0; }
.ami-link code { display: block; padding: 10px 12px; border: 2px dashed var(--ink); border-radius: 10px; background: var(--paper); font-size: .85rem; overflow-wrap: anywhere; }
.ami-share { flex-wrap: wrap; gap: 8px; }
.ami-share [data-wa] { background: #25d366; color: #0b3d1e; border-color: var(--ink); }
.ami-search { display: flex; gap: 8px; }
.ami-search input { flex: 1; min-width: 0; padding: 9px 12px; border: 2px solid var(--ink); border-radius: 10px; font: 600 .95rem var(--sans); background: var(--card); color: var(--ink); }
.ami-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.ami-list li { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; padding: 8px 10px; border-radius: 12px; }
.ami-n { display: grid; min-width: 0; }
.ami-n b, .ami-n small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ami-n small { color: var(--ink-2); font-size: .8rem; }
.ami-btns { display: flex; gap: 6px; }
.ami-chat { display: grid; grid-template-rows: auto minmax(260px, 56vh) auto auto; gap: 10px; }
.ami-chat header { display: flex; align-items: center; gap: 10px; }
.ami-chat-who { display: flex; align-items: center; gap: 8px; margin-right: auto; }
.ami-chat-who b { font-family: var(--display); font-weight: 900; }
.ami-log { overflow-y: auto; display: flex; flex-direction: column; gap: 8px; padding: 10px; border: 2px solid var(--ink); border-radius: 14px; background: var(--paper); }
.ami-m { max-width: 80%; align-self: flex-start; display: grid; gap: 2px; }
.ami-m.me { align-self: flex-end; justify-items: end; }
.ami-m p { margin: 0; padding: 8px 12px; border: 1.5px solid var(--ink); border-radius: 14px 14px 14px 4px; background: var(--card); line-height: 1.35; overflow-wrap: anywhere; }
.ami-m.me p { border-radius: 14px 14px 4px 14px; background: #fff3c4; }
.ami-m small { font-size: .7rem; color: var(--ink-2); }
.ami-form { display: flex; gap: 8px; }
.ami-form input { flex: 1; min-width: 0; padding: 10px 12px; border: 2px solid var(--ink); border-radius: 12px; font: 600 .95rem var(--sans); background: var(--card); color: var(--ink); }
.ami-note { margin: 0; font-size: .78rem; color: var(--ink-2); }

/* Debat entre amics: el medidor, amb una línia per candidat */
.dbm-meters { gap: 6px; }
.dbm-meters ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 5px; }
.dbm-meters li { display: grid; grid-template-columns: 8px auto 1fr auto auto; gap: 6px; align-items: center; font-size: .8rem; }
.dbm-meters li > i { width: 8px; height: 8px; border-radius: 50%; background: var(--pc); }
.dbm-meters li.me b::after { content: " · tu"; font-weight: 600; opacity: .7; }
.dbm-meters svg { width: 100%; height: 18px; }
.dbm-meters path { fill: none; stroke: var(--pc); stroke-width: 2; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.dbm-meters strong { font-family: var(--display); font-weight: 900; }
.dbm-meters em { font-style: normal; font-size: .7rem; font-weight: 800; }
.dbm-meters em.up { color: #5fe39a; } .dbm-meters em.down { color: #ff7a6b; }
.db-opt.picked { box-shadow: 0 0 0 3px var(--yellow); }
@media (max-width: 900px) { .dbm-meters { grid-template-columns: 1fr !important; } .dbm-meters svg { display: block; } }

/* ---------- Simulador · Campanya contra amics: la legislatura ---------- */
.simlgm-score { list-style: none; margin: 0 0 6px; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 8px; }
.simlgm-score li { display: grid; grid-template-columns: auto 1fr auto; grid-template-rows: auto auto; column-gap: 8px; align-items: center; padding: 8px 10px; border: 2px solid var(--ink); border-radius: 12px; background: var(--card); }
.simlgm-score li.me { box-shadow: inset 0 0 0 2px var(--yellow); background: #fff8e1; }
.simlgm-score i { grid-row: span 2; width: 12px; height: 28px; border-radius: 4px; background: var(--pc); }
.simlgm-score small { grid-column: 2; color: var(--ink-2); font-size: .76rem; }
.simlgm-score strong { grid-row: 1 / span 2; grid-column: 3; font-family: var(--display); font-size: 1.3rem; }
.simlgm-items { display: grid; gap: 10px; }
.simlgm-item { border: 2px solid var(--ink); border-radius: 14px; padding: 12px 14px; background: var(--card); display: grid; gap: 8px; }
.simlgm-item h5 { margin: 0; font-size: 1rem; line-height: 1.3; }
.simlgm-item .simmp-note { margin: 0; }
.simlgm-item.k-cens { border-color: #b3261e; } .simlgm-item.k-conf { border-color: #1e5fb3; } .simlgm-item.k-pge { border-color: #0f7a45; }
.simlgm-item.ok { background: #f1fbf4; } .simlgm-item.ko { background: #fdf1ef; }
.simlgm-items.done .simlgm-item { padding: 10px 12px; }
.simlgm-k { margin: 0; font-size: .74rem; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-2); }
.simlgm-votes { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.simlgm-votes li { display: flex; align-items: center; gap: 6px; padding: 4px 8px; border: 1.5px solid var(--ink); border-radius: 999px; font-size: .8rem; background: var(--paper); }
.simlgm-votes li i { width: 9px; height: 9px; border-radius: 50%; background: var(--pc); }
.simlgm-votes li small { color: var(--ink-2); }
.simlgm-votes li.me { box-shadow: inset 0 0 0 2px var(--yellow); }
.simlgm-votes li.v-si { background: #e3f7ea; } .simlgm-votes li.v-no { background: #fde2df; }
.simlgm-votes .btn.sm { padding: 2px 8px; font-size: .74rem; }
.simlgm-res { margin: 0; font-weight: 800; }
.simlgm-new { display: grid; gap: 8px; }
.simlgm-lab { display: grid; gap: 6px; font-weight: 800; }
.simlgm-lab select { width: 100%; min-width: 0; padding: 10px; border: 2px solid var(--ink); border-radius: 10px; font: inherit; font-weight: 600; background: var(--card); color: var(--ink); }
.simlgm-prev { margin: 0; font-weight: 700; color: var(--ink-2); }
.simlgm-acts { display: flex; flex-wrap: wrap; gap: 8px; }
.simlgm-ready { display: grid; gap: 8px; justify-items: start; margin-top: 14px; }
.simlgm-final { margin-top: 14px; display: grid; gap: 8px; }
.simlgm-final h4 { margin: 0; }
.simlgm-final ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.simlgm-final li { display: grid; grid-template-columns: auto auto 1fr auto; gap: 10px; align-items: center; padding: 8px 10px; border: 2px solid var(--ink); border-radius: 12px; background: var(--card); }
.simlgm-final li.me { box-shadow: inset 0 0 0 2px var(--yellow); background: #fff8e1; }
.simlgm-final li span { display: grid; min-width: 0; }
.simlgm-final li small { color: var(--ink-2); font-size: .76rem; }
.simlgm-final li strong { font-family: var(--display); font-size: 1.2rem; }
/* Denunciar un missatge */
.ami-m, .simchat-m { position: relative; }
.ami-flag { position: absolute; top: 2px; right: -26px; width: 22px; height: 22px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--ink-2); font-size: .8rem; cursor: pointer; opacity: .45; }
.ami-flag:hover, .ami-flag:focus-visible { opacity: 1; background: #fde2df; color: #b3261e; }

/* ---------- Trucades i videotrucades entre amics (trucada.js) ---------- */
.call-ui { position: fixed; z-index: 97; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); display: grid; justify-items: end; gap: 8px; max-width: calc(100vw - 24px); }
.call-pill { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border: 2px solid var(--ink); border-radius: 99px; background: var(--card); box-shadow: 3px 3px 0 var(--ink); font: inherit; font-weight: 900; color: var(--ink); cursor: pointer; }
.call-pill.live { background: #e3f7ea; animation: callPulse 1.6s ease-in-out infinite; }
.call-pill.on { padding: 4px; gap: 4px; background: #17173d; color: #fff; }
.call-pill.on > button:first-child { display: inline-flex; gap: 6px; align-items: center; padding: 4px 8px; border: 0; background: none; color: inherit; font: inherit; font-weight: 900; cursor: pointer; }
@keyframes callPulse { 50% { box-shadow: 3px 3px 0 var(--ink), 0 0 0 6px rgba(15, 122, 69, .18); } }
.call-ask { width: min(340px, calc(100vw - 24px)); display: grid; gap: 8px; padding: 14px; order: -1; }
.call-ask p { margin: 0; }
.call-ask .muted { font-size: .84rem; }
.call-ask-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.call-ui.dock { width: min(420px, calc(100vw - 24px)); padding: 10px; border: 2px solid var(--ink); border-radius: 16px; background: #17173d; color: #fff; box-shadow: 4px 4px 0 var(--ink); gap: 8px; justify-items: stretch; }
.call-head { display: flex; align-items: center; gap: 8px; }
.call-head b { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.call-head span { font-variant-numeric: tabular-nums; opacity: .8; font-size: .85rem; }
.call-grid { display: grid; gap: 6px; grid-template-columns: 1fr 1fr; }
.call-grid.n1 { grid-template-columns: 1fr; }
.call-tile { position: relative; aspect-ratio: 4 / 3; border-radius: 10px; overflow: hidden; background: #2a2a55; display: grid; place-items: center; outline: 3px solid transparent; transition: outline-color .15s; }
.call-tile.talk { outline-color: #3ddc84; }
.call-tile.err { opacity: .6; }
.call-tile.bot { opacity: .55; }
.call-tile video { width: 100%; height: 100%; object-fit: cover; }
.call-tile audio { display: none; }
.call-av { width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; background: var(--yellow); color: #17173d; font-family: var(--display); font-weight: 900; font-size: 1.5rem; }
.call-tile small { position: absolute; left: 6px; right: 6px; bottom: 5px; padding: 2px 6px; border-radius: 6px; background: rgba(0, 0, 0, .55); font-size: .72rem; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.call-note { margin: 0; font-size: .78rem; opacity: .85; }
.call-ctrl { display: flex; justify-content: center; gap: 10px; }
.call-ic { min-width: 42px; height: 42px; padding: 0 10px; border: 2px solid #fff; border-radius: 99px; background: transparent; color: #fff; font: inherit; font-weight: 900; font-size: 1.05rem; cursor: pointer; }
.call-pill .call-ic { min-width: 34px; height: 34px; font-size: .9rem; }
.call-ic.off { background: #fff; color: #17173d; }
.call-ic.end { background: #e0302a; border-color: #e0302a; }
.call-head .call-ic { min-width: 32px; height: 32px; font-size: .8rem; }
.ami-call { display: grid; gap: 10px; }
.ami-call h3 { margin: 0; }
.ami-call-who { margin: 0; padding-left: 18px; }
@media (max-width: 640px) {
  .call-ui { bottom: calc(70px + env(safe-area-inset-bottom)); }
  .call-ui.dock { right: 8px; width: calc(100vw - 16px); }
  .call-tile { aspect-ratio: 16 / 10; }
}
/* Al plató del debat (a pantalla completa), per sobre de la franja inferior */
body:has(.db-theater) .call-ui { top: calc(112px + env(safe-area-inset-top)); bottom: auto; }
body:has(.db-theater) .call-ask { order: 1; }
@media (max-width: 640px) { body:has(.db-theater) .call-ui { top: calc(172px + env(safe-area-inset-top)); } }
/* Debat entre amics en pantalla estreta: el medidor té una línia per candidat, i els rellotges i el botó de trucada van a sota */
@media (max-width: 900px) {
  body:has(.dbm-meters) { --dbm-rows: 2; }
  body:has(.dbm-meters li:nth-child(3)) { --dbm-rows: 3; }
  body:has(.dbm-meters li:nth-child(4)) { --dbm-rows: 4; }
  .db-theater:has(.dbm-meters) .db-clocks { top: calc(70px + var(--dbm-rows) * 24px + 22px); }
  body:has(.dbm-meters) .call-ui { top: calc(70px + var(--dbm-rows) * 24px + 64px + env(safe-area-inset-top)); }
}

/* ---------- Xats (xat.js): el privat entre amics i el dels equips de campanya ---------- */
.xat { position: relative; display: grid; overflow: hidden; }
.xat-head { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-bottom: 2px solid var(--ink); background: var(--card); }
.xat-back { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; color: var(--ink); font-weight: 900; font-size: 1.2rem; text-decoration: none; }
.xat-back:hover { background: var(--paper); }
.xat-head .ami-chat-who { display: flex; align-items: center; gap: 10px; margin-right: auto; min-width: 0; cursor: pointer; }
.xat-head .ami-chat-who > span { display: grid; min-width: 0; }
.xat-head .ami-chat-who b { font-family: var(--display); font-weight: 900; font-size: 1.05rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.xat-head .ami-chat-who small { font-size: .76rem; color: var(--ink-2); font-weight: 700; min-height: 1em; }
.xat-acts { display: flex; gap: 6px; }
.xat-act { display: grid; place-items: center; width: 38px; height: 38px; padding: 0; border: 2px solid var(--ink); border-radius: 50%; background: var(--card); color: var(--ink); font-size: 1rem; cursor: pointer; box-shadow: 2px 2px 0 var(--ink); }
.xat-act:hover { background: var(--yellow); }
.xat-act:active { transform: translate(2px, 2px); box-shadow: none; }
.xat-typing { color: #1f8f4e; }
.xat-typing i { display: inline-block; width: 4px; height: 4px; margin-left: 2px; border-radius: 50%; background: currentColor; animation: xatDot 1s infinite; }
.xat-typing i:nth-child(2) { animation-delay: .15s; }
.xat-typing i:nth-child(3) { animation-delay: .3s; }
@keyframes xatDot { 0%, 60%, 100% { opacity: .25; transform: none; } 30% { opacity: 1; transform: translateY(-2px); } }

.xat-log { overflow-y: auto; overscroll-behavior: contain; padding: 12px 14px 18px; display: flex; flex-direction: column; background-color: var(--paper); background-image: radial-gradient(rgba(23, 23, 61, .07) 1px, transparent 1px); background-size: 14px 14px; }
.xat-intro { align-self: center; max-width: 420px; margin: 4px 0 10px; padding: 7px 12px; border-radius: 10px; background: #fff8dc; border: 1.5px solid rgba(23, 23, 61, .25); font-size: .76rem; text-align: center; color: var(--ink-2); }
.xat-empty { align-self: center; margin: auto 0; padding: 18px; text-align: center; color: var(--ink-2); font-weight: 700; }
.xat-day { position: sticky; top: 0; z-index: 2; align-self: center; margin: 10px 0 6px; }
.xat-day span { display: inline-block; padding: 3px 10px; border: 1.5px solid var(--ink); border-radius: 99px; background: var(--card); font-size: .72rem; font-weight: 800; }
.xat-new { display: flex; align-items: center; gap: 8px; margin: 10px 0 4px; color: #d93025; font-size: .72rem; font-weight: 900; text-transform: uppercase; letter-spacing: .05em; }
.xat-new::before, .xat-new::after { content: ""; flex: 1; height: 2px; background: currentColor; opacity: .5; }
.xat-sys { align-self: center; max-width: 92%; margin: 8px 0; padding: 6px 12px; border-radius: 10px; background: #17173d; color: #fff; font-size: .78rem; font-weight: 700; text-align: center; }
.xat-sys a { color: var(--yellow); }

.xat-m { position: relative; display: grid; grid-template-columns: 32px minmax(0, 1fr); column-gap: 8px; align-items: end; margin-top: 2px; max-width: 100%; }
.xat-m.first { margin-top: 10px; }
.xat-m.me { grid-template-columns: minmax(0, 1fr); justify-items: end; }
.xat-av { grid-row: 1; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; overflow: hidden; background: var(--pc); color: #fff; border: 2px solid var(--ink); font-weight: 900; font-size: .9rem; }
.xat-av img { width: 100%; height: 100%; object-fit: cover; }
.xat-av.sp { visibility: hidden; }
.xat-sig { font-size: .58rem; letter-spacing: -.02em; }
.xat-b { position: relative; justify-self: start; max-width: min(80%, 520px); padding: 7px 12px; border: 2px solid var(--ink); border-radius: 6px 18px 18px 6px; background: var(--card); line-height: 1.38; outline: none; }
.xat-m.first .xat-b { border-top-left-radius: 18px; }
.xat-m.last .xat-b { border-bottom-left-radius: 18px; box-shadow: 2px 2px 0 var(--ink); }
.xat-m.me .xat-b { justify-self: end; border-radius: 18px 6px 6px 18px; background: #ffe680; }
.xat-m.me.first .xat-b { border-top-right-radius: 18px; }
.xat-m.me.last .xat-b { border-bottom-right-radius: 18px; }
.xat-b:focus-visible { box-shadow: 0 0 0 3px #4d7cfe; }
.xat-b p { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; font-size: .94rem; }
.xat-b a { color: #2a4fd6; font-weight: 700; word-break: break-all; }
.xat-who { display: flex; align-items: center; gap: 6px; margin-bottom: 2px; color: var(--ink); font-size: .76rem; font-weight: 900; }
.xat-who i { padding: 0 5px; border-radius: 5px; background: var(--pc); color: #fff; font-style: normal; font-size: .64rem; }
.xat-m.big .xat-b { padding: 0; border: 0; background: none; box-shadow: none; }
.xat-m.big .xat-b p { font-size: 2.6rem; line-height: 1.1; }
.xat-meta { grid-column: 2; margin: 2px 4px 0; font-size: .66rem; font-weight: 700; color: var(--ink-2); }
.xat-m.me .xat-meta { grid-column: 1; }
.xat-seen { align-self: flex-end; margin: 1px 4px 0; font-size: .66rem; font-weight: 900; color: #2a4fd6; }
.xat-quote { display: grid; gap: 1px; width: 100%; margin: 2px 0 5px; padding: 4px 8px; border: 0; border-left: 3px solid var(--ink); border-radius: 6px; background: rgba(23, 23, 61, .07); text-align: left; font: inherit; font-size: .8rem; color: var(--ink); cursor: pointer; }
.xat-quote b { font-size: .72rem; }
.xat-quote span { overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; color: var(--ink-2); }
.xat-reacts { display: flex; flex-wrap: wrap; gap: 4px; margin: 5px 0 -16px; position: relative; z-index: 1; }
.xat-m:has(.xat-reacts) { margin-bottom: 14px; }
.xat-reacts button { display: inline-flex; align-items: center; gap: 2px; padding: 1px 6px; border: 1.5px solid var(--ink); border-radius: 99px; background: var(--card); font-size: .85rem; cursor: pointer; line-height: 1.3; }
.xat-reacts button.on { background: #cfe0ff; }
.xat-reacts small { font-size: .7rem; font-weight: 900; }
.xat-m.flash .xat-b { animation: xatFlash 1.4s ease; }
@keyframes xatFlash { 0%, 60% { box-shadow: 0 0 0 4px #4d7cfe; } 100% { box-shadow: none; } }
.xat-burst { position: absolute; left: 50%; top: 50%; font-size: 2.2rem; pointer-events: none; animation: xatBurst .7s ease-out forwards; }
@keyframes xatBurst { 0% { transform: translate(-50%, -50%) scale(.3); opacity: 1; } 60% { transform: translate(-50%, -70%) scale(1.25); opacity: 1; } 100% { transform: translate(-50%, -110%) scale(1); opacity: 0; } }
.xat-tools { position: absolute; z-index: 3; top: -16px; right: 8px; display: flex; gap: 2px; padding: 2px; border: 1.5px solid var(--ink); border-radius: 99px; background: var(--card); box-shadow: 2px 2px 0 var(--ink); }
.xat-m.me .xat-tools { right: auto; left: 8px; }
.xat-m:not(:hover) .xat-tools { display: none; }
.xat-tools button { width: 28px; height: 26px; padding: 0; border: 0; border-radius: 99px; background: none; font-size: .9rem; cursor: pointer; color: var(--ink); }
.xat-tools button:hover { background: var(--paper); }
.xat-card { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 8px 10px; min-width: min(250px, 62vw); margin: 2px 0; padding: 8px; border: 2px solid var(--ink); border-radius: 12px; background: #fff; }
.xat-card-i { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--yellow); border: 2px solid var(--ink); font-size: 1.2rem; }
.xat-card.k-call .xat-card-i { background: #3ddc84; }
.xat-card.k-duel .xat-card-i { background: #ff8a5c; }
.xat-card > span:nth-child(2) { display: grid; min-width: 0; }
.xat-card b { font-size: .9rem; }
.xat-card small { font-size: .74rem; color: var(--ink-2); }
.xat-card em { font-size: .74rem; color: var(--ink-2); font-style: normal; }

.xat-foot { border-top: 2px solid var(--ink); background: var(--card); padding: 8px 10px calc(8px + env(safe-area-inset-bottom)); display: grid; gap: 6px; }
.xat-form { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: end; gap: 8px; }
.xat-form textarea { min-height: 42px; max-height: 132px; padding: 10px 14px; border: 2px solid var(--ink); border-radius: 21px; resize: none; font: 600 .95rem/1.35 var(--sans); background: var(--paper); color: var(--ink); overflow-y: auto; }
.xat-form textarea:focus { outline: none; background: #fff; box-shadow: 0 0 0 3px rgba(77, 124, 254, .35); }
.xat-emo-btn { width: 42px; height: 42px; padding: 0; border: 0; border-radius: 50%; background: none; font-size: 1.35rem; cursor: pointer; }
.xat-emo-btn:hover { background: var(--paper); }
.xat-send { display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 2px solid var(--ink); border-radius: 50%; background: var(--red); color: #fff; cursor: pointer; box-shadow: 2px 2px 0 var(--ink); transition: transform .1s, opacity .15s; }
.xat-send:disabled { opacity: .35; box-shadow: none; cursor: default; }
.xat-send:not(:disabled):active { transform: translate(2px, 2px); box-shadow: none; }
.xat-emo { display: grid; grid-template-columns: repeat(auto-fill, minmax(38px, 1fr)); gap: 2px; max-height: 150px; overflow-y: auto; padding: 4px; border: 2px solid var(--ink); border-radius: 12px; background: var(--paper); }
.xat-emo[hidden], .xat-chips[hidden], .xat-reply[hidden] { display: none; }
.xat-emo button { height: 38px; border: 0; border-radius: 8px; background: none; font-size: 1.3rem; cursor: pointer; }
.xat-emo button:hover { background: #fff; }
.xat-chips { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: 1px 1px 3px; }
.xat-chips button { flex: none; padding: 5px 11px; border: 1.5px solid var(--ink); border-radius: 99px; background: var(--paper); font: 700 .8rem var(--sans); color: var(--ink); cursor: pointer; }
.xat-chips button:hover { background: var(--yellow); }
.xat-reply { display: flex; align-items: center; gap: 8px; padding: 6px 10px; border-left: 4px solid #4d7cfe; border-radius: 8px; background: #eef3ff; }
.xat-reply span { flex: 1; min-width: 0; display: grid; font-size: .8rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.xat-reply span b { font-size: .74rem; color: #2a4fd6; }
.xat-reply button { border: 0; background: none; font-size: 1rem; cursor: pointer; color: var(--ink); }
.xat-down { position: absolute; z-index: 4; right: 16px; bottom: 96px; display: grid; place-items: center; width: 42px; height: 42px; border: 2px solid var(--ink); border-radius: 50%; background: var(--card); box-shadow: 2px 2px 0 var(--ink); font-weight: 900; font-size: 1.1rem; cursor: pointer; color: var(--ink); }
.xat-down b { position: absolute; top: -8px; right: -6px; min-width: 18px; padding: 0 4px; border-radius: 99px; background: var(--red); color: #fff; font-size: .68rem; }
.xat-down b:empty { display: none; }
.xat-down[hidden] { display: none; }

.xat-sheet-bg { position: fixed; inset: 0; z-index: 120; display: grid; place-items: center; background: rgba(10, 10, 30, .45); }
.xat-sheet { width: min(360px, calc(100vw - 32px)); display: grid; gap: 10px; padding: 14px; border: 2px solid var(--ink); border-radius: 18px; background: var(--card); box-shadow: 4px 4px 0 var(--ink); }
.xat-sheet-t { margin: 0; padding: 6px 10px; border-radius: 10px; background: var(--paper); font-size: .84rem; color: var(--ink-2); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }
.xat-sheet-r { display: flex; justify-content: space-between; gap: 4px; }
.xat-sheet-r button { width: 46px; height: 46px; border: 2px solid transparent; border-radius: 50%; background: var(--paper); font-size: 1.5rem; cursor: pointer; transition: transform .1s; }
.xat-sheet-r button:hover { transform: scale(1.15); }
.xat-sheet-r button.on { border-color: var(--ink); background: #cfe0ff; }
.xat-sheet-a { display: grid; }
.xat-sheet-a button { padding: 11px 6px; border: 0; border-top: 1.5px solid rgba(23, 23, 61, .12); background: none; text-align: left; font: 700 .95rem var(--sans); color: var(--ink); cursor: pointer; }
.xat-sheet-a button:hover { background: var(--paper); }
.xat-sheet-a .danger, .xat-menu .danger { color: #c62828; }
@media (max-width: 640px) {
  .xat-sheet-bg { place-items: end center; }
  .xat-sheet { width: 100vw; border-radius: 20px 20px 0 0; border-bottom: 0; padding-bottom: calc(14px + env(safe-area-inset-bottom)); animation: xatUp .2s ease; }
}
@keyframes xatUp { from { transform: translateY(40px); opacity: .4; } }
.xat-menu { position: fixed; z-index: 110; display: grid; min-width: 220px; padding: 6px; border: 2px solid var(--ink); border-radius: 14px; background: var(--card); box-shadow: 4px 4px 0 var(--ink); }
.xat-menu button { padding: 10px 12px; border: 0; border-radius: 8px; background: none; text-align: left; font: 700 .92rem var(--sans); color: var(--ink); cursor: pointer; }
.xat-menu button:hover { background: var(--paper); }

/* El xat privat: una targeta alta; en mòbil, a pantalla completa com una app de missatges */
.ami-chat.xat { grid-template-rows: auto minmax(0, 1fr) auto; height: min(760px, calc(100dvh - 190px)); min-height: 440px; padding: 0; gap: 0; }
@media (max-width: 640px) {
  .ami-chat.xat { position: fixed; inset: 0; z-index: 70; height: auto; min-height: 0; border: 0; border-radius: 0; box-shadow: none; padding-top: env(safe-area-inset-top); }
  .xat-b { max-width: 84%; }
}
/* El xat dels equips de campanya */
.simchat.xat { position: fixed; grid-template-rows: auto auto minmax(0, 1fr) auto auto; }
.simchat .xat-head { background: #17173d; color: #fff; border-bottom-color: #17173d; }
.simchat .xat-head .xat-act { background: transparent; color: #fff; border-color: #fff; box-shadow: none; }
.simchat-ttl { display: grid; margin-right: auto; }
.simchat-ttl b { font-family: var(--display); font-weight: 900; }
.simchat-ttl small { font-size: .74rem; opacity: .75; font-weight: 700; }
.simchat-tabs button { padding: 4px 10px 4px 4px; }
.simchat-tabs button:not(.priv) { padding-left: 10px; }
.simchat-tabs button i { width: auto; height: 22px; min-width: 22px; padding: 0 4px; display: grid; place-items: center; border-radius: 99px; background: var(--pc); color: #fff; border: 1.5px solid var(--ink); font-style: normal; font-size: .6rem; font-weight: 900; }
.simchat-tabs button span { max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.simchat .xat-down { bottom: 108px; }
.simchat.composing .xat-foot { display: none; }
.simchat.composing { grid-template-rows: auto auto minmax(0, 1fr) auto; }
@media (max-width: 640px) {
  .simchat.xat { inset: 0; width: 100vw; height: 100dvh; right: 0; bottom: 0; border: 0; border-radius: 0; box-shadow: none; padding-top: env(safe-area-inset-top); }
}

.xat-card > .btn, .xat-card > em { grid-column: 1 / -1; justify-self: stretch; text-align: center; }
/* Amb el xat dels equips obert, la trucada al costat (ordinador) o amagada si no hi ets (mòbil, xat a pantalla completa) */
body:has(.simchat) .call-ui { right: calc(min(400px, 100vw - 32px) + 30px); }
@media (max-width: 640px) { body:has(.simchat) .call-ui { right: 12px; } body:has(.simchat) .call-ui.pill, body:has(.ami-chat.xat) .call-ui.pill { display: none; } }

/* ---------- Trucada entrant (amistat.js): a pantalla completa, com al mòbil ---------- */
.ring { position: fixed; inset: 0; z-index: 130; display: grid; place-items: center; padding: max(24px, env(safe-area-inset-top)) 20px max(28px, env(safe-area-inset-bottom)); background: radial-gradient(circle at 50% 30%, #2d2d6b 0%, #17173d 55%, #0c0c26 100%); color: #fff; animation: ringIn .25s ease; }
@keyframes ringIn { from { opacity: 0; transform: scale(1.04); } }
.ring-in { width: min(420px, 100%); height: 100%; max-height: 720px; display: grid; grid-template-rows: auto 1fr auto auto auto; justify-items: center; text-align: center; gap: 10px; }
.ring-k { margin: 0; font-size: .84rem; font-weight: 800; letter-spacing: .04em; opacity: .8; }
.ring-av { align-self: center; position: relative; border-radius: 50%; }
.ring-av .avatar { width: 128px !important; height: 128px !important; border: 4px solid #fff; font-size: 3.4rem; }
.ring-av::before, .ring-av::after { content: ""; position: absolute; inset: -6px; border-radius: 50%; border: 3px solid rgba(61, 220, 132, .7); animation: ringWave 2s ease-out infinite; }
.ring-av::after { animation-delay: 1s; }
@keyframes ringWave { from { transform: scale(1); opacity: .9; } to { transform: scale(1.7); opacity: 0; } }
.ring h2 { margin: 6px 0 0; font-family: var(--display); font-weight: 900; font-size: clamp(1.8rem, 7vw, 2.4rem); color: #fff; }
.ring-s { margin: 0; font-size: 1.05rem; opacity: .85; }
.ring-s i { display: inline-block; width: 5px; height: 5px; margin-left: 3px; border-radius: 50%; background: currentColor; animation: xatDot 1.2s infinite; }
.ring-s i:nth-child(2) { animation-delay: .2s; } .ring-s i:nth-child(3) { animation-delay: .4s; }
.ring-btns { display: flex; justify-content: center; gap: clamp(20px, 9vw, 48px); margin-top: 28px; }
.ring-b { display: grid; justify-items: center; gap: 8px; padding: 0; border: 0; background: none; color: #fff; font: 800 .86rem var(--sans); cursor: pointer; }
.ring-b span { display: grid; place-items: center; width: 70px; height: 70px; border-radius: 50%; font-size: 1.9rem; box-shadow: 0 6px 18px rgba(0, 0, 0, .35); transition: transform .12s; }
.ring-b:hover span, .ring-b:focus-visible span { transform: scale(1.08); }
.ring-b.no span { background: #e0302a; }
.ring-b.ok span { background: #1fbf5b; animation: ringBounce 1.2s ease-in-out infinite; }
.ring-b.vid span { background: #2d7cf0; }
@keyframes ringBounce { 0%, 100% { transform: translateY(0); } 30% { transform: translateY(-6px); } 50% { transform: translateY(0); } }
@media (prefers-reduced-motion: reduce) { .ring-av::before, .ring-av::after, .ring-b.ok span { animation: none; } }

/* Avís per activar les notificacions (pestanya Amics) */
.ami-notif { display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: #fff8dc; }
.ami-notif > span { font-size: 1.6rem; }
.ami-notif > div { flex: 1; display: grid; min-width: 0; }
.ami-notif small { color: var(--ink-2); font-size: .82rem; }

/* Estat de la trucada a la targeta del xat */
.xat-card.st-ring .xat-card-i { animation: ringBounce 1.2s ease-in-out infinite; }
.xat-card.st-no .xat-card-i, .xat-card.st-perduda .xat-card-i, .xat-card.st-fi .xat-card-i { background: #ffb4ad; }
.xat-card.st-perduda small, .xat-card.st-fi small { color: #c62828; font-weight: 800; }

/* ---------- Pestanya Amics (amistat.js): xats a l'esquerra, afegir amics a la dreta ---------- */
.amx { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 18px; align-items: start; }
.amx.empty { grid-template-columns: minmax(0, 640px); justify-content: center; }
.amx-main, .amx-side { display: grid; gap: 14px; min-width: 0; }
.amx-side { position: sticky; top: 84px; }
.amx .card { padding: 16px; margin: 0; }
.amx-h { display: flex; align-items: center; gap: 8px; margin: 0; font-family: var(--display); font-weight: 900; font-size: 1.15rem; letter-spacing: -.01em; text-transform: none; }
.amx-n { min-width: 22px; padding: 1px 7px; border-radius: 99px; background: var(--red); color: #fff; font: 900 .74rem var(--sans); text-align: center; }
.amx-n.soft { background: var(--paper); color: var(--ink-2); border: 1.5px solid rgba(23, 23, 61, .2); }
.amx-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.amx-addbtn { display: none; }
.amx-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.amx-list .amx-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 8px; border-radius: 14px; }
.amx-chats .amx-row { grid-template-columns: auto minmax(0, 1fr); }
.amx-chats .amx-row:hover, .amx-chats .amx-row:focus-within { background: var(--paper); }
.amx-av { display: inline-grid; border-radius: 50%; cursor: pointer; }
.amx-av:focus-visible { outline: 3px solid #4d7cfe; outline-offset: 2px; }
.amx-go { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 10px; min-width: 0; color: var(--ink); text-decoration: none; }
.amx-mid { display: grid; gap: 1px; min-width: 0; }
.amx-mid b { font-size: 1rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.amx-mid small { font-size: .84rem; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.amx-mid em { font-style: normal; font-weight: 800; }
.amx-mid em.ok { color: #1f8f4e; }
.amx-mid em.ko { color: #c62828; }
.amx-new { color: var(--ink-2); font-style: italic; }
.amx-meta { display: grid; justify-items: end; gap: 4px; }
.amx-meta time { font-size: .74rem; font-weight: 700; color: var(--ink-2); white-space: nowrap; }
.amx-dot { width: 11px; height: 11px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 2px var(--card); }
.amx-row.unread .amx-mid b { font-weight: 900; }
.amx-row.unread .amx-mid small { color: var(--ink); font-weight: 700; }
.amx-row.unread .amx-meta time { color: var(--red); }
.amx-filter { width: 100%; margin: 0 0 8px; padding: 9px 12px; border: 2px solid var(--ink); border-radius: 12px; font: 600 .92rem var(--sans); background: var(--paper); color: var(--ink); }
.amx-none { padding: 12px 8px; color: var(--ink-2); }
.amx-btns { display: flex; gap: 6px; }

/* Sol·licituds rebudes: el primer que es veu */
.amx-req { background: #fff3c4; }
.amx-req .amx-h { margin-bottom: 6px; }

/* Avís per activar les notificacions: discret i es pot treure */
.amx-notif { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 2px dashed rgba(23, 23, 61, .35); border-radius: 14px; background: #eef3ff; }
.amx-notif > span { font-size: 1.4rem; }
.amx-notif > div { flex: 1; display: grid; min-width: 0; }
.amx-notif b { font-size: .92rem; }
.amx-notif small { font-size: .8rem; color: var(--ink-2); }
.amx-x { width: 30px; height: 30px; padding: 0; border: 0; border-radius: 50%; background: none; color: var(--ink-2); cursor: pointer; }
.amx-x:hover { background: rgba(23, 23, 61, .08); }

/* Afegir amics */
.amx-add { display: grid; gap: 12px; }
.amx-lead { margin: -4px 0 0; color: var(--ink-2); }
.amx-search { display: flex; align-items: center; gap: 8px; padding: 4px 4px 4px 12px; border: 2px solid var(--ink); border-radius: 14px; background: var(--card); }
.amx-search:focus-within { box-shadow: 0 0 0 3px rgba(77, 124, 254, .35); }
.amx-search input { flex: 1; min-width: 0; padding: 7px 0; border: 0; outline: none; background: none; font: 600 .95rem var(--sans); color: var(--ink); }
.amx-link { display: grid; gap: 8px; padding-top: 12px; border-top: 1.5px dashed rgba(23, 23, 61, .25); }
.amx-link p { margin: 0; font-size: .86rem; font-weight: 700; }
.amx-link code { display: block; padding: 7px 10px; border-radius: 10px; background: var(--paper); font-size: .8rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.amx-share { display: flex; flex-wrap: wrap; gap: 6px; }
.amx-wa { background: #25d366; color: #0b3d1e; }
.amx-tip { margin: 0; font-size: .78rem; color: var(--ink-2); }
.amx-add.hero { padding: 24px; gap: 14px; }
.amx-add.hero .amx-h { font-size: 1.5rem; }
.amx-add.hero .amx-search { padding: 6px 6px 6px 14px; }

/* Sol·licituds enviades: plegades */
.amx-sent summary { display: flex; align-items: center; gap: 8px; cursor: pointer; font-weight: 800; list-style: none; }
.amx-sent summary::-webkit-details-marker { display: none; }
.amx-sent summary::after { content: "▾"; margin-left: auto; transition: transform .15s; }
.amx-sent[open] summary::after { transform: rotate(180deg); }
.amx-sent[open] .amx-list { margin-top: 8px; }

@media (max-width: 860px) {
  .amx { grid-template-columns: minmax(0, 1fr); }
  .amx-side { position: static; }
  .amx-addbtn { display: inline-flex; }
}
@media (max-width: 480px) {
  .amx .card { padding: 12px; }
  .amx-list .amx-row { gap: 10px; padding: 7px 4px; }
  .amx-btns .btn { padding-inline: 10px; }
}

/* ---------- Secció Amics: pestanyes, «Juga amb un amic», Reptes i rànquing entre amics ---------- */
.social-tabs a[data-rp-tab][data-n]:not([data-n=""])::after { content: attr(data-n); display: inline-grid; place-items: center; min-width: 17px; height: 17px; margin-left: 6px; padding: 0 4px; border-radius: 99px; background: #2a4fd6; color: #fff; font: 900 .66rem/1 var(--sans); }
.social-tabs { max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.social-tabs a { white-space: nowrap; }

/* Juga amb un amic */
.amx-play { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 14px; border: 2px solid var(--ink); border-radius: 18px; background: #17173d; color: #fff; box-shadow: 4px 4px 0 var(--ink); }
.amx-play > b { font-family: var(--display); font-weight: 900; font-size: 1.05rem; }
.amx-play-btns { display: flex; gap: 8px; flex-wrap: wrap; margin-left: auto; }
.amx-play-btns > * { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border: 2px solid #fff; border-radius: 99px; background: transparent; color: #fff; font: 800 .9rem var(--sans); text-decoration: none; cursor: pointer; }
.amx-play-btns > *:hover { background: var(--yellow); color: #17173d; border-color: var(--yellow); }
.amx-play-btns span { font-size: 1.05rem; }
@media (max-width: 560px) {
  .amx-play { padding: 12px; }
  .amx-play-btns { margin-left: 0; width: 100%; display: grid; grid-template-columns: repeat(auto-fit, minmax(70px, 1fr)); }
  .amx-play-btns > * { flex-direction: column; justify-content: center; gap: 2px; padding: 8px 4px; border-radius: 14px; font-size: .78rem; }
  .amx-play-btns span { font-size: 1.35rem; }
}
/* A qui? */
.amx-pick-t { margin: 0; font-family: var(--display); font-weight: 900; font-size: 1.1rem; }
.amx-pick-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; max-height: min(52vh, 420px); overflow-y: auto; }
.amx-pick-list button { width: 100%; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; padding: 8px; border: 0; border-radius: 12px; background: none; text-align: left; font: inherit; color: var(--ink); cursor: pointer; }
.amx-pick-list button:hover, .amx-pick-list button:focus-visible { background: var(--paper); }
.amx-pick-list i { font-style: normal; font-size: 1.3rem; color: var(--ink-2); }

/* Reptes */
.rp { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 18px; align-items: start; }
.rp .card { padding: 16px; margin: 0; }
.rp-side { display: grid; gap: 14px; position: sticky; top: 84px; }
.rp-list { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 2px; }
.rp-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 8px; border-radius: 14px; color: var(--ink); text-decoration: none; }
.rp-row:hover, .rp-row:focus-visible { background: var(--paper); }
.rp-big { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--paper); border: 2px solid var(--ink); font-size: 1.2rem; }
.rp-empty { padding: 14px 8px; color: var(--ink-2); }
.rp-new { display: grid; gap: 6px; }
.rp-new .amx-h { margin-bottom: 4px; }
.rp-opt { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; width: 100%; padding: 10px; border: 2px solid var(--ink); border-radius: 14px; background: var(--card); color: var(--ink); font: inherit; text-align: left; text-decoration: none; cursor: pointer; box-shadow: 2px 2px 0 var(--ink); }
.rp-opt:hover { background: #fff8dc; }
.rp-opt:active { transform: translate(2px, 2px); box-shadow: none; }
.rp-opt > span:nth-child(2) { display: grid; min-width: 0; }
.rp-opt b { font-size: .95rem; }
.rp-opt small { font-size: .78rem; color: var(--ink-2); }
.rp-opt i { font-style: normal; font-size: 1.3rem; color: var(--ink-2); }
.rp-ico { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; background: var(--yellow); border: 2px solid var(--ink); font-size: 1.15rem; }
.rp-new .amx-tip { margin-top: 4px; }
.rp-join { display: grid; gap: 8px; }
.rp-join .join-form { display: flex; gap: 8px; }
.rp-join .join-form input { flex: 1; min-width: 0; padding: 10px 12px; border: 2px solid var(--ink); border-radius: 12px; background: var(--paper); font: 900 1.1rem var(--display); letter-spacing: .2em; text-align: center; text-transform: uppercase; color: var(--ink); }
@media (max-width: 860px) {
  .rp { grid-template-columns: minmax(0, 1fr); }
  .rp-side { position: static; }
}

/* Rànquing entre amics */
.rk-amics { display: grid; gap: 14px; }
.rk-amics .card { padding: 16px; margin: 0; }
.rk-amics .amx-h { margin-bottom: 8px; }
.rk-amics .amx-h small { font: 700 .8rem var(--sans); }
.rk-amics .lb-row strong small { margin-left: 6px; font-size: .74rem; color: var(--ink-2); }
.rk-pending { margin: 10px 0 0; font-size: .86rem; color: var(--ink-2); }
.rk-pending span { font-weight: 800; color: var(--ink); cursor: pointer; }
.rk-empty { padding: 18px; }
.rank-tabs { max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.rank-tabs button { white-space: nowrap; }

/* ---------- Instal·lar l'app (app.js): finestra des de baix i pantalla del tutorial ---------- */
.ins-bg { position: fixed; inset: 0; z-index: 115; display: grid; place-items: end center; padding: 16px; background: rgba(10, 10, 30, .5); animation: nxsFade .2s ease; }
.ins { position: relative; width: min(440px, 100%); display: grid; gap: 14px; padding: 22px 20px 18px; border-radius: 22px; animation: xatUp .25s ease; }
.ins-x { position: absolute; top: 10px; right: 10px; width: 34px; height: 34px; border: 0; border-radius: 50%; background: none; font-size: 1rem; color: var(--ink-2); cursor: pointer; }
.ins-x:hover { background: var(--paper); }
.ins-head { display: flex; align-items: center; gap: 14px; }
.ins-head img { width: 64px; height: 64px; border-radius: 16px; border: 2px solid var(--ink); box-shadow: 3px 3px 0 var(--ink); }
.ins-head h3 { margin: 0; font-family: var(--display); font-weight: 900; font-size: 1.3rem; line-height: 1.1; }
.ins-head p { margin: 2px 0 0; font-size: .82rem; color: var(--ink-2); font-weight: 700; }
.ins-why { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.ins-why li { display: flex; align-items: center; gap: 10px; font-size: .92rem; font-weight: 600; }
.ins-why span { display: grid; place-items: center; width: 32px; height: 32px; flex: none; border-radius: 10px; background: var(--paper); font-size: 1rem; }
.ins-go { width: 100%; justify-content: center; }
.ins-small { margin: 0; font-size: .84rem; color: var(--ink-2); text-align: center; }
.ins-steps { list-style: none; margin: 0; padding: 12px; display: grid; gap: 10px; border: 2px dashed rgba(23, 23, 61, .3); border-radius: 14px; background: #fff8dc; }
.ins-steps li { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 10px; font-size: .92rem; line-height: 1.35; }
.ins-steps li > span { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--ink); color: #fff; font-weight: 900; font-size: .8rem; }
.ins-svg { width: 20px; height: 20px; vertical-align: -4px; color: #2a7cf6; }
.ins .btn.ghost { justify-self: center; }
@media (min-width: 641px) { .ins-bg { place-items: center; } }
/* Dins del tutorial de la primera visita */
.ins-onb { display: grid; gap: 12px; margin-top: 10px; text-align: left; }

.ins-steps li p { margin: 0; }
.ins-head { padding-right: 30px; }
/* Centre de control · estadística: recorreguts */
.ctu-funnels { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; }
.ctu-fn b { display: block; margin-bottom: 6px; }
.ctu-fn ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.ctu-fn li { display: grid; grid-template-columns: 1fr; gap: 2px; font-size: .82rem; }
.ctu-fn li i { display: block; height: 8px; border-radius: 99px; background: var(--blue, #2a4fd6); }
.ctu-fn li em { font-style: normal; font-weight: 800; font-size: .74rem; color: var(--ink-2); }
/* Centre de control · notificacions programades */
.ctl-push-prog { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; padding: 12px; border: 2px dashed rgba(23, 23, 61, .25); border-radius: 12px; background: #fff8dc; }
.ctl-days { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px; }
.ctl-days label { display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border: 1.5px solid var(--ink); border-radius: 99px; background: var(--card); font-weight: 700; font-size: .85rem; }
.ctl-check { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; }
.ctl-h3 { margin: 16px 0 4px; font-size: 1rem; }
.push-acts { display: flex; gap: 6px; flex-wrap: wrap; }

/* ---------- Capçalera de secció: sempre a la mateixa alçada ----------
   Com .page-head: el primer element 6px sota la barra i el títol 14px sota l'avantítol. */
.sh2-head, .pr, .apx-head, .ap-tool-head, .ap-chapter, #legal-root, #botiga-page, #pron-page, #nit-page { padding-top: 6px; }
.sh2-head { gap: 0; }
.sh2-head .kicker + .page-title, .pr > .kicker + .page-title, .apx-head .kicker + .page-title { margin-top: 14px; }
.sh2-head .page-title + p { margin-top: 4px; }
.apx-head { align-items: start; }
/* L'enlla «← Aprèn» ocupa l'alçada d'un avantítol (sobresurt una mica, però no desplaça el títol) */
.ap-crumb { margin-bottom: 14px; min-height: 18px; }
.ap-crumb a { padding: 2px 12px; margin: -5px 0; line-height: 18px; }
.ap-tool-hero { align-items: start; }
.ap-tool-hero .ap-title { margin-top: 0; }
@media (max-width: 760px) {
  .ap-tool-hero { grid-template-columns: minmax(0, 1fr) auto; }
  .ap-tool-hero .ap-tool-ico { order: 2; width: 52px; height: 52px; border-radius: 16px; }
  .ap-tool-hero .ap-tool-ico svg { width: 28px; height: 28px; }
}
.ap-crumb span { line-height: 18px; }
.ap-ch-head { align-items: start; }
.ap-ch-head .ap-title { margin-top: 0; }
.ap-ch-meta { margin-top: 10px; font-size: .78rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.ap-ch-meta a { color: var(--ink); }
#legal-root { padding-top: 4px; }
@media (max-width: 900px) {
  .ap-ch-headart { order: 2; }
}

/* ---------- Sala de premsa: widgets per a altres webs (#premsa/widgets) ---------- */
.pr-wg-link { display: grid; gap: 4px; margin: 18px 0; text-decoration: none; color: inherit; border-color: var(--blue); }
.pr-wg-link:hover { background: color-mix(in srgb, var(--blue) 8%, var(--card)); }
.pr-wg-link span { color: var(--ink-2); font-size: .92rem; }
.pr-wg { display: grid; gap: 18px; }
.pr-wg .lede { margin-top: 0; max-width: 60ch; }
.pr-wg-terms { display: grid; gap: 8px; font-size: .92rem; }
.pr-wg-item { display: grid; gap: 12px; }
.pr-wg-item h2 { font-family: var(--display); font-weight: 900; text-transform: uppercase; font-size: 1.15rem; letter-spacing: -.02em; }
.pr-wg-prov { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: .88rem; }
.pr-wg-prov select { padding: 6px 10px; border: 2px solid var(--ink); border-radius: 10px; background: var(--card); font: inherit; }
.pr-wg-prev { border: 2px dashed rgba(23, 23, 61, .3); border-radius: 12px; overflow: hidden; }
.pr-wg-prev iframe { display: block; width: 100%; border: 0; }
.pr-wg-code { display: grid; gap: 8px; justify-items: start; }
.pr-wg-code pre { margin: 0; width: 100%; overflow-x: auto; padding: 12px; border-radius: 10px; background: var(--ink); color: #f1e9d8; font-size: .8rem; line-height: 1.5; white-space: pre-wrap; word-break: break-all; }
.pr-wg > *, .pr-wg-item > * { min-width: 0; }

/* ---------- Sala de premsa: portada, kit, dades, guies i preguntes ---------- */
.pr-hub { display: grid; gap: 18px; max-width: 980px; }
.pr-hub > *, .pr-sec > * { min-width: 0; }
.pr-hub .lede { margin-top: 0; max-width: 62ch; }
.pr-nav { display: flex; gap: 6px; overflow-x: auto; padding: 2px 2px 8px; scrollbar-width: none; }
.pr-nav::-webkit-scrollbar { display: none; }
.pr-nav a { flex: none; display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border: 2px solid var(--ink); border-radius: 99px; background: var(--card); font-weight: 800; font-size: .82rem; text-decoration: none; color: inherit; box-shadow: 2px 2px 0 var(--ink); }
.pr-nav a.on { background: var(--ink); color: var(--card); }
.pr-figs { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
.pr-fig { padding: 14px; border: var(--bw) solid var(--ink); border-radius: var(--radius-sm); background: var(--card); box-shadow: var(--hard-sm); display: grid; gap: 2px; }
.pr-fig b { font-family: var(--display); font-weight: 900; font-size: 1.9rem; line-height: 1; letter-spacing: -.03em; }
.pr-fig span { font-size: .82rem; color: var(--ink-2); font-weight: 600; }
.pr-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.pr-card { display: grid; gap: 6px; align-content: start; text-decoration: none; color: inherit; transition: transform .15s var(--ease); }
.pr-card:hover { transform: translate(-2px, -2px); }
.pr-card-i { font-size: 1.6rem; }
.pr-card b { font-family: var(--display); font-weight: 900; text-transform: uppercase; font-size: 1rem; letter-spacing: -.02em; }
.pr-card span:last-child { color: var(--ink-2); font-size: .9rem; }
.pr-sec { display: grid; gap: 12px; }
.pr-sec h2, .pr-contact h2 { font-family: var(--display); font-weight: 900; text-transform: uppercase; font-size: 1.15rem; letter-spacing: -.02em; }
.pr-contact { display: grid; gap: 10px; background: color-mix(in srgb, var(--yellow) 22%, var(--card)); }
.pr-contact-row { display: flex; flex-wrap: wrap; gap: 8px; }
.pr-text { display: grid; gap: 6px; justify-items: start; padding: 12px; border: 2px dashed rgba(23, 23, 61, .25); border-radius: 12px; }
.pr-text small { font-weight: 800; font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.btn.sm { padding: 5px 12px; font-size: .82rem; }
.pr-logos { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.pr-logo { margin: 0; display: grid; gap: 6px; }
.pr-logo-prev { height: 120px; display: grid; place-items: center; padding: 14px; border: 2px solid var(--ink); border-radius: 12px; background: #fff; }
.pr-logo-prev.dark { background: var(--ink); }
.pr-logo-prev img { max-width: 100%; max-height: 92px; }
.pr-logo figcaption, .pr-shot figcaption { display: grid; gap: 2px; font-size: .85rem; font-weight: 700; }
.pr-logo figcaption span, .pr-shot figcaption span { font-weight: 600; color: var(--ink-2); }
.pr-colors { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.pr-color { display: grid; gap: 2px; text-align: left; padding: 0 0 10px; border: 2px solid var(--ink); border-radius: 12px; background: var(--card); overflow: hidden; cursor: pointer; }
.pr-color i { height: 54px; background: var(--c); border-bottom: 2px solid var(--ink); margin-bottom: 6px; }
.pr-color b, .pr-color code, .pr-color span { padding: 0 10px; }
.pr-color code { font-size: .8rem; }
.pr-color span { font-size: .75rem; color: var(--muted); }
.pr-fonts { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; }
.pr-fonts div { display: grid; gap: 4px; padding: 12px; border: 2px dashed rgba(23, 23, 61, .25); border-radius: 12px; font-size: .85rem; }
.pr-font-d { font-family: var(--display); font-weight: 900; font-size: 1.5rem; text-transform: uppercase; }
.pr-font-s { font-family: var(--sans); font-weight: 700; font-size: 1.5rem; }
.pr-shots { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.pr-shot { margin: 0; display: grid; gap: 6px; }
.pr-shot img { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: top; border: 2px solid var(--ink); border-radius: 10px; }
.pr-ul { margin: 0; padding-left: 20px; display: grid; gap: 6px; }
.pr-table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.pr-table th { text-align: left; font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding: 6px 8px; border-bottom: 2px solid var(--ink); white-space: nowrap; }
.pr-table td { padding: 6px 8px; border-bottom: 1px solid rgba(23, 23, 61, .12); font-variant-numeric: tabular-nums; }
.pr-table small.up { color: var(--ok); font-weight: 800; }
.pr-table small.down { color: var(--ko); font-weight: 800; }
.pr-scroll { max-height: 420px; overflow-y: auto; }
.pr-scroll thead th { position: sticky; top: 0; background: var(--card); }
.pr-dl { display: flex; flex-wrap: wrap; gap: 8px; }
.pr-seats23 { display: flex; flex-wrap: wrap; gap: 6px; }
.pr-seats23 span { display: inline-flex; gap: 6px; align-items: baseline; padding: 4px 10px; border: 2px solid var(--ink); border-radius: 99px; font-size: .82rem; font-weight: 700; background: var(--card); }
.pr-cal { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.pr-cal li { display: grid; grid-template-columns: minmax(120px, 200px) 1fr; gap: 10px; padding: 6px 0; border-bottom: 1px solid rgba(23, 23, 61, .12); font-size: .9rem; }
.pr-cal li.key b { color: var(--red); }
.pr-links { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.pr-linkc { display: grid; gap: 2px; padding: 12px; border: 2px solid var(--ink); border-radius: 12px; background: var(--card); text-decoration: none; color: inherit; box-shadow: 2px 2px 0 var(--ink); }
.pr-linkc span { font-size: .8rem; color: var(--ink-2); overflow-wrap: anywhere; }
.pr-chs { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.pr-ch { display: grid; gap: 6px; align-content: start; padding: 12px; border: 2px dashed rgba(23, 23, 61, .25); border-radius: 12px; }
.pr-ch small { font-weight: 800; font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.pr-ch h3 { font-size: 1rem; }
.pr-ch p { font-size: .88rem; color: var(--ink-2); }
.pr-ch-l { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: .82rem; font-weight: 700; }
.pr-faq { display: grid; gap: 10px; }
.pr-q summary { cursor: pointer; font-weight: 800; }
.pr-q p { margin-top: 8px; color: var(--ink-2); }
@media (max-width: 600px) {
  .pr-cal li { grid-template-columns: 1fr; gap: 2px; }
  .pr-fig b { font-size: 1.5rem; }
}

/* ---------- Aprèn: botó de tornar al costat del títol (sense fil d'Ariadna a sobre) ---------- */
.ap-titlerow { display: flex; align-items: flex-start; gap: 12px; }
.ap-titlerow .ap-title { margin: 0; }
.ap-back { flex: none; display: grid; place-items: center; width: 40px; height: 40px; margin-top: 2px; border: 2.5px solid var(--ink); border-radius: 12px; background: var(--card); color: var(--ink); box-shadow: 3px 3px 0 var(--ink); }
.ap-back:hover { background: var(--yellow); }
.ap-back svg { width: 20px; height: 20px; }
.ap-tool-hero { grid-template-columns: minmax(0, 1fr) auto; }
.ap-tool-hero .ap-lead { margin-top: 10px; }
.ap-ch-t { grid-column: 1 / -1; }
.pla-t { margin-bottom: 16px; }
.pla-head .ap-titlerow { margin-bottom: 8px; }
@media (max-width: 760px) {
  .ap-tool-hero .ap-tool-ico { display: none; }
  .ap-back { width: 36px; height: 36px; border-radius: 10px; }
}

/* Repte diari: troba l'error, classifica, resultats d'eleccions i llei d'Hondt */
.ferr { margin: 0; font-size: 1.12rem; font-weight: 600; line-height: 2.05; }
.ferr-t { font: inherit; font-weight: 800; color: inherit; padding: 2px 8px; border: 2px solid var(--ink); border-radius: 9px; background: var(--paper); cursor: pointer; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.ferr-t:hover:not(:disabled) { background: var(--yellow); }
.ferr-t:disabled { cursor: default; opacity: .75; }
.ferr-t.bad { background: var(--ok-soft); opacity: 1; }
.ferr-t.ko { background: var(--ko-soft); opacity: 1; }
.srt { display: grid; gap: 12px; }
.srt-card { min-height: 70px; display: grid; place-items: center; text-align: center; padding: 14px; border: 2px solid var(--ink); border-radius: 14px; background: var(--paper); font-weight: 800; font-size: 1.05rem; box-shadow: 4px 4px 0 var(--ink); }
.srt-b { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.srt-b .btn { justify-content: center; min-height: 48px; white-space: normal; }
.srt-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.srt-col b { display: block; font-size: .8rem; text-transform: uppercase; letter-spacing: .03em; margin-bottom: 6px; }
.srt-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 5px; }
.srt-col li { font-size: .82rem; font-weight: 700; padding: 5px 8px; border-radius: 8px; line-height: 1.2; }
.srt-col li.ok { background: var(--ok-soft); }
.srt-col li.ko { background: var(--ko-soft); }
.relx { display: grid; gap: 8px; margin-top: 12px; }
.relx-r { display: grid; grid-template-columns: 7.2em 1fr 2.6em; align-items: center; gap: 8px; font-weight: 700; font-size: .88rem; }
.relx-r i { display: block; height: 18px; width: var(--w); min-width: 4px; background: var(--c); border-radius: 5px; }
.relx-r b { text-align: right; font-weight: 900; }
.dh { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 12px; }
.dh > div { padding: 10px 6px; text-align: center; border: 2px solid var(--ink); border-radius: 12px; }
.dh > div.on { background: var(--yellow); }
.dh b { display: block; font-size: 1.3rem; font-weight: 900; }
.dh span { font-size: .8rem; font-weight: 700; }
