@import "colors.css";
@import "keyframes.css";
@import "debug.css";

/* sobreescritura de colores por hacer la prueba */
:root {
  --light-red: rgb(255, 80, 80);
  --mixme-red: darkred;
  --mixme-green: darkgreen;
  --mixme-blue: darkblue;
  --bg-texture-background-image: none;
}

.red {
  color: var(--mixme-red);
}
.green {
  color: var(--mixme-green);
}
.blue {
  color: var(--mixme-blue);
}

.montserrat {
  font-family: "Montserrat", sans-serif;
  font-optical-sizing: auto;
  font-weight: normal;
  font-style: normal;
}
.montserrat-bold {
  font-family: "Montserrat", sans-serif;
  font-optical-sizing: auto;
  font-weight: bold;
  font-style: normal;
}


html,body{
  margin: 0;
  padding: 0;
  font-family: "Montserrat", sans-serif;
  font-optical-sizing: auto;
  font-weight: normal;
  font-style: normal;
}

html {
  background-color: black;
  color: white;
  }

* {
  box-sizing: border-box;
}

body {
  background-color: var(--recre-morado);
  color: white;
  text-align: center;
  /*
  width: 100vw;
  height: 100vh;
  */
  width: 100%;
  height: 100%;
  padding: 0;
  margin: 0;
}

#app {
  height: 100vh;
  width: 100vw;
}

.logo {
  position: relative;
  height: 55px;
  margin-top: 20px;
  margin-top: 30px;
  background-image: var(--app-logo-url, url('https://app.mixme.live/img/logo_sin_tagline.png'));
  background-size:contain;
  background-position: center;
  background-repeat: no-repeat;
  z-index: 100;
}

.join .logo {
  margin-top: 100px;
  min-height: 75px;
}

#text_well_done {
  margin-bottom: 10px;
}

#main {
  position: absolute;
  /*width: 100vw;
  height: 100vh;*/
  width: 100%;
  height: 100%;
  top: 0px;
  left: 0px;

  /*border: 1px solid orange;*/
  /*background-color: rgba(0, 255, 0, .5);*/
  /*padding: 1vh 1vw;*/
  z-index: 90;

  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: stretch;
  flex-wrap: nowrap;
  padding: 0px 10px 20px 10px;
  overflow: hidden;
}

#main > * {
  /*border: 1px dashed rgba(255, 255, 0, 0.5);*/
  /*height: auto;*/
  align-self: stretch;
}


#bg_texture {  
  /*background-image: url('https://picsum.photos/1024');*/
  background-image: var(--bg-texture-background-image);
  background-size:cover;
  /*filter: grayscale(100%) blur(5px);*/
  position: absolute;
  top: 0px;
  right: 0px;
  bottom: 0px;
  left: 0px;
  /*opacity: 0.6;
  z-index: 80;*/
}

/* el claim de mixme ... se podría modificar por skin */
#bg_texture::after {
  content: " ";
  position: absolute;
  top: 10px;
  left: 10px;
  right: 10px;
  bottom: 10px;
  background-image: url('https://app.mixme.live/img/g27_g30.png');
  /*background-image: url('https://picsum.photos/1024');*/
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  /*border: 1px solid red;*/
  /*z-index: 100; si activamos ésto, no podemos hacer clic en nada, se superpone a todo ...*/
}

#bad_orientation {
  /*width: 100vw;
  height: 100vh;*/
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0px;
  left: 0px;

  display: none;
  /*border: 4px solid blue;*/
  /*background-color: red;*/
  /*padding: 1vh 1vw;*/
}
#bad_orientation::before {
  content: "";
  /*
  background-image: url('https://img.freepik.com/premium-vector/black-elegant-background-vector-free-download_839034-397.jpg');
  /*background-image: url('https://img.freepik.com/free-vector/realistic-elegant-geometric-shapes-theme-wallpaper_23-2148410456.jpg?t=st=1729284849~exp=1729288449~hmac=cb4796bf3d9d80acaeb6b8692722632f2c1afc996ec48e6b3c6207f237b75f9d&w=1480');* /
  background-image: url('https://img.freepik.com/free-vector/shiny-cube-pattern-dark-background_1409-2012.jpg?t=st=1729284984~exp=1729288584~hmac=ff51e7abc6cfc47ed13c072e17d35bd30be5c3159cf08a92811121d9ee8477b7&w=1060');
  background-image: url('https://img.freepik.com/free-photo/free-photo-black-grunge-abstract-background-pattern-wallpaper_1340-34120.jpg?t=st=1729284778~exp=1729288378~hmac=146402580dcfde953687bd1d775b0bddfb41dffa1b51816013460d70b1467064&w=1480');
  background-image: url('https://img.freepik.com/free-vector/gradient-dynamic-purple-lines-background_23-2148995757.jpg?t=st=1729286109~exp=1729289709~hmac=685baae9280004f44cdb16886269de93ef292459b805dfe8978aee21105f2c64&w=1480');
  */

  background-image: url('/public/assets/img/bad_orientation_background.jpg');
  background-size:cover;  
  /*filter: grayscale(100%) blur(5px);*/
  position: absolute;
  top: 0px;
  right: 0px;
  bottom: 0px;
  left: 0px;
  opacity: 0.6;
}

.bad_orientation_container {
  position: absolute;
  width: 100%;
  height: 150px;
  margin: auto;
  transform: translateY(50%);
  top: 0;
  left: 0;
}

.phone {
  background-color: rgba(0,0,0,.6);
  margin: auto;
  margin-top: 50px;
  height: 50px;
  width: 100px;
  border: 3px solid white;
  border-radius: 10px;
  animation: rotate 1.5s ease-in-out infinite alternate;
  position: relative;
}
.phone::after {
  position: absolute;
  content:"";
  border: 3px solid white;
  width: 2px;
  height: 2px;
  left: 3px;
  top: 20px;
  border-radius: 3px;
}
.phone::before {
  position: absolute;
  content:"";
  border: 2px solid white;
  width: 1px;
  height: 20px;
  right: 3px;
  top: 12px;
  bottom: 12px;
  border-radius: 3px;
}

.message {
  color: white;
  font-size: 1em;
  margin-top: 30px;
}

/*
@media (orientation: landscape) {
  .main {
    display: none;
  }
  .bad_orientation {
    display: block;
  }
}
*/

/* detectar que es móvil */
/*
@media only screen and (hover: none) and (pointer: coarse){
  #bg_texture, #main, #bad_orientation {
    /*border: 10px solid orange;* /
  }
}
*/

/* mostrar el cambio de orientación lo hacemos sólo en dispositivos móviles finalmente */
@media only screen and (hover: none) and (pointer: coarse) and (orientation: landscape) {
  #bg_texture, #main {
    display: none;
  }
  #bad_orientation {
    display: block;
  }
}

/*
@media (orientation: portrait) {
  .main {
    background-color: green;
  }
}
*/

#ws_log {
  width: 95%;
  min-height: 250px;
  margin: auto;
  border: 2px solid green;
  background-color: black;
  color: greenyellow;
  overflow: scroll;
  font-family: 'Courier New', Courier, monospace;
  font-size: 12px;
  line-height: 20px;
}

/*
.transparent_text {
  mix-blend-mode: screen;
  display: block;
  width: fit-content;
  background-color: white;
  padding: 0px 8px 0px 8px;
  border-radius: 5px;
  color: black;
  font-size: 32px;
  font-weight: 300;
  margin: auto;
}
*/

.hidden {
  visibility: hidden;
}

.transparent_text {
  mix-blend-mode: screen;
  display: block;
  width: fit-content;
  background-color: white;
  padding: 0px 8px 0px 8px;
  border-radius: 5px;
  color: black;
  font-size: 32px;
  margin-left: auto;
  margin-right: auto;
}

.big_text {
  font-size: clamp(55px, 70px, 70px);
  line-height: clamp(55px, 75px, 75px);
}

.medium_text {
  font-size: clamp(50px, 65px, 65px);
  line-height: clamp(50px, 70px, 70px);
}

.text_group_up {
  text-wrap: pretty; /* no soportado en algunos sitios */
  width: 80%;
  margin-left: auto;
  margin-right: auto;
  /*text-wrap: balance;*/
}

.mission_text {
  font-size: clamp(25px, 35px, 35px);
  line-height: clamp(42px, 50px, 55px);
  text-wrap: pretty; /* no soportado en algunos sitios */
  width: 90%;
  margin-left: auto;
  margin-right: auto;
  /*text-wrap: balance;*/
}

.mission_text.small {
  font-size: clamp(18px, 28px, 28px);
  line-height: clamp(35px, 43px, 48px);
}

.listen_talk {
  width: 100vw;
  margin-left: -10px;
  /*margin-right: -10px;*/
  margin-bottom: -20px;
  padding-top: 5px;
  padding-bottom: 5px;
  margin-top: 10px;
  border-bottom-left-radius: 0px;
  border-bottom-right-radius: 0px;  
  /*font-size: clamp(5vh,10vh,13vw);*/
  font-size: clamp(6vh,12vh,14vw);
  overflow: hidden;
}

.round_timer {
  aspect-ratio: 1;
  line-height: 80px;
  vertical-align: middle;
  font-size: clamp(20px, 60px, 60px);
  padding: 18px;
}

.round_timer.big_line_height {
  line-height: 120px;
}

.bold {
  font-weight: bold;
}

.card {
  padding: 5px;
  background-color: var(--mixme-bs-card-bg);
  color: var(--mixme-bs-card-color);
  border-radius: 12px;
}

.colors_card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-items: center;
  align-content: center;
  flex-wrap: wrap;

  width: fit-content;
  max-width: 80%;
  margin-left: auto;
  margin-right: auto;  
  margin-bottom: 10px;
}
.group_people_text{
  padding: 5px 10px 2px 10px;
  text-wrap: pretty;
}

.group_colors {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-items: center;
  align-content: center;
  flex-wrap: wrap;
  padding: 5px;
}
.colors_card .color {
  min-width: 40px;
  width: 40px;
  max-width: 40px;
  min-height: 40px;
  height: 40px;
  max-height: 40px;
  margin: 5px;
  border-radius: 50%;
  flex: 1;
}
.colors_card .color.my_color {
  min-width: 60px;
  width: 60px;
  max-width: 60px;
  min-height: 60px;
  height: 60px;
  max-height: 60px;
}

/* ICONS START */
.walk_icon_container i, .walk_icon_container svg,
.finish_icon_container i, .finish_icon_container svg {
  /*font-size: clamp(82px, 25vh, 162px);*/
  /*font-size: clamp(200px, 40vh, 40vh);*/
  font-size: clamp(125px, 80vw, 400px);
}

.walk_icon_container {
  animation: walk 0.5s 1 forwards;
}
/* ICONS END */

.walk_text {
  font-weight: bold;
  font-size: clamp(38px, 10vh, 60px);
}



/* IFRAMES START */
.iframe_screen {
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0px;
  left: 0px;
  display: none;
}
/* IFRAMES END */





.uppercase_text {
  text-transform: uppercase;
}

/* WELCOME FIRST SCREEN - CLICK BUTTON START */
#main_text {
  line-height: clamp(5vh, 7vh, 7vh);
  font-size: clamp(4vh, 4vh, 6vh);
  font-weight: 800;

}

#main_text b {
  display: block;
  line-height: clamp(6vh, 6vh, 8vh);
  /*font-size: clamp(6vh, 7vh, 8vh);*/
  font-size: 175%;
  font-weight: 900;

}

#screen_login p#before_button #request_fullscreen {
  position: relative;
  display: inline-block;
  padding: 12px 36px;
  margin: 40px 0px 10px 0px;
  color: #fff;
  text-decoration: none;
  text-transform: uppercase;
  font-size: 18px;
  font-weight: bold;
  letter-spacing: 2px;
  border-radius: 40px;
  /* En Safari no pinta el efecto chulo de borde biselado */
  border: 3px solid #fff;
  background: linear-gradient(90deg,#755bea,#ff72c0);
}

/* WELCOME FIRST SCREEN - CLICK BUTTON END */

/* JOIN SCREEN - ROOM CODE START */
#screen_login {
  font-size: 36px;
  color: white;
}

#screen_login label {
  color: white;
  font-size: .6em;
  margin-top: 10px;
  margin-bottom: 2px;
}
#screen_login #room_code {
  display: block;
  margin: auto;
  /*max-width: 280px;*/
  max-width: 320px;
  text-align: center;
  text-transform: uppercase;
  border-radius: 40px;
  letter-spacing: 5px;
}

#screen_login #room_code_redirect {
  position: relative;
  display: inline-block;
  padding: 12px 36px;
  margin: 40px 0px 10px 0px;
  color: #fff;
  text-decoration: none;
  text-transform: uppercase;
  font-size: 18px;
  font-weight: bold;
  letter-spacing: 2px;
  border-radius: 40px;
  /* En Safari no pinta el efecto chulo de borde biselado */
  border: 3px solid #fff;
  background: linear-gradient(90deg,#755bea,#ff72c0);
}


/* JOIN SCREEN - ROOM CODE END */



.ani_login {
  background-image: linear-gradient(-124deg, var(--recre_morado_75), var(--recre_rosa_75),  var(--recre_morado_75), var(--recre_rosa_75),  var(--recre_morado_75), var(--recre_rosa_75));
}

.blink {
  animation: blink 1s infinite;
}

.medium_speed {
  animation-duration: 10s;
}
.fast_speed {
  animation-duration: 5s !important;
}



/* AUDIENCE GATE START */
#audience_gate {
  position: fixed;
  inset: 0;
  z-index: 999999;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 20px;
  padding-top: max(20px, env(safe-area-inset-top));
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  color: white;
  text-align: center;
  background: linear-gradient(-45deg, #a63d97 0%, #a63d97 58%, #f2197a 100%) !important;
}

#audience_gate.hidden {
  display: none;
}

#audience_gate .logo {
  margin: 0 auto 20px auto;
}

.audience_box {
  width: 100%;
  max-width: 360px;
}

.audience_step {
  display: none;
}

.audience_step.active {
  display: block;
  animation: audience_fade_in .3s ease-in;
}

.audience_title {
  font-size: 24px;
  font-weight: 800;
  text-transform: uppercase;
  margin-bottom: 20px;
}
.audience_subtitle { font-size: 14px; opacity: .7; margin-bottom: 24px; }
.audience_role_buttons { display: flex; flex-direction: column; gap: 12px; width: 100%; }
.audience_role_btn {
  width: 100%; padding: 18px 24px; border: 2px solid rgba(255,255,255,.3);
  border-radius: 14px; background: rgba(255,255,255,.1); color: #fff;
  font-size: 18px; font-weight: 700; letter-spacing: .03em; cursor: pointer;
  transition: background .15s, border-color .15s, transform .1s;
  -webkit-tap-highlight-color: transparent;
}
.audience_role_btn:active { transform: scale(.97); }
.audience_role_btn.selected { background: rgba(255,255,255,.25); border-color: #fff; }

.audience_step input,
.audience_step select {
  display: block;
  width: 100%;
  max-width: 320px;
  margin: 0 auto 12px auto;
  padding: 12px 20px;
  text-align: center;
  border: none;
  border-radius: 40px;
  background-color: rgba(255, 255, 255, 0.9);
  color: #333;
  font-size: 16px;
  font-family: inherit;
}

.audience_step input::placeholder {
  color: #888;
}

.audience_step button,
.audience_button {
  position: relative;
  display: inline-block;
  padding: 12px 36px;
  margin: 10px 0px;
  color: #fff;
  text-decoration: none;
  text-transform: uppercase;
  font-size: 16px;
  font-weight: bold;
  letter-spacing: 2px;
  border-radius: 40px;
  border: 3px solid #fff;
  background: linear-gradient(90deg,#755bea,#ff72c0);
  cursor: pointer;
}

.audience_fields {
  display: none;
  margin-top: 10px;
}

.audience_fields.active {
  display: block;
  animation: audience_fade_in .3s ease-in;
}

.audience_msg {
  margin-top: 10px;
  font-size: 14px;
  min-height: 20px;
}

.audience_msg.error {
  color: #ffd166;
  font-weight: bold;
}

.audience_msg a {
  color: #fff;
  text-decoration: underline;
}

.audience_link {
  display: inline-block;
  margin-top: 10px;
  color: #fff;
  text-decoration: underline;
  font-size: 14px;
  opacity: 0.85;
}

.audience_google_btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  max-width: 320px;
  box-sizing: border-box;
  margin: 0 auto 12px auto;
  padding: 12px 20px;
  border-radius: 40px;
  background-color: rgba(255, 255, 255, 0.9);
  color: #333;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
}

.audience_google_btn img {
  width: 18px;
  height: 18px;
}

.audience_separator {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 320px;
  margin: 14px auto;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 1px;
  opacity: 0.75;
}

.audience_separator::before,
.audience_separator::after {
  content: '';
  flex: 1;
  height: 1px;
  background-color: rgba(255, 255, 255, 0.4);
}

@keyframes audience_fade_in {
  from { opacity: 0; }
  to { opacity: 1; }
}
/* AUDIENCE GATE END */

/* IDENTITY LEGEND START */
/* pastilla discreta, siempre visible, con el email registrado (o el mixme_uuid
   en sesiones anónimas) para que regiduría/staff identifique el dispositivo */
#identity_legend {
  display: none;
  position: fixed;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100000;
  padding: 6px 18px;
  border-radius: 20px;
  background-color: rgba(0, 0, 0, 0.65);
  color: rgba(255, 255, 255, 0.95);
  font-size: 14px;
  font-family: 'Courier New', Courier, monospace;
  white-space: nowrap;
  pointer-events: auto;
  cursor: pointer;
  user-select: none;
}
/* IDENTITY LEGEND END */







/* ---- Wordcloud app screen ---- */
.wc-question {
  font-size: 1.4rem; font-weight: 700; text-align: center;
  padding: 16px 20px 8px; color: #fff; text-shadow: 0 1px 3px rgba(0,0,0,.4);
}
.wc-input-area {
  display: flex; flex-direction: column; gap: 10px; padding: 10px 16px;
}
.wc-input {
  width: 100%; box-sizing: border-box;
  border-radius: 24px; border: 2px solid rgba(255,255,255,.6);
  background: rgba(255,255,255,.15); color: #fff; padding: 12px 18px;
  font-size: 16px; outline: none; backdrop-filter: blur(4px);
}
.wc-input::placeholder { color: rgba(255,255,255,.6); }
.wc-submit-btn {
  width: 100%; border-radius: 24px; border: none; padding: 12px 20px; font-size: 1rem;
  background: rgba(255,255,255,.9); color: #333; font-weight: 700; cursor: pointer;
}
.wc-frozen-notice {
  text-align: center; padding: 8px 16px; color: rgba(255,255,255,.85);
  font-size: 0.95rem; letter-spacing: .5px;
}
.wc-word-list {
  flex: 1; overflow-y: auto; padding: 8px 16px; display: flex;
  flex-direction: column; gap: 6px;
}
@keyframes wc-chip-appear {
  0%   { opacity: 0; transform: scale(.72) translateY(-6px); }
  60%  { transform: scale(1.04) translateY(0); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}
@keyframes wc-vote-pulse {
  0%   { transform: scale(1); box-shadow: 0 0 0 0 rgba(233,30,140,.55); }
  50%  { transform: scale(1.04); box-shadow: 0 0 0 6px rgba(233,30,140,0); }
  100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(233,30,140,0); }
}
.wc-word-chip {
  display: flex; align-items: center; justify-content: space-between;
  background: rgba(255,255,255,.18); border-radius: 12px; padding: 8px 14px;
  backdrop-filter: blur(4px);
  transition: background 200ms;
}
.wc-word-chip.wc-chip-new {
  animation: wc-chip-appear 320ms cubic-bezier(.34,1.56,.64,1) both;
}
.wc-word-chip.wc-vote-flash {
  animation: wc-vote-pulse 350ms ease-out;
}
.wc-word-text { color: #fff; font-size: 1rem; font-weight: 600; }
.wc-like-btn, .wc-dislike-btn {
  border: 1.5px solid rgba(255,255,255,.5); border-radius: 20px;
  background: transparent; color: #fff; padding: 4px 10px; font-size: 0.85rem;
  cursor: pointer; white-space: nowrap; transition: background 150ms, border-color 150ms, color 150ms;
}
.wc-like-btn:active, .wc-dislike-btn:active { background: rgba(255,255,255,.25); }
.wc-like-btn.voted {
  background: #e91e8c; border-color: #e91e8c; color: #fff; cursor: not-allowed;
}
.wc-like-btn.voted.retractable {
  cursor: pointer; opacity: 0.75;
}
.wc-like-btn.voted.retractable:hover { opacity: 1; }
.wc-like-btn.wc-btn-cooldown { opacity: 0.45; pointer-events: none; }
.wc-dislike-btn.voted {
  background: rgba(255,255,255,.3); border-color: #fff; color: #fff; cursor: not-allowed;
}
.wc-word-chip .wc-dislike-btn { margin-left: 6px; }

/* ---- WC sort button group ---- */
.wc-sort-group {
  display: flex; margin: 4px 16px 4px; border-radius: 22px; overflow: hidden;
  border: 1.5px solid rgba(255,255,255,.22);
}
.wc-sort-btn {
  flex: 1; background: transparent; border: none; color: rgba(255,255,255,.55);
  padding: 7px 8px; font-size: 0.78rem; font-weight: 600; cursor: pointer;
  letter-spacing: .02em; transition: background 150ms, color 150ms;
  border-right: 1px solid rgba(255,255,255,.15);
}
.wc-sort-btn:last-child { border-right: none; }
.wc-sort-btn.active {
  background: rgba(255,255,255,.2); color: #fff;
}
.wc-sort-btn:active { background: rgba(255,255,255,.25); }

/* ---- Group Leader overlays (app) ---- */
.leader-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.6); z-index: 9999;
  display: flex; align-items: center; justify-content: center; padding: 16px;
}
.leader-overlay-box {
  background: #fff; border-radius: 16px; padding: 24px;
  max-width: 380px; width: 100%; text-align: center;
}
.leader-crown-icon { font-size: 2.5rem; margin-bottom: 8px; }
.leader-overlay-title { font-size: 1.1rem; font-weight: 700; margin-bottom: 6px; }
.leader-vote-subtitle { font-size: .85rem; color: #666; margin-bottom: 16px; }
.leader-vote-btn {
  display: block; width: 100%; padding: 10px 16px; margin-bottom: 8px;
  border-radius: 8px; border: 2px solid #000;
  font-weight: 600; font-size: 0.95rem; color: #fff;
  text-shadow: 0 1px 2px rgba(0,0,0,.35);
  cursor: pointer; transition: opacity .15s, transform .1s;
}
.leader-vote-btn:not(:disabled):active { transform: scale(.97); }
.leader-vote-btn.leader-voted-dim  { opacity: .35; cursor: default; }
.leader-vote-btn.leader-voted-pick { box-shadow: 0 0 0 3px #fff, 0 0 0 5px #000; }
.leader-voted-msg { color: green; font-weight: 600; margin-top: 12px; }
.leader-result-text {
  font-size: 1rem; color: #333; margin: 10px 0;
  padding: 12px; background: #fffbea; border-radius: 8px;
}
.leader-result-name { font-size: 1.5rem; font-weight: 800; color: var(--bs-primary); margin-top: 8px; }
.leader-crown-white { color: #fff; margin-right: 4px; }
.group-up-crown-display { font-size: 5rem; text-align: center; padding: 20px 0; color: #fff; filter: drop-shadow(0 2px 6px rgba(0,0,0,.4)); }
.follower-wait-crown { font-size: 4rem; text-align: center; padding: 16px 0 8px; color: #fff; filter: drop-shadow(0 2px 6px rgba(0,0,0,.4)); }
.follower-wait-text { text-align: center; font-size: 1.1rem; font-weight: 700; color: #fff; padding: 0 24px; }
.leader-screen-crown {
  position: fixed; top: 19%; left: 50%; transform: translateX(-50%);
  z-index: 200; font-size: 3rem; color: #fff;
  filter: drop-shadow(0 1px 3px rgba(0,0,0,.4));
  pointer-events: none;
}

/* ---- Quiz / Multiple Choice participant screen ---- */
.activity-waiting {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 40px 20px; gap: 18px;
}
.activity-waiting-icon {
  font-size: 3rem; color: rgba(255,255,255,0.5);
  animation: waiting-pulse 2s ease-in-out infinite;
}
.activity-waiting-text {
  font-size: 1.1rem; font-weight: 600; color: rgba(255,255,255,0.7); text-align: center;
}
@keyframes waiting-pulse {
  0%, 100% { opacity: 0.4; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.1); }
}
/* Sala de espera global */
.waiting-icon-container {
  font-size: 4.5rem; color: #fff; text-align: center;
}
.waiting-room-text {
  font-size: clamp(1.3rem,5vw,1.8rem); font-weight: 700; color: #fff;
  text-align: center; max-width: 26ch; line-height: 1.55;
}
.waiting-room-text strong { display: block; font-size: 1.15em; }
.waiting-dim { font-size: .8em; font-weight: 400; color: rgba(255,255,255,.65); }
.waiting-connected-badge {
  font-size: 0.85rem; color: rgba(255,255,255,.5); text-align: center;
  margin-top: 16px;
}

.quiz-screen {
  width: 100%; padding: 20px 16px; display: flex; flex-direction: column; gap: 16px;
}
.quiz-question {
  font-size: clamp(22px, 5.5vw, 34px); font-weight: 800; color: #fff;
  text-align: center; line-height: 1.35;
  width: 90%; margin: 0 auto;
  text-wrap: pretty;
}
.quiz-choices {
  display: flex; flex-direction: column; gap: 10px;
}
.quiz-choice-btn {
  position: relative; overflow: hidden;
  background: rgba(255,255,255,.15);
  border: 2px solid rgba(255,255,255,.3);
  border-radius: 12px;
  color: #fff; font-size: 1rem; font-weight: 600;
  padding: 14px 16px; text-align: left; cursor: pointer;
  transition: background .2s, border-color .2s;
  display: flex; align-items: center; gap: 12px;
}
.quiz-choice-letter {
  flex-shrink: 0;
  width: 2rem; height: 2rem;
  background: rgba(255,255,255,.22);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: .95rem; font-weight: 800; position: relative; z-index: 1;
}
.quiz-choice-text { position: relative; z-index: 1; }
.quiz-choice-btn:disabled { cursor: default; }
.quiz-choice-btn.quiz-selected { border-color: rgba(255,255,255,.7); background: rgba(255,255,255,.25); }
.quiz-bar { position: absolute; top: 0; left: 0; height: 100%; background: rgba(255,255,255,.18); transition: width .5s ease; border-radius: 10px; pointer-events: none; }
.quiz-bar span { display: block; height: 100%; background: rgba(255,255,255,.18); border-radius: 10px; }
.quiz-bar-pct { margin-left: auto; font-size: .85rem; opacity: .75; position: relative; z-index: 1; }
.quiz-choice-btn.quiz-correct { background: rgba(26,138,64,.7); border-color: #1a8a40; }
.quiz-choice-btn.quiz-wrong   { opacity: .38; }
/* El botón que el participante eligió Y era incorrecto → rojo */
.quiz-choice-btn.quiz-selected.quiz-wrong {
  background: rgba(204,47,54,.65); border-color: #cc2f36;
  opacity: 1; /* visible, no transparente */
}
.quiz-choice-btn.quiz-result  { cursor: default; }
.quiz-timer { text-align: center; font-size: 1.1rem; color: rgba(255,255,255,.7); font-weight: 600; }
.quiz-status { text-align: center; font-size: .9rem; color: rgba(255,255,255,.6); padding: 8px 0; }
.quiz-status-ok   { color: #4ade80; font-weight: 700; }
.quiz-status-fail { color: #f87171; font-weight: 700; }
/* Multi-correct */
.quiz-multi-hint { text-align: center; font-size: .8rem; color: rgba(255,255,255,.55); }
/* Quiz Batería (Fase 1): píldora "N / M" + barra de progreso, encima de la pregunta */
.quiz-battery-progress { display: flex; flex-direction: column; align-items: center; gap: 6px; margin-bottom: 4px; }
.quiz-battery-progress-pill {
  font-size: .8rem; font-weight: 700; color: rgba(255,255,255,.75);
  background: rgba(255,255,255,.12); border-radius: 999px; padding: 4px 14px;
}
.quiz-battery-progress-bar { width: 60%; max-width: 220px; height: 4px; background: rgba(255,255,255,.15); border-radius: 999px; overflow: hidden; }
.quiz-battery-progress-fill { height: 100%; background: rgba(255,255,255,.7); border-radius: 999px; transition: width .4s ease; }
.quiz-confirm-btn {
  background: rgba(255,255,255,.2); border: 2px solid rgba(255,255,255,.45);
  border-radius: 12px; color: #fff; font-size: 1rem; font-weight: 700;
  padding: 14px; cursor: pointer; transition: background .2s;
}
.quiz-confirm-btn:disabled { opacity: .4; cursor: default; }
.quiz-confirm-btn:not(:disabled):hover { background: rgba(255,255,255,.32); }
/* Emoji — button-group horizontal, una sola línea */
.quiz-emoji-screen .emoji-choices {
  flex-direction: row; justify-content: center; flex-wrap: nowrap;
  width: 100%; gap: 0;
}
.emoji-choice-btn {
  flex: 1; min-width: 0;
  background: rgba(255,255,255,.12); border: 2px solid rgba(255,255,255,.3);
  border-right-width: 0;
  padding: 14px 4px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background .15s;
}
.emoji-choice-btn:last-child { border-right-width: 2px; border-radius: 0 12px 12px 0; }
.emoji-choice-btn:first-child { border-radius: 12px 0 0 12px; }
.emoji-choice-btn:hover { background: rgba(255,255,255,.22); }
.emoji-choice-btn.quiz-selected { background: rgba(74,222,128,.25); border-color: #4ade80; }
.emoji-choice-btn:disabled { opacity: .7; cursor: default; }
/* font-family garantiza que el glyph use la fuente de emojis del sistema */
.emoji-face {
  font-size: clamp(1.6rem, 8vw, 2.4rem); line-height: 1;
  font-family: 'Apple Color Emoji','Segoe UI Emoji','Noto Color Emoji','Segoe UI Symbol',sans-serif;
}
/* Thumbs */
.quiz-thumbs-screen .thumbs-choices {
  flex-direction: row; justify-content: center; gap: 28px;
}
.thumbs-choice-btn {
  flex: 1; max-width: 160px;
  background: rgba(255,255,255,.12); border: 3px solid rgba(255,255,255,.25);
  border-radius: 20px; padding: 24px 12px; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  font-size: 1rem; font-weight: 700; color: #fff;
  transition: transform .15s, border-color .15s, background .15s;
}
.thumbs-up-btn:hover,   .thumbs-up-btn.quiz-selected   { background: rgba(74,222,128,.3); border-color: #4ade80; }
.thumbs-down-btn:hover, .thumbs-down-btn.quiz-selected { background: rgba(248,113,113,.3); border-color: #f87171; }
.thumbs-icon { font-size: 3rem; line-height: 1; font-family: 'Apple Color Emoji','Segoe UI Emoji','Noto Color Emoji','Segoe UI Symbol',sans-serif; }
.thumbs-label { font-size: .85rem; opacity: .85; }
/* ---- /Quiz ---- */

/* ---- Quiz Feedback — pantallas lúdicas post-respuesta (diseño 2026-07-17) ---- */
:root {
  --mm-yellow:        #FFC800;
  --mm-ink:           #171512;
  --mm-surface-dark:  #24211E;
  --mm-surface-dark-2:#2A2724;
  --mm-paper:         #FFFDF4;
  --mm-paper-2:       #F4EFE3;
  --mm-green:         #1FA95C;
  --mm-red:           #F4504B;
  --mm-orange:        #FF8A3D;
  --mm-muted-dark:    #A39D92;
  --mm-muted-light:   #6B665C;
}

@keyframes mmFall  { 0% { transform:translateY(-60px) rotate(0deg); opacity:1 } 100% { transform:translateY(100vh) rotate(720deg); opacity:0 } }
@keyframes mmPop   { 0% { transform:scale(0) } 70% { transform:scale(1.15) } 100% { transform:scale(1) } }
@keyframes mmPulse { 0%,100% { transform:scale(1) } 50% { transform:scale(1.06) } }
@keyframes mmShake { 0%,100% { transform:translateX(0) } 20% { transform:translateX(-8px) } 40% { transform:translateX(8px) } 60% { transform:translateX(-5px) } 80% { transform:translateX(5px) } }
@keyframes mmTick  { 0%,100% { transform:rotate(-8deg) } 50% { transform:rotate(8deg) } }
@keyframes mmRise  { 0% { transform:translateY(24px); opacity:0 } 100% { transform:translateY(0); opacity:1 } }

/* Contenedor principal — posición fija sobre todo */
.qf-screen {
  position: fixed; inset: 0; z-index: 200;
  display: flex; flex-direction: column;
  overflow: hidden; font-family: "Montserrat", sans-serif;
}
.qf-screen.qf-correct   { background: var(--mm-yellow); }
.qf-screen.qf-incorrect { background: var(--mm-ink); }
.qf-screen.qf-timeout   { background: var(--mm-ink); }
.qf-screen.qf-streak    { background: var(--mm-ink); }
.qf-screen.qf-partial   { background: var(--mm-orange); }

/* Confetti */
.qf-confetti { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.qf-confetti-piece {
  position: absolute; top: -40px;
  width: var(--cf-size, 10px); height: var(--cf-size, 10px);
  background: var(--cf-color, #FFC800);
  border-radius: var(--cf-ar, 3px);
  left: var(--cf-left, 50%);
  animation: mmFall var(--cf-duration, 4s) linear var(--cf-delay, 0s) infinite;
}

/* Header */
.qf-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 28px 24px 0; position: relative;
}
/* Logo real de la sesión (antes: wordmark "MIXME" fijo, ignoraba el logo configurado).
   width explícito: .logo normalmente hereda el ancho de un contenedor de bloque a pantalla
   completa, pero aquí vive dentro de un inline-block que hace shrink-to-fit — sin ancho
   propio, el div (sin contenido, solo background-image) colapsaría a 0px. */
.qf-logo-badge .logo { height: 36px; width: 120px; margin: 0; }
/* Fondos claros (amarillo/naranja): el logo por defecto es claro y se perdería sin
   una base oscura detrás — mismo recurso visual que la pill de "+1 pt" de esta pantalla */
.qf-screen.qf-correct .qf-logo-badge,
.qf-screen.qf-partial .qf-logo-badge {
  display: inline-block; background: var(--mm-ink);
  border-radius: 14px; padding: 8px 18px;
}

/* Cuerpo central */
.qf-body {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 20px; padding: 0 28px; position: relative;
  overflow-y: auto; min-height: 0;
}

/* Hero icono */
.qf-hero {
  width: 140px; height: 140px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; position: relative;
  flex-shrink: 0;
}
.qf-screen.qf-correct .qf-hero  { background: var(--mm-ink); box-shadow: 0 12px 0 rgba(23,21,18,.2); animation: mmPop .5s cubic-bezier(0.34,1.56,0.64,1) both; }
.qf-screen.qf-incorrect .qf-hero{ background: var(--mm-red);  box-shadow: 0 12px 0 rgba(244,80,75,.25); animation: mmShake .5s .2s both; }
.qf-screen.qf-timeout .qf-hero  { background: var(--mm-yellow); box-shadow: 0 12px 0 rgba(255,200,0,.2); animation: mmTick .8s ease-in-out infinite; }
.qf-screen.qf-streak .qf-hero   { background: var(--mm-yellow); box-shadow: 0 0 60px rgba(255,200,0,.5); animation: mmPulse 1.2s ease-in-out infinite; }

/* Iconos CSS puro */
.qf-icon-check {
  width: 56px; height: 30px;
  border-left: 12px solid var(--mm-yellow); border-bottom: 12px solid var(--mm-yellow);
  transform: rotate(-45deg); margin-top: -14px;
}
.qf-icon-x::before, .qf-icon-x::after {
  content: ''; position: absolute;
  left: 50%; top: 50%; width: 64px; height: 12px;
  background: var(--mm-paper); border-radius: 6px;
  transform: translate(-50%,-50%) rotate(45deg);
}
.qf-icon-x::after { transform: translate(-50%,-50%) rotate(-45deg); }
.qf-icon-clock {
  position: absolute; inset: 16px;
  border: 10px solid var(--mm-ink); border-radius: 50%;
}
.qf-icon-hand-long {
  position: absolute; left: 50%; top: 50%;
  width: 8px; height: 34px; background: var(--mm-ink);
  border-radius: 4px; transform: translate(-50%,-100%); transform-origin: bottom;
}
.qf-icon-hand-short {
  position: absolute; left: 50%; top: 50%;
  width: 8px; height: 26px; background: var(--mm-ink);
  border-radius: 4px; transform: translate(-50%,-4px) rotate(115deg); transform-origin: top;
}
.qf-icon-bolt {
  width: 58px; height: 84px; background: var(--mm-ink);
  clip-path: polygon(62% 0%, 8% 56%, 42% 56%, 34% 100%, 92% 40%, 55% 40%);
}

/* Tipografía de resultado */
.qf-title {
  font-size: 46px; font-weight: 900; letter-spacing: -1px;
  animation: mmRise .4s .15s both;
  flex-shrink: 0;
}
.qf-subtitle {
  font-weight: 700; font-size: 16px; margin-top: -10px;
  text-align: center; animation: mmRise .4s .2s both;
  flex-shrink: 0;
}
.qf-screen.qf-correct .qf-title   { color: var(--mm-ink); }
.qf-screen.qf-incorrect .qf-title { color: var(--mm-paper); }
.qf-screen.qf-timeout .qf-title   { color: var(--mm-paper); }
.qf-screen.qf-streak .qf-title    { color: var(--mm-paper); font-size: 36px; margin-top: -16px; }
.qf-screen.qf-incorrect .qf-subtitle { color: var(--mm-muted-dark); }
.qf-screen.qf-timeout .qf-subtitle   { color: var(--mm-muted-dark); }
.qf-screen.qf-streak .qf-subtitle    { color: var(--mm-muted-dark); }

/* Pill de puntos */
.qf-points {
  font-weight: 900; font-size: 24px; padding: 10px 28px;
  border-radius: 99px; animation: mmRise .4s .25s both;
  flex-shrink: 0;
}
.qf-screen.qf-correct .qf-points { background: var(--mm-paper); color: var(--mm-ink); box-shadow: 0 6px 0 rgba(23,21,18,.25); }

/* Badges de letra A/B/C/D */
.qf-answer-badge {
  width: 34px; height: 34px; border-radius: 10px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-weight: 900; font-size: 16px; color: var(--mm-paper);
}
.qf-badge-green { background: var(--mm-green); }
.qf-badge-red   { background: var(--mm-red); }

/* Card de respuesta correcta (pantalla 1a) */
.qf-correct-card {
  background: var(--mm-paper); border-radius: 20px; padding: 18px 20px;
  width: 100%; box-sizing: border-box; animation: mmRise .4s .35s both;
}
.qf-correct-answer-row { display: flex; align-items: center; gap: 12px; }
.qf-correct-text { font-weight: 800; font-size: 17px; color: var(--mm-ink); }
.qf-correct-explanation { font-size: 13.5px; font-weight: 600; color: var(--mm-muted-light); margin-top: 10px; line-height: 1.45; }

/* Cards incorrecto / timeout (pantallas 1b, 1d) */
.qf-wrong-card {
  border-radius: 20px; padding: 16px 20px;
  width: 100%; box-sizing: border-box;
  display: flex; align-items: center; gap: 12px;
}
.qf-wrong-card.qf-wc-wrong   { background: var(--mm-surface-dark); border: 2px solid var(--mm-red);   animation: mmRise .4s .3s both; }
.qf-wrong-card.qf-wc-correct { background: var(--mm-surface-dark); border: 2px solid var(--mm-green); animation: mmRise .4s .4s both; }
.qf-answer-label { font-size: 11px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; }
.qf-label-red   { color: var(--mm-red); }
.qf-label-green { color: var(--mm-green); }
.qf-answer-text { font-weight: 800; font-size: 16px; color: var(--mm-paper); }

/* Revisión compacta multi-correct (pregunta con varias correctas): una fila por
   opción en vez de 2 tarjetas grandes — así cabe entera sin scroll aunque haya
   4-6 opciones, y se ve el desglose completo (no solo la primera correcta/marcada) */
.qf-multi-summary { font-weight: 800; font-size: 15px; color: var(--mm-paper); text-align: center; flex-shrink: 0; }
.qf-multi-list {
  display: flex; flex-direction: column; gap: 6px;
  width: 100%; flex-shrink: 0;
}
.qf-multi-item {
  display: flex; align-items: center; gap: 10px;
  border-radius: 12px; padding: 8px 14px;
  background: var(--mm-surface-dark);
  border: 2px solid transparent;
}
.qf-multi-item.qf-multi-hit   { border-color: var(--mm-green); }
.qf-multi-item.qf-multi-miss  { border-color: var(--mm-muted-light); opacity: .7; }
.qf-multi-item.qf-multi-wrong { border-color: var(--mm-red); }
.qf-multi-badge { font-weight: 900; font-size: 15px; flex-shrink: 0; width: 18px; text-align: center; }
.qf-multi-item.qf-multi-hit   .qf-multi-badge { color: var(--mm-green); }
.qf-multi-item.qf-multi-miss  .qf-multi-badge { color: var(--mm-muted-light); }
.qf-multi-item.qf-multi-wrong .qf-multi-badge { color: var(--mm-red); }
.qf-multi-text { font-weight: 700; font-size: 14px; color: var(--mm-paper); text-align: left; }

/* Streak (pantalla 1e) */
.qf-streak-glow {
  position: absolute; left: 50%; top: 42%;
  width: 560px; height: 560px; pointer-events: none;
  background: radial-gradient(circle, rgba(255,200,0,.22) 0%, rgba(255,200,0,0) 65%);
  transform: translate(-50%,-50%);
}
.qf-streak-x { font-size: 64px; font-weight: 900; color: var(--mm-yellow); letter-spacing: -2px; animation: mmPop .5s cubic-bezier(0.34,1.56,0.64,1) both; }
.qf-streak-dots { display: flex; gap: 10px; animation: mmRise .4s .3s both; }
.qf-streak-dot  { width: 16px; height: 16px; border-radius: 50%; }
.qf-dot-active  { background: var(--mm-yellow); }
.qf-dot-inactive{ background: var(--mm-surface-dark-2); }
.qf-streak-bonus { background: var(--mm-surface-dark); border: 2px solid var(--mm-yellow); border-radius: 20px; padding: 16px 22px; text-align: center; animation: mmRise .4s .4s both; }
.qf-streak-bonus-label { font-size: 12px; font-weight: 800; color: var(--mm-yellow); letter-spacing: 1.5px; text-transform: uppercase; }
.qf-streak-bonus-text  { font-weight: 800; font-size: 17px; color: var(--mm-paper); margin-top: 4px; }

/* CTA "Siguiente pregunta" */
.qf-cta { padding: 0 24px 36px; position: relative; }
.qf-cta-btn {
  width: 100%; border: none; cursor: pointer;
  font-family: "Montserrat", sans-serif; font-size: 18px; font-weight: 900;
  text-align: center; padding: 18px; border-radius: 99px;
  transition: transform .1s;
}
.qf-cta-btn:active { transform: translateY(2px); }
.qf-screen.qf-correct   .qf-cta-btn { background: var(--mm-ink); color: var(--mm-yellow); box-shadow: 0 6px 0 rgba(23,21,18,.3); }
.qf-screen.qf-incorrect .qf-cta-btn { background: var(--mm-yellow); color: var(--mm-ink); box-shadow: 0 6px 0 rgba(255,200,0,.25); }
.qf-screen.qf-timeout   .qf-cta-btn { background: var(--mm-yellow); color: var(--mm-ink); box-shadow: 0 6px 0 rgba(255,200,0,.25); }
.qf-screen.qf-streak    .qf-cta-btn { background: var(--mm-yellow); color: var(--mm-ink); box-shadow: 0 6px 0 rgba(255,200,0,.25); }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .qf-hero, .qf-title, .qf-subtitle, .qf-points,
  .qf-correct-card, .qf-wrong-card,
  .qf-streak-x, .qf-streak-dots, .qf-streak-bonus { animation: none; }
  .qf-confetti { display: none; }
}
/* ---- /Quiz Feedback ---- */

/* ---- Ranking participant screen ---- */
.ranking-screen {
  width: 100%; height: 100%; padding: 20px 16px; display: flex; flex-direction: column; gap: 12px;
  min-height: 0;
}
.ranking-question {
  font-size: 1.15rem; font-weight: 700; color: #fff;
  text-align: center; line-height: 1.4; flex-shrink: 0;
}
.ranking-hint {
  text-align: center; font-size: .85rem; color: rgba(255,255,255,.55); flex-shrink: 0;
}
/* flex:1 + min-height:0 → si hay muchos items (hasta 20) la lista hace scroll
   interno en vez de desbordar #main (que tiene overflow:hidden); pregunta,
   hint y botón de enviar quedan siempre visibles fuera del área de scroll. */
.ranking-items {
  display: flex; flex-direction: column; gap: 8px;
  flex: 1; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch;
  padding-right: 2px;
}
.ranking-submit-btn { flex-shrink: 0; }
.ranking-item-btn {
  display: flex; align-items: center; gap: 12px;
  background: rgba(255,255,255,.12);
  border: 2px solid rgba(255,255,255,.25);
  border-radius: 12px;
  color: #fff; font-size: 1rem; font-weight: 600;
  padding: 12px 16px; text-align: left; cursor: pointer;
  transition: background .15s, border-color .15s;
}
.ranking-item-btn:disabled { opacity: .5; cursor: default; }
.ranking-item-btn.ranking-selected {
  background: rgba(247,147,30,.25);
  border-color: #f7931e;
}
.ranking-item-badge {
  min-width: 28px; height: 28px; border-radius: 50%;
  background: rgba(255,255,255,.2);
  display: flex; align-items: center; justify-content: center;
  font-size: .9rem; font-weight: 800;
  flex-shrink: 0;
}
.ranking-item-btn.ranking-selected .ranking-item-badge {
  background: #f7931e; color: #fff;
}
.ranking-item-text { flex: 1; }
.ranking-submit-btn {
  background: #f7931e; color: #fff; border: none;
  border-radius: 12px; padding: 14px; font-size: 1rem; font-weight: 700;
  cursor: pointer; transition: opacity .2s;
}
.ranking-submit-btn:disabled { opacity: .35; cursor: default; }
.ranking-results { display: flex; flex-direction: column; gap: 10px; margin-top: 8px; }
.ranking-result-row {
  display: flex; align-items: center; gap: 12px;
}
/* Mismo esquema de color que Cast (oro/plata/bronce top-3, morado el resto) —
   antes era todo naranja en App y distinto del podio ya usado en Cast. */
.ranking-result-pos {
  display: flex; align-items: center; justify-content: center;
  min-width: 32px; width: 32px; height: 32px; border-radius: 10px; flex-shrink: 0;
  font-weight: 800; font-size: .95rem; color: #171512;
  background: linear-gradient(135deg,#c6a7ff,#8b5cf6);
}
.ranking-result-row.rr-gold   .ranking-result-pos { background: linear-gradient(135deg,#ffe27a,#ffc800); }
.ranking-result-row.rr-silver .ranking-result-pos { background: linear-gradient(135deg,#f2f4f8,#c3cad4); }
.ranking-result-row.rr-bronze .ranking-result-pos { background: linear-gradient(135deg,#ffb27a,#ff8a3d); }
/* Body: texto arriba, barra debajo — antes la barra iba entre el texto y el
   hueco disponible, con ancho de arranque distinto por fila según la longitud
   del texto (quedaba escalonado). Ahora ambos ocupan el ancho completo. */
.ranking-result-body { flex: 1; min-width: 0; }
.ranking-result-text {
  color: #fff; font-size: .95rem; font-weight: 600; margin-bottom: 6px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ranking-result-bar {
  height: 14px; background: rgba(255,255,255,.1);
  border-radius: 6px; overflow: hidden;
}
.ranking-result-bar span {
  display: block; height: 100%;
  background: linear-gradient(90deg, #c6a7ff, #8b5cf6);
  border-radius: 6px; transition: width .5s ease;
}
.ranking-result-row.rr-gold   .ranking-result-bar span { background: linear-gradient(90deg,#ffe27a,#ffc800); }
.ranking-result-row.rr-silver .ranking-result-bar span { background: linear-gradient(90deg,#f2f4f8,#c3cad4); }
.ranking-result-row.rr-bronze .ranking-result-bar span { background: linear-gradient(90deg,#ffb27a,#ff8a3d); }
/* Modo arrastrar y soltar */
.ranking-drag-item { touch-action: none; cursor: grab; user-select: none; }
.ranking-drag-item.ranking-dragging {
  cursor: grabbing; box-shadow: 0 10px 24px rgba(0,0,0,.35);
  background: rgba(247,147,30,.25); border-color: #f7931e;
}
.ranking-drag-handle {
  margin-left: auto; padding-left: 8px; color: rgba(255,255,255,.5); flex-shrink: 0;
}
.ranking-drag-placeholder {
  border: 2px dashed rgba(255,255,255,.3); border-radius: 12px;
}
.ranking-submitted .ranking-drag-item { cursor: default; touch-action: auto; opacity: .6; }
/* ---- /Ranking ---- */

/* ── Photo Activity (App participante) ──────────────────────────────────────── */
.photo-activity-screen {
  position: fixed; inset: 0; z-index: 900;
  background: #0d0d1a; display: flex; align-items: flex-start; justify-content: center;
  overflow-y: auto; -webkit-overflow-scrolling: touch;
  opacity: 0; pointer-events: none; transition: opacity 300ms ease;
}
/* Bug real 2026-08-25: con muchas secciones (logo/instrucción/preview/recientes/
   botones/caption/enviar) el contenido superaba la altura de un móvil real y, como
   el contenedor no hacía scroll (align-items:center + sin overflow), el botón
   "Enviar foto" quedaba fuera de la pantalla e inalcanzable — el usuario reportó
   "no veo botón enviar" probando en 14 dispositivos. align-items:flex-start +
   overflow-y:auto + tamaños reducidos abajo para que quepa sin scroll en la
   mayoría de móviles, con scroll como red de seguridad si no cabe. */
.photo-activity-screen.active { opacity: 1; pointer-events: all; }
.photo-activity-inner {
  width: 100%; max-width: 400px; padding: 14px 20px 24px;
  display: flex; flex-direction: column; gap: 10px;
}
.photo-activity-inner .logo { height: 36px; margin-top: 0; }
.photo-activity-instruction {
  color: rgba(255,255,255,.9); font-size: 1rem; font-weight: 700;
  text-align: center; line-height: 1.3;
}
.photo-activity-preview-wrap {
  width: 100%; aspect-ratio: 16/10; max-height: 32vh; border-radius: 12px; overflow: hidden;
  background: rgba(255,255,255,.07); position: relative;
}
.photo-preview-img { width: 100%; height: 100%; object-fit: contain; border-radius: 12px; }
.photo-preview-placeholder {
  position: absolute; inset: 0; display: flex; align-items: center;
  justify-content: center; color: rgba(255,255,255,.25); font-size: 2.2rem;
}
.photo-recents-wrap { width: 100%; }
.photo-recents-label { font-size: 0.7rem; text-transform: uppercase; letter-spacing: .08em; color: rgba(255,255,255,.45); margin-bottom: 4px; }
.photo-recents-row { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; }
.photo-recent-thumb { width: 52px; height: 52px; object-fit: cover; border-radius: 8px; cursor: pointer; opacity: .8; flex-shrink: 0; border: 2px solid transparent; transition: opacity .2s, border-color .2s; }
.photo-recent-thumb:active { opacity: 1; border-color: rgba(255,255,255,.7); }
.photo-activity-buttons { display: flex; gap: 10px; }
.photo-btn-select {
  flex: 1; text-align: center; border-radius: 8px; cursor: pointer;
  background: rgba(255,255,255,.18); border: 1px solid rgba(255,255,255,.3);
  color: #fff; font-weight: 600;
}
.photo-btn-select:hover { background: rgba(255,255,255,.28); color: #fff; }
.photo-caption-input {
  background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.2);
  color: #fff; border-radius: 8px; resize: none; font-size: 0.9rem;
}
.photo-caption-input::placeholder { color: rgba(255,255,255,.4); }
.photo-caption-input:focus { background: rgba(255,255,255,.14); border-color: rgba(255,255,255,.4); color: #fff; }
.photo-send-status { text-align: center; font-size: 0.85rem; color: rgba(255,255,255,.7); padding: 4px 0; }

/* Rediseño 2026-08-25: la galería de voto ya no convive siempre visible con los
   controles de subida — un botón la sustituye, y tocar una miniatura abre un
   detalle en vez de votar directo desde la rejilla (pedido explícito del usuario). */
#photo_vote_toggle_btn { flex-shrink: 0; }
.photo-contest-wrap { width: 100%; }
.photo-contest-back-btn, .photo-detail-back-btn {
  display: flex; align-items: center; gap: 6px; background: none; border: none;
  color: rgba(255,255,255,.75); font-weight: 700; font-size: 0.9rem;
  padding: 6px 0; margin-bottom: 8px; cursor: pointer;
}
.photo-contest-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px;
}
.photo-contest-tile {
  position: relative; aspect-ratio: 1/1; border-radius: 8px; overflow: hidden;
  background: rgba(255,255,255,.06); cursor: pointer;
}
.photo-contest-tile img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-contest-like-count-badge {
  position: absolute; bottom: 4px; right: 4px; display: flex; align-items: center; gap: 3px;
  padding: 3px 7px; border-radius: 999px; pointer-events: none;
  background: rgba(0,0,0,.55); color: rgba(255,255,255,.85); font-size: 0.7rem; font-weight: 700;
}
.photo-contest-like-count-badge i { color: rgba(255,255,255,.6); }

/* Detalle de una foto del concurso — foto + texto + votar + volver */
.photo-detail-overlay {
  position: fixed; inset: 0; z-index: 910; background: #0d0d1a;
  display: flex; flex-direction: column; align-items: center; gap: 14px;
  padding: 14px 20px 24px; opacity: 0; pointer-events: none; transition: opacity 200ms ease;
  overflow-y: auto;
}
.photo-detail-overlay.active { opacity: 1; pointer-events: all; }
.photo-detail-back-btn { align-self: flex-start; }
.photo-detail-img {
  width: 100%; max-width: 400px; border-radius: 12px; object-fit: contain;
}
.photo-detail-caption {
  color: rgba(255,255,255,.85); font-size: 0.95rem; text-align: center; max-width: 400px;
}
.photo-detail-caption.d-none { display: none; }
.photo-detail-vote-btn {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  width: 100%; max-width: 400px; font-weight: 700;
}
.photo-detail-vote-btn.is-liked { background: #f43f5e; border-color: #f43f5e; }

/* ==================== MIXME Games: Simón Dice ==================== */
#simon_screen {
  position: fixed; inset: 0; z-index: 500; display: none;
  flex-direction: column; align-items: center; justify-content: center; gap: 18px;
  background: radial-gradient(circle at 50% 0%, #1a1233, #0b0714 70%);
  padding: 24px 16px; text-align: center;
}
#simon_screen.active { display: flex; }
#simon_screen.is-paused::after {
  content: "Pausado"; position: absolute; inset: 0; z-index: 5;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,.72); color: #fff; font-size: 1.4rem; font-weight: 800;
}
#simon_round_label { color: rgba(255,255,255,.55); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; font-size: 0.85rem; }
#simon_status_label { color: #fff; font-size: 1.6rem; font-weight: 800; min-height: 2.2rem; }

.simon-grid {
  display: grid; gap: 14px; width: 100%; max-width: 420px; aspect-ratio: 1/1;
}
.simon-grid-4 { grid-template-columns: repeat(2, 1fr); grid-template-rows: repeat(2, 1fr); }
.simon-grid-6 { grid-template-columns: repeat(2, 1fr); grid-template-rows: repeat(3, 1fr); }
.simon-grid-8 { grid-template-columns: repeat(2, 1fr); grid-template-rows: repeat(4, 1fr); }

.simon-btn {
  border: none; border-radius: 18px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  opacity: .55; transition: opacity .12s, transform .1s, filter .12s;
  filter: brightness(0.75) saturate(0.8);
}
.simon-btn:disabled { cursor: default; }
.simon-btn:not(:disabled) { opacity: 1; filter: brightness(1) saturate(1); }
.simon-btn.is-tapped { transform: scale(0.93); filter: brightness(1.3) saturate(1.2); }
.simon-btn.is-sequence-on { filter: brightness(1.6) saturate(1.3); box-shadow: 0 0 40px 8px currentColor; }
.simon-btn-symbol { font-size: clamp(28px, 8vw, 48px); color: rgba(0,0,0,.55); }

.simon-btn-0 { background: #e53950; color: #e53950; }
.simon-btn-1 { background: #2fbf6e; color: #2fbf6e; }
.simon-btn-2 { background: #2f7fe5; color: #2f7fe5; }
.simon-btn-3 { background: #f2c53d; color: #f2c53d; }
.simon-btn-4 { background: #9b5de5; color: #9b5de5; }
.simon-btn-5 { background: #f2914a; color: #f2914a; }
.simon-btn-6 { background: #2ec4c6; color: #2ec4c6; }
.simon-btn-7 { background: #ef5da8; color: #ef5da8; }

#simon_result_overlay {
  position: absolute; inset: 0; z-index: 10;
  display: none; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  background: rgba(10,6,20,.92);
}
#simon_result_overlay.show { display: flex; }
.simon-result-icon { font-size: 4rem; line-height: 1; }
.simon-result-text { color: #fff; font-size: 1.3rem; font-weight: 800; max-width: 80%; }
.simon-ranking { margin-top: 10px; display: flex; flex-direction: column; gap: 4px; }
.simon-rank-row { color: rgba(255,255,255,.85); font-size: 1rem; font-weight: 600; }
/* ==================== /Simón Dice ==================== */

/* ==================== MIXME Games: Cajas Sorpresa ==================== */
#boxes_screen {
  position: fixed; inset: 0; z-index: 500; display: none;
  flex-direction: column; align-items: center; justify-content: center; gap: 18px;
  background: radial-gradient(circle at 50% 0%, #241a05, #0b0714 70%);
  padding: 24px 16px; text-align: center;
  transition: background .4s ease;
}
#boxes_screen.active { display: flex; }
/* "TU TURNO" — mismo amarillo que la pantalla de ¡CORRECTO! del Quiz (--mm-yellow,
   ver .qf-screen.qf-correct), pedido explícito 2026-08-26 para dar homogeneidad
   visual a "es tu momento de actuar" en toda la App. Los textos que antes eran
   blancos pasan a --mm-ink (mismo par de colores que usa Quiz sobre amarillo). */
#boxes_screen.is-my-turn { background: var(--mm-yellow); }
#boxes_screen.is-my-turn #boxes_turn_label,
#boxes_screen.is-my-turn #boxes_confirm_text { color: var(--mm-ink); }
#boxes_screen.is-my-turn .box-tile:not(.is-opened) {
  background: rgba(23,21,18,.08); border-color: rgba(23,21,18,.2);
}
#boxes_screen.is-my-turn .box-tile-num { color: rgba(23,21,18,.55); }
#boxes_screen.is-my-turn #boxes_confirm_bar { background: rgba(23,21,18,.08); }
#boxes_screen.is-paused::after {
  content: "Pausado"; position: absolute; inset: 0; z-index: 5;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,.72); color: #fff; font-size: 1.4rem; font-weight: 800;
}
#boxes_turn_label {
  color: #fff; font-size: 1.4rem; font-weight: 800; min-height: 2rem;
  display: flex; align-items: center; justify-content: center; gap: 8px;
}
/* Foto de asistente (selfie) en resultados de MIXME Games — Simón/Cajas/Buzz.
   Sesión no anonimizada: mostrar cara real, no solo el nombre (bug real 2026-08-25). */
.game-winner-photo {
  width: 56px; height: 56px; border-radius: 50%; object-fit: cover;
  border: 2px solid rgba(255,255,255,.85); box-shadow: 0 3px 14px rgba(0,0,0,.4);
}
#boxes_grid {
  display: grid; grid-template-columns: repeat(3, minmax(70px, 100px)); gap: 12px;
  max-width: 420px;
}
.box-tile {
  position: relative;
  aspect-ratio: 1/1; border-radius: 16px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,.08); border: 2px solid rgba(255,255,255,.15);
  transition: transform .12s, box-shadow .12s, opacity .2s;
}
#boxes_screen.is-my-turn .box-tile:not(.is-opened) { cursor: pointer; }
#boxes_screen:not(.is-my-turn) .box-tile:not(.is-opened) { opacity: .7; }
.box-tile-emoji { font-size: clamp(24px, 7vw, 40px); }
.box-tile-num {
  position: absolute; top: 4px; left: 6px; z-index: 1;
  font-size: 0.7rem; font-weight: 800; color: rgba(255,255,255,.55);
}
.box-tile.is-special { border-color: #f59e0b; box-shadow: 0 0 14px 2px rgba(245,158,11,.5); }
.box-tile:active:not(.is-opened) { transform: scale(0.94); }
.box-tile.is-tension { transform: scale(1.12); box-shadow: 0 0 30px 6px rgba(255,255,255,.25); }
.box-tile.is-opened { opacity: .35; cursor: default; }

#boxes_confirm_bar {
  display: flex; flex-direction: column; gap: 10px; align-items: center;
  background: rgba(255,255,255,.08); border-radius: 14px; padding: 14px 18px;
}
#boxes_confirm_text { color: #fff; font-weight: 700; font-size: 1.05rem; }
.boxes-confirm-buttons { display: flex; gap: 10px; }

#boxes_result_overlay {
  position: absolute; inset: 0; z-index: 10;
  display: none; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  background: rgba(10,6,20,.92);
}
#boxes_result_overlay.show { display: flex; }
.boxes-result-icon { font-size: 4rem; line-height: 1; }
.boxes-result-text { color: #fff; font-size: 1.3rem; font-weight: 800; max-width: 80%; }
.boxes-ranking { margin-top: 10px; display: flex; flex-direction: column; gap: 4px; }
.boxes-rank-row { color: rgba(255,255,255,.85); font-size: 1rem; font-weight: 600; }
/* ==================== /Cajas Sorpresa ==================== */

/* ==================== MIXME Games: Buzz ==================== */
#buzz_screen {
  position: fixed; inset: 0; z-index: 500; display: none;
  flex-direction: column; align-items: center; justify-content: center; gap: 22px;
  background: radial-gradient(circle at 50% 0%, #1a0505, #0b0714 70%);
  padding: 24px 16px; text-align: center;
}
#buzz_screen.active { display: flex; }
#buzz_screen.is-paused::after {
  content: "Pausado"; position: absolute; inset: 0; z-index: 5;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,.72); color: #fff; font-size: 1.4rem; font-weight: 800;
}
#buzz_question_text { color: #fff; font-size: 1.3rem; font-weight: 700; max-width: 92%; }

/* El botón: relieve 3D, rojo oscuro, se hunde al pulsar */
#buzz_button {
  width: 55vw; height: 55vw; max-width: 220px; max-height: 220px; border-radius: 50%;
  border: none; cursor: pointer;
  background: radial-gradient(circle at 35% 28%, #d94b4b 0%, #9a1f1f 55%, #5c0f0f 100%);
  box-shadow:
    inset 0 6px 10px rgba(255,255,255,.35),
    inset 0 -14px 22px rgba(0,0,0,.55),
    0 14px 0 #4a0d0d,
    0 18px 24px rgba(0,0,0,.55);
  transform: translateY(0);
  transition: transform .08s, box-shadow .08s, filter .15s;
}
#buzz_button:disabled { filter: grayscale(0.6) brightness(0.6); cursor: default; }
#buzz_button:not(:disabled):active {
  transform: translateY(10px);
  box-shadow:
    inset 0 6px 14px rgba(0,0,0,.6),
    0 4px 0 #4a0d0d,
    0 6px 10px rgba(0,0,0,.5);
}
#buzz_button_label {
  color: rgba(255,255,255,.9); font-weight: 900; font-size: 1.1rem;
  letter-spacing: .05em; text-shadow: 0 2px 3px rgba(0,0,0,.5);
}
#buzz_status_label {
  color: #fff; font-size: 1.2rem; font-weight: 800; min-height: 1.8rem;
  display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap;
}

#buzz_answer_wrap { width: 100%; max-width: 360px; }
.buzz-choice-btn { font-weight: 700; }

#buzz_result_overlay {
  position: absolute; inset: 0; z-index: 10;
  display: none; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  background: rgba(10,6,20,.92);
}
#buzz_result_overlay.show { display: flex; }
.buzz-result-icon { font-size: 4rem; line-height: 1; }
.buzz-result-text { color: #fff; font-size: 1.3rem; font-weight: 800; max-width: 80%; }
.buzz-ranking { margin-top: 10px; display: flex; flex-direction: column; gap: 4px; }
.buzz-rank-row { color: rgba(255,255,255,.85); font-size: 1rem; font-weight: 600; }
/* ==================== /Buzz ==================== */

/* ── Star Rating (tipo 15 — Rating activity) ────────────────────────────── */
/* Convertido desde SCSS del CodePen jkantner/BarvVNa */
.rating-screen {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; padding: 1.5em;
}
.rating-question {
  font-size: clamp(22px, 5.5vw, 34px); font-weight: 800; color: #fff;
  text-align: center; line-height: 1.35; margin-bottom: 1em;
  width: 90%; margin-left: auto; margin-right: auto; text-wrap: pretty;
}
.rating { margin: auto; }
.rating__stars {
  display: flex; padding-bottom: 0.375em; position: relative;
}
.rating__star {
  display: block; overflow: visible; pointer-events: none;
  width: 2.8em; height: 2.8em;
}
.rating__star-ring,
.rating__star-fill,
.rating__star-line,
.rating__star-stroke {
  animation-duration: 1s;
  animation-timing-function: ease-in-out;
  animation-fill-mode: forwards;
}
.rating__star-ring,
.rating__star-fill,
.rating__star-line { stroke: hsl(38,90%,55%); }
.rating__star-fill {
  fill: hsl(38,90%,55%);
  transform: scale(0);
  transition: fill .3s cubic-bezier(.42,0,.58,1), transform .3s cubic-bezier(.42,0,.58,1);
}
.rating__star-line {
  stroke-dasharray: 12 13; stroke-dashoffset: -13;
}
.rating__star-stroke {
  stroke: rgba(255,255,255,.3);
  transition: stroke .3s;
}
.rating__label { cursor: pointer; padding: 0.2em; }

/* Delay classes para animación en cascada */
.rating__label--delay1 .rating__star-ring,
.rating__label--delay1 .rating__star-fill,
.rating__label--delay1 .rating__star-line,
.rating__label--delay1 .rating__star-stroke { animation-delay: .05s; }
.rating__label--delay2 .rating__star-ring,
.rating__label--delay2 .rating__star-fill,
.rating__label--delay2 .rating__star-line,
.rating__label--delay2 .rating__star-stroke { animation-delay: .10s; }
.rating__label--delay3 .rating__star-ring,
.rating__label--delay3 .rating__star-fill,
.rating__label--delay3 .rating__star-line,
.rating__label--delay3 .rating__star-stroke { animation-delay: .15s; }
.rating__label--delay4 .rating__star-ring,
.rating__label--delay4 .rating__star-fill,
.rating__label--delay4 .rating__star-line,
.rating__label--delay4 .rating__star-stroke { animation-delay: .20s; }

.rating__input {
  position: absolute; -webkit-appearance: none; appearance: none;
}
/* Hover: iluminar estrellas hasta la seleccionada */
.rating__input-1:hover ~ .rating__label:first-of-type .rating__star-stroke,
.rating__input-2:hover ~ .rating__label:nth-of-type(-n+2) .rating__star-stroke,
.rating__input-3:hover ~ .rating__label:nth-of-type(-n+3) .rating__star-stroke,
.rating__input-4:hover ~ .rating__label:nth-of-type(-n+4) .rating__star-stroke,
.rating__input-5:hover ~ .rating__label:nth-of-type(-n+5) .rating__star-stroke { stroke: hsl(38,90%,55%); }

/* Checked: animaciones de selección */
.rating__input-1:checked ~ .rating__label:first-of-type .rating__star-ring,
.rating__input-2:checked ~ .rating__label:nth-of-type(-n+2) .rating__star-ring,
.rating__input-3:checked ~ .rating__label:nth-of-type(-n+3) .rating__star-ring,
.rating__input-4:checked ~ .rating__label:nth-of-type(-n+4) .rating__star-ring,
.rating__input-5:checked ~ .rating__label:nth-of-type(-n+5) .rating__star-ring { animation-name: starRatingRing; }
.rating__input-1:checked ~ .rating__label:first-of-type .rating__star-stroke,
.rating__input-2:checked ~ .rating__label:nth-of-type(-n+2) .rating__star-stroke,
.rating__input-3:checked ~ .rating__label:nth-of-type(-n+3) .rating__star-stroke,
.rating__input-4:checked ~ .rating__label:nth-of-type(-n+4) .rating__star-stroke,
.rating__input-5:checked ~ .rating__label:nth-of-type(-n+5) .rating__star-stroke { animation-name: starRatingStroke; }
.rating__input-1:checked ~ .rating__label:first-of-type .rating__star-line,
.rating__input-2:checked ~ .rating__label:nth-of-type(-n+2) .rating__star-line,
.rating__input-3:checked ~ .rating__label:nth-of-type(-n+3) .rating__star-line,
.rating__input-4:checked ~ .rating__label:nth-of-type(-n+4) .rating__star-line,
.rating__input-5:checked ~ .rating__label:nth-of-type(-n+5) .rating__star-line { animation-name: starRatingLine; }
.rating__input-1:checked ~ .rating__label:first-of-type .rating__star-fill,
.rating__input-2:checked ~ .rating__label:nth-of-type(-n+2) .rating__star-fill,
.rating__input-3:checked ~ .rating__label:nth-of-type(-n+3) .rating__star-fill,
.rating__input-4:checked ~ .rating__label:nth-of-type(-n+4) .rating__star-fill,
.rating__input-5:checked ~ .rating__label:nth-of-type(-n+5) .rating__star-fill { animation-name: starRatingFill; }

.rating__display {
  font-size: 1em; font-weight: 600; min-height: 1.4em;
  position: absolute; top: 100%; width: 100%; text-align: center;
  color: rgba(255,255,255,.75);
}
/* Mostrar label al hacer hover / checked */
.rating__input:hover ~ [data-rating]:not([hidden]) { display: none; }
.rating__input-1:hover ~ [data-rating="1"][hidden],
.rating__input-2:hover ~ [data-rating="2"][hidden],
.rating__input-3:hover ~ [data-rating="3"][hidden],
.rating__input-4:hover ~ [data-rating="4"][hidden],
.rating__input-5:hover ~ [data-rating="5"][hidden],
.rating__input:checked:hover ~ [data-rating]:not([hidden]) { display: block; }

.rating__sr {
  clip: rect(1px,1px,1px,1px); overflow: hidden;
  position: absolute; width: 1px; height: 1px;
}
.rating-sent {
  margin-top: 1.5em; font-size: 1.1rem; font-weight: 700;
  color: hsl(38,90%,65%); text-align: center;
}
/* Rating multi-ítem */
.rating-multi { justify-content: flex-start; overflow-y: auto; max-height: 100%; padding: 1em 1.2em; }
.rating-multi .rating-question { margin-bottom: 0.75em; }
.rating-items { width: 100%; display: flex; flex-direction: column; gap: 0.6em; }
.rating-item { background: rgba(255,255,255,.1); border-radius: 12px; padding: 0.8em 1em; }
.rating-item-label { color: #fff; font-size: 0.95rem; font-weight: 600; margin-bottom: 0.5em; line-height: 1.3; }
.rating-item-form { margin: 0; }
.rating-item-form .rating__stars { padding-bottom: 0.2em; }
.rating-item-form .rating__star { width: 2.2em; height: 2.2em; }
.rating-send-btn {
  margin-top: 1.2em; padding: 0.7em 2em;
  background: hsl(38,90%,55%); color: #1a1a1a; font-weight: 700;
  border: none; border-radius: 24px; font-size: 1rem; cursor: pointer;
  transition: background .15s, opacity .15s;
}
.rating-send-btn:disabled { opacity: .4; cursor: default; }
.rating-send-btn:not(:disabled):hover { background: hsl(38,90%,65%); }

/* Keyframes para las estrellas (namespaceados para no colisionar) */
@keyframes starRatingRing {
  from, 20% { animation-timing-function: ease-in; opacity:1; r:8px; stroke-width:16px; transform:scale(0); }
  35%        { animation-timing-function: ease-out; opacity:.5; r:8px; stroke-width:16px; transform:scale(1); }
  50%, to    { opacity:0; r:16px; stroke-width:0; transform:scale(1); }
}
@keyframes starRatingFill {
  from, 40% { animation-timing-function: ease-out; transform:scale(0); }
  60%        { animation-timing-function: ease-in-out; transform:scale(1.2); }
  80%        { transform:scale(0.9); }
  to         { transform:scale(1); }
}
@keyframes starRatingStroke {
  from { transform:scale(1); }
  20%, to { transform:scale(0); }
}
@keyframes starRatingLine {
  from, 40% { animation-timing-function:ease-out; stroke-dasharray:1 23; stroke-dashoffset:1; }
  60%, to   { stroke-dasharray:12 13; stroke-dashoffset:-13; }
}

/* ── Open Text / Ideas screen ─────────────────────────────────────────────── */
.open-text-screen {
  display: flex; flex-direction: column; align-items: center;
  padding: 1.5em; width: 100%;
  /* min-height:0 necesario: es hijo flex de #main (overflow:hidden) — sin esto,
     el flex-basis por contenido gana y el historial de abajo se recorta en vez
     de poder hacer su propio scroll interno. Bug real 2026-09-01: "no permite
     hacer scroll para ver los envíos propios" con varias ideas ya enviadas. */
  min-height: 0;
}
.open-text-input {
  width: 100%; border-radius: 14px; padding: 14px 16px; font-size: 1rem;
  background: rgba(255,255,255,.1); border: 2px solid rgba(255,255,255,.2);
  color: #fff; resize: none; line-height: 1.5; margin-top: 1.2em;
  transition: border-color .2s;
}
.open-text-input:focus {
  outline: none; border-color: rgba(255,255,255,.55);
  background: rgba(255,255,255,.14);
}
.open-text-input::placeholder { color: rgba(255,255,255,.38); }
.open-text-chars {
  align-self: flex-end; font-size: 0.75rem; color: rgba(255,255,255,.4);
  margin-top: 4px;
}
.ot-sent {
  visibility: hidden; opacity: 0; transition: opacity .3s, visibility .3s;
  margin-top: .75em; pointer-events: none;
}
.ot-sent.ot-sent-visible { visibility: visible; opacity: 1; }
/* Propuesta pineada con botones de voto */
.ot-pinned-vote {
  width: 100%; margin-bottom: 1rem;
  background: rgba(255,255,255,.1); border-radius: 14px;
  border: 1.5px solid rgba(255,255,255,.25);
  padding: .9rem 1.1rem;
}
.ot-pinned-label {
  font-size: .72rem; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: rgba(255,255,255,.5);
  margin-bottom: .4rem;
}
.ot-pinned-text {
  font-size: 1rem; font-weight: 700; color: #fff;
  word-break: break-word; margin-bottom: .7rem;
}
.ot-vote-btns { display: flex; gap: .75rem; }
.ot-vote-btn {
  border: 1.5px solid rgba(255,255,255,.3); background: rgba(255,255,255,.08);
  color: rgba(255,255,255,.7); border-radius: 24px;
  padding: .35rem .9rem; font-size: .9rem; font-weight: 700;
  cursor: pointer; display: flex; align-items: center; gap: .35rem;
  transition: background .15s, border-color .15s, color .15s;
  -webkit-tap-highlight-color: transparent;
}
.ot-vote-btn.ot-vote-active {
  background: rgba(255,255,255,.25); border-color: rgba(255,255,255,.7); color: #fff;
}
.ot-dislike-btn.ot-vote-active { background: rgba(255,80,80,.3); border-color: rgba(255,100,100,.6); }
/* Mensaje de límite alcanzado */
.ot-limit-msg {
  font-size: .82rem; font-weight: 700; color: rgba(255,200,0,.85);
  text-align: center; margin-top: .5rem; padding: .4rem .8rem;
  background: rgba(255,200,0,.1); border-radius: 8px;
}
.open-text-history {
  width: 100%; margin-top: 1.2rem;
  max-height: 35vh; overflow-y: auto;
  min-height: 0;
  display: flex; flex-direction: column; gap: 8px;
}
.open-text-history-item {
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 10px;
  padding: 10px 14px;
  color: rgba(255,255,255,.7);
  font-size: .88rem;
  word-break: break-word;
  text-align: left;
  animation: ot-item-in .25s ease;
}
@keyframes ot-item-in {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: none; }
}

/* ── Selfie step & skip ─────────────────────────────────────────────────── */
.audience_skip_btn {
  background: none; border: none; color: rgba(255,255,255,.4);
  font-size: 13px; cursor: pointer; margin-top: 12px; text-decoration: underline;
  display: block; width: 100%; text-align: center;
}
/* ── ShotCode ring ──────────────────────────────────────────────────────── */
.shotcode-wrap {
  position: relative; display: block;
  width: 160px; height: 160px; margin: 0 auto 20px;
}
.shotcode-ring {
  position: absolute; inset: -18%; width: 136%; height: 136%;
  pointer-events: none; opacity: 0; transition: opacity .5s;
}
.shotcode-ring.visible { opacity: 1; }
.shotcode-wrap .selfie-preview-wrap {
  margin: 0; position: absolute; inset: 0;
}

.selfie-preview-wrap {
  width: 160px; height: 160px; border-radius: 50%; margin: 0 auto 20px;
  overflow: hidden; border: 3px solid rgba(255,255,255,.3);
  background: rgba(255,255,255,.08);
  display: flex; align-items: center; justify-content: center;
  position: relative;
}
.selfie-placeholder { font-size: 3rem; color: rgba(255,255,255,.3); }
.selfie-preview { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1); }
.selfie-buttons { margin-bottom: 12px; }
.selfie-take-btn { display: flex; align-items: center; justify-content: center; cursor: pointer; }

/* Input en el gate (nombre en selfie step) */
.audience_input {
  width: 100%; padding: 14px 18px; border-radius: 12px; margin-bottom: 10px;
  background: rgba(255,255,255,.15); border: 1.5px solid rgba(255,255,255,.3);
  color: #fff; font-size: 1rem; box-sizing: border-box;
}
.audience_input::placeholder { color: rgba(255,255,255,.5); }
.audience_input:focus { outline: none; border-color: rgba(255,255,255,.6); background: rgba(255,255,255,.2); }

/* ShotCode ring: el wrap necesita overflow visible para que el ring sobresalga */
.shotcode-wrap {
  overflow: visible !important;
}
/* Ampliar el área del wrap para incluir el ring en el layout */
#ps_shotcode_wrap {
  width: 200px; height: 200px; margin: 0 auto 20px;
}
#ps_shotcode_wrap .selfie-preview-wrap {
  width: 140px; height: 140px;
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  margin: 0;
}
#ps_shotcode_wrap .shotcode-ring {
  width: 100%; height: 100%;
  inset: 0;
}

/* Foto clickable como botón */
.selfie-clickable { cursor: pointer; }
.selfie-clickable .selfie-preview-wrap {
  transition: filter .2s, transform .2s;
}
.selfie-clickable:active .selfie-preview-wrap {
  filter: brightness(.75);
  transform: scale(.97);
}
/* Hint "Toca para cambiar" sobre la foto */
.selfie-tap-hint {
  position: absolute; inset: 0; border-radius: 50%;
  display: flex; align-items: flex-end; justify-content: center;
  padding-bottom: 12%;
  font-size: .65rem; font-weight: 700; letter-spacing: .04em;
  color: rgba(255,255,255,.9);
  background: linear-gradient(to top, rgba(0,0,0,.55) 0%, transparent 55%);
  opacity: 0; transition: opacity .25s;
  pointer-events: none; text-transform: uppercase;
}
.selfie-preview-wrap:hover .selfie-tap-hint,
.selfie-clickable:focus .selfie-tap-hint { opacity: 1; }
/* Mostrar siempre el hint en móvil (no hay hover) */
@media (hover: none) {
  .selfie-tap-hint { opacity: 1; }
}

/* Slot MixMark embebido en la pantalla de perfil */
.ps-mixmark-slot {
  display: flex; justify-content: center; margin-bottom: .75rem;
  min-height: 40px;
}
.ps-mixmark-slot svg { border-radius: 50%; }

/* Debug temporal: hex del ShotCode en pantalla de perfil */
#ps_shotcode_debug {
  text-align: center; margin: .6rem 0 .2rem;
  display: flex; flex-direction: column; align-items: center; gap: .15rem;
}
#ps_shotcode_debug code {
  font-size: 1rem; font-weight: 700; letter-spacing: .15em;
  background: rgba(255,255,255,.12); border-radius: 6px;
  padding: .15rem .6rem; color: #a8f7c1;
}
#ps_shotcode_debug small {
  font-size: .55rem; opacity: .35; font-family: monospace; word-break: break-all;
}

/* Botón continuar del selfie step (separado de audience_role_btn para evitar conflicto de handlers) */
.audience_selfie_btn {
  width: 100%; padding: 18px 24px; border: 2px solid rgba(255,255,255,.3);
  border-radius: 14px; background: rgba(255,255,255,.1); color: #fff;
  font-size: 1rem; font-weight: 700; cursor: pointer;
  transition: background .15s, border-color .15s, transform .1s;
  -webkit-tap-highlight-color: transparent;
}
.audience_selfie_btn:not(:disabled):active { transform: scale(.97); }
.audience_selfie_btn:disabled { opacity: .45; cursor: not-allowed; }

/* ---- MixMark: botón FAB + panel de identificación óptica (experimental) ---- */
.mixmark-fab {
  position: fixed; bottom: 18px; right: 18px; z-index: 300;
  width: 48px; height: 48px; border-radius: 50%;
  background: rgba(255,255,255,.18); backdrop-filter: blur(8px);
  border: 1.5px solid rgba(255,255,255,.3); color: #fff;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; box-shadow: 0 3px 12px rgba(0,0,0,.25);
  transition: transform .15s, background .15s;
  -webkit-tap-highlight-color: transparent;
}
.mixmark-fab:active { transform: scale(.92); background: rgba(255,255,255,.28); }

.mixmark-panel {
  position: fixed; inset: 0; z-index: 10001;
  background: rgba(10,10,18,.92); backdrop-filter: blur(12px);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 1rem; opacity: 0; pointer-events: none;
  transition: opacity .25s;
}
.mixmark-panel.is-open { opacity: 1; pointer-events: all; }
.mixmark-svg-wrap { display: flex; align-items: center; justify-content: center; }
.mixmark-svg-wrap svg { border-radius: 50%; box-shadow: 0 0 0 3px rgba(255,255,255,.15); }
.mixmark-code {
  font-size: 1.6rem; font-weight: 700; letter-spacing: .18em;
  color: #fff; font-family: monospace; margin: 0;
}
.mixmark-hint { font-size: .8rem; color: rgba(255,255,255,.5); margin: 0; }
.mixmark-close {
  position: absolute; top: 18px; right: 18px;
  background: rgba(255,255,255,.12); border: none; color: #fff;
  width: 38px; height: 38px; border-radius: 50%; font-size: 1.4rem;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.mixmark-close:active { background: rgba(255,255,255,.22); }

/* ── MixMark Scanner embebido en App ── */
.mss-screen {
  position: fixed; inset: 0; z-index: 10002;
  background: #000; overflow: hidden;
}
.mss-video {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; z-index: 1;
}
.mss-overlay-canvas {
  position: absolute; inset: 0; width: 100%; height: 100%;
  pointer-events: none; z-index: 2; opacity: 0;
}
/* Círculo transparente — box-shadow crea el área oscura alrededor */
.mss-circle-guide {
  position: absolute; z-index: 3; pointer-events: none;
  top: 50%; left: 50%; transform: translate(-50%, -58%);
  width: min(72vw, 52vh); height: min(72vw, 52vh);
  border-radius: 50%;
  box-shadow: 0 0 0 9999px rgba(0,0,0,.58);
  border: 2.5px dashed rgba(255,255,255,.55);
  transition: border-color .2s, box-shadow .2s;
}
/* Reflejan el data-state que ya calcula el motor de visión por frame (running/found)
   — antes solo se escribía en elementos técnicos ocultos, sin señal visual alguna. */
.mss-circle-guide.mss-state-running {
  border-style: solid; border-color: rgba(255,255,255,.85);
}
.mss-circle-guide.mss-state-found {
  border-style: solid; border-color: #22c55e;
  box-shadow: 0 0 0 9999px rgba(0,0,0,.58), 0 0 24px 4px rgba(34,197,94,.55);
}
.mss-hint-text {
  position: absolute; z-index: 4; pointer-events: none;
  left: 50%; bottom: 26%; transform: translateX(-50%);
  background: rgba(0,0,0,.55); color: #fff;
  font-size: .9rem; font-weight: 600; white-space: nowrap;
  padding: .4rem 1rem; border-radius: 20px;
  font-family: system-ui, sans-serif;
}
/* Overlay toca-para-activar: cubre toda la pantalla, solo aparece si el auto-arranque falla */
.mss-tap-start {
  position: absolute; inset: 0; z-index: 6;
  cursor: pointer; -webkit-tap-highlight-color: transparent;
  display: flex; align-items: flex-end; justify-content: center;
  padding-bottom: 22%;
}
.mss-tap-label {
  background: rgba(255,255,255,.14); color: #fff;
  font-size: 1.05rem; font-weight: 700; white-space: nowrap;
  padding: .55rem 1.5rem; border-radius: 28px;
  border: 1.5px solid rgba(255,255,255,.35);
  font-family: system-ui, sans-serif;
  animation: mss-pulse 1.8s ease-in-out infinite;
}
@keyframes mss-pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: .5; }
}
/* Tarjeta de identidad al reconocer */
.mss-identity {
  position: absolute; bottom: 0; left: 0; right: 0; z-index: 5;
  background: rgba(20,200,140,.92); backdrop-filter: blur(10px);
  display: flex; align-items: center; gap: 1rem;
  padding: 1rem 1.25rem; font-family: system-ui, sans-serif;
}
.mss-id-photo {
  width: 58px; height: 58px; border-radius: 50%;
  object-fit: cover; border: 3px solid #fff; flex-shrink: 0;
}
.mss-id-photo.hidden { display: none; }
.mss-id-name {
  flex: 1; font-size: 1.15rem; font-weight: 800;
  color: #fff; min-width: 0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.mss-id-check {
  font-size: 2rem; color: #fff; font-weight: 900; flex-shrink: 0;
}
