/* ==========================================================================
   CURITAS · experiencia completa
   Cada capa tiene su color fijo, el mismo en el mezclador y en el filtro de RA:
   voz = amarillo, guitarra = fucsia, bajo = azul, batería = naranja.
   ========================================================================== */
[data-stem=voz]      { --stem: var(--yellow); --stem-ink: var(--black); }
[data-stem=guitarra] { --stem: var(--pink-strong); --stem-ink: var(--cream); }
[data-stem=bajo]     { --stem: var(--blue);   --stem-ink: var(--cream); }
[data-stem=bateria]  { --stem: var(--orange); --stem-ink: var(--black); }

.face-bandage { background: var(--stem); color: var(--stem-ink); }
.stem-buttons button span { color: var(--stem); }
.stem-buttons button[aria-pressed=true] { background: var(--stem); color: var(--stem-ink); border-color: transparent; }
.stem-buttons button[aria-pressed=true] span { color: inherit; }

/* Entrada por QR del show */
.qr-welcome {
  margin: 0 auto 26px; max-width: 640px; padding: 14px 20px; border-radius: 18px; text-align: center;
  font-family: var(--hand); font-size: 15px; line-height: 1.5; color: var(--cream);
  background: rgb(var(--yellow-rgb) / .1); border: 1px solid rgb(var(--yellow-rgb) / .45);
}

/* Reproducción con reloj compartido */
.audio-preview { gap: 16px; }
.audio-preview p { font-size: 13px; line-height: 1.45; }
.audio-toggle {
  display: inline-flex; align-items: center; gap: 10px; flex: 0 0 auto;
  min-height: 48px; padding: 10px 20px; border-radius: 999px;
  background: var(--accent); color: var(--black); font-family: var(--heading); font-size: 18px; line-height: 1;
}
.audio-toggle .ui-icon { width: 18px; height: 18px; color: inherit; }
.audio-toggle[aria-pressed=true] { background: transparent; color: var(--accent); box-shadow: inset 0 0 0 2px var(--accent); }

/* Regalo: filtro RA + fondo de pantalla */
#gift-dialog { max-width: min(640px, calc(100vw - 32px)); }
#gift-dialog h3 { font-family: var(--heading); font-size: 22px; line-height: 1.2; margin-bottom: 8px; }
.gift-ar { display: flex; gap: 24px; align-items: center; margin: 22px 0 18px; padding: 22px; border-radius: 22px; background: rgb(var(--cream-rgb) / .05); }
.gift-ar-copy { flex: 1; }
.gift-ar-copy p { margin-bottom: 16px; }
.gift-ar-open { gap: 12px; }
.gift-qr { margin: 0; flex: 0 0 150px; text-align: center; }
.gift-qr-code { background: var(--cream); padding: 8px; border-radius: 14px; width: 150px; aspect-ratio: 1; }
.gift-qr-code svg { width: 100%; height: 100%; display: block; }
.gift-qr figcaption { font-size: 13px; color: var(--muted); margin-top: 8px; line-height: 1.4; }
.gift-wallpaper { display: flex; gap: 20px; align-items: center; }
.gift-wallpaper .gift-preview { width: 72px; height: 128px; margin: 0; object-fit: cover; border-radius: 10px; }
@media (max-width: 600px) {
  .gift-ar { flex-direction: column; align-items: stretch; padding: 18px; }
  .gift-qr { flex-basis: auto; }
  .gift-qr-code { margin-inline: auto; }
}

/* Títulos que reciben foco al cambiar de etapa: sin recuadro, el foco es solo para lectores */
h1[tabindex="-1"]:focus, h2[tabindex="-1"]:focus { outline: none; }

/* ==========================================================================
   CURITAS · tono naranja, bienvenida centrada y «Hacé tu silueta»
   ========================================================================== */
.curitas-page { --accent: var(--orange); --button-ink: var(--black); }
.curitas-welcome, .curitas-mixer, .curitas-photo { --wash-rgb: var(--orange-rgb); --wash-strength: 14%; }
.curitas-page .error-message, .curitas-steps span { color: var(--accent); }
.qr-welcome { background: color-mix(in srgb, var(--accent) 10%, transparent); border-color: color-mix(in srgb, var(--accent) 45%, transparent); }

/* Bienvenida: sin arte flotante, todo en un eje central */
.curitas-welcome { display: flex; flex-direction: column; align-items: center; text-align: center; }
.curitas-welcome .welcome-copy { max-width: 640px; margin-inline: auto; display: flex; flex-direction: column; align-items: center; }
.curitas-welcome .welcome-copy .eyebrow { justify-content: center; }
.curitas-welcome .access-form { width: min(100%, 460px); margin-inline: auto; }
.curitas-welcome .access-form label { text-align: center; }
.curitas-welcome .curitas-steps { width: 100%; max-width: 860px; justify-content: center; gap: clamp(20px, 6vw, 80px); }

/* Paso de la foto */
.curitas-photo { position: relative; text-align: center; padding-block: 60px 70px; display: flex; flex-direction: column; align-items: center; }
.curitas-photo .eyebrow { justify-content: center; }
.curitas-photo h1 { font-family: var(--display); font-weight: 400; font-size: clamp(60px, 7vw, 92px); line-height: .96; margin: 20px 0 18px; }
.curitas-photo .qr-welcome { margin-bottom: 18px; }
.photo-lead { font-size: 18px; line-height: 1.55; max-width: 36ch; margin: 0 auto 28px; color: var(--muted); }
.photo-lead strong { color: var(--accent); font-weight: 400; }
.photo-stage { width: min(100%, 420px); aspect-ratio: 4 / 5; position: relative; margin: 0 auto 26px;
  border-radius: 26px; }
.pose-guide, .photo-camera { position: absolute; inset: 0; margin: 0; border-radius: 26px; overflow: hidden;
  background: color-mix(in srgb, var(--orange) 8%, var(--black)); }
.pose-guide svg, .pose-overlay svg { width: 100%; height: 100%; display: block; }
.photo-camera video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); }
.pose-overlay { position: absolute; inset: 0; pointer-events: none; }
.photo-count { position: absolute; inset: 0; display: grid; place-items: center; margin: 0; pointer-events: none;
  font-family: var(--display); font-size: 160px; line-height: 1; color: var(--cream); text-shadow: 0 6px 30px rgb(var(--black-rgb) / .6); }
.photo-count:empty { display: none; }
.photo-camera.flash::after { content: ''; position: absolute; inset: 0; background: var(--cream); animation: photo-flash .22s ease-out forwards; }
@keyframes photo-flash { from { opacity: .85; } to { opacity: 0; } }
.photo-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.photo-actions .button { gap: 12px; }
.photo-upload { cursor: pointer; }
.photo-upload:has(:focus-visible) { box-shadow: 0 0 0 2px var(--accent); }
.photo-camera-actions { display: flex; align-items: center; justify-content: center; gap: 34px; }
.photo-camera-actions[hidden] { display: none; }
.photo-round { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; color: var(--cream); }
button.photo-round { box-shadow: inset 0 0 0 1.5px rgb(var(--cream-rgb) / .35); }
.photo-round .ui-icon { color: var(--cream); width: 24px; height: 24px; }
.photo-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); }
.photo-shutter:active { transform: scale(.94); }
.photo-error { margin-top: 16px; }
.photo-error:empty { display: none; }
.photo-privacy { margin-top: 18px; font-size: 13px; color: var(--muted); }

/* Retrato del mezclador con la foto de la persona */
.mixer-portrait.has-photo { aspect-ratio: 4 / 5; min-height: 0; align-self: start; overflow: visible; }
.mixer-portrait.has-photo > img, .mixer-portrait.has-photo .portrait-label { border-radius: 25px; }
.mixer-portrait.has-photo > img { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; left: 0; bottom: auto;
  object-fit: cover; filter: grayscale(1) contrast(1.12); }
.mixer-portrait.has-photo .face-bandage {
  left: var(--x); top: var(--y); width: var(--w); height: auto; aspect-ratio: 2.78;
  transform: translate(-50%, -50%) rotate(var(--r)); font-size: clamp(14px, 2vw, 22px);
  box-shadow: 0 4px 14px rgb(var(--black-rgb) / .45);
}
.mixer-portrait.has-photo .face-bandage.uncovered {
  opacity: 1; background: transparent; color: transparent; box-shadow: none;
}
.face-bandage > .dash-line { display: none; }
.face-bandage { --line-gap: 0px; }
.mixer-portrait.has-photo .face-bandage.uncovered > .dash-line { display: block; }
.mixer-portrait.has-photo .portrait-label { background: linear-gradient(transparent, rgb(var(--black-rgb) / .7)); padding: 30px 0 4px; bottom: 0; }

/* Compartir y guardar */
.photo-share { margin-top: 22px; padding-top: 22px; border-top: 1px solid var(--border); }
.photo-share-note { font-family: var(--hand); font-size: 15px; line-height: 1.5; color: var(--muted); margin: 8px 0 14px; }
.photo-share-note strong { color: var(--accent); font-weight: 400; }
.photo-share-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.photo-share-actions .button { gap: 10px; }
.photo-retake { margin-top: 14px; }

@media (max-width: 760px) {
  .curitas-photo { padding-block: 36px 50px; }
  .photo-lead { font-size: 16px; }
  .photo-stage { width: min(100%, 340px); }
  .photo-count { font-size: 120px; }
  .photo-actions .button { width: min(100%, 300px); }
}
.curitas-photo {
  background-color: var(--black);
  background-image: url('assets/section-grain.svg'),
    linear-gradient(180deg in oklab, var(--black) 0%, color-mix(in srgb, rgb(var(--wash-rgb)) var(--wash-strength), var(--black)) 48%, var(--black) 100%);
  background-size: 180px 180px, 100% 100%; background-repeat: repeat, no-repeat; background-blend-mode: soft-light, normal;
}
.curitas-page .hero-symbol { color: var(--accent); }
/* Ecualizador junto al nombre de la canción */
.audio-preview .eq { margin-right: 2px; }

/* Siluetas de Luasó para elegir */
.pose-picker { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; margin: 0 auto 14px; }
.pose-option {
  display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 8px 8px 10px; border-radius: 16px;
  background: rgb(var(--cream-rgb) / .04); box-shadow: inset 0 0 0 1.5px rgb(var(--cream-rgb) / .14);
  color: var(--muted); font-family: var(--heading); font-size: 13px; line-height: 1.1; transition: box-shadow .2s, color .2s, background-color .2s;
}
.pose-option img { width: 64px; height: 80px; object-fit: contain; }
.pose-option:hover { color: var(--cream); }
.pose-option[aria-pressed="true"] { color: var(--cream); background: rgb(var(--orange-rgb) / .12); box-shadow: inset 0 0 0 2px var(--accent); }
.pose-current { margin: 0 auto 22px; max-width: 40ch; font-family: var(--hand); font-size: 15px; line-height: 1.45; color: var(--muted); text-align: center; }
.pose-current strong { color: var(--accent); font-weight: 400; }
.pose-guide img, .pose-overlay img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.pose-guide svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.pose-overlay img { opacity: .9; }
@media (max-width: 760px) { .pose-option img { width: 52px; height: 65px; } .pose-picker { gap: 6px; } }

/* ==========================================================================
   Consola: reproducción + fader de volumen general
   ========================================================================== */
.audio-console { display: grid; grid-template-columns: 1fr auto; gap: 18px; align-items: center; border-block: 1px solid var(--border); padding: 18px 0; }
.audio-console .audio-preview { border: 0; padding: 0; flex-wrap: wrap; }
.fader { --level: .8; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.fader-label { font-family: var(--heading); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.fader-body { display: flex; align-items: stretch; gap: 4px; height: 160px; }
.fader-scale { width: 14px; height: 100%; color: rgb(var(--cream-rgb) / .35); }
.fader-track { position: relative; width: 44px; height: 100%; touch-action: none; cursor: ns-resize; border-radius: 12px; }
.fader-track:focus-visible { outline: none; box-shadow: 0 0 0 1.5px rgb(var(--orange-rgb) / .6); }
/* Ranura de la consola */
.fader-groove { position: absolute; left: 50%; top: 14px; bottom: 14px; width: 6px; translate: -50% 0; border-radius: 3px; background: #1A1A1A; box-shadow: inset 0 1px 2px rgb(var(--black-rgb) / .9), 0 0 0 1px rgb(var(--cream-rgb) / .1); }
/* Relleno: el nivel en el tono de la sección */
.fader-fill { position: absolute; left: 50%; bottom: 14px; width: 6px; translate: -50% 0; border-radius: 3px;
  height: calc((100% - 28px) * var(--level)); background: linear-gradient(to top, var(--accent), var(--yellow)); }
/* Perilla: como la tapa de un fader, oscura con la línea de referencia */
.fader-cap {
  position: absolute; left: 50%; width: 40px; height: 28px; translate: -50% 50%;
  bottom: calc(14px + (100% - 28px) * var(--level));
  border-radius: 6px; background: linear-gradient(180deg, rgb(var(--cream-rgb) / .26) 0%, rgb(var(--cream-rgb) / .1) 45%, transparent 55%, rgb(var(--cream-rgb) / .14) 100%), #1A1A1A;
  box-shadow: 0 6px 10px rgb(var(--black-rgb) / .6), inset 0 1px 0 rgb(var(--cream-rgb) / .25);
}
.fader-cap i { position: absolute; left: 6px; right: 6px; top: 50%; height: 2px; translate: 0 -50%; border-radius: 1px; background: var(--cream); }
/* Al soltar, se acomoda en el escalón con rebote */
.fader.is-snapping .fader-cap { transition: bottom .45s cubic-bezier(.34, 1.56, .64, 1); }
.fader.is-snapping .fader-fill { transition: height .45s cubic-bezier(.34, 1.56, .64, 1); }
.fader-value { font-family: var(--heading); font-size: 16px; color: var(--cream); font-variant-numeric: tabular-nums; min-width: 3ch; text-align: center; }
@media (max-width: 760px) { .fader-body { height: 140px; } }

/* ==========================================================================
   Secciones de CURITAS a todo el ancho (como el resto del sitio):
   el fondo y la trama ocupan toda la pantalla; el contenido queda centrado.
   ========================================================================== */
.curitas-page :is(.curitas-welcome, .curitas-photo, .curitas-mixer) {
  max-width: none; width: 100%; margin-inline: 0;
  padding-inline: max(var(--gutter), calc((100% - 1240px) / 2));
}
/* Hacé tu silueta: en pantallas anchas, texto y elección a la izquierda, cámara a la derecha */
@media (min-width: 900px) {
  .curitas-photo {
    display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, 440px); column-gap: clamp(40px, 6vw, 96px);
    align-items: center; align-content: center; text-align: left; min-height: calc(100svh - 90px);
  }
  .curitas-photo > :not(.trama) { grid-column: 1; justify-self: start; }
  .curitas-photo > .photo-stage { grid-column: 2; grid-row: 1 / span 8; justify-self: stretch; width: 100%; margin: 0; }
  .curitas-photo > .photo-camera-actions { grid-column: 2; justify-self: center; margin-top: 18px; }
  .curitas-photo .eyebrow, .curitas-photo .pose-picker, .curitas-photo .photo-actions { justify-content: flex-start; }
  .curitas-photo h1 { margin-top: 12px; }
  .curitas-photo .photo-lead, .curitas-photo .pose-current { margin-inline: 0; text-align: left; }
  .curitas-photo .pose-picker { margin-inline: 0; }
  .curitas-photo .photo-privacy { text-align: left; }
}


/* Curitas del retrato con la forma oficial (assets/curita.svg), en el color de cada capa */
.mixer-portrait.has-photo .face-bandage {
  aspect-ratio: 3; border-radius: 0; box-shadow: none; font-size: 0; color: transparent;
  background: var(--stem);
  -webkit-mask: url(assets/curita.svg) center / 100% 100% no-repeat; mask: url(assets/curita.svg) center / 100% 100% no-repeat;
  filter: drop-shadow(0 4px 8px rgb(var(--black-rgb) / .45));
  transition: left .6s cubic-bezier(.2, .8, .2, 1), top .6s cubic-bezier(.2, .8, .2, 1), width .6s ease, transform .6s ease, opacity .3s;
}
.mixer-portrait.has-photo .face-bandage.uncovered { -webkit-mask: none; mask: none; background: transparent; filter: none; border-radius: 999px; }
.mixer-portrait.has-photo .face-bandage:focus-visible { outline: none; filter: drop-shadow(0 0 0 var(--accent)) drop-shadow(0 0 3px var(--cream)); }
.mixer-portrait.is-analyzing .face-bandage { opacity: 0; pointer-events: none; }
.portrait-analysis {
  position: absolute; left: 50%; top: 14px; translate: -50% 0; z-index: 3; margin: 0; width: max-content; max-width: 88%;
  padding: 8px 14px; border-radius: 999px; background: rgb(var(--black-rgb) / .78); color: var(--cream);
  font-family: var(--hand); font-size: 14px; text-align: center;
}
.portrait-analysis[hidden] { display: none; }
