/* ==========================================================================
   CURITAS · Filtro de RA
   Mobile first: la cámara ocupa casi toda la pantalla y los controles quedan
   al alcance del pulgar. Fuera del filtro, la misma voz visual de CURITAS.
   ========================================================================== */
.ra-intro { text-align: center; padding-block: 64px 80px; max-width: 760px; }
.ra-intro h1 { font-family: var(--display); font-size: clamp(58px, 9vw, 104px); line-height: .95; margin-bottom: 22px; }
.ra-lead { font-size: 19px; line-height: 1.55; max-width: 30ch; margin: 0 auto 26px; }
  font-family: var(--heading); font-size: 15px; line-height: 1; padding: 9px 16px 9px 12px; border-radius: 999px;
  background: rgb(var(--cream-rgb) / .06); display: inline-flex; align-items: center; gap: 9px;
}
.ra-start { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.ra-start .button { gap: 12px; }
.ra-upload { cursor: pointer; }
.ra-upload:has(:focus-visible) { box-shadow: 0 0 0 2px var(--accent); }
.ra-error { margin-top: 18px; color: var(--accent); font-size: 15px; }
.ra-error:empty { display: none; }
.ra-privacy { margin-top: 22px; font-size: 13px; color: var(--muted); }

/* Escenario de cámara */
.ra-stage { padding: 12px var(--gutter) 28px; display: flex; flex-direction: column; align-items: center; gap: 16px; }
.ra-frame {
  position: relative; width: min(100%, 720px); border-radius: 26px; overflow: hidden;
  background: var(--black); display: grid; place-items: center;
}
.ra-frame video { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.ra-frame canvas { display: block; width: 100%; height: auto; max-height: min(72svh, 760px); object-fit: contain; touch-action: none; }
.ra-frame canvas.is-manual { cursor: grab; }
.ra-status {
  position: absolute; top: 14px; left: 50%; transform: translateX(-50%); width: max-content; max-width: calc(100% - 28px);
  padding: 9px 16px; border-radius: 999px; text-align: center;
  background: rgb(var(--black-rgb) / .72); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  font-family: var(--hand); font-size: 14px; line-height: 1.35; color: var(--cream);
}
.ra-status[data-tone=warn] { color: var(--accent); }
.ra-status[hidden] { display: none; }
.ra-stage.flash .ra-frame::after { content: ''; position: absolute; inset: 0; background: var(--cream); animation: ra-flash .22s ease-out forwards; }
@keyframes ra-flash { from { opacity: .85; } to { opacity: 0; } }

.ra-controls { width: min(100%, 720px); display: flex; flex-direction: column; align-items: center; gap: 14px; }
.ra-actions { display: flex; align-items: center; justify-content: center; gap: 34px; }
.ra-round { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; color: var(--cream); box-shadow: inset 0 0 0 1.5px rgb(var(--cream-rgb) / .35); }
.ra-round .ui-icon { color: var(--cream); width: 24px; height: 24px; }
.ra-shutter {
  width: 78px; height: 78px; border-radius: 50%; background: var(--cream);
  box-shadow: 0 0 0 5px var(--black), 0 0 0 8px var(--accent); transition: transform .12s;
}
.ra-shutter:active { transform: scale(.94); }
.ra-shutter:disabled { opacity: .5; }
.ra-mode { font-size: 18px; }

/* Resultado */
.ra-result { text-align: center; padding-block: 40px 70px; max-width: 760px; }
.ra-result h1 { font-family: var(--display); font-size: clamp(48px, 7vw, 80px); line-height: 1; margin-bottom: 24px; }
.ra-photo { width: min(100%, 520px); margin: 0 auto 24px; border-radius: 22px; box-shadow: 0 20px 60px rgb(var(--black-rgb) / .6); }
.ra-share { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-bottom: 18px; }
.ra-share .button { gap: 12px; }
.ra-tag { font-size: 17px; }
.ra-result-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 28px; margin-top: 14px; }
.ra-result-links .text-link { font-size: 18px; }

/* Con la cámara abierta, menos distracciones */
body.ra-live .site-footer { display: none; }
@media (max-width: 760px) {
  .ra-intro { padding-block: 40px 56px; }
  .ra-lead { font-size: 17px; }
  .ra-stage { padding: 8px 12px 22px; }
  .ra-frame { border-radius: 20px; }
  .ra-start .button { width: min(100%, 300px); }
}


/* ==========================================================================
   Filtro «Lo que tapamos»: curitas con frases + la voz de Coval
   ========================================================================== */
.ra-preview { list-style: none; padding: 0; margin: 0 auto 34px; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 14px; max-width: 640px; }
.ra-preview li:nth-child(odd) img { rotate: -4deg; }
.ra-preview li:nth-child(even) img { rotate: 3deg; }
.ra-preview img { display: block; width: clamp(120px, 26vw, 170px); height: auto; filter: drop-shadow(0 6px 12px rgb(var(--black-rgb) / .45)); }

/* Comentario de Coval: como una notificación del celular, baja desde arriba del cuadro.
   No forma parte de la foto. */
.ra-voice {
  position: absolute; left: 50%; top: 12px; z-index: 3; width: min(92%, 420px);
  display: flex; align-items: center; gap: 12px; padding: 10px 14px 11px 10px; border-radius: 20px;
  background: rgb(var(--black-rgb) / .86); backdrop-filter: blur(14px) saturate(1.2); -webkit-backdrop-filter: blur(14px) saturate(1.2);
  box-shadow: 0 12px 30px rgb(var(--black-rgb) / .45), inset 0 0 0 1px rgb(var(--cream-rgb) / .1);
  translate: -50% calc(-100% - 24px); opacity: 0; pointer-events: none;
  transition: translate .5s cubic-bezier(.2, .9, .25, 1.05), opacity .25s ease;
}
.ra-voice.is-in { translate: -50% 0; opacity: 1; }
.ra-voice-avatar {
  flex: 0 0 auto; width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center;
  background: var(--orange); color: var(--black); font-family: var(--display); font-size: 22px; line-height: 1;
}
.ra-voice-body { min-width: 0; }
.ra-voice-who { display: block; font-family: var(--heading); font-size: 12px; letter-spacing: .02em; color: var(--cream); margin-bottom: 2px; }
.ra-voice-who em { font-style: normal; font-family: var(--hand); font-size: 12px; color: var(--muted); margin-left: 6px; }
.ra-voice p { margin: 0; font-family: var(--hand); font-size: 16px; line-height: 1.3; color: var(--cream); }

/* Bandeja de curitas */
.ra-tray-wrap { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.ra-tray-hint { margin: 0; font-family: var(--hand); font-size: 14px; color: var(--muted); text-align: center; }
.ra-count { display: inline-block; margin-left: 6px; padding: 2px 10px; border-radius: 999px; background: rgb(var(--orange-rgb) / .16); color: var(--orange); font-family: var(--heading); font-size: 12px; }
.ra-tray { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 10px; }
.ra-curita {
  padding: 6px; border-radius: 16px; background: transparent; cursor: grab; touch-action: none;
  transition: opacity .25s ease, scale .2s ease, box-shadow .2s ease;
}
.ra-curita img { display: block; width: clamp(104px, 24vw, 140px); height: auto; pointer-events: none; filter: drop-shadow(0 4px 8px rgb(var(--black-rgb) / .4)); }
.ra-curita:hover { scale: 1.05; }
.ra-curita:active { cursor: grabbing; }
.ra-curita[aria-pressed="true"] { opacity: .35; box-shadow: inset 0 0 0 1.5px rgb(var(--orange-rgb) / .5); }
.ra-curita:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; }
.ra-ghost {
  position: fixed; z-index: 80; width: 150px; height: auto; pointer-events: none;
  translate: -50% -50%; rotate: -6deg; filter: drop-shadow(0 10px 18px rgb(var(--black-rgb) / .5));
}
.ra-result-note { font-size: 18px; color: var(--muted); margin: -8px auto 22px; max-width: 34ch; }
.ra-mode:disabled { opacity: .5; cursor: default; }
@media (max-width: 760px) {
  .ra-voice { top: 8px; }
  .ra-voice p { font-size: 15px; }
  .ra-tray { gap: 6px; }
}

/* La revelación: frase en grande sobre el cuadro, que late en naranja; después se dan vuelta */
.ra-stage.revealing .ra-frame { animation: ra-reveal 2s ease-out; }
.ra-frame { container-type: inline-size; }
.ra-honest {
  position: absolute; inset: 0; z-index: 4; margin: 0; display: grid; place-items: center; padding: 8%;
  text-align: center; font-family: var(--display); font-weight: 400; font-size: clamp(26px, 8.2cqi, 70px); line-height: .98;
  color: var(--cream); background: radial-gradient(ellipse at center, rgb(var(--black-rgb) / .78), rgb(var(--black-rgb) / .55));
  text-shadow: 0 4px 30px rgb(var(--black-rgb) / .6);
  opacity: 0; scale: .94; pointer-events: none; transition: opacity .45s ease, scale .9s cubic-bezier(.2, .8, .2, 1);
}
.ra-honest.is-in { opacity: 1; scale: 1; }
.ra-reset { margin-top: 2px; }
.ra-reset[hidden] { display: none; }
.ra-curita:disabled { opacity: .3; cursor: default; scale: 1; }
@keyframes ra-reveal {
  0% { box-shadow: 0 0 0 0 rgb(var(--orange-rgb) / 0); }
  25% { box-shadow: 0 0 0 4px rgb(var(--orange-rgb) / .9), 0 0 60px 10px rgb(var(--orange-rgb) / .45); }
  100% { box-shadow: 0 0 0 0 rgb(var(--orange-rgb) / 0); }
}

/* Selector de ubicación de las curitas */
.ra-layouts-wrap { display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap; }
.ra-layouts-label { font-family: var(--heading); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.ra-layouts { display: inline-flex; gap: 6px; padding: 4px; border-radius: 999px; background: rgb(var(--cream-rgb) / .06); }
.ra-layouts button { min-height: 40px; padding: 0 14px; border-radius: 999px; font-family: var(--heading); font-size: 13px; color: var(--muted); transition: background-color .25s, color .25s; }
.ra-layouts button:hover { color: var(--cream); }
.ra-layouts button[aria-pressed="true"] { background: var(--orange); color: var(--black); }
.ra-stage.is-revealed .ra-layouts button:not([aria-pressed="true"]) { opacity: .4; pointer-events: none; }
/* Los avisos del seguimiento van abajo: arriba bajan las notificaciones de Coval */
.ra-status { top: auto; bottom: 12px; }
