/* Fondo negro con piezas de cuero marrón liso y cosido, y ámbar de ron; los tweets, con los colores de X. Sin gradientes.
   Letras Alegreya (Huerta Tipográfica, Argentina). Scroll y entradas: solo CSS (animation-timeline, scroll-state, @starting-style). */
@font-face { font-family: "Alegreya SC"; font-weight: 900; font-display: swap; src: url(fuentes/asc-900.woff2) format("woff2"); }
@font-face { font-family: "Alegreya SC"; font-weight: 800; font-display: swap; src: url(fuentes/asc-800.woff2) format("woff2"); }
@font-face { font-family: "Alegreya"; font-weight: 400 900; font-display: swap; src: url(fuentes/alegreya.woff2) format("woff2"); }
@font-face { font-family: "Alegreya Sans"; font-weight: 400; font-display: swap; src: url(fuentes/as-400.woff2) format("woff2"); }
@font-face { font-family: "Alegreya Sans"; font-weight: 700; font-display: swap; src: url(fuentes/as-700.woff2) format("woff2"); }

@property --n { syntax: "<integer>"; inherits: false; initial-value: 0; }
@property --tono { syntax: "<color>"; inherits: true; initial-value: #1d9bf0; }

:root {
  color-scheme: dark;
  interpolate-size: allow-keywords;
  --m1: #1b0e07;
  --m2: #2d180c;
  --m3: #452612;
  --m4: #6a3b1a;
  --m5: #97572a;
  --papel: #ead3a6;
  --tinta: #2b140a;
  --crema: #f4e4c3;
  --hilo: #d6ad72;
  --tabaco: #cfae80;
  --ambar: #e99a3c;
  --ron: #c9702a;
  --x-azul: #1d9bf0;
  --x-rosa: #f91880;
  --x-verde: #00ba7c;
  --x-violeta: #7856ff;
  --x-borde: #2f3336;
  --x-texto: #e7e9ea;
  --x-gris: #8b98a5;
  --versal: "Alegreya SC", Georgia, serif;
  --serif: "Alegreya", Georgia, serif;
  --sans: "Alegreya Sans", "Segoe UI", sans-serif;
  --x-letra: "TwitterChirp", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --suave: cubic-bezier(.2, .9, .25, 1);
  --resorte: cubic-bezier(.34, 1.5, .5, 1);
  --piel: url(cuero.webp) var(--m3);
  --puntada: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='2'%3E%3Crect width='11' height='2' rx='1' fill='%23d6ad72'/%3E%3C/svg%3E");
}

* { box-sizing: border-box; margin: 0; }
html { scroll-behavior: smooth; scrollbar-color: #7a4522 #000; scrollbar-gutter: stable; background: #000; &:has(.menu[open]) { overflow: hidden; } }
body { font: 400 1.125rem/1.45 var(--sans); color: var(--crema); background: #000; min-height: 100svh; timeline-scope: --abrir; }
a { color: inherit; }
button { font: inherit; }
:focus-visible { outline: 2px solid var(--ambar); outline-offset: 3px; border-radius: 2px; }
::selection { background: var(--ron); color: #fff; }
::highlight(buscado) { background: var(--ambar); color: #1a0a03; }
.saltar { position: absolute; left: -999px; &:focus { left: 1rem; top: 1rem; z-index: 9; background: var(--papel); color: var(--tinta); padding: .5rem .9rem; } }

.mesa { overflow-x: clip; max-width: 1240px; margin-inline: auto; padding: clamp(1rem, 3vw, 2.5rem) clamp(1rem, 4vw, 3rem) 4rem; display: grid; gap: 1.75rem; }

/* ---------- lateral: una tapa de cuero marrón, lisa y cosida ---------- */
.panel { position: relative; padding: 1.75rem 1.5rem 1.6rem; border-radius: 14px; background: url(cuero.webp) var(--m2); }
.panel::before { content: ""; position: absolute; inset: 8px; border: 2px dashed var(--m5); border-radius: 9px; pointer-events: none; }
.marca { display: block; font: 900 3.6rem/.9 var(--versal); letter-spacing: -.02em; color: var(--crema); text-decoration: none; }
.cuenta { margin-top: .55rem; color: var(--tabaco); line-height: 1.2; & b { color: var(--ambar); font-weight: 700; font-variant-numeric: lining-nums; } }
.abrir {
  view-timeline: --abrir block;
  position: relative; display: flex; align-items: center; gap: .7rem; width: 100%; margin-top: 1.25rem; padding: .95rem 1rem; border: 0; border-radius: 8px; cursor: pointer; background: var(--crema); color: var(--tinta);
  font: 700 1.125rem/1 var(--sans); text-align: left; transition: background .2s, scale .35s var(--resorte);
  & span { flex: 1; }
  & svg { width: 1.35rem; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; transition: rotate .5s var(--resorte), scale .5s var(--resorte); }
  & kbd { font: 700 1rem/1 var(--sans); color: var(--m4); border: 1.5px solid var(--m5); border-radius: 4px; padding: .2rem .5rem; }
  &:hover { background: var(--ambar); & svg { rotate: -14deg; scale: 1.2; } }
  &:active { scale: .97; }
}
.tipos-lado { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; margin-top: .75rem; }
.tipo {
  position: relative; display: grid; gap: .1rem; padding: .75rem .85rem .65rem; border: 0; border-radius: 8px; cursor: pointer; text-align: left; background: var(--m1); color: var(--tabaco); transition: background .25s, color .25s, scale .35s var(--resorte);
  & span { font: 700 1.0625rem/1.1 var(--sans); }
  & b { font: 800 1.9rem/1 var(--serif); font-variant-numeric: lining-nums; color: var(--crema); transition: color .25s; }
  &:hover { background: var(--m4); color: var(--crema); }
  &:active { scale: .95; }
  &[aria-pressed="true"] { background: var(--ron); color: #fff3dc; & b { color: #fff; } }
}
.puestos { display: grid; gap: .1rem; margin-top: .9rem; }
.puesto {
  position: relative; display: flex; justify-content: space-between; gap: 1rem; padding: .35rem 0; border: 0; background: none; cursor: pointer; color: var(--crema); font-weight: 700; text-align: left; animation: aparece .35s var(--suave) both;
  & span { font-weight: 400; color: var(--tabaco); text-decoration: underline; text-underline-offset: .2em; }
  &:hover span { color: var(--ambar); }
}
@keyframes aparece { from { opacity: 0; translate: -.8rem 0; } }
.calendario { scroll-target-group: auto; position: relative; display: grid; gap: 1.1rem; margin-top: 1.35rem; }
.mes-cal h2 { font: 800 1.2rem/1 var(--versal); color: var(--crema); margin-bottom: .5rem; }
.dias { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; text-align: center; font-variant-numeric: tabular-nums lining-nums; }
.dias > * { display: grid; place-items: center; aspect-ratio: 1; border-radius: 6px; font-size: 1rem; line-height: 1; }
.letra { aspect-ratio: auto !important; padding-bottom: .15rem; color: var(--tabaco); }
.sin { color: #a5845b; }
.con { background: var(--m4); color: var(--crema); font-weight: 700; text-decoration: none; transition: background .2s, color .2s, scale .35s var(--resorte); &:hover { background: var(--crema); color: var(--tinta); scale: 1.18; } }
.con[data-n="1"] { background: var(--m3); }
.con:is([data-n="3"], [data-n="4"]) { background: var(--m5); }
.hoy { outline: 2px solid var(--ambar); outline-offset: -2px; }
/* el día que se está leyendo: scrollspy nativo */
.con:target-current { background: var(--ambar); color: var(--tinta); scale: 1.12; }

.opciones { position: relative; anchor-scope: --elegida; isolation: isolate; }
/* el resalte se desliza de una opción a otra */
@supports (top: anchor(top)) {
  .opciones::before {
    content: ""; position: absolute; z-index: -1; position-anchor: --elegida; top: anchor(top); bottom: anchor(bottom); left: anchor(left); right: anchor(right); border-radius: 6px; background: var(--ron);
    transition: top .4s var(--suave), bottom .4s var(--suave);
  }
}
.opcion {
  display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; width: 100%; padding: .42rem .7rem; border: 0; border-radius: 6px; background: none; cursor: pointer; font: 400 1.0938rem/1.3 var(--sans); color: var(--tabaco); text-align: left; transition: color .2s;
  & b { font-weight: 400; font-variant-numeric: tabular-nums lining-nums; }
  & span { transition: translate .3s var(--suave); }
  &:hover { color: var(--crema); & span { translate: .25rem 0; } }
  &[aria-pressed="true"] { anchor-name: --elegida; color: #fff3dc; font-weight: 700; & b { font-weight: 700; } }
}

/* ---------- menú de búsqueda: un cuero que se desenrolla ---------- */
.menu {
  width: min(62rem, calc(100vw - 2rem)); height: min(44rem, 86svh); max-height: none; margin: 6svh auto auto; padding: 0; border: 0; border-radius: 10px; color: var(--crema); overflow: hidden;
  background: url(cuero.webp) var(--m2);
  clip-path: inset(0 0 100% 0 round 10px); translate: 0 -1.5rem;
  transition: clip-path .5s var(--suave), translate .5s var(--suave), overlay .5s allow-discrete, display .5s allow-discrete;
  &[open] { clip-path: inset(0 0 0 0 round 10px); translate: 0 0; @starting-style { clip-path: inset(0 0 100% 0 round 10px); translate: 0 -1.5rem; } }
  /* costura del borde */
  &::before { content: ""; position: absolute; inset: 9px; border: 2px dashed var(--m5); border-radius: 6px; pointer-events: none; }
  /* el rollo que baja */
  &::after {
    content: ""; position: absolute; inset: auto 0 0; height: 30px; pointer-events: none; opacity: 0;
    background: var(--m5); border-block: 5px solid var(--m4);
  }
  &[open]::after { animation: rollo .55s var(--suave) both; }
  &::backdrop { background: rgb(0 0 0 / 0); transition: background .4s, backdrop-filter .4s, overlay .4s allow-discrete, display .4s allow-discrete; }
  &[open]::backdrop { background: rgb(0 0 0 / .74); backdrop-filter: blur(5px); @starting-style { background: rgb(0 0 0 / 0); backdrop-filter: blur(0); } }
  & form { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr) auto; height: 100%; padding: 1.4rem 1.6rem 1.2rem; }
}
@keyframes rollo { from { bottom: 100%; opacity: 1; } 80% { opacity: 1; } to { bottom: -30px; opacity: 0; } }
.menu[open] :is(.menu-cabeza, .menu-filtros > *, .menu-pie) { animation: sube .5s var(--suave) both; animation-delay: calc(90ms + 45ms * var(--i, 1)); }
.menu-filtros > :nth-child(2) { --i: 2; } .menu-filtros > :nth-child(3) { --i: 3; } .menu-filtros > :nth-child(4) { --i: 4; } .menu-filtros > :nth-child(5) { --i: 5; } .menu-pie { --i: 6; }
@keyframes sube { from { opacity: 0; translate: 0 1.1rem; } }

.menu-cabeza {
  position: relative; display: flex; align-items: center; gap: .9rem; padding-bottom: .9rem;
  & svg { flex: none; width: 1.9rem; fill: none; stroke: var(--ambar); stroke-width: 2; stroke-linecap: round; }
  /* la costura corre mientras se escribe */
  &::after { content: ""; position: absolute; inset: auto 0 0; height: 2px; background: var(--puntada) 0 0 / 36px 2px repeat-x; transform-origin: left; animation: coser-x .7s .25s var(--suave) backwards; }
  &:has(input:focus)::after { animation: coser-x .7s .25s var(--suave) backwards, corre .9s .95s linear infinite; }
  & input {
    flex: 1; min-width: 0; border: 0; outline: 0; background: none; color: var(--crema); font: 700 clamp(1.45rem, 3.4vw, 2.1rem)/1.2 var(--serif);
    &::placeholder { color: rgb(207 174 128 / .8); transition: opacity .3s; }
    &::-webkit-search-cancel-button { display: none; }
  }
}
@keyframes coser-x { from { scale: 0 1; } }
@keyframes corre { to { background-position: 36px 0; } }
.cerrar { border: 0; background: none; cursor: pointer; color: var(--tabaco); text-decoration: underline; text-underline-offset: .2em; padding: .5rem .2rem; &:hover { color: var(--ambar); } }
.menu-cuerpo { display: grid; grid-template-columns: minmax(0, 17rem) minmax(0, 1fr); gap: 2.25rem; min-height: 0; padding-top: 1.1rem; }
.menu-filtros { overflow-y: auto; padding: 0 .7rem 1rem; scrollbar-width: thin; scrollbar-color: #7a4522 transparent; }
.carta {
  border-bottom: 1px solid rgb(214 173 114 / .22);
  & summary { display: flex; justify-content: space-between; align-items: center; padding: .7rem 0; cursor: pointer; list-style: none; font: 800 1.2rem/1 var(--versal); color: var(--hilo); &::-webkit-details-marker { display: none; } }
  & summary::after { content: ""; width: .6rem; height: .6rem; border: solid var(--ambar); border-width: 0 2px 2px 0; rotate: 45deg; translate: -.2rem -.15rem; transition: rotate .4s var(--resorte), translate .4s; }
  &[open] summary::after { rotate: 225deg; translate: -.2rem .15rem; }
  &::details-content { block-size: 0; overflow: clip; overflow-clip-margin: .7rem; opacity: 0; transition: block-size .45s var(--suave), opacity .3s, content-visibility .45s allow-discrete; }
  &[open]::details-content { block-size: auto; opacity: 1; }
  & .opciones { padding-bottom: .7rem; }
}
.casillas { display: grid; gap: .65rem; padding-top: 1rem; }
.gratis[hidden] { display: none; }
.gratis {
  display: flex; align-items: center; gap: .6rem; cursor: pointer; color: var(--tabaco);
  & input { appearance: none; position: relative; width: 2.5rem; height: 1.35rem; flex: none; border-radius: 1rem; border: 1px solid var(--hilo); background: rgb(0 0 0 / .5); cursor: pointer; transition: background .3s; }
  & input::before { content: ""; position: absolute; inset: 2px auto 2px 2px; aspect-ratio: 1; border-radius: 50%; background: var(--hilo); transition: translate .35s var(--resorte), background .3s; }
  & input:checked { background: var(--ron); &::before { translate: 1.12rem 0; background: var(--papel); } }
  &:hover { color: var(--crema); }
}

.resultados { list-style: none; padding: 0 .4rem 1rem 0; overflow-y: auto; scrollbar-width: thin; scrollbar-color: #7a4522 transparent; overscroll-behavior: contain; }
.resultado {
  border-bottom: 1px solid rgb(214 173 114 / .16); transition: opacity .35s var(--suave), translate .35s var(--suave); transition-delay: calc(22ms * min(sibling-index(), 10));
  @starting-style { opacity: 0; translate: 1.4rem 0; }
  & a { position: relative; display: grid; grid-template-columns: 3.4rem minmax(0, 1fr); gap: .5rem; align-items: center; padding: .6rem .7rem; border-radius: 5px; text-decoration: none; transition: background .2s, translate .3s var(--suave); }
  &:is([aria-selected="true"], :hover) a { background: var(--m4); translate: .35rem 0; }
}
.r-fecha { text-align: center; line-height: 1; & b { display: block; font: 800 1.75rem/.9 var(--serif); font-variant-numeric: lining-nums; color: var(--ambar); } & span { color: var(--tabaco); font-size: 1rem; } }
.r-cuerpo { min-width: 0; & b { display: block; font: 700 1.2rem/1.15 var(--serif); } & span { color: var(--tabaco); font-size: 1.0313rem; } }
.r-nada { padding: 2rem 0; font: 500 1.3rem/1.3 var(--serif); color: var(--hilo); }
.menu-pie { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding-top: .9rem; }
.limpiar { border: 0; background: none; cursor: pointer; color: var(--tabaco); text-decoration: underline; text-underline-offset: .2em; padding: .6rem 0; &:hover { color: var(--ambar); } }
.ver {
  border: 0; border-radius: 4px; padding: .85rem 1.5rem; cursor: pointer; font: 700 1.125rem/1 var(--sans); color: var(--tinta); font-variant-numeric: lining-nums;
  background: var(--crema); transition: background .2s, scale .3s var(--resorte);
  &:hover { background: var(--ambar); scale: 1.03; }
}
.barra { display: none; }

/* ---------- título grabado ---------- */
main { min-width: 0; outline: 0; }
.titulo { padding-bottom: 1rem; }
h1 {
  font: 900 clamp(2.25rem, 4.9vw, 4rem)/1 var(--serif); letter-spacing: -.018em; text-wrap: balance; max-width: 19ch; color: var(--ambar);
}
#estado { margin-top: .7rem; color: var(--tabaco); }

/* ---------- mes: correa de cuero que se queda arriba y se afina ---------- */
.bloque { view-timeline: --bloque block; }
.cinta { position: sticky; top: 0; z-index: 3; container-type: scroll-state; padding-block: .75rem .35rem; background: #000; }
.mes {
  position: relative; padding: 1.1rem 1.2rem 1rem; border-radius: 8px; font: 800 1.6rem/1 var(--versal); color: var(--crema); background: var(--piel);
  &::before { content: ""; position: absolute; inset: 6px 8px; border-block: 2px dashed var(--m5); pointer-events: none; }
  transition: padding .35s var(--suave), font-size .35s var(--suave);
  @container scroll-state(stuck: top) { padding-block: .72rem .66rem; font-size: 1.25rem; }
}

/* ---------- días y eventos ---------- */
.dia { scroll-margin-top: 4.5rem; display: grid; grid-template-columns: 6.25rem minmax(0, 1fr); border-bottom: 1px solid rgb(214 173 114 / .2); &:last-child { border-bottom: 0; } }
.fecha { padding: 1.35rem 0; & div { position: sticky; top: 5.2rem; } }
.fecha b { display: block; font: 800 3.4rem/.85 var(--serif); font-variant-numeric: lining-nums; color: var(--ambar); letter-spacing: -.02em; }
.fecha span { display: block; margin-top: .4rem; color: var(--tabaco); line-height: 1.1; }
.dia ol { list-style: none; padding: 0; min-width: 0; }
.evento { position: relative; padding: 1.35rem 0 1.4rem; & + & { border-top: 1px solid rgb(214 173 114 / .13); } }
.evento h3 { font: 700 1.5rem/1.14 var(--serif); letter-spacing: -.005em; text-wrap: balance; }
.evento h3 a { text-decoration: underline 2px transparent; text-underline-offset: .16em; transition: text-decoration-color .25s, color .25s; }
/* toda la fila abre el evento; lo demás queda por encima */
.evento h3 a::after { content: ""; position: absolute; inset: 0 -.75rem; }
.evento:hover h3 a { text-decoration-color: var(--ambar); }
.cuando { margin-top: .3rem; color: var(--hilo); & b { font-weight: 700; color: var(--crema); font-variant-numeric: lining-nums; } }
.resumen { margin-top: .4rem; color: var(--tabaco); max-width: 68ch; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; }
.temas { margin-top: .45rem; color: var(--tabaco); }
.tema { position: relative; z-index: 1; border: 0; padding: .1rem 0; background: none; cursor: pointer; color: var(--hilo); font: 700 1.0625rem/1.3 var(--sans); text-decoration: underline 1px transparent; text-underline-offset: .2em; transition: text-decoration-color .25s, color .2s; &:hover { color: var(--ambar); text-decoration-color: currentColor; } }
.organiza { display: flex; flex-wrap: wrap; align-items: baseline; gap: .1rem .7rem; margin-top: .4rem; color: var(--tabaco); }
.x {
  position: relative; z-index: 1; border: 0; padding: .1rem 0; background: none; cursor: pointer; font: 700 1.0625rem/1.3 var(--sans); color: var(--hilo);
  text-decoration: underline dotted rgb(214 173 114 / .7) 1px; text-underline-offset: .22em; &:hover { color: var(--ambar); }
}
.ficha { display: flex; flex-wrap: wrap; align-items: baseline; gap: .2rem 1.4rem; margin-top: .55rem; font-size: 1.0625rem; color: var(--tabaco); }
.ficha .tipos { font: 800 1.0625rem/1.2 var(--versal); color: var(--ambar); }
.ficha .marcas { color: var(--crema); }
.ficha .agendar { position: relative; z-index: 1; margin-left: auto; text-underline-offset: .2em; text-decoration-color: rgb(214 173 114 / .5); &:hover { color: var(--ambar); } }

/* ---------- tweets: negro, gris, azul, rosa y verde de X ---------- */
.tweets { position: relative; z-index: 1; margin-top: 1.1rem; view-timeline: --tira block; font-family: var(--x-letra); }
.tweets h4 { display: flex; align-items: center; gap: .55rem; min-height: 2.25rem; padding-right: 5.5rem; font: 700 1rem/1.2 var(--x-letra); color: var(--x-texto); & .logo-x { width: 1.05rem; } }
.logo-x { flex: none; fill: var(--x-texto); }
.tweets ol {
  display: flex; align-items: flex-start; gap: .85rem; margin-top: .5rem; padding: 3px 3px .8rem; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-left: 3px; scroll-behavior: smooth; overscroll-behavior-x: contain;
  scrollbar-width: thin; scrollbar-color: var(--x-borde) transparent; perspective: 900px;
}
/* flechas nativas del carrusel */
.tweets ol::scroll-button(*) {
  position: absolute; top: 0; width: 2.25rem; height: 2.25rem; border: 1px solid var(--x-borde); border-radius: 50%; background: #000; color: var(--x-azul); font: 700 1.15rem/1 var(--x-letra); cursor: pointer;
  transition: background .2s, color .2s, scale .3s var(--resorte), opacity .2s;
}
.tweets ol::scroll-button(left) { content: "←" / "Tweets anteriores"; right: 2.75rem; }
.tweets ol::scroll-button(right) { content: "→" / "Más tweets"; right: 0; }
.tweets ol:has(> :only-child)::scroll-button(*) { display: none; }
.tweets ol::scroll-button(*):hover { background: var(--x-azul); color: #fff; scale: 1.1; }
.tweets ol::scroll-button(*):disabled { opacity: .3; scale: 1; background: #000; color: var(--x-gris); cursor: default; }
.tweets ol:focus-visible { outline-color: var(--x-azul); border-radius: 16px; }
.tweet {
  position: relative; flex: none; width: min(20.5rem, 86%); scroll-snap-align: start; padding: .95rem 1rem .8rem; border: 1px solid var(--x-borde); border-radius: 16px; background: #000; color: var(--x-texto);
  transition: border-color .25s, background .25s, box-shadow .35s;
  &:only-child { width: min(30rem, 100%); }
  /* al pasar por encima, el borde recorre los colores de X */
  &:is(:hover, :focus-within) { background: #0a0a0a; box-shadow: 0 0 0 1.5px var(--tono); border-color: var(--tono); animation-name: cae, gira-x, tonos; & .logo-x { rotate: 360deg; fill: var(--tono); } & .mg svg { animation: latido .7s var(--resorte); } & .rt svg { rotate: 180deg; } }
  & .logo-x { width: 1.15rem; margin-left: auto; align-self: flex-start; transition: rotate .7s var(--suave), fill .3s; }
}
@keyframes tonos { 0%, 100% { --tono: #1d9bf0; } 30% { --tono: #7856ff; } 55% { --tono: #f91880; } 80% { --tono: #00ba7c; } }
@keyframes latido { 30% { scale: 1.5; } 55% { scale: .88; } }
.tweet-cabeza { display: flex; align-items: center; gap: .65rem; & div { min-width: 0; } & b { display: block; font: 700 1rem/1.25 var(--x-letra); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } & div span { display: block; color: var(--x-gris); font-size: .9375rem; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } }
.tweet-foto { position: relative; flex: none; width: 40px; height: 40px; border-radius: 50%; overflow: hidden; display: grid; place-items: center; background: var(--x-borde); color: var(--x-texto); font: 700 1.1rem/1 var(--x-letra); & img { position: absolute; inset: 0; width: 100%; height: 100%; } }
.tweet-texto { margin-top: .65rem; font-size: 1rem; line-height: 1.4; white-space: pre-line; overflow-wrap: anywhere; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 8; line-clamp: 8; overflow: hidden; & a { color: var(--x-azul); text-decoration: none; &:hover { text-decoration: underline; } } }
.tweet-imagen { display: block; max-width: 100%; width: auto; height: auto; max-height: 19rem; margin-inline: auto; margin-top: .75rem; border-radius: 14px; border: 1px solid var(--x-borde); }
.tweet-pie { display: flex; align-items: center; gap: 1.1rem; margin-top: .75rem; color: var(--x-gris); font-size: .9375rem; line-height: 1.2; & > a { margin-left: auto; color: var(--x-azul); font-weight: 700; text-decoration: none; &:hover { text-decoration: underline; } } }
.cifra { display: inline-flex; align-items: center; gap: .35rem; font-variant-numeric: tabular-nums; & b { font-weight: 400; } & svg { width: 1.15rem; fill: currentColor; transition: rotate .5s var(--resorte); } }
.mg { color: var(--x-rosa); }
.rt { color: var(--x-verde); }
.sube { --n: var(--hasta); counter-reset: n var(--n); &::after { content: counter(n); } }
.tweet.rel { border-style: dashed; }

/* ---------- popup de perfil: tarjeta de cuero cosida ---------- */
.perfil {
  width: min(22rem, calc(100vw - 2rem)); padding: 1.6rem 1.5rem 1.5rem; border: 0; border-radius: 8px; color: var(--crema); margin: auto;
  background: url(cuero.webp) var(--m3); box-shadow: 0 0 0 6px #000;
  opacity: 0; scale: .92; transition: opacity .18s, scale .35s var(--resorte), overlay .2s allow-discrete, display .2s allow-discrete;
  &:popover-open { opacity: 1; scale: 1; @starting-style { opacity: 0; scale: .92; } }
  &::before { content: ""; position: absolute; inset: 8px; border: 2px dashed var(--m5); border-radius: 5px; pointer-events: none; }
}
@supports (position-area: block-end) {
  @media (min-width: 600px) { .perfil { position: fixed; inset: auto; margin: .6rem 0; position-area: block-end span-inline-end; position-try-fallbacks: flip-block, flip-inline, flip-block flip-inline; } }
}
.perfil-cabeza { display: flex; gap: 1rem; align-items: center; }
.perfil-foto {
  position: relative; flex: none; width: 72px; height: 72px; border-radius: 50%; overflow: hidden; display: grid; place-items: center; background: var(--papel); color: var(--m4); font: 900 2.2rem/1 var(--versal); box-shadow: 0 0 0 2px var(--hilo);
  & img { position: absolute; inset: 0; width: 100%; height: 100%; }
}
.perfil-nombre { font: 800 1.35rem/1.1 var(--serif); overflow-wrap: anywhere; }
.perfil-usuario { color: var(--ambar); font-weight: 700; margin-top: .15rem; }
.perfil-bio { margin-top: .9rem; line-height: 1.35; }
.perfil-otros { margin-top: .9rem; color: var(--hilo); & ul { list-style: none; padding: 0; } & li { margin-top: .15rem; line-height: 1.25; } & a { color: var(--crema); text-underline-offset: .2em; } }
.perfil-x { display: block; margin-top: 1.15rem; padding: .7rem 1rem; border-radius: 3px; text-align: center; text-decoration: none; font: 700 1.0625rem/1 var(--sans); color: var(--tinta); background: var(--crema); &:hover { background: var(--ambar); } }

.vacio { padding: 3rem 0; font: 500 1.4rem/1.3 var(--serif); color: var(--hilo); & button { display: block; margin-top: 1rem; font: 700 1.0625rem/1 var(--sans); color: var(--tinta); background: var(--papel); border: 0; border-radius: 3px; padding: .75rem 1.1rem; cursor: pointer; } }
footer { margin-top: 2.5rem; padding-top: 1.25rem; color: var(--tabaco); max-width: 62ch; }
.avance { display: none; }

@media (min-width: 960px) {
  .mesa { grid-template-columns: 290px minmax(0, 1fr); gap: 4.5rem; padding-bottom: 0; }
  .lomo { position: sticky; top: 2.5rem; align-self: start; padding-bottom: 2rem; }
  main { position: relative; padding-bottom: 4rem; }
  /* surco entre la carta y la agenda; el hilo lo cose el scroll */
  /* la costura entre el lateral y la agenda la hace el scroll */
  main::after { content: ""; position: absolute; inset: 0 auto 0 -2.4rem; border-left: 2px dashed var(--m5); }
}
@media (max-width: 959px) {
  .panel { display: grid; grid-template-columns: 1fr auto; align-items: end; padding: 1.4rem 1.25rem 1.25rem; }
  .marca { font-size: 3rem; }
  .cuenta { text-align: right; & b { display: block; font: 800 1.9rem/1 var(--serif); } }
  .panel > :not(.marca, .cuenta) { grid-column: 1 / -1; }
  .abrir { margin-top: 1rem; & kbd { display: none; } }
  .tipos-lado { grid-template-columns: repeat(4, auto); gap: .4rem; }
  .tipo { padding: .6rem .6rem .5rem; & span { font-size: 1rem; } & b { font-size: 1.5rem; } }
  /* en el teléfono, el calendario es una tira con solo los días que tienen eventos */
  .calendario { display: flex; gap: 1rem; margin: 1rem -.4rem 0; padding-bottom: .3rem; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x proximity; scrollbar-width: none; }
  .mes-cal { flex: none; & h2 { font-size: 1.1rem; } }
  .dias { display: flex; gap: .4rem; & > :is(.sin, .letra) { display: none; } & > .con { width: 2.75rem; scroll-snap-align: start; font-size: 1.125rem; } }
  .dia { grid-template-columns: 4.6rem minmax(0, 1fr); }
  .fecha b { font-size: 2.5rem; }
  .fecha span { font-size: 1rem; }
  .evento h3 { font-size: 1.32rem; }
  .ficha .agendar { margin-left: 0; }
  /* los tweets usan todo el ancho de la pantalla */
  .tweets { margin-left: -4.6rem; }
  html { scrollbar-gutter: auto; }
  .menu { width: 100%; max-width: none; height: 92svh; margin: auto 0 0; border-radius: 14px 14px 0 0; & form { padding: 1.3rem 1.25rem max(1rem, env(safe-area-inset-bottom)); } }
  .menu, .menu[open] { clip-path: none; }
  .menu { translate: 0 100%; &[open] { translate: 0 0; @starting-style { translate: 0 100%; } } &[open]::after { animation: none; } }
  .menu-cuerpo { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); gap: .75rem; overflow-y: auto; }
  .menu-filtros, .resultados { overflow: visible; }
  .opcion { padding: .5rem 0; }
  .barra {
    display: block; position: fixed; z-index: 4; inset: auto 1rem max(1rem, env(safe-area-inset-bottom)); padding: 1.1rem 1rem; border: 0; border-radius: 6px; cursor: pointer; font: 700 1.125rem/1 var(--sans); color: var(--crema);
    background: var(--crema); color: var(--tinta); box-shadow: 0 0 0 6px #000;
  }
}

/* ---------- movimiento atado al scroll: solo CSS. Sin soporte o con movimiento reducido, todo se ve quieto y completo ---------- */
@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    .titulo { animation: aleja linear both; animation-timeline: scroll(root); animation-range: 0 55vh; transform-origin: left top; }
    main::after { animation: cose linear both; animation-timeline: scroll(root); }
    .avance { display: block; position: fixed; z-index: 6; inset: 0 0 auto; height: 3px; background: var(--ambar); transform-origin: left; animation: avanza linear both; animation-timeline: scroll(root); }

    .mes { animation: correa linear both; animation-timeline: --bloque; animation-range: entry 0% entry 18rem; }
    .fecha b { animation: rueda linear both; animation-timeline: view(); animation-range: entry 0% entry 9rem; transform-origin: 50% 100%; }
    .fecha span { animation: entra-chica linear both; animation-timeline: view(); animation-range: entry 0% entry 10rem; }
    .evento { view-timeline: --ev block; animation: entra linear both; animation-timeline: --ev; animation-range: entry 0% entry 9rem; }
    .evento .cuando, .evento .resumen, .evento .temas, .evento .organiza, .evento .ficha { animation: entra-chica linear both; animation-timeline: --ev; animation-range: entry 1rem entry 11rem; }
    .evento .temas { animation-range: entry 2rem entry 13rem; }
    .evento .ficha { animation-range: entry 3rem entry 14rem; }

    .tweets h4 .logo-x { animation: logo linear both; animation-timeline: --tira; animation-range: entry 0% entry 16rem; }
    .tweet {
      --d: calc(1.6rem * min(sibling-index(), 5));
      animation: cae linear both, gira-x linear both, none 2.8s linear infinite; animation-timeline: --tira, view(inline), auto; animation-range: entry var(--d) entry calc(14rem + var(--d)), cover 0% cover 100%, normal;
    }
    .sube { animation: contar linear both; animation-timeline: --tira; animation-range: entry 6rem entry 24rem; }
    .mg svg { animation: prende linear both; animation-timeline: --tira; animation-range: entry 8rem entry 22rem; }
    footer { animation: entra linear both; animation-timeline: view(); animation-range: entry 0% entry 90%; }

    @media (max-width: 959px) { .evento .cuando, .evento .resumen, .evento .temas, .evento .organiza, .evento .ficha { animation-name: entra-baja; } .barra { animation: asoma linear both; animation-timeline: --abrir; animation-range: exit 0% exit 100%; } }
  }
  #lista { transition: opacity .25s; }
}
@keyframes aleja { to { opacity: .25; scale: .96; translate: 0 2.5rem; } }
@keyframes cose { from { clip-path: inset(0 0 100% 0); } to { clip-path: inset(0); } }
@keyframes avanza { from { scale: 0 1; } }
@keyframes correa { from { clip-path: inset(0 100% 0 0 round 4px); translate: -2rem 0; } to { clip-path: inset(0 0 0 0 round 4px); } }
@keyframes rueda { from { opacity: 0; rotate: x -85deg; translate: 0 1.6rem; } }
@keyframes entra { from { opacity: 0; translate: 0 3.5rem; } }
@keyframes entra-chica { from { opacity: 0; translate: 1.5rem 0; } }
@keyframes entra-baja { from { opacity: 0; translate: 0 1.2rem; } }
@keyframes logo { from { scale: 0; rotate: -200deg; } }
@keyframes cae { from { opacity: 0; translate: 4rem 2.5rem; } }
/* al pasar de costado, cada tarjeta gira al entrar y al salir */
@keyframes gira-x { 0% { rotate: y -34deg; scale: .84; } 22%, 78% { rotate: y 0deg; scale: 1; } 100% { rotate: y 34deg; scale: .84; } }
@keyframes contar { from { --n: 0; } }
@keyframes prende { from { scale: 0; } 70% { scale: 1.35; } to { scale: 1; } }
@keyframes asoma { from { translate: 0 8rem; } }
@media (prefers-reduced-motion: reduce) { *, ::before, ::after { transition: none !important; animation: none !important; } }
