:root{
  --bg:#0b0d10; --card:#11151b; --text:#e7edf5; --muted:#9aa7b6;
  --stroke:#233041; --radius:18px;
}
*{box-sizing:border-box}
body{margin:0;font-family:system-ui,Segoe UI,Roboto,Arial; background:var(--bg); color:var(--text)}
a{color:inherit;text-decoration:none}
.container{max-width:980px;margin:0 auto;padding:18px}
.header{display:flex;gap:12px;align-items:baseline;justify-content:space-between;margin:10px 0 18px}
.header h1{font-size:18px;margin:0}
.header .hint{font-size:13px;color:var(--muted)}

.feed{display:flex;flex-direction:column;gap:14px}

.card{
  background:var(--card); border:1px solid var(--stroke); border-radius:var(--radius);
  overflow:hidden; box-shadow:0 8px 25px rgba(0,0,0,.35);
}
.card-inner{
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 14px;
  align-items: start;
}

.thumb{
  width: 100%;
  height: 300px;
  object-fit: cover;
  display: block;
  border-radius: 0;
}
@media (max-width: 720px){
  .card-inner{grid-template-columns:1fr}
  .container {padding-top:150px}
  .thumb{
    height: 250px;
    border-radius: 0;
  }
  .thumb-wrap{
    border-radius: 0;
    margin: 0;
    width: 100%;
  }
}
.thumb-wrap{
  overflow: hidden;
  margin-top: 5px;
  margin-left: 13px;
  margin-bottom: 5px;
  border-top-left-radius: 16px;
  border-bottom-left-radius: 16px;
  border-bottom-right-radius: 16px;
  border-top-right-radius: 16px;
}
.content{padding:14px}
.title-row{display:flex;align-items:center;justify-content:space-between;gap:10px}
.title{font-size:16px;margin:0}
.meta{font-size:12px;color:var(--muted)}
.text{margin:10px 0 14px; color:#d7e1ee; line-height:1.35}

.choices{display:flex;flex-direction:column;gap:10px}
.choice{
  border:1px solid var(--stroke); border-radius:14px; padding:10px; background:#0d1117;
}
.choice-top{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:8px}
.choice-label{font-size:14px}
.choice-pct{font-size:12px;color:var(--muted)}
.bar{
  height:10px;border-radius:999px;background:#121a24;border:1px solid #1b2633;overflow:hidden;
}
.fill{height:100%;width:0%}
.btnrow{display:flex;gap:10px;margin-top:10px;flex-wrap:wrap}
button{
  border:1px solid var(--stroke); background:#121a24; color:var(--text);
  padding:9px 12px; border-radius:12px; cursor:pointer; font-weight:600;
}
button:hover{filter:brightness(1.08)}
button:disabled{opacity:.55; cursor:not-allowed}
.small-link{font-size:12px;color:var(--muted)}

/* ===== Encabezado tipo Facebook ===== */

.page-header{
  width: 100%;
}

.cover-container{
  max-width: 980px;
  margin: 0 auto;
  padding: 0 18px;
}

/* Portada responsiva */
.cover{
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 1;      /* Ajustá si querés: 16/5 o 4/1 */
  max-height: 190px;        /* Límite en desktop */
  border-radius: 12px;
  overflow: hidden;
  background: #0b1220;
}

/* En móvil: un poco más alta */
@media (max-width: 720px){
  .cover{
    width: 100%;
    aspect-ratio: 9 / 3;    /* más “alta” en móvil */
    max-height: 170px;
    border-radius: 0px;
  }
  .cover-container{
    margin: 0 0;
    padding: 0 0;
  }
}

.cover-img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;   /* o "top center" si se corta la parte importante */
  display: block;
}

/* Si usás un degradado encima */
.cover-gradient{
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.35), rgba(0,0,0,0) 60%);
  pointer-events: none;
}

.cover-actions{
  position: absolute;
  right: 16px;
  bottom: 16px;
  display: flex;
  gap: 10px;
  z-index: 2;
}

.cover-btn{
  border: 1px solid rgba(255,255,255,.25);
  background: rgba(255,255,255,.92);
  color: #0b0d10;
  padding: 10px 12px;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 700;
}

.cover-btn:hover{ filter: brightness(0.98); }

.profile-row{
  background: transparent;
}

.profile-inner{
  max-width: 980px;
  margin: 0 auto;
  padding: 0 18px 14px;
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 18px;
  align-items: end;
  position: relative;
}

/* Sube el bloque del perfil sobre la portada */
.profile-inner{
  margin-top: -62px;
}

@media (max-width: 720px){
  .profile-inner{
    grid-template-columns: 110px 1fr;
    margin-top: -162px;
    align-items: center;
  }
}

.avatar-wrap{
  width: 140px;
  height: 140px;
  border-radius: 999px;
  background: #0b0d10;
  border: 6px solid #ffffff;
  box-shadow: 0 10px 30px rgba(0,0,0,.35);
  overflow: hidden;
}

@media (max-width: 720px){
  .avatar-wrap{
    width: 80px;
    height: 80px;
    border-width: 5px;
  }
}

.avatar{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.profile-text{
  padding-bottom: 6px;
}

.profile-title{
  margin: 0px 0px 0px 0px;
  font-size: 26px;
  line-height: 1.1;
}

@media (max-width: 720px){
  .profile-title{ 
    font-size: 22px; 
    margin: 0px 0px 0px 0px;
  }
}

/* ===== SOLO CELULARES ===== */
@media (max-width: 720px){
  /* el cover debe ser referencia */
  .cover{
    position: relative;
  }
  /* mover el logo arriba izquierda */
  .avatar-wrap{
    position: absolute;
    top: 100px;
    left: 10px;
    width: 55px;
    height: 55px;
    margin-top: 0;
    border: 3px solid white;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0,0,0,.4);
    z-index: 10;
  }
  /* evitar que el layout grid afecte */
  .profile-inner{
    grid-template-columns: 1fr;
  }
  /* espacio para que el texto no quede debajo del logo */
  .profile-text{
    margin-top: 20px;
    padding-left: 0;
    text-align: left;
    padding-bottom: 0px;
  }
}

.profile-meta{
  margin-top: 6px;
  font-size: 13px;
  color: var(--muted);
}

.profile-desc{
  margin: 10px 0 12px;
  color: #d7e1ee;
  line-height: 1.35;
  max-width: 100%;
}

.profile-actions{
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.pill{
  border: 1px solid var(--stroke);
  background: #121a24;
  color: var(--text);
  padding: 9px 12px;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 700;
}

.pill.primary{
  background: #2b6cff;
  border-color: rgba(255,255,255,.15);
}

.pill:hover{ filter: brightness(1.07); }

/* Ajuste del título del muro para que no choque con h1 */
.wall-title{
  margin: 0;
  font-size: 16px;
}

.story-link{
  text-decoration: none;
  color: var(--text);
}
.story-link:hover{
  text-decoration: underline;
}

.card-clickable{
  cursor: pointer;
}

.card-clickable:hover{
  transform: scale(1.01);
  transition: 0.15s;
}

.vote-btn{
  background: #2b6cff;
  color: white;
  border: none;
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: 0.15s;
}

.vote-btn:hover{
  background: #1f57d6;
}

.vote-btn:disabled{
  background: #999;
  cursor: default;
}

/* Opción clickeable (cuando no se ha votado) */
.choice-click{
  cursor: pointer;
  transition: transform 0.12s, filter 0.12s, border-color 0.12s;
}

.choice-click:hover{
  transform: scale(1.01);
  filter: brightness(1.06);
  border-color: rgba(255,255,255,0.14);
}

/* Botón pro */
.vote-btn{
  background: #2b6cff;
  color: white;
  border: none;
  padding: 6px 14px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: 0.15s;
}

.vote-btn:hover{
  filter: brightness(1.05);
}

.vote-btn:disabled{
  background: #6c7a92;
  cursor: default;
}

/* Animación de barras al aparecer resultados */
.fill-anim{
  transition: width 0.6s ease;
}

.choice-selected{
  border-color: rgba(43,108,255,0.65) !important;
  box-shadow: 0 0 0 2px rgba(43,108,255,0.25);
  background: rgba(43,108,255,0.06);
}

/* contenedor del texto */
.vote-mark{
  display: none;
  font-size: 13px;
  font-weight: 600;
  color: #2b6cff;
  margin-top: 4px;
}


.vote-mark::before{
  content: "";
  width: 14px;
  height: 7px;
  border-left: 3px solid #2b6cff;
  border-bottom: 3px solid #2b6cff;
  transform: rotate(-45deg);
  display: inline-block;
  margin-right: 6px;
}

.choice[data-selected="1"] .vote-mark{
  display: block;
}

.vote-mark{
  opacity: 0;
  transform: translateY(4px);
  transition: 0.25s;
}

.choice[data-selected="1"] .vote-mark{
  opacity: 1;
  transform: translateY(0);
}

.bar{
  height: 10px;
  border-radius: 999px;
  background: #121a24;
  border: 1px solid #1b2633;
  overflow: hidden;
}

.fill{
  height: 100%;
  display: block;
  width: 0%;
  background: #2b6cff;   /* <-- esto es lo que te faltaba */
}

.fill-anim{
  transition: width 0.6s ease;
}

.choice-right{
  display: flex;
  align-items: center;
  gap: 10px;
}

/* texto */
.vote-mark-inline{
  font-size: 13px;
  font-weight: 600;
  color: #16a34a;
  display: flex;
  align-items: center;
}

/* check verde */
.vote-mark-inline::before{
  content: "";
  width: 14px;
  height: 7px;
  border-left: 3px solid #16a34a;
  border-bottom: 3px solid #16a34a;
  transform: rotate(-45deg);
  margin-right: 6px;
}

.vote-mark-below{
  display: none;
  margin-top: 6px;
  font-size: 13px;
  font-weight: 600;
  color: #16a34a;
  text-align: right;
}


/* check verde */
.vote-mark-below::before{
  content: "";
  width: 14px;
  height: 7px;
  border-left: 3px solid #16a34a;
  border-bottom: 3px solid #16a34a;
  transform: rotate(-45deg);
  display: inline-block;
  margin-right: 6px;
}


/* mostrar SOLO en elegida */
.choice[data-selected="1"] .vote-mark-below{
  display: block;
}

.vote-hint{
  margin: 10px 0 14px;
  padding: 10px 14px;
  border-radius: 10px;
  background: rgba(43,108,255,0.08);
  color: #2b6cff;
  font-size: 14px;
  font-weight: 600;
  text-align: center;
  border: 1px solid rgba(43,108,255,0.18);
}

.vote-hint-animate{
  animation: voteHintPulse 1.2s ease-out 1;
}

@keyframes voteHintPulse{
  0%{
    transform: scale(0.96);
    opacity: 0;
  }
  50%{
    transform: scale(1.04);
    opacity: 1;
  }
  100%{
    transform: scale(1);
  }
}

.wall-controls{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  margin: 10px 0 14px;
}

.chip{
  border: 1px solid var(--stroke);
  background: #121a24;
  color: var(--text);
  padding: 8px 12px;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 700;
  font-size: 13px;
}

.chip.active{
  background: rgba(43,108,255,0.14);
  border-color: rgba(43,108,255,0.35);
}

.feed-fade{
  opacity: 0.35;
  transition: opacity 0.12s ease;
}

/* ===== FOOTER PRO ===== */

.footer{

  margin-top: 40px;

  border-top: 1px solid var(--stroke);

  background: transparent;

}


.footer-inner{

  max-width: 980px;

  margin: 0 auto;

  padding: 18px;

  display: flex;

  flex-direction: column;

  align-items: center;

  gap: 12px;

  text-align: center;

}


.footer-brand{

  font-size: 14px;

  color: var(--muted);

}


.footer-links{

  justify-content: center;

}


.footer-copy{

  font-size: 12px;

  color: var(--muted);

}


/* ===== MENÚ SUPERIOR (no toca tu header actual) ===== */

.top-nav{
  max-width: 980px;
  margin: 0 auto;
  padding: 10px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.brand-mini{
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 14px;
  color: var(--text);
  white-space: nowrap;
}

.brand-dot{
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #2b6cff;
  display: inline-block;
}

.nav-links{
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.top-nav .nav-link{
  color: var(--muted);
  text-decoration: none;
  font-weight: 700;
  font-size: 13px;
  padding: 7px 10px;
  border-radius: 999px;
  border: 1px solid transparent;
}

.top-nav .nav-link:hover{
  color: var(--text);
  border-color: rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.04);
}

@media (max-width: 720px){
  .top-nav{
    padding: 10px 14px;
  }
  .top-nav .nav-link{
    font-size: 12px;
    padding: 6px 9px;
  }
}

/* ===== Admin ===== */
.admin-head{margin: 10px 0 16px}
.admin-title{margin:0;font-size:18px}
.admin-sub{color:var(--muted);font-size:13px;margin-top:6px}

.admin-grid{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

@media (max-width: 720px){
  .admin-grid{grid-template-columns:1fr}
}

.admin-card{
  background: var(--card);
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  padding: 14px;
  box-shadow: 0 8px 25px rgba(0,0,0,.35);
}

.admin-row{
  display:flex;
  gap:10px;
  align-items:center;
  margin-bottom:10px;
}

.admin-row-bottom{
  margin-top: 12px;
  justify-content: space-between;
}

.admin-label{
  width: 140px;
  color: var(--muted);
  font-size: 13px;
}

.admin-input{
  width: 100%;
  border: 1px solid var(--stroke);
  background: #0d1117;
  color: var(--text);
  padding: 10px 12px;
  border-radius: 12px;
  outline: none;
}

.admin-textarea{resize: vertical; min-height: 140px}

.admin-btn{
  border: 1px solid var(--stroke);
  background: #121a24;
  color: var(--text);
  padding: 10px 12px;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 700;
  white-space: nowrap;
}
.admin-btn:hover{filter:brightness(1.08)}
.admin-btn.primary{background:#2b6cff;border-color: rgba(255,255,255,.12)}
.admin-btn.danger{background:#3a1212;border-color: rgba(255,255,255,.12)}

.admin-list{
  display:flex;
  flex-direction:column;
  gap:10px;
  margin-top: 8px;
  max-height: 420px;
  overflow:auto;
  padding-right: 4px;
}

.admin-item{
  text-align:left;
  background:#0d1117;
  border:1px solid var(--stroke);
  border-radius:14px;
  padding:10px;
  cursor:pointer;
}
.admin-item:hover{filter:brightness(1.06)}
.admin-item.active{border-color: rgba(43,108,255,.55); box-shadow: 0 0 0 2px rgba(43,108,255,.18)}
.admin-item-top{display:flex;justify-content:space-between;gap:10px;align-items:center}
.admin-item-title{font-weight:800;font-size:13px}
.admin-item-id{color:var(--muted);font-size:12px}
.admin-item-sub{color:#d7e1ee;font-size:12px;margin-top:6px;line-height:1.25}

.admin-empty{color:var(--muted);font-size:13px;padding:10px}

.admin-note{
  margin-top: 10px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.admin-actions{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  margin-top: 6px;
}

.admin-preview{margin-top: 14px}
.admin-preview-title{color:var(--muted);font-size:12px;margin-bottom:8px}
.admin-preview-box{
  border: 1px solid var(--stroke);
  border-radius: 14px;
  background: #0d1117;
  padding: 12px;
}
.admin-prev-img{width:100%;max-height:180px;object-fit:cover;border-radius:12px;display:block;margin-bottom:10px}
.admin-prev-title{font-weight:900;margin-bottom:6px}
.admin-prev-text{color:#d7e1ee;line-height:1.35;margin-bottom:10px}
.admin-prev-opts{display:flex;flex-direction:column;gap:6px}
.admin-prev-opt{color:var(--muted);font-size:13px}
.admin-prev-meta{color:var(--muted);font-size:12px;margin-top:10px}

input[type="file"]{
  color: var(--muted);
  font-size: 13px;
}

.skeleton-card{
  overflow: hidden;
}

.skeleton{
  position: relative;
  overflow: hidden;
  background: #1a212c;
  border-radius: 10px;
}

.skeleton::after{
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255,255,255,0.08),
    transparent
  );
  animation: skeleton-loading 1.2s infinite;
}

@keyframes skeleton-loading{
  100%{
    transform: translateX(100%);
  }
}

.skeleton-thumb{
  min-height: 160px;
  height: 100%;
  width: 100%;
}

.skeleton-title{
  height: 20px;
  width: 60%;
  margin-bottom: 14px;
}

.skeleton-text{
  height: 14px;
  width: 100%;
  margin-bottom: 10px;
}

.skeleton-text.short{
  width: 75%;
  margin-bottom: 18px;
}

.skeleton-choice{
  height: 42px;
  width: 100%;
  margin-bottom: 10px;
}

.top-nav,
.nav-links,
.top-nav .nav-link{
  position: relative;
  z-index: 30;
}

.cover,
.cover-gradient,
.profile-row,
.profile-inner{
  position: relative;
  z-index: 1;
}

@media (max-width: 720px){

  .top-nav{
    padding: 10px 12px;
    display: block;
    position: relative;
    z-index: 20;
  }

  .brand-mini{
    display: none;
  }

  .nav-links{
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    gap: 10px;
    padding: 2px 0 6px;
    justify-content: flex-start;   /* importante */
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    scroll-behavior: smooth;
  }

  .nav-links::-webkit-scrollbar{
    display: none;
  }

  .top-nav .nav-link{
    flex: 0 0 auto;
    white-space: nowrap;
    font-size: 14px;
    padding: 10px 14px;
    border-radius: 999px;
    background: #121a24;
    border: 1px solid var(--stroke);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
  }

}

@media (max-width: 720px){

  .footer-inner{
    align-items: stretch;
    gap: 10px;
  }

  .footer-brand{
    text-align: center;
    justify-content: center;
  }

  .footer-links{
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    gap: 10px;
    padding: 2px 2px 6px;
    justify-content: flex-start;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .footer-links::-webkit-scrollbar{
    display: none;
  }

  .footer .nav-link{
    flex: 0 0 auto;
    white-space: nowrap;
    font-size: 14px;
    padding: 10px 14px;
    border-radius: 999px;
    background: #121a24;
    border: 1px solid var(--stroke);
  }

  .footer-copy{
    margin-top: 4px;
  }

}

.cookie-banner{
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #0f1720;
  border-top: 1px solid #233041;
  padding: 14px;
  z-index: 9999;
}

.cookie-inner{
  max-width: 980px;
  margin: 0 auto;
  display: flex;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
}

.cookie-inner span{
  font-size: 13px;
  color: #cbd5e1;
}

.cookie-inner a{
  color: #60a5fa;
}

#cookie-accept{
  border: none;
  background: #2b6cff;
  color: white;
  padding: 8px 14px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
}

#cookie-accept:hover{
  background: #1f57d6;
}

@media (max-width:720px){

  .cookie-inner{
    flex-direction: column;
    align-items: flex-start;
  }

  #cookie-accept{
    width: 100%;
  }

}

.cookie-banner{
  display:none;
}

.story-insights-grid{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  padding: 0 14px 14px;
}

.story-insight-card{
  background: #0f1622;
  border: 1px solid #1f2a3a;
  border-radius: 16px;
  padding: 16px;
}

.story-insight-card-title{
  margin: 0 0 8px;
  font-size: 15px;
  font-weight: 800;
  color: #cbd5e1;
}

.story-insight-card-text{
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
  color: #d7e1ee;
}

@media (max-width: 720px){
  .story-insights-grid{
    grid-template-columns: 1fr;
    padding: 0 12px 12px;
  }

  .story-insight-card{
    padding: 14px;
  }
}

.story-pager{
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin: 10px 0 12px;
}

.story-pager-btn{
  flex: 1;
  text-align: center;
  border: 1px solid var(--stroke);
  background: #121a24;
  color: var(--text);
  padding: 10px 12px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 13px;
}

.story-pager-btn:hover{
  filter: brightness(1.08);
}

.story-pager-btn:last-child{
  background: #2b6cff;
  border: none;
}

.story-pager-btn.disabled{
  opacity: 0.45;
  pointer-events: none;
}

@media (max-width: 720px){
  .story-pager{
    display: flex;
    flex-direction: row;
    gap: 8px;
  }

  .story-pager-btn{
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    padding: 10px 12px;
  }

  .story-pager-btn:first-child{
    justify-content: flex-start;
  }

  .story-pager-btn:last-child{
    justify-content: flex-end;
  }
}

.story-swipe-hint{
  margin-top: 10px;
  text-align: center;
  font-size: 12px;
  color: var(--muted);
}

.skeleton-panel{
  height: 140px;
  width: 100%;
  border-radius: 16px;
}

#single .skeleton-thumb{
  height: 260px;
  width: 100%;
  display: block;
}

.choice-top{
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.choice-texts{
  flex: 1;
  min-width: 0;
}

.choice-label{
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
}

.choice-impact{
  margin-top: 4px;
  font-size: 12px;
  line-height: 1.4;
  color: var(--muted);
}

@media (max-width: 720px){
  .choice-label{
    font-size: 14px;
  }

  .choice-impact{
    font-size: 12px;
  }

  .vote-btn{
    align-self: flex-start;
  }
}

@media (max-width: 720px){
  #single .skeleton-thumb{
    height: 200px;
  }
}