/* Vendedores and the visual layer for Atracciones, Histórico and Emisoras. Loaded after pizarra.css; uses its tokens only.
   Faces are circles (people and shops, like the organizer seals); posts and flyers are 8px panels. */

/* Flyer strip: a lone flyer keeps the width of one in four instead of stretching across the page. */
.pz-carteles-lista { grid-auto-columns: minmax(200px, calc((100% - 48px) / 4)); }
.cs-vend-carteles { margin: 0 0 8px; }
@media (max-width: 760px) { .pz-carteles-lista { grid-auto-columns: 68%; } }

/* Social accounts inside the ink band (vendor and organizer pages). Organizer pages add them as a second strip. */
.cs-banda:has(+ .cs-banda-redes) { display: flow-root; padding-bottom: 0; }
.cs-banda-redes { display: flow-root; padding-top: 0; }
.cs-banda-redes .cs-cifras { margin-top: 24px; }
.cs-cifras { display: flex; flex-wrap: wrap; gap: 10px; margin: 20px 0 0; padding: 0; list-style: none; }
.cs-cifras li { margin: 0; padding: 0; }
.cs-cifra { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 6px 14px; border: 1px solid currentColor; border-radius: var(--radius); color: inherit; font-size: 1.5rem; font-weight: 600; line-height: 1.2; transition: background-color 0.15s; }
.cs-cifra:hover { background: rgba(253, 246, 227, 0.12); text-decoration: none; }
.cs-cifra:active { transform: scale(0.97); }
.cs-cifra:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; box-shadow: none; }
.cs-cifra .icon { flex: none; width: 18px; height: 18px; }
.cs-cifra-n { font-weight: 400; opacity: 0.9; }
.cs-cifra-n .pz-dato { font-weight: 700; }
.cs-cifras-nota { margin: 10px 0 0; color: inherit; font-size: 1.3rem; opacity: 0.85; }

/* Vendor faces on a show page: 48px circles that wrap; the count sits beside the heading. */
.cs-vend-zona { margin: 0 0 48px; }
.cs-vend-total { display: inline-block; margin-left: 6px; padding: 2px 8px; border-radius: var(--radius); background: var(--pz-text); color: var(--pz-bg); font-size: 1.4rem; vertical-align: 0.3em; }
.cs-avatares { display: flex; flex-wrap: wrap; gap: 14px 6px; margin: 0; padding: 0; list-style: none; }
.cs-avatar-item { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 76px; color: var(--pz-text); text-decoration: none; }
.cs-avatar-item:hover { text-decoration: none; }
.cs-avatar { position: relative; display: block; width: 56px; height: 56px; border-radius: 50%; box-shadow: 0 0 0 1px var(--pz-border); transition: box-shadow 0.15s, transform 0.15s var(--pz-ease); }
.cs-avatar img { display: block; width: 100%; height: 100%; border-radius: 50%; object-fit: cover; background: var(--pz-surface2); }
.cs-avatar-item:hover .cs-avatar { box-shadow: 0 0 0 2px var(--pz-bg), 0 0 0 4px var(--primary); transform: translateY(-2px); }
.cs-avatar-item:active .cs-avatar { transform: scale(0.95); }
.cs-avatar-item:focus-visible { outline: none; }
.cs-avatar-item:focus-visible .cs-avatar { outline: 2px solid var(--pz-text); outline-offset: 3px; }
.cs-avatar-nombre { display: -webkit-box; overflow: hidden; max-width: 100%; font-size: 1.2rem; font-weight: 600; line-height: 1.25; text-align: center; -webkit-line-clamp: 2; -webkit-box-orient: vertical; word-break: break-word; }
.cs-avatar-item:hover .cs-avatar-nombre { text-decoration: underline; text-underline-offset: 3px; }
.cs-avatar-inicial { display: block; width: 56px; height: 56px; overflow: hidden; border-radius: 50%; background: var(--cs-tinta); color: var(--cs-papel); font-size: 0; line-height: 56px; text-align: center; white-space: nowrap; }
.cs-avatar-inicial::first-letter { font-size: 2.2rem; font-weight: 700; }
.cs-avatares li { margin: 0; padding: 0; }
.cs-avatares-mas { margin-top: 12px; }
.cs-avatares-mas[open] summary { margin-bottom: 12px; }
.cs-boton-linea { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border: 1px solid var(--pz-text); border-radius: var(--radius); color: var(--pz-text); font-size: 1.5rem; font-weight: 700; cursor: pointer; list-style: none; }
.cs-boton-linea::-webkit-details-marker { display: none; }
.cs-boton-linea:hover { background: var(--pz-text); color: var(--pz-bg); }
.cs-boton-linea:active { transform: scale(0.97); }
.cs-vend-nota { margin: 12px 0 0; color: var(--pz-muted); font-size: 1.4rem; }
@media (prefers-reduced-motion: reduce) { .cs-avatar, .cs-avatar-item:hover .cs-avatar { transition: none; transform: none; } }

/* Recent posts: image cards that open the original post. Instagram squares, TikTok 3:4 covers. */
.cs-redes-cuerpo { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 440px), 1fr)); gap: 48px; margin-top: 48px; }
.cs-redes-cuerpo .cs-fuentes { grid-column: 1 / -1; }
.cs-redes-cuerpo:not(:has(.cs-redes + .cs-redes)) .cs-redes { max-width: 640px; }
.cs-redes-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 0; padding: 0; list-style: none; }
.cs-redes-grid li { margin: 0; padding: 0; }
.cs-red { position: relative; display: flex; flex-direction: column; overflow: hidden; height: 100%; border: 1px solid var(--pz-border); border-radius: var(--pz-radius); background: var(--pz-surface2); color: var(--pz-text); transition: border-color 0.15s; }
.cs-red:hover { border-color: var(--pz-text); text-decoration: none; }
.cs-red:focus-visible { outline: 2px solid var(--pz-text); outline-offset: 2px; }
.cs-red img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; background: var(--pz-hover); transition: transform 0.3s var(--pz-ease); }
.cs-redes-tt .cs-red img { aspect-ratio: 3 / 4; }
.cs-red:hover img { transform: scale(1.03); }
.cs-red-pie { padding: 10px 12px; font-family: var(--pz-mono); font-size: 1.3rem; white-space: nowrap; }
.cs-red-tipo { position: absolute; top: 8px; left: 8px; padding: 2px 6px; border-radius: var(--radius); background: var(--pz-text); color: var(--pz-bg); font-family: var(--pz-sans); font-size: 1.1rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
@media (prefers-reduced-motion: reduce) { .cs-red img { transition: none; } .cs-red:hover img { transform: none; } }
@media (max-width: 760px) { .cs-redes-grid { gap: 8px; } .cs-red-pie { padding: 8px; font-size: 1.2rem; } }

/* Sources: every vendor fact links to the post or profile it comes from. */
.cs-fuentes ul { max-width: 75ch; margin: 12px 0 0; padding-left: 20px; }
.cs-fuentes li { margin: 0 0 8px; color: var(--pz-muted-strong); font-size: 1.5rem; line-height: 1.5; }
.cs-fuentes a { color: var(--pz-text); font-weight: 600; text-decoration: underline; text-decoration-color: var(--pz-muted); text-underline-offset: 3px; }
.cs-fuentes a:hover { text-decoration-color: var(--pz-text); }

/* /vendedores/ index */
.cs-vend-indice { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; margin: 0; padding: 0; list-style: none; }
.cs-vend-indice li { margin: 0; padding: 0; }
.cs-vend-tile { display: flex; align-items: center; gap: 14px; height: 100%; padding: 12px 14px; border: 1px solid var(--pz-border); border-radius: var(--pz-radius); color: var(--pz-text); transition: border-color 0.15s, background-color 0.15s; }
.cs-vend-tile:hover { border-color: var(--pz-text); background: var(--pz-hover); text-decoration: none; }
.cs-vend-tile:active { transform: scale(0.99); }
.cs-vend-tile:focus-visible { outline: 2px solid var(--pz-text); outline-offset: 2px; }
.cs-vend-tile img, .cs-vend-tile .cs-avatar-inicial { flex: none; width: 56px; height: 56px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 1px var(--pz-border); line-height: 56px; }
.cs-vend-tile-texto { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cs-vend-tile-nombre { font-size: 1.7rem; font-weight: 700; line-height: 1.25; overflow-wrap: anywhere; }
.cs-vend-tile-cuenta { color: var(--pz-muted-strong); font-size: 1.3rem; overflow-wrap: anywhere; }

/* Atracciones: the representative picture opens each row. */
.cs-atr { grid-template-columns: 88px 132px minmax(0, 1fr) 24px; }
.cs-atr-conshow { grid-template-columns: 88px 132px minmax(0, 1fr) minmax(180px, 260px) 24px; }
.cs-atr-img { display: block; width: 88px; height: 88px; overflow: hidden; border: 1px solid var(--pz-border); border-radius: var(--pz-radius); background: var(--pz-surface2); }
.cs-atr-img img { width: 100%; height: 100%; object-fit: cover; }
.cs-atr-cuerpo.con-imagen { display: grid; grid-template-columns: minmax(0, 360px) minmax(0, 1fr); gap: 32px 48px; align-items: start; margin-top: 32px; }
.cs-atr-cuerpo.con-imagen .pz-cuerpo { margin-top: 0; }
.cs-atr-anuncio { display: flex; flex-direction: column; gap: 8px; color: var(--pz-text); font-size: 1.4rem; font-weight: 600; }
.cs-atr-anuncio img { width: 100%; aspect-ratio: 1 / 1; border: 1px solid var(--pz-border); border-radius: var(--pz-radius); object-fit: cover; }
.cs-atr-anuncio:hover img { border-color: var(--pz-text); }
.cs-atr-anuncio:hover .cs-atr-anuncio-pie { text-decoration: underline; text-underline-offset: 3px; }
.cs-atr-anuncio:focus-visible { outline: 2px solid var(--pz-text); outline-offset: 2px; }
@media (max-width: 760px) {
    .cs-atr, .cs-atr-conshow { grid-template-columns: 72px minmax(0, 1fr) 24px; grid-template-areas: "img tipo flecha" "img texto texto" "show show show"; column-gap: 14px; }
    .cs-atr-img { grid-area: img; align-self: start; width: 72px; height: 72px; }
    .cs-atr-texto { margin-top: 4px; }
    .cs-atr-cuerpo.con-imagen { grid-template-columns: 1fr; }
    .cs-atr-anuncio { max-width: 360px; }
}

/* Histórico and past editions: picture rows. The title link covers the row. */
.cs-archivo { margin: 8px 0 0; padding: 0; list-style: none; border-top: 1px solid var(--pz-border); }
.cs-archivo-fila { position: relative; display: grid; grid-template-columns: 96px minmax(0, 1fr) auto 24px; gap: 8px 24px; align-items: center; margin: 0; padding: 16px 12px; border-bottom: 1px solid var(--pz-border); transition: background-color 0.15s; }
.cs-archivo-fila:hover, .cs-archivo-fila:focus-within { background: var(--pz-hover); }
.cs-archivo-fila:focus-within { outline: 2px solid var(--pz-text); outline-offset: -2px; box-shadow: inset 0 0 0 6px var(--pz-focus-ring); }
.cs-archivo-img { display: block; width: 96px; aspect-ratio: 4 / 5; overflow: hidden; border: 1px solid var(--pz-border); border-radius: var(--pz-radius); background: var(--pz-surface2); }
.cs-archivo-img img { width: 100%; height: 100%; object-fit: cover; }
.cs-archivo-sinimg { display: flex; flex-direction: column; align-items: flex-start; justify-content: space-between; height: 100%; padding: 10px; background: var(--cs-tinta); color: var(--cs-papel); }
.cs-archivo-sinimg .pz-sello { width: 36px; height: 36px; border-color: var(--cs-papel); }
.cs-archivo-sinimg .pz-ticker { font-size: 1.3rem; }
.cs-archivo-texto { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.cs-archivo-fecha { color: var(--pz-text); font-size: 1.4rem; font-weight: 700; }
.cs-archivo-titulo { color: var(--pz-text); font-size: 2rem; font-weight: 700; line-height: 1.25; }
.cs-archivo-titulo:hover { text-decoration: none; }
.cs-archivo-titulo:focus-visible { outline: none; }
.cs-archivo-titulo::after { content: ""; position: absolute; inset: 0; }
.cs-archivo-lugar, .cs-archivo-org { color: var(--pz-muted-strong); font-size: 1.5rem; }
.cs-archivo-lugar .pz-plaza { color: var(--pz-text); }
.cs-archivo-vend { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.cs-pila { display: flex; padding-left: 10px; }
.cs-pila img { width: 36px; height: 36px; margin-left: -10px; border: 2px solid var(--pz-bg); border-radius: 50%; object-fit: cover; background: var(--pz-surface2); }
.cs-archivo-n { color: var(--pz-muted-strong); font-size: 1.3rem; font-weight: 600; }
.cs-archivo-fila:hover .cs-atr-flecha { color: var(--pz-text); transform: translateX(3px); }
@media (max-width: 760px) {
    .cs-archivo-fila { grid-template-columns: 72px minmax(0, 1fr); grid-template-areas: "img texto" "img vend"; gap: 8px 16px; padding: 14px 4px; align-items: start; }
    .cs-archivo-img { grid-area: img; width: 72px; }
    .cs-archivo-texto { grid-area: texto; }
    .cs-archivo-vend { grid-area: vend; flex-direction: row; align-items: center; }
    .cs-archivo-fila .cs-atr-flecha { display: none; }
    .cs-archivo-titulo { font-size: 1.8rem; }
}

/* Emisoras: organizer cards with description, next date and that show's flyer. */
.cs-orgs { grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); }
.cs-org { align-items: center; padding: 16px; }
.cs-org-logo { width: 72px; height: 72px; }
.cs-org .cs-avatar-inicial { width: 72px; height: 72px; line-height: 72px; }
.cs-org-texto { flex: 1; min-width: 0; }
.cs-org-desc { display: -webkit-box; overflow: hidden; color: var(--pz-muted-strong); font-size: 1.4rem; line-height: 1.45; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.cs-org-prox { margin-top: 4px; color: var(--pz-text); font-size: 1.4rem; font-weight: 600; }
.cs-org-prox .pz-dato { font-weight: 700; }
.cs-org-sin { color: var(--pz-muted); font-weight: 400; }
.cs-org-cartel { flex: none; width: 72px; height: 90px; border: 1px solid var(--pz-border); border-radius: var(--pz-radius); object-fit: cover; }

/* Compact Atracciones row: 72 px picture with the type badge on it; no separate type column. */
.cs-atr { grid-template-columns: 72px minmax(0, 1fr) 24px; gap: 4px 16px; padding: 12px 8px; }
.cs-atr-conshow { grid-template-columns: 72px minmax(0, 1fr) minmax(160px, 240px) 24px; }
.cs-atr-img { position: relative; width: 72px; height: 72px; }
.cs-atr-img .cs-atr-tipo { position: absolute; right: 4px; bottom: 4px; left: 4px; overflow: hidden; padding: 2px 4px; border-radius: 4px; font-size: 0.95rem; letter-spacing: 0.04em; text-align: center; text-overflow: ellipsis; white-space: nowrap; }
.cs-atr-titulo { font-size: 1.7rem; }
.cs-atr-gancho { display: -webkit-box; overflow: hidden; font-size: 1.4rem; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
@media (max-width: 760px) {
    .cs-atr, .cs-atr-conshow { grid-template-columns: 64px minmax(0, 1fr) 20px; grid-template-areas: "img texto flecha" "img show flecha"; column-gap: 12px; padding: 12px 4px; }
    .cs-atr-img { grid-area: img; width: 64px; height: 64px; }
    .cs-atr-texto { grid-area: texto; margin-top: 0; }
    .cs-atr-show { grid-area: show; flex-direction: row; flex-wrap: wrap; gap: 0 6px; margin-top: 2px; font-size: 1.3rem; }
    .cs-atr-show .pz-dato { white-space: nowrap; }
    .cs-atr-show .pz-dato::after { content: " ·"; }
    .cs-atr-gancho { -webkit-line-clamp: 1; }
    .cs-atr-flecha { grid-area: flecha; align-self: center; }
}
@media (max-width: 760px) {
    .cs-atr-show { flex-wrap: nowrap; min-width: 0; }
    .cs-atr-show > span { overflow: hidden; min-width: 0; text-overflow: ellipsis; white-space: nowrap; }
    .cs-atr-img .cs-atr-tipo { right: 2px; left: 2px; padding: 2px; font-size: 0.85rem; letter-spacing: 0; }
}
