:root { --bg:#000; --bg2:#121212; --bg3:#1c1c1e; --tx:#F5F5F5; --tx2:#A8A8A8; --linea:#262626; --azul:#0095F6;
  --lava:#FF5900; --verde:#2fbf71; --rojo:#ff453a; --ambar:#ffb020; --gris:#8e8e93; }
* { margin:0; padding:0; box-sizing:border-box; -webkit-tap-highlight-color:transparent; }
html { background:var(--bg); }
body { font:400 15px/20px -apple-system,BlinkMacSystemFont,'SF Pro Text','Segoe UI',Roboto,Helvetica,Arial,sans-serif; color:var(--tx);
  background:var(--bg); max-width:480px; margin:0 auto; min-height:100vh; padding-bottom:calc(64px + env(safe-area-inset-bottom)); }
button, input { font:inherit; color:inherit; }
button { background:none; border:0; cursor:pointer; }
a { color:inherit; text-decoration:none; }
[hidden] { display:none !important; }
svg { width:24px; height:24px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }

.franja-prueba { background:#5b3cc4; color:#fff; font-size:13px; font-weight:600; text-align:center; padding:6px 10px; }
.cabeza { position:sticky; top:0; z-index:10; background:rgba(0,0,0,.92); backdrop-filter:blur(12px); -webkit-backdrop-filter:blur(12px);
  padding:calc(8px + env(safe-area-inset-top)) 16px 10px; border-bottom:1px solid var(--linea); }
.cabeza h1 { font-size:18px; font-weight:700; letter-spacing:-.01em; }
.cabeza h1 span { color:var(--tx2); font-weight:500; }
.interruptor { display:flex; align-items:center; gap:12px; margin-top:8px; padding:10px 12px; border-radius:12px; background:var(--bg3); cursor:pointer; }
.texto-int { flex:1; display:flex; flex-direction:column; }
.texto-int b { font-weight:600; }
.texto-int small { color:var(--tx2); font-size:13px; line-height:17px; }
.interruptor input { position:absolute; opacity:0; width:1px; height:1px; }
.pista-int { width:51px; height:31px; border-radius:16px; background:#39393d; position:relative; flex:none; transition:background .2s; }
.pista-int span { position:absolute; top:2px; left:2px; width:27px; height:27px; border-radius:50%; background:#fff; transition:transform .2s; box-shadow:0 2px 4px rgba(0,0,0,.3); }
.interruptor input:checked + .pista-int { background:var(--verde); }
.interruptor input:checked + .pista-int span { transform:translateX(20px); }
.interruptor.on { outline:1px solid var(--verde); }
#avisos .aviso { margin-top:8px; padding:8px 12px; border-radius:10px; background:#3a2a00; color:#ffd27a; font-size:13px; line-height:18px; }

.vista { padding:4px 0 24px; }
.dia { padding:16px 16px 6px; font-size:13px; font-weight:600; color:var(--tx2); display:flex; justify-content:space-between; }
.dia.hoy { color:var(--tx); }
.tarjeta { display:flex; align-items:center; gap:12px; padding:8px 8px 8px 16px; }
.tarjeta .mini { width:54px; height:72px; border-radius:6px; overflow:hidden; background:var(--bg3); flex:none; position:relative; }
.tarjeta .mini img { width:100%; height:100%; object-fit:cover; display:block; }
.tarjeta .mini i { position:absolute; top:3px; right:3px; width:14px; height:14px; }
.tarjeta .mini i svg { width:14px; height:14px; fill:#fff; stroke:none; filter:drop-shadow(0 0 2px rgba(0,0,0,.6)); }
.tarjeta .info { flex:1; min-width:0; }
.tarjeta .tit { font-weight:600; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.tarjeta .meta { color:var(--tx2); font-size:13px; margin-top:2px; }
.tarjeta .flechas { display:flex; flex-direction:column; gap:2px; }
.tarjeta .flechas button { width:40px; height:34px; border-radius:8px; display:flex; align-items:center; justify-content:center; color:var(--tx2); }
.tarjeta .flechas button:active { background:var(--bg3); }
.tarjeta .flechas button:disabled { opacity:.25; }
.tarjeta .flechas svg { width:20px; height:20px; }
.estado { display:inline-block; font-size:12px; font-weight:600; line-height:16px; padding:2px 8px; border-radius:10px; margin-top:4px; }
.e-programada { background:#0a2a4a; color:#7cc4ff; }
.e-publicada { background:#0d3321; color:#6ee7a8; }
.e-publicando { background:#0a2a4a; color:#fff; }
.e-falta { background:#3a2a00; color:#ffd27a; }
.e-revisar { background:#4a1f00; color:#ffab70; }
.e-error { background:#4a0f0d; color:#ff8a80; }
.e-fuera { background:#2c2c2e; color:var(--tx2); }
.plegar { display:block; width:calc(100% - 32px); margin:12px 16px 0; padding:10px; border-radius:10px; background:var(--bg3); color:var(--tx2); font-size:14px; }
.seccion { padding:24px 16px 4px; font-size:15px; font-weight:700; }
.nota { padding:4px 16px 0; color:var(--tx2); font-size:13px; line-height:18px; }

/* perfil */
.dias { display:flex; gap:6px; overflow-x:auto; padding:12px 16px; scrollbar-width:none; }
.dias::-webkit-scrollbar { display:none; }
.dias button { flex:none; padding:6px 12px; border-radius:16px; background:var(--bg3); font-size:13px; font-weight:600; color:var(--tx2); white-space:nowrap; }
.dias button.on { background:var(--tx); color:#000; }
.pcab { padding:4px 16px 12px; display:flex; align-items:center; gap:20px; }
.avatar { width:78px; height:78px; border-radius:50%; overflow:hidden; background:var(--lava); flex:none; }
.avatar img { width:100%; height:100%; display:block; }
.num { flex:1; display:flex; justify-content:space-between; }
.num div { font-size:13px; } .num b { display:block; font-size:16px; font-weight:600; }
.pbio { padding:0 16px 12px; font-size:14px; line-height:18px; white-space:pre-line; }
.pbio b { display:block; }
.pbio .enl { color:#E0F1FF; font-weight:600; }
.cuadricula { display:grid; grid-template-columns:repeat(3,1fr); gap:2px; }
.celda { position:relative; aspect-ratio:3/4; overflow:hidden; background:#1a1a1a; display:block; }
.celda img { width:100%; height:100%; object-fit:cover; display:block; }
.celda i { position:absolute; top:6px; right:6px; }
.celda i svg { width:18px; height:18px; fill:#fff; stroke:none; filter:drop-shadow(0 0 2px rgba(0,0,0,.5)); }
.celda .fecha { position:absolute; left:4px; bottom:4px; font-size:10px; font-weight:700; padding:1px 5px; border-radius:6px; background:rgba(0,0,0,.65); }
.celda.nueva { outline:2px solid var(--azul); outline-offset:-2px; }

/* ver una publicación */
.vbarra { display:flex; align-items:center; gap:8px; padding:6px 8px; }
.vbarra b { flex:1; text-align:center; font-weight:600; margin-right:40px; }
.vbarra button { width:40px; height:40px; display:flex; align-items:center; justify-content:center; }
.carrusel { position:relative; }
.pista { display:flex; overflow-x:auto; scroll-snap-type:x mandatory; scrollbar-width:none; overscroll-behavior-x:contain; }
.pista::-webkit-scrollbar { display:none; }
.pista img { flex:0 0 100%; width:100%; aspect-ratio:4/5; object-fit:cover; scroll-snap-align:start; scroll-snap-stop:always; display:block; }
.pista video { min-width:0; flex:0 0 100%; width:100%; aspect-ratio:9/16; max-height:78vh; object-fit:contain; background:#000; display:block; }
.contador { position:absolute; top:12px; right:12px; padding:3px 8px; border-radius:12px; background:rgba(18,18,18,.7); font-size:12px; font-weight:600; }
.puntos { display:flex; gap:4px; justify-content:center; padding:10px 0 4px; min-height:20px; }
.puntos i { width:6px; height:6px; border-radius:50%; background:#555; }
.puntos i.on { background:var(--azul); }
.texto { padding:4px 16px 0; white-space:pre-line; overflow-wrap:anywhere; font-size:14px; line-height:19px; }
.texto .tag { color:#E0F1FF; }
.ficha { margin:16px; padding:14px; border-radius:14px; background:var(--bg3); }
.ficha .fila { display:flex; justify-content:space-between; gap:12px; padding:4px 0; font-size:14px; }
.ficha .fila span:first-child { color:var(--tx2); }
.ficha .fila a { color:#7cc4ff; }
.ficha .mensaje { font-size:13px; line-height:18px; margin-top:8px; color:var(--tx2); }
.ficha .mensaje.mal { color:#ff8a80; }
.ficha .mensaje.ojo { color:#ffd27a; }
.acciones { padding:0 16px; display:grid; grid-template-columns:minmax(0,1fr); gap:8px; }
.acciones .dos { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:8px; }
.boton { display:flex; align-items:center; justify-content:center; gap:6px; min-height:46px; padding:10px 14px; border-radius:12px; background:var(--bg3); font-weight:600; font-size:15px; text-align:center; }
.boton.azul { background:var(--azul); color:#fff; }
.boton.verde { background:var(--verde); color:#04140b; }
.boton.rojo { color:var(--rojo); }
.boton:disabled { opacity:.4; }
.cuando { display:flex; gap:8px; align-items:center; }
.cuando input { flex:1; min-width:0; width:100%; -webkit-appearance:none; appearance:none; min-height:46px; padding:10px 12px; border-radius:12px; border:1px solid var(--linea); background:#0b0b0b; color-scheme:dark; font-size:16px; }
.cuando .boton { flex:none; }

/* ajustes */
.bloque { margin:12px 16px; padding:14px; border-radius:14px; background:var(--bg3); }
.bloque h2 { font-size:15px; margin-bottom:6px; }
.bloque p { color:var(--tx2); font-size:13px; line-height:18px; margin-bottom:10px; }
.horas { display:flex; gap:8px; margin-bottom:10px; }
.horas input { flex:1; min-width:0; min-height:46px; padding:8px 12px; border-radius:12px; border:1px solid var(--linea); background:#0b0b0b; color-scheme:dark; font-size:17px; }

nav.abajo { position:fixed; bottom:0; left:50%; transform:translateX(-50%); width:100%; max-width:480px; z-index:10; display:flex;
  background:rgba(0,0,0,.94); border-top:1px solid var(--linea); padding-bottom:env(safe-area-inset-bottom); backdrop-filter:blur(12px); -webkit-backdrop-filter:blur(12px); }
nav.abajo a { flex:1; display:flex; flex-direction:column; align-items:center; gap:2px; padding:8px 0 6px; font-size:11px; color:var(--tx2); }
nav.abajo a.on { color:var(--tx); }
.flotante { position:fixed; left:16px; right:16px; bottom:calc(76px + env(safe-area-inset-bottom)); z-index:20; max-width:448px; margin:0 auto;
  padding:12px 14px; border-radius:12px; background:#2c2c2e; box-shadow:0 8px 24px rgba(0,0,0,.5); font-size:14px; line-height:19px; }
.flotante.mal { background:#4a0f0d; }
.vacio { padding:40px 16px; text-align:center; color:var(--tx2); }
