/* ═══ TABLÓN — compartido por el panel del alumno y el del profesor ═══
   Post-its de colores e imágenes en filas (misma idea que el de Imagilang),
   con la identidad de Llengua: Oswald/Lato, acento naranja, esquinas casi
   rectas. Mobile-first: en móvil cada fila apila sus elementos. */

.tablon { display: grid; gap: 18px; }
.fila-wrap { display: grid; gap: 6px; border: 2px dashed transparent; border-radius: var(--radius-lg); }
.fila { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
@media (min-width: 640px) { .fila { flex-direction: row; align-items: stretch; } }
.celda { position: relative; min-width: 0; display: flex; }
.celda > * { flex: 1; min-width: 0; }
.celda--hueco { display: none; }
@media (min-width: 640px) { .celda--hueco { display: flex; } }

/* Post-it */
.postit {
  position: relative; display: flex; flex-direction: column; align-items: center; text-align: center;
  padding: 26px 22px 16px; min-height: 170px; border-radius: var(--radius-lg);
  box-shadow: 0 2px 6px rgba(25,48,62,.08), 0 10px 24px rgba(25,48,62,.07);
}
.postit::before {   /* el trozo de celo */
  content: ""; position: absolute; top: -8px; left: 50%; transform: translateX(-50%) rotate(-1.5deg);
  width: 70px; height: 18px; background: rgba(255,255,255,.6); border: 1px solid rgba(0,0,0,.05);
  box-shadow: 0 2px 4px rgba(0,0,0,.08);
}
.postit--amarillo { background: #FFF4B0; }
.postit--rosa     { background: #FFD6E0; }
.postit--azul     { background: #CFE8FF; }
.postit--verde    { background: #D4F0C2; }
.postit--naranja  { background: #FFD9B0; }
.postit-titulo { font-family: var(--font-display); font-weight: 500; font-size: clamp(1.15rem, 1rem + .6vw, 1.45rem); line-height: 1.25; letter-spacing: .5px; text-transform: uppercase; color: #2b2b2b; margin: 0 0 8px; overflow-wrap: anywhere; }
.postit-cuerpo { font-size: 17px; line-height: 1.55; color: #2f2f2f; white-space: pre-wrap; overflow-wrap: anywhere; margin: 0 0 12px; flex: 1; }
.postit-pie { width: 100%; display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; font-size: 12px; color: rgba(0,0,0,.62); border-top: 1px dashed rgba(0,0,0,.18); padding-top: 9px; }
.postit-autor { font-weight: 700; color: rgba(0,0,0,.75); }
.postit-editado { font-style: italic; }

/* Imagen */
.banner { background: var(--bg-white); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: 0 2px 6px rgba(25,48,62,.06); overflow: hidden; display: flex; flex-direction: column; }
.banner-img { display: flex; justify-content: center; align-items: center; padding: 10px; flex: 1; background: var(--bg-white); }
.banner-img img { max-width: 100%; max-height: 420px; /* el alto real lo fija cada imagen (style) */ width: auto; height: auto; object-fit: contain; display: block; }
.banner-pie { padding: 10px 14px; border-top: 1px solid var(--border); font-size: 14px; }
.banner-pie a { color: var(--brand-primary); font-weight: 700; overflow-wrap: anywhere; }
.banner-para { padding: 0 14px 12px; text-align: center; }

/* «Para quién» (solo lo ve el equipo) */
.para-chip { display: inline-block; margin: 0 0 10px; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; background: rgba(255,255,255,.7); color: #19303e; }
.para-chip--grupos { background: rgba(25,48,62,.1); }

.tablon-vacio { text-align: center; }
.tablon-vacio-icono { font-size: 44px; margin-bottom: 8px; }
.tablon-vacio p { color: var(--text-secondary); margin: 0; }

/* ── Modo edición (panel del profesor) ─────────────────────────────── */
.aviso-edicion { background: var(--brand-primary-light); border: 1px solid var(--brand-primary); border-radius: var(--radius-md); padding: 10px 14px; font-size: 14px; color: #6b3100; margin: 0; }
.tablon--editando .fila-wrap { border-color: var(--border); padding: 8px; background: rgba(246,246,246,.6); }
.tablon--editando .fila-wrap.soltar-aqui { border-color: var(--brand-primary); background: var(--brand-primary-light); }
.tablon--editando .fila-wrap.arrastrando { opacity: .4; }
.tablon--editando .celda { padding-top: 38px; }
.fila-controles { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.fila-asa { cursor: grab; color: var(--text-muted); font-size: 18px; padding: 0 6px; user-select: none; display: none; }
@media (pointer: fine) { .fila-asa { display: inline-block; } }
.fila-unir { min-height: 36px; padding: 4px 12px; border: 1px solid var(--brand-primary); background: var(--bg-white); color: var(--brand-primary); border-radius: 999px; font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
.celda-acciones { position: absolute; top: 0; right: 0; display: flex; gap: 4px; z-index: 2; }
.celda-btn { min-width: 36px; height: 36px; padding: 0 6px; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--bg-white); font-size: 14px; cursor: pointer; display: inline-grid; place-items: center; box-shadow: 0 1px 3px rgba(0,0,0,.1); }
.celda-btn:hover:not(:disabled) { border-color: var(--brand-primary); }
.celda-btn:disabled { opacity: .35; cursor: default; }
.alto-tirador { display: flex; align-items: center; justify-content: center; min-height: 28px; border-top: 1px dashed var(--border); cursor: ns-resize; touch-action: none; background: var(--bg-light); user-select: none; }
.alto-tirador::before { content: ""; width: 44px; height: 5px; border-radius: 999px; background: #c9c9c9; margin-right: 10px; }
.alto-tirador span { font-size: 12px; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.alto-tirador:hover::before, .alto-tirador:focus-visible::before { background: var(--brand-primary); }
.alto-tirador:focus-visible { outline: 2px solid var(--brand-primary); outline-offset: -2px; }
.hueco { display: grid; place-items: center; min-height: 120px; border: 2px dashed #d6d6d6; border-radius: var(--radius-lg); color: var(--text-muted); font-size: 14px; }
.divisor { display: none; }
@media (min-width: 640px) {
  .divisor { display: flex; align-items: center; justify-content: center; flex: 0 0 18px; margin: 0 -9px; cursor: col-resize; touch-action: none; z-index: 3; }
  .divisor::after { content: "⠿"; display: grid; place-items: center; width: 16px; height: 44px; background: var(--bg-white); border: 1.5px solid #d1d1d1; border-radius: 4px; color: var(--text-muted); font-size: 13px; box-shadow: 0 1px 4px rgba(0,0,0,.1); }
  .divisor:hover::after, .divisor:focus-visible::after { border-color: var(--brand-primary); color: var(--brand-primary); }
  .divisor:focus-visible { outline: none; }
}
.tablon-anadir { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 12px; border: 2px dashed var(--brand-primary); border-radius: var(--radius-lg); background: var(--bg-white); }
.tablon-anadir > span { font-weight: 700; font-size: 14px; color: var(--text-primary); }

/* ── Diálogos ─────────────────────────────────────────────────────── */
.colores { display: flex; gap: 10px; flex-wrap: wrap; }
.color-op { position: relative; }
.color-op input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.color-op span { display: block; width: 44px; height: 44px; border-radius: 50%; border: 2px solid rgba(0,0,0,.12); }
.color-op--amarillo span { background: #FFF4B0; } .color-op--rosa span { background: #FFD6E0; } .color-op--azul span { background: #CFE8FF; }
.color-op--verde span { background: #D4F0C2; } .color-op--naranja span { background: #FFD9B0; }
.color-op input:checked + span { border-color: var(--brand-primary); box-shadow: 0 0 0 3px var(--brand-primary-light); }
.color-op input:focus-visible + span { outline: 2px solid var(--brand-primary); outline-offset: 2px; }
.para-opciones { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.para-opcion, .para-grupo { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; font-size: 15px; cursor: pointer; }
.para-opcion input, .para-grupo input { width: 18px; height: 18px; accent-color: var(--brand-primary); }
.para-grupos { display: grid; gap: 2px; margin-top: 6px; padding: 8px 12px; background: var(--bg-light); border-radius: var(--radius-md); }
.zona-subida { display: grid; justify-items: center; gap: 6px; padding: 24px 16px; border: 2px dashed #d6d6d6; border-radius: var(--radius-lg); text-align: center; cursor: pointer; background: var(--bg-light); }
.zona-subida:hover, .zona-subida.encima, .zona-subida:focus-within { border-color: var(--brand-primary); background: var(--brand-primary-light); }
.zona-icono { font-size: 32px; }
.img-previa { max-width: 100%; max-height: 260px; object-fit: contain; margin: 0 auto; border: 1px solid var(--border); border-radius: var(--radius-md); }
