/* Tripletisme — estils
   Disseny: una taula de joc on el tauler d'acer és la peça forta; els panells que
   l'envolten són sobris. Signes verd/vermell només per a la polaritat. */
:root {
  --bg: #e8edef;
  --surface: #f7f9f9;
  --ink: #132229;
  --muted: #55666e;
  --line: #c7d2d6;
  --accent: #b25f27;
  --accent-ink: #ffffff;
  --pos-text: #15813f;
  --neg-text: #c2262b;

  --display: "Big Shoulders Display", "Arial Narrow", "Roboto Condensed", sans-serif;
  --body: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;

  /* Material del tauler i de les fitxes: igual en tots dos temes */
  --tauler: #22313a;
  --tauler-2: #2d3f4a;
  --tauler-linia: #17232a;
  --tauler-text: #eef3f4;
  --perill: rgba(255, 94, 98, 0.15);
  --perill-vora: rgba(255, 120, 110, 0.5);
  --jug-1: #ffffff;
  --jug-2: #e1e4de;
  --jug-vora: #a6ada5;
  --bot-1: #5f6970;
  --bot-2: #343c42;
  --bot-vora: #8d979e;
  --pos: #1fae5b;
  --neg: #e3373c;
  --signe-contorn: #10191e;
  --atr: #62ccff;
  --rep: #ffb84d;
  --exp: #ff5e62;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0d1519;
    --surface: #142026;
    --ink: #e1e9eb;
    --muted: #8c9ea5;
    --line: #26363e;
    --accent: #e28a4e;
    --accent-ink: #1b0e05;
    --pos-text: #4fd18a;
    --neg-text: #ff6b6f;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0d1519;
  --surface: #142026;
  --ink: #e1e9eb;
  --muted: #8c9ea5;
  --line: #26363e;
  --accent: #e28a4e;
  --accent-ink: #1b0e05;
  --pos-text: #4fd18a;
  --neg-text: #ff6b6f;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  font-size: 15px;
  line-height: 1.5;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}

.app {
  max-width: 1180px;
  margin: 0 auto;
  padding-block: 20px 48px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

/* ---------- Capçalera ---------- */
.capcalera {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px 28px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}
.marca { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.titol {
  margin: 0;
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(2.5rem, 7vw, 4.2rem);
  line-height: 0.86;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.05em 0.2em;
  text-wrap: balance;
}
.pols { display: inline-flex; gap: 0.08em; transform: translateY(-0.02em); }
.pols i {
  font-style: normal;
  width: 0.6em;
  height: 0.6em;
  border-radius: 50%;
  display: grid;
  place-items: center;
}
.pols svg { width: 70%; height: 70%; fill: none; stroke: #fff; stroke-width: 4; stroke-linecap: round; }
.pols .p { background: var(--pos); }
.pols .n { background: var(--neg); }
.lema { margin: 0; color: var(--muted); max-width: 52ch; }

.marcador {
  display: flex;
  gap: 18px;
  font-family: var(--mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}
.marcador span { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.marcador b {
  font-family: var(--display);
  font-size: 2rem;
  line-height: 1;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
}

/* ---------- Distribució ---------- */
.taula {
  display: grid;
  gap: 20px;
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas: "centre" "jug" "bot";
}
.centre { grid-area: centre; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.panell-jug { grid-area: jug; }
.panell-bot { grid-area: bot; }

@media (min-width: 640px) and (max-width: 979px) {
  .taula { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-areas: "centre centre" "jug bot"; }
}
@media (min-width: 980px) {
  .taula {
    grid-template-columns: 250px minmax(0, 1fr) 290px;
    grid-template-areas: "jug centre bot";
    align-items: start;
  }
}

.panell {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
  transition: border-color 0.25s;
}
.panell.actiu { border-color: var(--accent); }

.costat { display: flex; align-items: center; gap: 12px; }
.costat h2 {
  margin: 0;
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.6rem;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}
.costat p { margin: 2px 0 0; color: var(--muted); font-size: 13px; }
.costat .torn-marca {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  visibility: hidden;
}
.panell.actiu .torn-marca { visibility: visible; }

.etiqueta {
  margin: 0;
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--muted);
}

/* ---------- Fitxes (disc comú) ---------- */
.disc {
  position: relative;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 34% 28%, var(--c1) 0 28%, var(--c2) 78%);
  box-shadow:
    inset 0 0 0 2px var(--cv),
    inset 0 -3px 0 rgba(0, 0, 0, 0.1),
    0 2px 0 var(--cv),
    0 8px 14px -5px rgba(0, 0, 0, 0.55);
}
.jug > .disc, .disc.jug { --c1: var(--jug-1); --c2: var(--jug-2); --cv: var(--jug-vora); }
.bot > .disc, .disc.bot { --c1: var(--bot-1); --c2: var(--bot-2); --cv: var(--bot-vora); }
.bot > .disc::before, .disc.bot::before {
  content: "";
  position: absolute;
  inset: 13%;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.14);
}
.signe { width: 58%; height: 58%; fill: none; stroke-linecap: round; position: relative; }
.signe .contorn { stroke: var(--signe-contorn); stroke-width: 7; }
.signe .linia { stroke-width: 4; }
.pos .signe .linia { stroke: var(--pos); }
.neg .signe .linia { stroke: var(--neg); }

/* ---------- Base (reserva) ---------- */
.base { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; max-width: 230px; }
.slot {
  aspect-ratio: 1;
  max-width: 100%;
  border-radius: 50%;
  border: 1.5px dashed var(--line);
  display: grid;
  place-items: center;
}
button.slot { appearance: none; margin: 0; padding: 0; background: transparent; font: inherit; cursor: pointer; }
.slot.ple { border-color: transparent; }
.slot .disc {
  width: 100%;
  height: 100%;
  box-shadow: inset 0 0 0 1.5px var(--cv), 0 2px 0 var(--cv);
  transition: transform 0.15s;
}
.slot .signe { width: 66%; height: 66%; }
.triable .slot.ple:hover .disc { transform: translateY(-2px); }
.slot.triada { outline: 2.5px solid var(--accent); outline-offset: 2px; }
.slot.triada .disc { transform: translateY(-3px); }
button.slot:focus-visible { outline: 2.5px solid var(--accent); outline-offset: 2px; }
.slot.tornada .disc { animation: gira 0.6s ease-out; }
@keyframes gira { from { transform: rotateY(180deg) scale(0.7); } to { transform: rotateY(0) scale(1); } }
.base-compte .s { margin-left: 1px; }
.base-compte { margin: 0; font-size: 13px; color: var(--muted); }
.base-compte b { color: var(--ink); font-variant-numeric: tabular-nums; }

/* ---------- Ajuda ---------- */
.ajuda { margin: 0; font-size: 12.5px; color: var(--muted); }
kbd {
  font-family: var(--mono);
  font-size: 11px;
  padding: 1px 5px;
  border: 1px solid var(--line);
  border-bottom-width: 2px;
  border-radius: 4px;
  background: var(--bg);
  color: var(--ink);
}

/* ---------- Estat i tauler ---------- */
.estat {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 2.4em;
  font-weight: 500;
  max-width: 600px;
  width: 100%;
  margin: 0 auto;
}
.estat .punt { width: 13px; height: 13px; border-radius: 50%; flex: none; }
.estat[data-torn="jug"] .punt { background: var(--jug-1); box-shadow: 0 0 0 1.5px var(--jug-vora); }
.estat[data-torn="bot"] .punt { background: var(--bot-2); box-shadow: 0 0 0 1.5px var(--bot-vora); }
.estat[data-torn="cap"] .punt { background: var(--line); }
.estat .num {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.estat[data-torn="bot"]:not(.acabat) .text::after {
  content: "";
  display: inline-block;
  width: 1.2em;
  text-align: left;
  animation: punts 1.2s steps(4) infinite;
}
@keyframes punts { 0% { content: ""; } 25% { content: "."; } 50% { content: ".."; } 75% { content: "..."; } }

.tauler-marc {
  display: grid;
  grid-template-columns: 1.3rem minmax(0, 1fr);
  grid-template-rows: 1.3rem auto;
  gap: 8px;
  max-width: 600px;
  width: 100%;
  margin: 0 auto;
}
.coords {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
  display: grid;
  place-items: center;
  user-select: none;
}
.coords-cols { grid-column: 2; grid-row: 1; grid-template-columns: repeat(6, 1fr); }
.coords-files { grid-column: 1; grid-row: 2; grid-template-rows: repeat(6, 1fr); }

.tauler {
  grid-column: 2;
  grid-row: 2;
  position: relative;
  aspect-ratio: 1;
  max-width: 100%;
  background: var(--tauler);
  border-radius: 6px;
  box-shadow:
    0 0 0 5px var(--tauler-linia),
    0 0 0 6px rgba(255, 255, 255, 0.06),
    0 22px 40px -20px rgba(0, 0, 0, 0.6);
  touch-action: manipulation;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
/* Límit de la zona segura: tot el que queda fora és vora (zona de perill) */
.tauler::after {
  content: "";
  position: absolute;
  inset: calc(100% / 6);
  border: 1px dashed var(--perill-vora);
  border-radius: 2px;
  pointer-events: none;
}

.caselles {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  grid-template-rows: repeat(6, 1fr);
}
.casella {
  appearance: none;
  border: 0;
  margin: 0;
  padding: 0;
  position: relative;
  background-color: transparent;
  box-shadow: inset 0 0 0 0.5px var(--tauler-linia);
  cursor: pointer;
  transition: background-color 0.12s;
}
.casella.vora {
  background-image: repeating-linear-gradient(135deg, var(--perill) 0 5px, transparent 5px 11px);
}
.casella::after {
  content: "";
  position: absolute;
  inset: 41%;
  border-radius: 50%;
  background: var(--tauler-linia);
}
.casella:hover, .casella.triada { background-color: var(--tauler-2); }
.casella:focus-visible { outline: 2px solid var(--accent); outline-offset: -3px; }
.tauler.bloquejat .casella { cursor: default; }
.tauler.bloquejat .casella:hover { background-color: transparent; }

.capa-peces, .capa-fletxes { position: absolute; inset: 0; pointer-events: none; }
.capa-fletxes { width: 100%; height: 100%; overflow: visible; }

.peca, .ona {
  position: absolute;
  left: 0;
  top: 0;
  width: calc(100% / 6);
  height: calc(100% / 6);
  display: grid;
  place-items: center;
  transform: translate(calc(var(--c) * 100%), calc(var(--r) * 100%));
}
.peca { transition: transform 0.44s cubic-bezier(0.3, 1.25, 0.5, 1); }
.peca .disc { width: 74%; height: 74%; transition: opacity 0.4s, transform 0.4s; }
.peca.entra .disc { animation: cau 0.26s cubic-bezier(0.2, 0.9, 0.3, 1.2); }
@keyframes cau { from { transform: scale(1.45); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.peca.expulsada { transition: transform 0.44s cubic-bezier(0.5, 0, 0.9, 0.6); }
.peca.expulsada .disc { opacity: 0; transform: scale(0.55) rotate(40deg); }
.peca.tremola .disc { animation: tremola 0.36s; }
@keyframes tremola { 25% { transform: translateX(-6%); } 50% { transform: translateX(6%); } 75% { transform: translateX(-3%); } }
.peca.clic .disc { animation: clic 0.3s; }
@keyframes clic { 50% { transform: scale(0.9); } }
.peca.darrera .disc { outline: 2px solid var(--accent); outline-offset: 3px; }
.peca.guanyadora .disc { animation: brilla 1.3s ease-in-out infinite; outline: 3px solid var(--accent); outline-offset: 3px; }
@keyframes brilla { 50% { transform: scale(1.07); } }
.peca.fantasma .disc { opacity: 0.55; box-shadow: inset 0 0 0 2px var(--cv); }

.ona::after {
  content: "";
  width: 74%;
  height: 74%;
  border-radius: 50%;
  border: 2px solid var(--pos);
  animation: ona 0.65s ease-out forwards;
}
.ona.neg::after { border-color: var(--neg); }
@keyframes ona { from { transform: scale(0.8); opacity: 0.9; } to { transform: scale(3); opacity: 0; } }

/* Fletxes de previsió */
.capa-fletxes .f { fill: none; stroke-width: 0.07; stroke-linecap: round; }
.capa-fletxes .f.atr { stroke: var(--atr); }
.capa-fletxes .f.rep { stroke: var(--rep); }
.capa-fletxes .f.exp { stroke: var(--exp); stroke-dasharray: 0.12 0.09; }
.capa-fletxes .f.creu { stroke: var(--exp); stroke-dasharray: none; stroke-width: 0.08; }
.capa-fletxes .f.bloc { stroke: var(--rep); opacity: 0.85; }

/* Banner de final de partida */
.final {
  position: absolute;
  left: 6%;
  right: 6%;
  bottom: 6%;
  background: rgba(12, 19, 23, 0.92);
  color: var(--tauler-text);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 10px;
  padding: 14px 16px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 16px;
  box-shadow: 0 16px 30px -12px rgba(0, 0, 0, 0.6);
  z-index: 2;
  animation: puja 0.35s ease-out;
}
@keyframes puja { from { transform: translateY(12px); opacity: 0; } }
.final h3 {
  margin: 0;
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(1.6rem, 5vw, 2.3rem);
  line-height: 1;
  text-transform: uppercase;
}
.final p { margin: 4px 0 0; font-size: 13.5px; color: #c4d0d4; }

.boto {
  appearance: none;
  border: 0;
  border-radius: 8px;
  background: var(--accent);
  color: var(--accent-ink);
  font: 600 14px/1 var(--body);
  padding: 11px 16px;
  cursor: pointer;
  white-space: nowrap;
}
.boto:hover { filter: brightness(1.08); }
.boto:focus-visible, select:focus-visible, summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.previsio {
  margin: 0 auto;
  max-width: 600px;
  width: 100%;
  min-height: 2.9em;
  font-size: 13.5px;
  color: var(--muted);
}
.previsio b { color: var(--ink); }
.previsio .avis { color: var(--neg-text); font-weight: 600; }
.previsio .bona { color: var(--pos-text); font-weight: 600; }

.llegenda {
  list-style: none;
  margin: 0 auto;
  padding: 0;
  max-width: 600px;
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  font-size: 12.5px;
  color: var(--muted);
}
.llegenda li { display: flex; align-items: center; gap: 7px; }
.llegenda svg { width: 26px; height: 10px; flex: none; }
.llegenda .perill-mostra {
  width: 16px;
  height: 16px;
  border-radius: 3px;
  background-color: var(--tauler);
  background-image: repeating-linear-gradient(135deg, var(--perill) 0 3px, transparent 3px 7px);
  flex: none;
}

/* ---------- Registre ---------- */
.registre {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 360px;
  overflow: auto;
  font-size: 13px;
}
.registre li {
  display: grid;
  grid-template-columns: 2.1em minmax(0, 1fr);
  gap: 8px;
  padding: 8px 0;
  border-top: 1px solid var(--line);
}
.registre li:first-child { border-top: 0; }
.registre .n { font-family: var(--mono); font-size: 12px; color: var(--muted); padding-top: 1px; font-variant-numeric: tabular-nums; }
.registre .cap { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 6px; }
.registre .ef { display: block; color: var(--muted); font-family: var(--mono); font-size: 11.5px; margin-top: 2px; overflow-wrap: anywhere; }
.registre .buit { color: var(--muted); border: 0; display: block; }
.s { font-family: var(--mono); font-weight: 600; }
.s.pos { color: var(--pos-text); }
.s.neg { color: var(--neg-text); }
.motiu {
  font-family: var(--mono);
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 1px 6px;
  border-radius: 4px;
  color: var(--ink);
  background: color-mix(in srgb, var(--line) 70%, var(--surface));
}
.motiu.atac { background: color-mix(in srgb, var(--accent) 26%, var(--surface)); }
.motiu.defensa { background: color-mix(in srgb, var(--atr) 30%, var(--surface)); }
.motiu.magnetic { background: color-mix(in srgb, var(--rep) 30%, var(--surface)); }

/* ---------- Regles i opcions ---------- */
.extra {
  display: grid;
  gap: 20px;
  grid-template-columns: minmax(0, 1fr);
}
@media (min-width: 980px) {
  .extra { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); align-items: start; }
}
.regles, .opcions {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 16px;
  min-width: 0;
}
.regles summary {
  cursor: pointer;
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.35rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}
.regles .cos { max-width: 70ch; }
.regles h4 {
  margin: 18px 0 4px;
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--accent);
}
.regles p, .regles ul { margin: 0 0 8px; }
.regles ul { padding-left: 1.2em; }
.regles li { margin-bottom: 4px; }

.opcions { display: flex; flex-direction: column; gap: 12px; }
.opcions h2 {
  margin: 0;
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.35rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}
.camp { display: flex; flex-direction: column; gap: 4px; }
.camp label { font-size: 13px; font-weight: 500; }
select {
  font: 14px var(--body);
  color: var(--ink);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 8px 10px;
  max-width: 100%;
}
.nota { margin: 0; font-size: 12.5px; color: var(--muted); }

@media (max-width: 639px) {
  .registre { max-height: 260px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

/* ---------- Demo explicada ---------- */
.cap-dreta {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 14px 24px;
}
.boto.secundari {
  background: transparent;
  color: var(--ink);
  box-shadow: inset 0 0 0 1.5px var(--line);
}
.boto.secundari:hover { filter: none; box-shadow: inset 0 0 0 1.5px var(--muted); }
.boto:disabled { opacity: 0.45; cursor: default; filter: none; }
.boto-demo { display: inline-flex; align-items: center; gap: 8px; }
.boto-demo svg { width: 15px; height: 15px; fill: var(--accent); }

.demo {
  position: relative;
  max-width: 600px;
  width: 100%;
  margin: 0 auto;
  background: var(--surface);
  border: 1.5px solid var(--accent);
  border-radius: 10px;
  padding: 18px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow: hidden;
}
.demo-barra {
  position: absolute;
  left: 0;
  top: 0;
  height: 4px;
  width: 100%;
  background: var(--accent);
  transform-origin: left;
  transform: scaleX(var(--progres, 0));
  transition: transform 0.3s ease-out;
}
.demo-cap { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.demo-surt {
  appearance: none;
  border: 0;
  background: none;
  padding: 2px 0;
  font: 500 13px var(--body);
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.demo-surt:hover { color: var(--ink); }
.demo h3 {
  margin: 0;
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.6rem;
  line-height: 1.05;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  text-wrap: balance;
}
.demo-text, .demo-despres { margin: 0; max-width: 65ch; }
.demo-despres {
  font-weight: 500;
  padding: 8px 10px;
  border-radius: 7px;
  background: color-mix(in srgb, var(--accent) 12%, var(--surface));
}
.demo-botons { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.demo-botons #demo-seg { margin-left: auto; }
.demo-surt:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.demo-focus { outline: 3px solid var(--accent); outline-offset: 4px; border-radius: 8px; animation: focus-demo 1.4s ease-in-out infinite; }
.tauler.demo-focus { outline-offset: 9px; }
@keyframes focus-demo { 50% { outline-color: transparent; } }

/* Amb la demo oberta: a l'escriptori va a la columna esquerra, a dalt del teu panell */
.demo { grid-area: demo; }
.taula.amb-demo { grid-template-areas: "demo" "centre" "jug" "bot"; }
@media (min-width: 640px) and (max-width: 979px) {
  .taula.amb-demo { grid-template-areas: "demo demo" "centre centre" "jug bot"; }
}
@media (min-width: 980px) {
  .taula.amb-demo {
    grid-template-columns: 300px minmax(0, 1fr) 290px;
    grid-template-areas: "demo centre bot" "jug centre bot";
    grid-template-rows: auto 1fr;
  }
  .taula.amb-demo .panell-bot { align-self: start; }
}
