/* «Mis dudas» (notas.js): el botón, el panel y el aviso de la primera vez. Aparte desde el 9-oct-2026 (antes en
   demo.css) para que lo cargue también la portada de rebotea.com, que lleva la demo en vídeo pero no demo.css:
   allí el lápiz de la peli no hacía nada. Lleva sus colores, para no depender de la página. */
.notas-panel, .notas-aviso, .notas-boton { --p-tinta: #f3f5fa; --p-gris: #a3acbd; --p-gris-2: #6f7889; --p-linea: rgba(255,255,255,.08); --p-linea-2: rgba(255,255,255,.16); --tarjeta-o: #0b1426; --tarjeta-o2: #142140; }
.notas-boton { flex: none; display: inline-flex; align-items: center; gap: 8px; height: 42px; margin-left: auto; margin-right: -10px; padding: 0 14px; border-radius: 999px; border: 1px solid rgba(255,255,255,.22); background: rgba(7,10,18,.35); color: #fff; font: 700 14px/1 var(--letra); transition: border-color .2s, background .2s; }
.notas-boton:hover, .notas-boton[aria-expanded="true"] { border-color: var(--bola); background: rgba(215,242,74,.1); }
.notas-boton svg { color: var(--bola); }
.notas-n { min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: var(--bola); color: var(--tinta); font-size: 12.5px; line-height: 22px; text-align: center; }
.notas-n[hidden] { display: none; }
.en-peli .notas-boton { display: none; }
.notas-panel { position: fixed; right: 18px; top: calc(76px + env(safe-area-inset-top, 0px)); z-index: 140; width: min(380px, calc(100vw - 36px)); max-height: calc(100vh - 100px); overflow-y: auto; overscroll-behavior: contain; padding: 18px; border-radius: 22px; background: var(--tarjeta-o); color: var(--p-tinta); border: 1px solid var(--p-linea-2); box-shadow: 0 30px 80px rgba(0,0,0,.5); animation: aparecer .25s ease both; }
.en-peli .notas-panel { max-height: calc(100vh - 190px); }
.notas-panel[hidden] { display: none; }
.notas-cab { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.notas-cab h3 { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 18px; font-weight: 800; }
.notas-cab h3 svg { color: var(--bola); }
.notas-cerrar { flex: none; width: 36px; height: 36px; border-radius: 50%; border: 0; background: var(--tarjeta-o2); color: var(--p-tinta); font-size: 22px; line-height: 1; }
.notas-que { margin: 8px 0 12px; color: var(--p-gris); font-size: 14px; line-height: 1.5; }
.notas-escribir { position: relative; }
.notas-escribir textarea { display: block; width: 100%; min-height: 84px; resize: vertical; padding: 12px 52px 12px 14px; border-radius: 14px; border: 1px solid var(--p-linea-2); background: #070d1a; color: var(--p-tinta); font: 15px/1.45 var(--letra); }
.notas-escribir textarea::placeholder { color: var(--p-gris-2); }
.notas-escribir textarea:focus { outline: none; border-color: var(--azul-c); box-shadow: 0 0 0 3px rgba(0,83,254,.3); }
.notas-micro { position: absolute; right: 8px; top: 8px; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; border: 0; background: var(--tarjeta-o2); color: var(--p-gris); transition: background .2s, color .2s; }
.notas-micro:hover { color: #fff; }
.notas-micro.on { background: var(--rojo); color: #fff; animation: escucha 1.4s ease-in-out infinite; }
@keyframes escucha { 50% { box-shadow: 0 0 0 6px rgba(239,68,68,.25); } }
.notas-dictado { margin: 8px 0 0; font-size: 12.5px; line-height: 1.45; color: var(--p-gris-2); }
.notas-dictado[hidden] { display: none; }
.notas-guardar { width: 100%; height: 44px; margin-top: 10px; border-radius: 12px; border: 1px solid var(--azul); background: rgba(0,83,254,.22); color: #fff; font: 800 14.5px/1 var(--letra); }
.notas-guardar:hover { background: rgba(0,83,254,.36); }
.notas-lista { display: grid; gap: 8px; margin: 14px 0 0; padding: 0; list-style: none; }
.notas-lista[hidden] { display: none; }
.notas-lista li { display: flex; align-items: flex-start; gap: 8px; padding: 10px 8px 10px 12px; border-radius: 12px; background: #070d1a; border: 1px solid var(--p-linea); }
.notas-lista p { flex: 1; min-width: 0; margin: 0; font-size: 14px; line-height: 1.45; overflow-wrap: anywhere; white-space: pre-line; }
.notas-lista p small { display: inline-block; margin-left: 8px; padding: 1px 8px; border-radius: 999px; background: rgba(34,197,94,.15); color: #6ee7a0; font-size: 11.5px; font-weight: 700; }
.notas-lista button { flex: none; width: 28px; height: 28px; border-radius: 50%; border: 0; background: transparent; color: var(--p-gris-2); font-size: 18px; line-height: 1; }
.notas-lista button:hover { background: var(--tarjeta-o2); color: #fff; }
.notas-pie { display: grid; gap: 8px; margin-top: 14px; }
.notas-pie .btn { width: 100%; height: 48px; justify-content: center; font-size: 15px; }
.notas-pie small { color: var(--p-gris-2); font-size: 12px; line-height: 1.45; }
.notas-aviso { position: fixed; right: 18px; top: calc(76px + env(safe-area-inset-top, 0px)); z-index: 141; max-width: 300px; padding: 12px 14px; border-radius: 14px; background: #fff; color: var(--tinta); font-size: 14px; font-weight: 600; line-height: 1.4; box-shadow: 0 16px 40px rgba(0,0,0,.35); animation: aparecer .35s ease both; pointer-events: none; }
.en-peli .notas-aviso { top: calc(70px + env(safe-area-inset-top, 0px)); }
.notas-pie .notas-enviar { display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 999px; background: var(--azul, #0053fe); color: #fff; font-family: inherit; font-size: 15px; font-weight: 800; cursor: pointer; }
/* En la portada no hay barra para el botón (notas.js lo deja al final de la página): allí se apuntan desde la peli. */
body > .notas-boton { display: none; }

@media (max-width: 760px) {
  .nav .notas-boton { display: none; }
  .notas-panel { left: 10px; right: 10px; top: auto; bottom: calc(80px + env(safe-area-inset-bottom, 0px)); width: auto; max-height: 70vh; }
  /* Encima de la demo en vídeo, una hoja baja (60 % como mucho): la peli se sigue viendo arriba, parada donde iba. */
  .en-peli .notas-panel { left: 0; right: 0; bottom: 0; max-height: 60vh; max-height: 60svh; padding-bottom: calc(18px + env(safe-area-inset-bottom, 0px)); border-radius: 22px 22px 0 0; }
  .notas-aviso { left: 10px; right: 10px; top: auto; bottom: calc(80px + env(safe-area-inset-bottom, 0px)); max-width: none; }
  /* Dentro del vídeo, arriba junto al lápiz y sin tapar los subtítulos (con «bottom: auto»: con los dos a la vez
     se estiraba de arriba abajo y lo tapaba todo). */
  .en-peli .notas-aviso { left: auto; right: 12px; top: calc(62px + env(safe-area-inset-top, 0px)); bottom: auto; max-width: 250px; }
}
@media (max-width: 1100px) {
  .nav .notas-boton { margin-left: auto; }
}
