/* Solo estructura de X de Prop y el acento de la marca. Medidas, colores y movimiento vienen del kit. */
:root { --xp-acento: #2A8A1E; --xp-sobre: #fff; --azul: var(--xp-acento); --mac-acento: var(--xp-acento); --mac-acento-sel-lateral: var(--xp-acento); --pestana-tinte: var(--xp-acento); --tinta-pestana: var(--xp-acento); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --xp-acento: #6BF05A; --xp-sobre: #0b0b0b; --azul: var(--xp-acento); --mac-acento: var(--xp-acento); --mac-acento-sel-lateral: var(--xp-acento); --pestana-tinte: var(--xp-acento); --tinta-pestana: var(--xp-acento); } }
:root[data-theme="dark"] { --xp-acento: #6BF05A; --xp-sobre: #0b0b0b; --azul: var(--xp-acento); --mac-acento: var(--xp-acento); --mac-acento-sel-lateral: var(--xp-acento); --pestana-tinte: var(--xp-acento); --tinta-pestana: var(--xp-acento); }

[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; }
body.xp-iphone { overflow: hidden; background: var(--fondo); }
body.xp-mac { overflow: hidden; background: var(--mac-fondo); }
.ak { --xp-sec: var(--subtitulo); --xp-rojo: var(--rojo); --xp-caja: rgb(118 118 128 / .16); --xp-linea: var(--separador); }
.mac { --xp-sec: var(--mac-texto-2); --xp-rojo: var(--mac-rojo, #ff383c); --xp-caja: var(--mac-relleno-control); --xp-linea: var(--mac-separador); }
.xp-ico { display: block; flex: none; overflow: visible; }

/* ---------- Entrar ---------- */
.xp-entrada { position: fixed; inset: 0; display: grid; place-items: center; padding: 20px; overflow-y: auto; background: var(--fondo); }
.xp-mac .xp-entrada { background: var(--mac-fondo); }
.xp-entrada-caja { width: min(340px, 100%); display: grid; gap: 12px; justify-items: center; text-align: center; }
.xp-entrada-caja img { width: 64px; height: 64px; border-radius: 15px; }
.xp-entrada h1 { margin: 0; font-size: 1.3em; font-weight: 700; }
.xp-mac .xp-entrada h1 { font-size: 17px; color: var(--mac-texto); }
.xp-campo-caja { width: 100%; display: flex; align-items: center; box-sizing: border-box; border-radius: 14px; padding: 0 6px 0 16px; background: var(--tarjeta); }
.xp-mac .xp-campo-caja { border-radius: 8px; padding: 0 4px 0 10px; background: var(--mac-campo-fondo); box-shadow: 0 0 0 1px var(--mac-campo-borde); }
.xp-campo-caja input { flex: 1; min-width: 0; height: 50px; border: 0; outline: 0; background: none; color: inherit; font: inherit; font-size: max(1em, 16px); -webkit-user-select: text; user-select: text; }
.xp-mac .xp-campo-caja input { height: 36px; font-size: 13px; color: var(--mac-texto); }
.xp-ojo { flex: none; width: 44px; height: 44px; display: grid; place-items: center; padding: 0; border: 0; background: none; color: var(--xp-sec); }
.xp-mac .xp-ojo { width: 30px; height: 30px; }
.xp-secreto { -webkit-text-security: disc; }
.xp-error { min-height: 1.3em; margin: 0; color: var(--xp-rojo); }
.xp-principal { width: 100%; height: 50px; border: 0; border-radius: 25px; background: var(--xp-acento); color: var(--xp-sobre); font: inherit; font-weight: 600; }
.xp-mac .xp-principal { height: 36px; border-radius: 18px; font-size: 13px; }
.xp-principal:disabled, .xp-btn:disabled { opacity: .4; }

/* ---------- El tuit, como en X ---------- */
/* (28 nov) como un tuit abierto en X: cabecera arriba (logo, nombre y @, ⋯) y el texto y las fotos a todo el ancho */
.xp-tuit { display: block; min-width: 0; }
.xp-tcab { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; min-width: 0; }
.xp-tcab > img { width: 40px; height: 40px; border-radius: 50%; flex: none; }
.xp-tcab .xp-quien { flex: 1; flex-direction: column; align-items: flex-start; gap: 0; line-height: 1.25; }
.xp-tcab .xp-quien span { max-width: 100%; }
.xp-tcuerpo { min-width: 0; }
.xp-quien { display: flex; gap: 6px; align-items: baseline; min-width: 0; }
.xp-quien b { font-weight: 600; white-space: nowrap; }
.xp-quien span { color: var(--xp-sec); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.xp-texto { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.35; margin: 2px 0 0; -webkit-user-select: text; user-select: text; }
.xp-fotos { display: grid; gap: 4px; margin-top: 10px; border-radius: 14px; overflow: hidden; grid-template-columns: 1fr; }
.xp-fotos.varias { grid-template-columns: 1fr 1fr; }
.xp-fotos figure { position: relative; margin: 0; aspect-ratio: 4 / 5; background: var(--xp-caja); }
.xp-fotos:not(.varias) figure { aspect-ratio: auto; min-height: 120px; }
.xp-fotos img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top; }
.xp-fotos:not(.varias) img { height: auto; }
.xp-quita { position: absolute; top: 6px; right: 6px; width: 30px; height: 30px; border: 0; border-radius: 50%; display: grid; place-items: center; background: rgb(0 0 0 / .6); color: #fff; padding: 0; }
.xp-quita::after { content: ''; position: absolute; inset: -7px; }
.xp-resp { margin-top: 10px; padding: 10px 12px; border-radius: 14px; background: var(--xp-caja); color: var(--xp-sec); white-space: pre-wrap; overflow-wrap: anywhere; font-size: calc(1em - 3px); line-height: 1.35; }
.xp-mac .xp-resp { font-size: 12px; }
.xp-resp b { display: block; font-weight: 600; }
.xp-porque { color: var(--xp-sec); font-size: calc(1em - 4px); line-height: 1.35; margin: 12px 0 0; }
.xp-mac .xp-porque { font-size: 12px; }
.xp-acciones { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.xp-btn { min-height: 44px; padding: 0 16px; border: 0; border-radius: 22px; font: inherit; font-size: calc(1em - 2px); font-weight: 600; background: var(--xp-caja); color: inherit; display: inline-flex; align-items: center; gap: 8px; }
.xp-btn.p { background: var(--xp-acento); color: var(--xp-sobre); }
.xp-btn.r { color: var(--xp-rojo); }
.xp-btn.solo { width: 44px; padding: 0; justify-content: center; }
.xp-mac .xp-btn { min-height: 28px; padding: 0 12px; border-radius: 14px; font-size: 13px; font-weight: 500; }
.xp-mac .xp-btn.solo { width: 28px; padding: 0; }
.xp-est { flex: none; font-size: calc(1em - 4px); color: var(--xp-sec); white-space: nowrap; text-align: right; }
.xp-mac .xp-est { font-size: 12px; }
.xp-est.si { color: var(--xp-acento); } .xp-est.no { color: var(--xp-rojo); }
.xp-hora { flex: none; width: 3em; font-variant-numeric: tabular-nums; font-weight: 600; }
.xp-hora.sin { font-weight: 400; color: var(--xp-sec); }
.xp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.xp-vacio { display: grid; justify-items: center; gap: 6px; text-align: center; color: var(--xp-sec); padding: 60px 40px; }
.xp-vacio strong { font-weight: 600; color: var(--texto, var(--mac-texto)); }
.xp-vacio p { margin: 0; }
.xp-cifras { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.xp-cifras div { padding: 14px 16px; }
.xp-cifras div + div { border-left: 1px solid var(--xp-linea); }
.xp-cifras b { display: block; font-size: 1.3em; font-weight: 700; font-variant-numeric: tabular-nums; }
.xp-cifras span { color: var(--xp-sec); font-size: calc(1em - 4px); }
.xp-mac .xp-cifras b { font-size: 22px; } .xp-mac .xp-cifras span { font-size: 11px; }
.xp-nums { color: var(--xp-sec); font-variant-numeric: tabular-nums; }
.xp-rueda { width: 20px; height: 20px; animation: xp-gira 1s steps(8) infinite; }
@keyframes xp-gira { to { rotate: 1turn; } }
.xp-cargando { display: grid; place-items: center; gap: 10px; padding: 40px 20px; color: var(--xp-sec); }

/* ---------- iPhone ---------- */
.xp-pantalla { position: fixed; inset: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; background: var(--fondo); padding: env(safe-area-inset-top, 0px) 0 120px; }
.xp-pantalla::before { content: ''; position: absolute; top: 0; left: 0; width: 1px; height: calc(100% + 1px); }
.xp-pantalla .ak-cabecera:first-child { padding-top: 12px; }
.xp-iphone .xp-carta { margin: 0 20px 16px; padding: 18px; background: var(--tarjeta); border-radius: 26px; }
.xp-iphone .xp-aviso { margin: 0 21px 12px; color: var(--xp-sec); font-size: calc(1em - 4px); }
.xp-iphone .ak-hoja.xp-alta { height: calc(100% - max(47px, env(safe-area-inset-top, 0px) + 10px)); max-height: none; display: flex; flex-direction: column; background: var(--fondo); }
.xp-iphone .ak-hoja.xp-alta[hidden] { display: none; }
.xp-hcab { flex: none; display: flex; align-items: center; justify-content: space-between; padding: 16px 20px 10px; touch-action: none; }
.xp-hcab strong { font-weight: 600; }
.xp-hcab .lg-boton:disabled { opacity: .35; }
.xp-hs { flex: 1; min-height: 0; overflow: hidden auto; overscroll-behavior: contain; position: relative; padding: 8px 0 calc(30px + env(safe-area-inset-bottom, 0px)); }
.xp-hs::before { content: ''; position: absolute; top: 0; left: 0; width: 1px; height: calc(100% + 1px); }
.xp-iphone .xp-carta.h { margin-top: 0; }
.xp-iphone .xp-area { flex: 1; min-width: 0; border: 0; outline: 0; background: none; color: inherit; font: inherit; font-size: max(1em, 16px); padding: 14px 0; line-height: 1.35; resize: none; display: block; -webkit-user-select: text; user-select: text; }
.xp-cuenta { display: flex; justify-content: space-between; }
.xp-cuenta .pasa { color: var(--xp-rojo); }
.xp-iphone .ak-hoja.xp-baja { height: auto; }
.xp-confirma { padding: 24px 0 calc(24px + env(safe-area-inset-bottom, 0px)); }
.xp-confirma h2 { margin: 0 20px 6px; font-size: 1em; font-weight: 600; }
.xp-confirma p { margin: 0 20px 18px; font-size: calc(1em - 4px); color: var(--texto-2); }
.xp-confirma .ak-grupo { background: var(--xp-caja); }
.xp-accion .texto { color: var(--xp-acento); } .xp-accion.rojo .texto { color: var(--xp-rojo); }
.xp-valor { position: relative; flex: none; display: block; min-height: 44px; min-width: 7em; text-align: right; line-height: 44px; color: var(--xp-acento); }
.xp-valor input, .xp-valor select { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; font-size: 16px; -webkit-appearance: none; appearance: none; }
.xp-chips { display: flex; gap: 8px; overflow-x: auto; padding: 0 20px 14px; scrollbar-width: none; }
.xp-chips::-webkit-scrollbar { display: none; }
.xp-chip { flex: none; height: 36px; padding: 0 14px; border: 0; border-radius: 18px; background: var(--xp-caja); color: inherit; font: inherit; font-size: calc(1em - 2px); position: relative; }
.xp-chip::after { content: ''; position: absolute; inset: -4px 0; }
.xp-chip[aria-pressed="true"] { background: var(--xp-acento); color: var(--xp-sobre); }
.xp-mac .xp-chip { height: 24px; padding: 0 10px; border-radius: 12px; font-size: 12px; }
.xp-iphone .xp-toast { position: fixed; left: 20px; right: 20px; bottom: calc(100px + env(safe-area-inset-bottom, 0px)); z-index: 70; }
.xp-toast { display: grid; place-items: center; pointer-events: none; }
.xp-toast span { max-width: 100%; padding: 10px 18px; border-radius: 22px; background: var(--menu-cristal, var(--mac-cristal)); -webkit-backdrop-filter: blur(20px) saturate(1.6); backdrop-filter: blur(20px) saturate(1.6); box-shadow: 0 6px 24px rgb(0 0 0 / .25); font-size: calc(1em - 2px); text-align: center; }
.xp-mac .xp-toast { position: fixed; left: 220px; right: 0; bottom: 24px; z-index: 70; }
.xp-mac .xp-toast span { font-size: 13px; }

/* ---------- Mac ---------- */
.xp-pagina { max-width: 760px; margin: 0 auto; padding: 8px 28px 40px; color: var(--mac-texto); font-size: 13px; }
.xp-seccion { font-weight: 700; font-size: 13px; margin: 22px 0 8px; }
.xp-pagina > .xp-seccion:first-child { margin-top: 6px; }
.xp-mgrupo { border: 1px solid var(--mac-separador); border-radius: 10px; overflow: hidden; }
.xp-mfila { display: flex; align-items: center; gap: 12px; width: 100%; box-sizing: border-box; min-height: 44px; padding: 6px 14px; border: 0; background: none; color: inherit; font: inherit; text-align: left; }
.xp-mfila + .xp-mfila { border-top: 1px solid var(--mac-separador); }
.xp-mfila .texto { flex: 1; min-width: 0; }
.xp-mfila .subtitulo { display: block; color: var(--mac-texto-2); font-size: 12px; }
.xp-mfila.toca:active { background: var(--mac-sel-sin-foco); }
.xp-mfila .valor { color: var(--mac-texto-2); }
.xp-mac .xp-pie { color: var(--mac-texto-2); font-size: 11px; margin: 8px 2px 0; }
.xp-mac .xp-cartas { columns: 2 300px; column-gap: 14px; }
.xp-mac .xp-carta { break-inside: avoid; margin: 0 0 14px; padding: 14px; border: 1px solid var(--mac-separador); border-radius: 12px; }
.mac-sheet.xp-sheet { width: min(520px, calc(100vw - 40px)); max-height: calc(100vh - 60px); overflow-y: auto; }
.xp-sheet .xp-carta { margin: 0 0 12px; }
.xp-sheet .xp-area { width: 100%; box-sizing: border-box; height: auto; padding: 6px 8px; resize: vertical; font: inherit; line-height: 17px; display: block; }
.xp-sheet .xp-lin { display: flex; align-items: center; gap: 10px; margin: 10px 0; flex-wrap: wrap; }
.xp-sheet .xp-chips { padding: 0 0 10px; flex-wrap: wrap; }
.xp-sheet p { margin: 0 0 12px; color: var(--mac-texto-2); }
.xp-dosmac { display: flex; gap: 8px; }

/* miniaturas al editar: 72, como la foto adjunta de un chat */
#e-fotos .xp-fotos, #e-fotos .xp-fotos.varias { grid-template-columns: repeat(4, 72px); gap: 8px; border-radius: 0; overflow: visible; margin: 0; }
#e-fotos figure { aspect-ratio: 1; min-height: 0; height: 72px; border-radius: 12px; }
#e-fotos .xp-fotos img { height: 72px; border-radius: 12px; }
#e-fotos .xp-quita { top: -6px; right: -6px; width: 24px; height: 24px; background: #3a3a3c; }
#e-fotos .xp-quita::after { inset: -10px; }
.xp-mac .xp-pie + .xp-mgrupo { margin-top: 22px; }
.xp-mac .xp-aviso { margin: 0 0 12px; }
.xp-mac .mac-lateral .mac-fila[aria-selected="true"], .xp-mac .mac-lateral .mac-fila[aria-selected="true"] .ico, .xp-mac .mac-lateral .mac-fila[aria-selected="true"] .cuenta { color: var(--xp-sobre); }
.xp-mac .mac-app[data-inactiva] .mac-lateral .mac-fila[aria-selected="true"], .xp-mac .mac-app[data-inactiva] .mac-lateral .mac-fila[aria-selected="true"] .ico { color: var(--mac-texto); }
.xp-mac .mac-boton.primario { color: var(--xp-sobre); }

/* ---------- Día y Formatos ---------- */
.xp-iphone .xp-dias { padding: 4px 20px 16px; }
.xp-mac .xp-dias { flex-wrap: wrap; padding: 0 0 14px; }
.xp-iphone .ak-pie + .ak-cabecera, .xp-iphone .ak-grupo + .ak-cabecera { padding-top: 28px; }
.xp-segc { margin: 4px 20px 16px; }
.xp-mac #seg-p { margin: 0 0 14px; }
.xp-mac #seg-p button[aria-pressed="true"] { color: var(--xp-sobre); }
.xp-dos { margin-top: 12px; }
.xp-med b { color: var(--texto, var(--mac-texto)); font-size: calc(1em + 4px); font-weight: 600; }
.xp-barra { display: block; height: 4px; margin-top: 7px; border-radius: 2px; background: var(--xp-caja); overflow: hidden; }
.xp-barra i { display: block; height: 100%; border-radius: 2px; background: var(--xp-acento); }
.xp-que { color: var(--xp-sec); line-height: 1.35; margin: 0 20px 18px; }
.xp-mac .xp-que { margin: 4px 0 14px; max-width: 60ch; }
.xp-graf { padding: 30px 16px 10px; }
.xp-barras { display: flex; align-items: flex-end; gap: 2px; height: 132px; border-bottom: 1px solid var(--xp-linea); }
.xp-barras button { position: relative; flex: 1; min-width: 0; height: 100%; padding: 0; border: 0; background: none; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; }
.xp-barras i { display: block; width: min(100%, 24px); min-height: 2px; border-radius: 4px 4px 0 0; background: var(--xp-acento); }
.xp-barras em { font-style: normal; font-size: 12px; color: var(--xp-sec); white-space: nowrap; margin-bottom: 4px; position: relative; }
.xp-barras em.d { align-self: flex-end; } .xp-barras em.i { align-self: flex-start; }
@media (hover: hover) { .xp-barras button:hover i { opacity: .75; } }
.xp-eje { display: flex; justify-content: space-between; padding-top: 6px; color: var(--xp-sec); font-size: 12px; font-variant-numeric: tabular-nums; }
.xp-det { z-index: 30; }
.xp-det .ak-barra { z-index: 31; }
.xp-volver { margin: 0 0 12px; display: inline-flex; align-items: center; gap: 4px; }
.xp-cifras b { white-space: nowrap; }
.xp-iphone .ak-fila .subtitulo.xp-2 { display: -webkit-box; }

/* ---------- Cuenta ---------- */
.xp-heroe { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; padding: 18px; }
.xp-heroe b { font-size: 2.6em; line-height: 1.05; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.xp-heroe span { color: var(--xp-sec); }
.xp-heroe em { margin-left: auto; font-style: normal; font-weight: 600; color: var(--xp-acento); font-variant-numeric: tabular-nums; }
.xp-mac .xp-heroe b { font-size: 34px; }
.xp-barras .b { position: relative; flex: 1; min-width: 0; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; }
.xp-ejed span { flex: 1; text-align: center; white-space: nowrap; min-width: 0; }
.xp-sec { color: var(--xp-sec); font-size: calc(1em - 4px); }
.xp-mac .xp-sec { font-size: 12px; }
.xp-hueco { height: 22px; }
.xp-fb .texto { align-self: center; }

/* (26 nov) en la app de iPhone con iOS 26+ la barra de pestañas es la de Apple */
body.barra-nativa #tabs, body.barra-nativa .ak-sombra-abajo { visibility: hidden; }
/* (27 nov) mientras escribes fuera de una hoja, la barra de pestañas se aparta (teclado.js); la nativa la aparta la app */
body.xp-teclado #tabs, body.xp-teclado .ak-sombra-abajo { visibility: hidden; }

/* «Cómo se elige»: la regla entera, sin cortar */
.xp-como .subtitulo.xp-2, .xp-iphone .ak-fila.xp-como .subtitulo.xp-2 { display: block; -webkit-line-clamp: unset; overflow: visible; }

/* «De dónde sale» en cada propuesta */
.xp-fuentes { margin: 10px 0 0; font-size: 14px; line-height: 1.35; color: var(--texto-2); }
.xp-fuentes summary { min-height: 44px; display: flex; align-items: center; color: var(--xp-acento); font-weight: 500; cursor: default; list-style: none; -webkit-user-select: none; user-select: none; }
.xp-fuentes summary::-webkit-details-marker { display: none; }
.xp-fuentes summary::after { content: ''; width: 8px; height: 8px; margin-left: 8px; border: solid currentColor; border-width: 0 2px 2px 0; transform: translateY(-2px) rotate(45deg); }
.xp-fuentes[open] summary::after { transform: translateY(2px) rotate(-135deg); }
.xp-fuentes ul { margin: 0 0 4px; padding: 0; list-style: none; display: grid; gap: 6px; }
.xp-fuentes b { color: var(--texto); font-weight: 600; }

/* Respuestas: borradores para contestar a otras cuentas */
.xp-rcab { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; font-size: 14px; color: var(--texto-2); }
.xp-chip { display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border-radius: 12px; font-size: 13px; font-weight: 600; background: var(--fondo); color: var(--texto); }
.xp-chip.t-baja { background: color-mix(in srgb, #FF3B30 14%, transparent); color: #D70015; }
.xp-chip.t-cita { background: color-mix(in srgb, #007AFF 14%, transparent); color: #0040DD; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .xp-chip.t-baja { color: #FF6961; } :root:not([data-theme="light"]) .xp-chip.t-cita { color: #409CFF; } }
.xp-orig { margin: 0 0 12px; padding: 10px 12px; border-left: 3px solid var(--separador, rgb(128 128 128 / .3)); color: var(--texto-2); font-size: 15px; line-height: 1.35; white-space: pre-line; }
.xp-op { display: flex; gap: 10px; align-items: flex-start; margin: 8px 0; }
.xp-op .n { flex: none; width: 22px; height: 22px; border-radius: 11px; display: grid; place-items: center; background: var(--fondo); font-size: 13px; font-weight: 600; margin-top: 1px; }
.xp-op p { margin: 0; font-size: 17px; line-height: 1.35; white-space: pre-line; }
.xp-rimgs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 10px 0 0; }
.xp-rimgs img { width: 100%; border-radius: 12px; display: block; }
.xp-coms { margin: 10px 0 0; display: grid; gap: 8px; }
.xp-coms p { margin: 0; padding: 10px 12px; border-radius: 12px; background: var(--fondo); font-size: 15px; line-height: 1.35; }
.xp-coms b { font-weight: 600; }

/* Chat de cada tipo de tuit (hilos.js) */
.xp-hilo { margin: 0 20px 28px; padding: 12px; background: var(--tarjeta); border-radius: 26px; }
.xp-mac .xp-hilo, .mac .xp-hilo { margin: 0 0 14px; border-radius: 12px; border: 1px solid var(--mac-separador, rgb(128 128 128 / .25)); }
.xp-sheet .xp-hilo { margin: 0 0 12px; }
.xp-hmsgs { display: flex; flex-direction: column; gap: 6px; padding: 4px 4px 10px; }
.xp-hm { max-width: 82%; display: flex; flex-direction: column; }
.xp-hm p { margin: 0; padding: 8px 12px; border-radius: 18px; font-size: 16px; line-height: 1.35; white-space: pre-line; overflow-wrap: anywhere; }
.xp-hm span { font-size: 12px; color: var(--texto-2); margin: 3px 8px 0; }
.xp-hm.yo { align-self: flex-end; align-items: flex-end; }
.xp-hm.yo p { background: var(--xp-acento); color: var(--xp-sobre); }
.xp-hm.mac p { background: var(--fondo); color: var(--texto); }
.xp-hvacio, .xp-hest, .xp-herr { margin: 0 4px 6px; font-size: 14px; line-height: 1.35; color: var(--texto-2); }
.xp-herr { color: #D70015; }
.xp-hform { display: flex; align-items: flex-end; gap: 8px; padding: 4px; border-radius: 22px; background: var(--fondo); }
.xp-hform textarea { flex: 1; min-height: 36px; max-height: 140px; resize: none; border: 0; outline: none; background: transparent; color: var(--texto); padding: 8px 10px; font: 400 17px/22px -apple-system, system-ui, sans-serif; }
/* (27 nov) con el tamaño de letra del iPhone (Kevin usa 21 pt), no 17 fijo; nunca menos de 16 o iOS acerca la página [N6] */
.xp-iphone .xp-hform textarea { font-size: max(1em, 16px); line-height: 1.294; }
.xp-hform textarea::placeholder { color: var(--texto-2); }
.xp-hform button { flex: none; width: 36px; height: 36px; border-radius: 50%; border: 0; padding: 0; display: grid; place-items: center; background: var(--xp-acento); color: var(--xp-sobre); }
.xp-hform button:disabled { opacity: .3; }
.xp-hform button svg { width: 18px; height: 18px; overflow: visible; }

/* Lo viral de fuera */
.xp-vtexto { margin: 0 0 8px; font-size: 16px; line-height: 1.35; white-space: pre-line; overflow-wrap: anywhere; }
.xp-vnum { margin: 0 0 8px; font-size: 14px; color: var(--texto-2); }
.xp-vnum b { color: var(--texto); font-weight: 600; }
.xp-vcarta .xp-op { margin: 10px 0 0; padding: 10px 12px; border-radius: 14px; background: var(--fondo); }

/* Globitos: rojo = cambio hecho sin mirar; naranja = se está haciendo */
.xp-globo { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; margin-left: 6px; border-radius: 9px; vertical-align: 2px; font-size: 12px; font-weight: 600; line-height: 1; color: #fff; background: #FF3B30; box-sizing: border-box; }
.xp-globo.curso { min-width: 10px; width: 10px; height: 10px; padding: 0; background: #FF9500; animation: xp-latido 1.2s ease-in-out infinite; }
@keyframes xp-latido { 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { .xp-globo.curso { animation: none; } }
.xp-hest.curso, .xp-cargando.curso span { color: #C93400; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .xp-hest.curso, :root:not([data-theme="light"]) .xp-cargando.curso span { color: #FF9F0A; } }
#tabs .fila > button.con-globo, #tabs .fila > button.con-curso { position: relative; }
#tabs .fila > button.con-globo::after, #tabs .fila > button.con-curso::after { content: ''; position: absolute; top: 4px; left: calc(50% + 8px); width: 10px; height: 10px; border-radius: 5px; background: #FF3B30; }
#tabs .fila > button.con-curso::after { background: #FF9500; }

/* Barra del chat: minimizar y borrar */
.xp-hbarra { display: flex; align-items: center; gap: 4px; margin: -4px -4px 6px; }
.xp-hmin { flex: 1; display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 8px; border: 0; background: transparent; color: var(--texto-2); font: 400 15px -apple-system, system-ui, sans-serif; text-align: left; -webkit-tap-highlight-color: transparent; }
.xp-hresumen { flex: 1; }
.xp-hflecha { width: 14px; height: 9px; overflow: visible; transition: transform 200ms ease; }
.xp-hmin[aria-expanded="false"] .xp-hflecha { transform: rotate(-90deg); }
.xp-hborra { flex: none; width: 44px; height: 44px; border: 0; border-radius: 50%; display: grid; place-items: center; background: transparent; color: var(--texto-2); padding: 0; -webkit-tap-highlight-color: transparent; }
.xp-hborra svg { width: 20px; height: 20px; overflow: visible; }
.xp-hilo.mini .xp-hmsgs, .xp-hilo.mini .xp-hform, .xp-hilo.mini .xp-hborra { display: none; }
.xp-hilo.mini .xp-hbarra { margin-bottom: -4px; }

/* Icono de cada tipo de tuit (cuadrado de color, como Ajustes de iOS) */
.xp-tico { flex: none; display: inline-grid; place-items: center; width: 28px; height: 28px; margin-right: 12px; }
.xp-tico .xp-ico { overflow: visible; }
.xp-tico.peq { width: 18px; height: 18px; margin: 0 6px 0 0; vertical-align: -3px; }

/* El tuit original al que contestamos */
.xp-otuit { display: block; margin: 0 0 12px; padding: 12px; border-radius: 16px; border: 1px solid rgb(128 128 128 / .28); color: var(--texto); text-decoration: none; -webkit-tap-highlight-color: transparent; }
.xp-otcab { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.xp-otcab img, .xp-otav { width: 36px; height: 36px; border-radius: 50%; flex: none; object-fit: cover; }
.xp-otav { display: grid; place-items: center; background: var(--fondo); font-weight: 600; color: var(--texto-2); }
.xp-otcab div { display: flex; flex-direction: column; min-width: 0; }
.xp-otcab b { font-weight: 600; font-size: 15px; }
.xp-otcab span { font-size: 14px; color: var(--texto-2); }
.xp-otuit p { margin: 0; font-size: 16px; line-height: 1.35; white-space: pre-line; overflow-wrap: anywhere; }
.xp-otfotos { display: grid; gap: 4px; margin-top: 10px; border-radius: 14px; overflow: hidden; }
.xp-otfotos.n2, .xp-otfotos.n3, .xp-otfotos.n4 { grid-template-columns: 1fr 1fr; }
.xp-otfotos img { width: 100%; height: 100%; max-height: 260px; object-fit: cover; display: block; }
.xp-otfotos.n1 img { max-height: 340px; }
.xp-rtitulo { margin: 4px 0 2px; font-size: 13px; font-weight: 600; color: var(--texto-2); text-transform: uppercase; letter-spacing: .02em; }

/* «Con tu cambio»: el tuit de ejemplo rehecho con lo que se ha pedido */
.xp-cambio { margin: 0 20px 16px; padding: 14px 18px 16px; border-radius: 26px; background: var(--tarjeta); box-shadow: inset 0 0 0 2px #FF9500; }
.xp-sheet .xp-cambio, .mac .xp-cambio { margin: 0 0 12px; border-radius: 12px; }
.xp-cartas .xp-cambio { margin-top: -4px; }

/* El chat se desliza por dentro y abre por los últimos mensajes */
.xp-hmsgs { max-height: min(42vh, 320px); overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }

/* Plantilla de cada tipo de tuit */
.xp-plantilla p { margin: 0 0 6px; font-size: 16px; line-height: 1.45; white-space: pre-line; overflow-wrap: anywhere; }
.xp-hueco { color: var(--xp-acento); font-weight: 600; }
.xp-extra { color: var(--texto-2); font-style: italic; }

.xp-aceptado { box-shadow: inset 0 0 0 2px var(--xp-acento); }

/* (26 nov, Kevin: «demasiado scroll… en tabs o slider») en el detalle de un tipo de tuit, las imágenes del tuit van en una fila que se desliza */
.xp-det .xp-fotos.varias { display: flex; gap: 6px; overflow-x: auto; scroll-snap-type: x mandatory; border-radius: 14px; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.xp-det .xp-fotos.varias::-webkit-scrollbar { display: none; }
.xp-det .xp-fotos.varias figure { flex: 0 0 46%; aspect-ratio: 4 / 5; scroll-snap-align: start; border-radius: 12px; overflow: hidden; }

/* (27 nov) propuestas: Programar · Editar · Formato · … caben en una fila del iPhone; los formatos rápidos de la hoja, sobre tarjeta para que se vean */
.xp-pacc { gap: 6px; }
.xp-iphone .xp-pacc .xp-btn:not(.solo):not(.p) { padding: 0 12px; }
.xp-iphone .xp-pf { padding: 0; }
.xp-iphone .xp-pf .xp-chip { background: var(--tarjeta); }
.xp-iphone .xp-pf .xp-chip[aria-pressed="true"] { background: var(--xp-acento); color: var(--xp-sobre); }

/* (27 nov, Kevin: «quiero ver diferentes del mismo post… estilo slider») Hoy: cada hora con su tuit y, si hay versiones o propuestas, un carrusel
   con scroll nativo y encaje, la siguiente asomando [N2: carrusel horizontal, márgenes 20] */
.xp-hslot { margin: 0 0 26px; }
.xp-hscab { display: flex; align-items: baseline; gap: 8px; margin: 0 24px 8px; font-size: calc(1em - 2px); }
.xp-hscab .h { color: var(--xp-sec); font-weight: 600; font-variant-numeric: tabular-nums; }
.xp-hscab b { font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.xp-hscab .xp-est { margin-left: auto; white-space: nowrap; }
.xp-est.naranja, .xp-viral { color: #FF9F0A; }
.xp-viral { font-weight: 600; font-size: calc(1em - 2px); }
.xp-slider { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 0 20px; scroll-padding: 0 20px; scrollbar-width: none; overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch; }
.xp-slider::-webkit-scrollbar { display: none; }
.xp-slide { flex: 0 0 calc(100% - 52px); min-width: 0; scroll-snap-align: start; }
.xp-slide:only-child { flex-basis: 100%; }
.xp-iphone .xp-slide .xp-carta { margin: 0; }
.xp-slide > .xp-acciones { margin: 10px 4px 0; }
.xp-spie { display: flex; align-items: center; gap: 10px; margin: 10px 24px 0; }
.xp-puntos { display: flex; gap: 6px; }
.xp-puntos i { width: 7px; height: 7px; border-radius: 50%; background: var(--xp-sec); opacity: .35; }
.xp-puntos i.on { opacity: 1; background: currentColor; }
.xp-scual { font-size: 13px; color: var(--xp-sec); }
.xp-mini { cursor: pointer; }
.xp-iphone .xp-carta.xp-mini { padding: 12px 16px; }
.xp-mini p { margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--xp-sec); }
.xp-nota { display: flex; gap: 8px; align-items: center; margin: 8px 24px 0; font-size: 13px; color: var(--xp-sec); }
.xp-centro { justify-content: center; margin-bottom: 24px; }
.xp-rop { margin: 0; white-space: pre-wrap; line-height: 1.35; }
.xp-hslot > .xp-rtitulo { margin: 4px 24px 8px; }
.xp-iphone .xp-hslot > .xp-carta { margin-bottom: 10px; }
.xp-mac .xp-hslot { max-width: 760px; }
.xp-mac .xp-slider { padding: 0; scroll-padding: 0; }
.xp-mac .xp-slide { flex-basis: min(560px, 85%); }
.xp-mac .xp-slide .xp-carta, .xp-mac .xp-hslot > .xp-carta { margin: 0 0 10px; }
.xp-mac .xp-hscab, .xp-mac .xp-spie, .xp-mac .xp-nota, .xp-mac .xp-hslot > .xp-rtitulo { margin-left: 4px; margin-right: 4px; }
.xp-hscab .xp-est { font-size: 13px; }
.xp-slide > .xp-acciones { flex-wrap: nowrap; }
.xp-iphone .xp-slide > .xp-acciones .xp-btn:not(.p) { padding: 0 14px; }

/* (27 nov) Formatos en el centro: veredicto, variaciones, mejoras */
.xp-ve { font-style: normal; font-weight: 600; color: var(--xp-sec); }
.xp-ve.si { color: var(--xp-acento); } .xp-ve.no { color: var(--xp-rojo); }
.xp-mchips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.xp-mchip { font-size: 12px; line-height: 20px; padding: 0 8px; border-radius: 10px; background: var(--xp-caja); color: var(--xp-sec); }
.xp-mchip.nar { color: #FF9F0A; background: rgb(255 159 10 / .16); }
.xp-veredicto { padding: 16px 18px; display: flex; flex-direction: column; gap: 2px; }
.xp-veredicto > b { font-size: 1.7em; font-weight: 700; }
.xp-veredicto > span { color: var(--xp-sec); font-size: calc(1em - 2px); }
.xp-mini3 { display: flex; gap: 8px; margin-top: 12px; }
.xp-mini3 > div { flex: 1; background: var(--xp-caja); border-radius: 14px; padding: 8px 10px; font-size: 12px; color: var(--xp-sec); }
.xp-mini3 b { display: block; font-size: 17px; color: var(--etiqueta, inherit); }
.xp-vt { display: block; font-size: 13px; font-weight: 600; color: var(--xp-sec); margin: 0 0 10px; }
.xp-vt.si { color: var(--xp-acento); }
.xp-mejoras { padding: 0; }
.xp-mejora { padding: 14px 18px; border-bottom: .5px solid var(--xp-linea); display: flex; flex-direction: column; gap: 2px; }
.xp-mejora:last-child { border-bottom: 0; }
.xp-mejora > span { color: var(--xp-sec); font-size: calc(1em - 2px); }
.xp-mejora .xp-acciones { margin-top: 10px; }
.xp-mejora > em { font-size: 13px; margin-top: 6px; }
.xp-metx { display: flex; justify-content: space-between; margin: 10px 0 0; font-size: 13px; color: var(--xp-sec); }
.xp-metx span { display: inline-flex; align-items: center; gap: 4px; }
.xp-rsub { margin: -4px 24px 10px; font-size: 13px; color: var(--xp-sec); }
.xp-mac .xp-rsub { margin: -4px 4px 10px; }
.xp-slider { touch-action: pan-x pan-y; }

/* (27 nov) Formatos como tarjetas con su último tuit; textos largos plegados con «Mostrar más»; ⋯ del tuit como en X; falta el dato */
.xp-fcard { cursor: pointer; }
.xp-fcab { display: flex; align-items: center; gap: 10px; }
.xp-fcab b { font-weight: 700; font-size: 1.05em; flex: 1; min-width: 0; }
.xp-fch { color: var(--xp-sec); font-size: 1.4em; line-height: 1; }
.xp-fnum { margin: 6px 0 0; } .xp-fnum b { font-weight: 700; }
.xp-fsub { margin: 2px 0 10px; font-size: calc(1em - 3px); color: var(--xp-sec); }
.xp-fmini { border: .5px solid var(--xp-linea); border-radius: 18px; padding: 12px; pointer-events: none; }
.xp-fmini .xp-texto { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.xp-fmini .xp-mostrar { display: none; }
.xp-fmini .xp-fotos img { max-height: 170px; object-fit: cover; }
.xp-fcard .xp-mchips { margin-top: 10px; }
.xp-texto.xp-plegado { display: -webkit-box; -webkit-line-clamp: 6; -webkit-box-orient: vertical; overflow: hidden; }
.xp-mostrar { border: 0; background: none; padding: 4px 0 0; font: inherit; color: var(--xp-acento); font-weight: 500; cursor: pointer; }
.xp-tmas { margin-left: auto; flex: none; width: 32px; height: 28px; border: 0; background: none; color: var(--xp-sec); display: inline-flex; align-items: center; justify-content: center; margin-right: -6px; position: relative; }
.xp-tmas::after { content: ''; position: absolute; inset: -8px; }
.xp-vt.nar { color: #FF9F0A; }
.xp-slide { flex-basis: calc(100% - 36px); }

/* (27 nov) foto y texto por separado: fila de fotos encima del carrusel de textos */
.xp-afotos { align-items: center; margin: 0 20px 12px; padding: 0; }
.xp-mac .xp-afotos { margin: 0 4px 12px; }
.xp-chlab { font-size: 13px; color: var(--xp-sec); margin-right: 2px; }

/* (27 nov) pestaña Ideas: Virales y Tuiteros */
.xp-icarta .xp-otuit { margin: 0; }
.xp-icarta .xp-vnum { margin: 10px 0 0; }
.xp-iesp { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; font-size: calc(1em - 3px); color: var(--xp-sec); }
.xp-iesp .xp-rueda { width: 18px; height: 18px; }
.xp-iesp.ok { color: var(--xp-acento); font-weight: 600; }
.xp-mac .xp-iesp { min-height: 28px; font-size: 12px; }
/* el tuitero cita nuestro tuit, como una cita de X: su avatar de 40 y dentro nuestro tuit enmarcado, con cabecera de 20 en una línea */
.xp-tcab > .xp-otav { width: 40px; height: 40px; flex: none; }
.xp-tcita { margin-top: 10px; padding: 10px 12px 12px; border-radius: 16px; border: 1px solid rgb(128 128 128 / .28); }
.xp-tcita .xp-otcab { gap: 6px; margin-bottom: 2px; }
.xp-tcita .xp-otcab img { width: 20px; height: 20px; }
.xp-tcita .xp-otcab div { flex-direction: row; align-items: baseline; gap: 4px; }
.xp-tcita .xp-otcab span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.xp-ajustes-t { font-size: calc(1em + 5px); font-weight: 700; margin: 40px 20px 0; }
.xp-mac .xp-otuit p { font-size: 13px; }
.xp-mac .xp-otcab b { font-size: 13px; } .xp-mac .xp-otcab span { font-size: 12px; } .xp-mac .xp-otcab img, .xp-mac .xp-otav { width: 28px; height: 28px; }
/* (28 nov) el carrusel solo se desplaza de lado (sin overflow-y: hidden el navegador lo trata como lista vertical cortada) y el texto del tuit no se selecciona al mantener [N6] */
.xp-slider { overflow-y: hidden; }
.xp-texto { -webkit-user-select: none; user-select: none; }
/* (28 nov, Kevin: «que todas las cards tengan el mismo tamaño, me molesta que esté así como escalonado») en un carrusel todas las tarjetas miden
   lo de la más alta: el contenido arriba y los botones en la misma línea abajo */
.xp-slider { align-items: stretch; }
.xp-slide { display: flex; flex-direction: column; }
.xp-slide > .xp-carta { flex: 1 0 auto; }
.xp-slide > .xp-acciones { flex: none; }
