/* ═══════════════════════════════════════════════════════════════
   ATHAN SHOCK — styles.css
   Estética: Noir Editorial Investigativo
   Fuentes: Bebas Neue (display) · IBM Plex Mono (body)
═══════════════════════════════════════════════════════════════ */


/* ── 0. VARIABLES ─────────────────────────────────────────── */
:root {
  /* Fondos y Superficies */
  --bg:           #080808;
  --surface:      #111111;
  --surface-2:    #181818;
  --border:       #1f1f1f;
  --border-mid:   #2e2e2e;

  /* Textos */
  --text:         #e0d8cc;
  --text-dim:     #9b968f;
  --text-muted:   #858483;

  /* Colores de Acento */
  --accent:       #c41c1c;
  --accent-texto: #e65151;   /* el rojo de marca como TEXTO: contraste AA sobre fondos oscuros */
  --accent-hi:    #e02828;
  --accent-lo:    #8a1212;

  /* Tipografías */
  --font-display: 'Bebas Neue', 'Arial Narrow', sans-serif;
  --font-serif:   'Playfair Display', Georgia, serif;
  --font-mono:    'IBM Plex Mono', 'Courier New', monospace;

  /* Espaciados y Tamaños */
  --max-w:        1200px;
  --gutter:       clamp(1.25rem, 4vw, 3rem);
  --section-gap:  clamp(4rem, 10vw, 9rem);

  /* Utilidades */
  --radius:       2px;
  --transition:   220ms cubic-bezier(0.4, 0, 0.2, 1);
  --header-h:     64px;
}


/* ── 1. RESET & BASE ──────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: clamp(0.875rem, 1.5vw, 1rem);
  font-weight: 300;
  line-height: 1.7;
  overflow-x: hidden;
  scrollbar-gutter: stable;
}

img, video { max-width: 100%; display: block; }

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition);
}

ul { list-style: none; }


/* ── 2. GRAIN OVERLAY ─────────────────────────────────────── */
.grain {
  position: fixed;
  inset: -50%;
  width: 200%;
  height: 200%;
  pointer-events: none;
  z-index: 999;
  opacity: 0.032;
  will-change: transform;
  transform: translateZ(0);
  background-image: url("../img/ruido.webp");
  background-size: 128px 128px;
  animation: grain-shift 8s steps(10) infinite;
}

@keyframes grain-shift {
  0%, 100% { transform: translate3d(0, 0, 0); }
  10%  { transform: translate3d(-2%, -3%, 0); }
  20%  { transform: translate3d(3%, 1%, 0); }
  30%  { transform: translate3d(-1%, 4%, 0); }
  40%  { transform: translate3d(4%, -2%, 0); }
  50%  { transform: translate3d(-3%, 3%, 0); }
  60%  { transform: translate3d(2%, -4%, 0); }
  70%  { transform: translate3d(-4%, 2%, 0); }
  80%  { transform: translate3d(3%, -1%, 0); }
  90%  { transform: translate3d(-2%, 4%, 0); }
}


/* ── 3. HEADER ────────────────────────────────────────────── */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--header-h);
  transform: translateZ(0);
  background: rgba(8, 8, 8, 0.94);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  transition: border-color var(--transition);
}

.site-header.scrolled { border-color: var(--border-mid); }

.header-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--gutter);
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-display);
  font-size: 1.4rem;
  letter-spacing: 0.08em;
  color: var(--text);
  user-select: none;
}

.logo-mark {
  width: 18px;
  height: 18px;
  object-fit: contain;
  display: block;
  animation: blink-mark 2.8s step-end infinite;
}

@keyframes blink-mark {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.2; }
}

.site-logo em { font-style: normal; color: var(--accent-texto); }

.site-nav ul { display: flex; gap: 2rem; align-items: center; }

.site-nav a {
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-dim);
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
  transition: color var(--transition), border-color var(--transition);
}

.site-nav a:hover,
.site-nav a.active     { color: var(--text); border-color: var(--border-mid); }


.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.nav-toggle span {
  display: block;
  height: 1.5px;
  background: var(--text);
  transition: transform var(--transition), opacity var(--transition);
}

.nav-toggle.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

.scroll-bar {
  position: absolute;
  bottom: 0; left: 0;
  height: 1px;
  width: 0%;
  background: var(--accent);
  transition: width 80ms linear;
  transform: translateZ(0);
}


/* ── 4. MAIN ──────────────────────────────────────────────── */
.site-main { padding-top: var(--header-h); }


/* ── 5. HERO ──────────────────────────────────────────────── */
.hero {
  position: relative;
  min-height: calc(100svh - var(--header-h));
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
  contain: layout paint;
}

/* ── TICKER ─────────────────────────────────────────────────
   Comportamiento: el texto entra por la DERECHA, cruza la
   pantalla y desaparece por la IZQUIERDA. Una vez fuera del
   borde izquierdo, el snap de vuelta a la derecha es invisible
   porque el elemento ya está fuera de .ticker-wrap (overflow:hidden).

   Keyframes:
     0%   → translateX(100vw)   : empieza justo fuera del borde derecho
     100% → translateX(-100%)   : sale completamente por el borde izquierdo
              (-100% de su propio ancho, que es max-content)
─────────────────────────────────────────────────────────── */
.ticker-wrap {
  overflow: hidden;
  background: var(--accent);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  height: 2.5rem;
}

.ticker-track {
  display: inline-flex;
  align-items: center;
  gap: 2.5rem;
  padding: 0 1rem;
  white-space: nowrap;
  font-family: var(--font-display);
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  color: #fff;
  will-change: transform;
  animation: ticker-rtl 24s linear infinite;
}

.ticker-track .sep { opacity: 0.45; }

@keyframes ticker-rtl {
  from { transform: translateX(100vw); }
  to   { transform: translateX(-100%); }
}

/* Hero body */
.hero-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(3rem, 8vw, 7rem) var(--gutter);
  max-width: var(--max-w);
  margin: 0 auto;
  width: 100%;
  position: relative;
  z-index: 1;
}

.hero-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 1.5rem;
}

.hero-label .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

/* Onda del punto: un pseudoelemento que crece y se desvanece. Anima solo transform
   y opacity (los hace la GPU); antes animaba box-shadow y repintaba 60 veces/s. */
.hero-label .dot, .ct-home .deco-tag .dot { position: relative; }
.hero-label .dot::after, .ct-home .deco-tag .dot::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  background: rgba(196, 28, 28, 0.5);
  animation: pulse-dot 2s ease-out infinite;
}
@keyframes pulse-dot {
  0%       { transform: scale(1); opacity: 0.6; }
  60%, 100% { transform: scale(3); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .hero-label .dot::after, .ct-home .deco-tag .dot::after, .ct-avatar-ring { animation: none !important; }
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(4rem, 12vw, 10rem);
  line-height: 0.92;
  letter-spacing: 0.02em;
  color: var(--text);
  margin-bottom: 2rem;
}

.hero-title em {
  font-style: italic;
  font-family: var(--font-serif);
  color: var(--accent-texto);
  font-size: 0.72em;
}

.hero-sub {
  max-width: 480px;
  font-size: clamp(0.85rem, 1.5vw, 1rem);
  color: var(--text-dim);
  line-height: 1.8;
  margin-bottom: 2.5rem;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: center;
}

.hero-deco {
  position: absolute;
  right: var(--gutter);
  bottom: 2rem;
  font-family: var(--font-display);
  font-size: clamp(6rem, 20vw, 18rem);
  color: var(--surface-2);
  line-height: 1;
  user-select: none;
  pointer-events: none;
  z-index: 0;
}


/* ── 6. BOTONES ───────────────────────────────────────────── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0.75rem 2rem;
  background: var(--accent);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  transition: background var(--transition), box-shadow var(--transition);
}

.btn-primary:hover {
  background: var(--accent-hi);
  box-shadow: 0 0 20px rgba(196, 28, 28, 0.35);
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0.75rem 1.5rem;
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border: 1px solid var(--border-mid);
  border-radius: var(--radius);
  transition: color var(--transition), border-color var(--transition);
}

.btn-ghost:hover { color: var(--text); border-color: var(--text-dim); }


/* ── 7. FEATURES ──────────────────────────────────────────── */
.features {
  padding: var(--section-gap) var(--gutter);
  max-width: var(--max-w);
  margin: 0 auto;
  contain: layout paint;
}

.section-header { margin-bottom: clamp(2rem, 5vw, 4rem); }

.section-tag {
  display: block;
  font-size: 0.78rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent-texto);
  margin-bottom: 0.75rem;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 6vw, 5rem);
  line-height: 0.95;
  letter-spacing: 0.02em;
  color: var(--text);
}

.section-title em {
  font-style: italic;
  font-family: var(--font-serif);
  color: var(--text-dim);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
}

.feature-card {
  background: var(--surface);
  padding: 2.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  opacity: 0;
  transform: translateY(16px);
  transition: background var(--transition), opacity 0.5s ease, transform 0.5s ease;
}

.feature-card.revealed { opacity: 1; transform: translateY(0); }
.feature-card:hover    { background: var(--surface-2); }

.card-icon {
  width: 28px;
  height: 28px;
  color: var(--accent-texto);
  margin-bottom: 0.25rem;
}

.feature-card h3 {
  font-family: var(--font-display);
  font-size: 1.6rem;
  letter-spacing: 0.04em;
  color: var(--text);
}

.feature-card p {
  font-size: 0.82rem;
  color: var(--text-dim);
  line-height: 1.75;
}


/* ── 8. DEV NOTICE ────────────────────────────────────────── */



/* ── 9. FOOTER ────────────────────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 2.5rem var(--gutter);
}

.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.footer-brand {
  font-family: var(--font-display);
  font-size: 1.1rem;
  letter-spacing: 0.1em;
  color: var(--text-dim);
}

.footer-brand em { font-style: normal; color: var(--accent-texto); }

.footer-copy {
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  text-align: right;
}


/* ── 10. PÁGINAS DE ERROR ─────────────────────────────────── */
.error-page {
  min-height: calc(100svh - var(--header-h));
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: var(--section-gap) var(--gutter);
  max-width: var(--max-w);
  margin: 0 auto;
  position: relative;
  overflow: hidden;
}

.error-code {
  font-family: var(--font-display);
  font-size: clamp(7rem, 25vw, 20rem);
  line-height: 0.85;
  color: var(--surface-2);
  letter-spacing: -0.02em;
  user-select: none;
  position: absolute;
  right: var(--gutter);
  top: 50%;
  transform: translateY(-50%);
  z-index: 0;
}


.error-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.68rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent-texto);
  margin-bottom: 1.25rem;
}

.error-tag::before {
  content: '';
  display: block;
  width: 24px;
  height: 1px;
  background: var(--accent);
}

.error-title {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 7vw, 5.5rem);
  line-height: 0.92;
  letter-spacing: 0.02em;
  color: var(--text);
  margin-bottom: 1.25rem;
}

.error-desc {
  font-size: 0.88rem;
  color: var(--text-dim);
  line-height: 1.8;
  margin-bottom: 2rem;
}

.error-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: center;
}



/* ── 11. RESPONSIVO ───────────────────────────────────────── */
@media (max-width: 720px) {
  .nav-toggle { display: flex; }

  .site-nav {
    position: absolute;
    top: var(--header-h);
    left: 0; right: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 1.5rem var(--gutter);
    display: none;
  }

  .site-nav.open { display: block; }

  .site-nav ul { flex-direction: column; gap: 1.25rem; align-items: flex-start; }
  .site-nav a  { font-size: 0.85rem; }

  /* backdrop-filter muy costoso en GPU móvil → off */
  .site-header {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: rgba(8, 8, 8, 0.98);
  }

  /* Grain más ligero en móvil */
  .grain { opacity: 0.02; animation: grain-shift 12s steps(6) infinite; }

  .hero-deco { display: none; }

  .error-code { font-size: 35vw; opacity: 0.5; }

  .footer-inner  { flex-direction: column; align-items: flex-start; }
  .footer-copy   { text-align: left; }
}


/* ── 12. ACCESIBILIDAD ────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }

  .grain        { display: none; }
  .ticker-track { animation: none; }
  .feature-card { opacity: 1; transform: none; }
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}


/* ══ App instalable / sin conexión (ver static/js/pwa.js) ══════════════ */
.aviso-red {
  position: fixed; left: 50%; bottom: calc(1rem + env(safe-area-inset-bottom, 0px)); z-index: 3500;
  transform: translate(-50%, 150%); max-width: calc(100vw - 2rem);
  padding: 0.7rem 1.1rem; border-radius: 999px; background: #1b1b1b; border: 1px solid var(--border-mid);
  color: var(--text); font-family: var(--font-mono); font-size: 0.74rem; letter-spacing: 0.04em; text-align: center;
  box-shadow: 0 8px 24px rgba(0,0,0,.5); transition: transform 0.25s ease; pointer-events: none;
}
.aviso-red::before { content: '●'; color: var(--accent-texto); margin-right: 0.5rem; }
.aviso-red.ok::before { color: #4ade80; }
.aviso-red.visible { transform: translate(-50%, 0); }
.site-nav .boton-instalar { color: var(--accent-texto); }
.site-nav .boton-instalar[hidden] { display: none; }
/* Reproductores incrustados sin red: aviso en lugar de la página de error del navegador */
.sin-conexion .blog-block-video iframe, .sin-conexion .hero-video-frame iframe { visibility: hidden; }
.sin-conexion .blog-block-video::after, .sin-conexion .hero-video-frame:has(iframe)::after {
  content: 'Este video necesita conexión a internet'; position: absolute; inset: 0; display: flex; align-items: center;
  justify-content: center; text-align: center; padding: 1rem; background: #0d0d0d; color: var(--text-dim);
  font-family: var(--font-mono); font-size: 0.8rem; border: 1px dashed var(--border-mid);
}

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
main p a:not([class]), main li a:not([class]) { text-decoration: underline; text-underline-offset: 2px; }

/* Cuenta en la cabecera */
.site-nav .nav-cuenta { display: inline-flex; align-items: center; gap: .45rem; padding: .3rem .75rem; border: 1px solid var(--border-mid); border-radius: 999px; }
.site-nav .nav-cuenta:hover, .site-nav .nav-cuenta:focus-visible, .site-nav .nav-cuenta.active { border-color: var(--accent); }
.nav-avatar { width: 24px; height: 24px; border-radius: 50%; object-fit: cover; flex: 0 0 auto; }
.nav-avatar-letra { display: inline-grid; place-items: center; background: var(--accent); color: #fff; font-size: .7rem; font-weight: 600; }
.nav-cuenta-nombre { max-width: 12ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ═══════════════════════════════════════════════════════════
   reproductor.css — reproductor de audio propio y reproductor flotante
   Usa los colores del sitio o del panel (variables), con valores de reserva.
   ═══════════════════════════════════════════════════════════ */
audio[data-rp-listo] { display: none !important; }
.rp {
  --rp-acento: var(--accent, #c41c1c); --rp-fondo: var(--surface, #141414); --rp-borde: var(--border-mid, #2a2a2a);
  --rp-texto: var(--text, #e8e8e8); --rp-tenue: var(--text-dim, #8a8a8a);
  display: flex; align-items: center; gap: .5rem; width: 100%; max-width: 640px; min-height: 48px; padding: .35rem .6rem;
  background: var(--rp-fondo); border: 1px solid var(--rp-borde); border-radius: 999px; color: var(--rp-texto);
  font: 500 .74rem/1 'IBM Plex Mono', ui-monospace, monospace; box-sizing: border-box;
}
.rp.rp-vacio { opacity: .55; pointer-events: none; }
.rp-btn {
  flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; padding: 0;
  border: none; border-radius: 50%; background: transparent; color: var(--rp-texto); cursor: pointer; text-decoration: none;
  font: inherit; transition: background .15s, color .15s;
}
.rp-btn:hover, .rp-btn:focus-visible { background: rgba(255,255,255,.08); outline: none; }
.rp-btn svg { width: 20px; height: 20px; fill: currentColor; }
.rp-play { width: 38px; height: 38px; background: var(--rp-acento); color: #fff; }
.rp-play:hover, .rp-play:focus-visible { background: var(--rp-acento); filter: brightness(1.15); }
.rp-vel { width: auto; min-width: 40px; padding: 0 .4rem; border-radius: 999px; font-size: .7rem; }
.rp-tiempo { flex: 0 0 auto; min-width: 2.6rem; text-align: center; color: var(--rp-tenue); font-variant-numeric: tabular-nums; }
.rp input[type="range"] {
  -webkit-appearance: none; appearance: none; height: 4px; border-radius: 2px; cursor: pointer; margin: 0; padding: 0; border: none;
  background: linear-gradient(to right, var(--rp-acento) var(--p, 0%), rgba(255,255,255,.18) var(--p, 0%));
}
.rp-barra { flex: 1 1 auto; min-width: 60px; }
.rp-volumen { flex: 0 0 70px; width: 70px; }
.rp input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 14px; height: 14px; border-radius: 50%; background: #fff; border: none; box-shadow: 0 0 0 3px rgba(0,0,0,.25); }
.rp input[type="range"]::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: #fff; border: none; }
.rp input[type="range"]::-moz-range-track { background: transparent; }
.rp input[type="range"]:focus-visible { outline: 2px solid var(--rp-acento); outline-offset: 4px; }
@media (max-width: 480px) {
  .rp { gap: .3rem; padding: .3rem .45rem; }
  .rp-volumen { display: none; }
  .rp-tiempo { min-width: 2.2rem; font-size: .66rem; }
}

/* ── Reproductor flotante (panel) ── */
.rp-flot {
  position: fixed; right: calc(1rem + env(safe-area-inset-right, 0px)); bottom: calc(1rem + env(safe-area-inset-bottom, 0px)); z-index: 3500;
  display: flex; align-items: center; gap: .5rem; max-width: min(320px, calc(100vw - 2rem)); padding: .45rem .9rem .45rem .45rem;
  background: #161616; color: #eee; border: 1px solid #333; border-radius: 999px; box-shadow: 0 8px 24px rgba(0,0,0,.5);
  font: 500 .74rem 'IBM Plex Mono', monospace; cursor: pointer;
}
.rp-flot[hidden] { display: none; }
.rp-flot-ico { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 50%; background: var(--accent, #c41c1c); flex: 0 0 auto; }
.rp-flot-ico svg { width: 18px; height: 18px; fill: #fff; }
.rp-flot.rp-sonando .rp-flot-ico { animation: rp-latido 1.6s ease-in-out infinite; }
@keyframes rp-latido { 50% { box-shadow: 0 0 0 6px rgba(196,28,28,.25); } }
.rp-flot-titulo { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rp-modal { position: fixed; inset: 0; z-index: 3600; display: flex; align-items: center; justify-content: center; padding: 1rem; background: rgba(0,0,0,.72); }
.rp-modal[hidden] { display: none; }
.rp-caja {
  width: min(720px, 100%); max-height: calc(100dvh - 2rem); display: grid; grid-template-rows: auto minmax(0, 1fr) auto auto; gap: .9rem;
  padding: 1.1rem; background: #121212; border: 1px solid #2a2a2a; border-radius: 10px; color: #e8e8e8; font-family: 'IBM Plex Mono', monospace;
}
.rp-cab { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.rp-titulo { font-size: .9rem; font-weight: 600; margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rp-x { flex: 0 0 auto; width: 36px; height: 36px; border-radius: 50%; border: 1px solid #333; background: transparent; color: #ccc; cursor: pointer; font-size: .9rem; }
.rp-x:hover { background: #222; color: #fff; }
.rp-texto { overflow-y: auto; min-height: 3rem; padding: .8rem .9rem; background: #0b0b0b; border: 1px solid #222; border-radius: 6px;
            font-size: .86rem; line-height: 1.75; white-space: pre-wrap; color: #ddd; }
.rp-texto[hidden] { display: none; }
.rp-caja .rp { max-width: none; }
.rp-acciones { display: flex; flex-wrap: wrap; gap: .45rem; align-items: center; }
.rp-extra { display: contents; }
.rp-accion { min-height: 38px; padding: 0 .9rem; border-radius: 6px; border: 1px solid #333; background: #1b1b1b; color: #e8e8e8; cursor: pointer; font: 500 .72rem 'IBM Plex Mono', monospace; }
.rp-accion:hover { border-color: #666; }
.rp-accion[hidden] { display: none; }
.rp-cerrar { margin-left: auto; color: #f39a9a; border-color: rgba(196,28,28,.5); }
@media (max-width: 600px) {
  .rp-modal { align-items: flex-end; padding: 0; }
  .rp-caja { border-radius: 12px 12px 0 0; max-height: 90dvh; padding-bottom: calc(1.1rem + env(safe-area-inset-bottom, 0px)); }
  .rp-acciones > .rp-accion, .rp-extra > .rp-accion { flex: 1 1 auto; }
  .rp-cerrar { margin-left: 0; }
}
