/* Publica tu actividad: formulario a la izquierda, vista previa a la derecha. */
.pub { padding-bottom: 4rem; }
.pub-cabeza { padding: 2rem 0 1.4rem; }
.pub-cabeza h1 { font-size: var(--step-3); margin: 0 0 .4rem; }
.pub-cabeza p { color: var(--text-2); margin: 0; max-width: 62ch; }

.pub-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.12fr); gap: 2rem; align-items: start; }
.pub-form { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 1.4rem; }

.pub-pasos { display: flex; gap: .35rem; list-style: none; margin: 0 0 .7rem; padding: 0; }
.pub-pasos li { flex: 1; min-width: 0; }
.pub-pasos button {
  width: 100%; height: 100%; background: none; border: 0; border-top: 3px solid var(--line); cursor: pointer;
  color: var(--text-2); font: inherit; font-size: .76rem; line-height: 1.2; padding: .5rem .1rem 0; text-align: left;
}
.pub-pasos .is-ok button { border-top-color: var(--brand); }
.pub-pasos .is-actual button { border-top-color: var(--lava); color: var(--text); font-weight: 700; }
.pub-avance { color: var(--text-2); font-size: .84rem; margin: 0 0 1.1rem; }

.pub-paso { border: 0; margin: 0; min-width: 0; padding: 0; }
.pub-paso > legend { font-size: 1.25rem; font-weight: 700; margin-bottom: .8rem; padding: 0; }
.pub-campo { display: block; margin-bottom: 1rem; min-width: 0; }
.pub-campo > span { display: block; font-size: .88rem; font-weight: 600; margin-bottom: .35rem; }
.pub-campo em { color: var(--text-2); font-style: normal; font-weight: 400; }
.pub-campo input:not([type=hidden]), .pub-campo select, .pub-campo textarea {
  width: 100%; background: var(--surface); border: 1px solid var(--line-strong); border-radius: 9px;
  color: var(--text); font: inherit; font-size: .95rem; padding: .65rem .75rem;
}
.pub-campo textarea { resize: vertical; }
.pub-campo input:focus, .pub-campo select:focus, .pub-campo textarea:focus { border-color: var(--brand); outline: 2px solid rgba(0, 48, 24, .18); }
.pub-doble { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; }
.pub-triple { display: grid; grid-template-columns: repeat(3, 1fr); gap: .8rem; align-items: end; }
.pub-ayuda { color: var(--text-2); font-size: .88rem; margin: -.3rem 0 1rem; }
.pub-trampa { height: 1px; left: -9999px; overflow: hidden; position: absolute; width: 1px; }

.pub-subir {
  display: flex; flex-direction: column; align-items: center; gap: .2rem; cursor: pointer; padding: 1.5rem 1rem;
  border: 1.5px dashed var(--line-strong); border-radius: 12px; color: var(--text-2); font-size: .84rem; text-align: center;
}
.pub-subir:hover, .pub-subir:focus-within { border-color: var(--brand); }
.pub-subir b { color: var(--text); font-size: .98rem; }
.pub-subir input { height: 1px; opacity: 0; position: absolute; width: 1px; }
.pub-miniaturas { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: .55rem; list-style: none; margin: 1rem 0; padding: 0; }
.pub-miniaturas li { aspect-ratio: 1; border-radius: 9px; overflow: hidden; position: relative; }
.pub-miniaturas img { display: block; height: 100%; object-fit: cover; width: 100%; }
.pub-miniaturas button {
  background: rgba(10, 15, 12, .78); border: 0; border-radius: 6px; color: #fff; cursor: pointer; font: inherit;
  font-size: .68rem; padding: .22rem .4rem; position: absolute;
}
.pub-miniaturas .pub-quitar { right: 4px; top: 4px; }
.pub-miniaturas .pub-portada { bottom: 4px; left: 4px; }
.pub-miniaturas li:first-child .pub-portada { background: var(--lava); cursor: default; }
.pub-casilla { margin-top: 1rem; }
.pub-paso .consent { border: 0; margin: .5rem 0 0; padding: 0; }

.pub-error { background: rgba(216, 48, 24, .08); border-radius: 9px; color: var(--lava-600); font-size: .86rem; margin: .8rem 0; padding: .6rem .8rem; }
.pub-faltan { background: rgba(233, 180, 76, .15); border-radius: 9px; font-size: .86rem; margin: .8rem 0; padding: .7rem .9rem; }
.pub-faltan ul { margin: .3rem 0 0; padding-left: 1.1rem; }
.pub-faltan button { background: none; border: 0; color: inherit; cursor: pointer; font: inherit; padding: 0; text-align: left; text-decoration: underline; }
.pub-botones { display: flex; gap: .6rem; justify-content: space-between; margin-top: 1.2rem; }
.pub-botones .btn[hidden] { display: none; }
.pub-nota { color: var(--text-2); font-size: .76rem; margin: .8rem 0 0; }
.pub-listo { padding: 2rem 0; text-align: center; }

.pub-vista { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; position: sticky; top: 5.4rem; }
.pub-vista-barra { align-items: center; background: var(--brand); color: var(--bone); display: flex; font-size: .84rem; justify-content: space-between; padding: .65rem 1rem; }
.pub-cerrar, .pub-ver { display: none; }
.pub-vista-cuerpo { background: var(--bg); max-height: calc(100vh - 9rem); overflow-y: auto; padding: 1.1rem; scroll-behavior: smooth; }
.pv h2 { font-size: 1.5rem; line-height: 1.15; margin: .3rem 0; overflow-wrap: anywhere; }
.pv h3 { font-size: 1.05rem; margin: 0 0 .6rem; }
.pv-migas { color: var(--text-2); font-size: .76rem; }
.pv-meta { color: var(--text-2); display: flex; flex-wrap: wrap; font-size: .8rem; gap: .3rem .9rem; }
.pv-fotos { display: grid; gap: 5px; grid-template-columns: repeat(4, 1fr); margin: .8rem 0; }
.pv-fotos img { aspect-ratio: 4 / 3; border-radius: 7px; display: block; object-fit: cover; width: 100%; }
.pv-fotos img:first-child { aspect-ratio: 16 / 9; grid-column: 1 / -1; }
.pv-vacia { align-items: center; aspect-ratio: 16 / 9; border: 1.5px dashed var(--line-strong); border-radius: 9px; color: var(--text-2); display: flex; font-size: .85rem; grid-column: 1 / -1; justify-content: center; padding: 1rem; text-align: center; }
.pv-datos { border-bottom: 1px solid var(--line); border-top: 1px solid var(--line); display: grid; gap: .8rem; grid-template-columns: repeat(3, 1fr); padding: .85rem 0; }
.pv-datos .qf { display: block; font-size: .8rem; min-width: 0; overflow-wrap: break-word; }
.pv-datos .qf b, .pv-datos .qf span { display: block; }
.pv-datos .qf span { color: var(--text-2); }
.pv-bloque { border-bottom: 1px solid var(--line); border-radius: 6px; padding: 1rem .4rem; transition: background-color .3s; overflow-wrap: anywhere; }
.pv-bloque.is-activo { background: rgba(233, 180, 76, .16); }
.pv-bloque p { font-size: .9rem; margin: 0 0 .6rem; }
.pv-bloque ul { font-size: .88rem; list-style: none; margin: 0; padding: 0; }
.pv-bloque li { align-items: flex-start; display: flex; gap: .45rem; margin-bottom: .35rem; }
.pv-bloque li .icon-sm { flex: 0 0 auto; margin-top: 3px; }
.pv-dos { display: grid; gap: 1rem; grid-template-columns: 1fr 1fr; }
.pv-dos h4 { font-size: .86rem; margin: 0 0 .4rem; }
.pv-linea { border-left: 2px solid var(--line-strong); padding-left: .85rem; }
.pv-linea li { display: block; }
.pv-linea time { color: var(--lava); display: block; font-size: .76rem; font-variant-numeric: tabular-nums; font-weight: 700; }
.pv-pista { color: var(--text-2); font-size: .84rem; font-style: italic; }
.pv-valor b { display: block; font-size: 1.15rem; }
.pv-valor small { color: var(--text-2); display: block; font-size: .76rem; margin-top: .25rem; }

@media (max-width: 1000px) {
  .pub-grid { grid-template-columns: minmax(0, 1fr); }
  .pub-vista { display: none; }
  .pub-vista.is-abierta { border: 0; border-radius: 0; display: block; inset: 0; position: fixed; z-index: 200; }
  .pub-vista.is-abierta .pub-vista-cuerpo { height: calc(100vh - 3.2rem); max-height: none; }
  .pub-cerrar { display: inline-flex; background: var(--bone); }
  .pub-ver { bottom: 5.4rem; display: inline-flex; position: fixed; right: 1rem; z-index: 100; }
  .pub-form { padding: 1rem; }
  .pub-doble, .pub-triple { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .pub { padding-bottom: 5.5rem; }
}
