/* OpinionApp — tipos de Opin: asistente para crear, controles de voto y resultados de cada tipo. */
[hidden] { display: none !important; }

/* ---------- Asistente por pasos ---------- */
.wiz { display: flex; flex-direction: column; }
.wiz-pane { display: flex; flex-direction: column; gap: 20px; padding: 20px 16px 28px; }
.wiz-intro h2 { font-size: 22px; font-weight: 800; letter-spacing: -0.02em; }
.wiz-intro p { margin: 4px 0 0; }
.wiz-steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; list-style: none; margin: 0; padding: 0 16px 12px; }
.wiz-step {
  width: 100%; display: flex; align-items: center; gap: 8px; padding: 8px 0 0; border: 0;
  border-top: 3px solid var(--line); background: transparent; color: var(--mut);
  font-weight: 600; font-size: 13px; cursor: default; text-align: left;
}
.wiz-num {
  width: 22px; height: 22px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  background: var(--bg2); font-size: 12px; font-weight: 700; flex: none;
}
.wiz-step.is-on { color: var(--fg); border-top-color: var(--acc); }
.wiz-step.is-on .wiz-num { background: var(--acc); color: var(--acc-fg); }
.wiz-step.is-done { color: var(--acc); border-top-color: var(--acc); cursor: pointer; }
.wiz-step.is-done .wiz-num { background: var(--acc-soft); color: var(--acc); }
.wiz-group { font-size: 12.5px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: var(--mut); margin: 4px 0 -10px; }

.tipo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 10px; }
.tipo-card {
  position: relative; display: flex; align-items: flex-start; gap: 12px; padding: 14px;
  border: 1.5px solid var(--line); border-radius: 16px; background: var(--bg); cursor: pointer;
  transition: border-color .15s ease, background .15s ease, transform .15s ease;
}
.tipo-card:hover { border-color: var(--acc); transform: translateY(-1px); }
.tipo-card input { position: absolute; opacity: 0; pointer-events: none; }
.tipo-card:has(input:checked) { border-color: var(--acc); background: var(--acc-soft); box-shadow: 0 0 0 3px var(--acc-soft); }
.tipo-card:has(input:focus-visible) { outline: 2px solid var(--acc); outline-offset: 2px; }
.tipo-emoji { font-size: 28px; line-height: 1.1; flex: none; width: 36px; text-align: center; }
.tipo-txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tipo-txt strong { font-weight: 800; }
.tipo-txt span { color: var(--mut); font-size: 13.5px; line-height: 1.35; }
.tipo-card.is-soon { opacity: .55; cursor: not-allowed; }
.tipo-card.is-soon:hover { border-color: var(--line); transform: none; }
.tipo-soon {
  position: absolute; top: 10px; right: 10px; font-size: 11px; font-weight: 700; padding: 2px 8px;
  border-radius: 999px; background: var(--bg3); color: var(--mut);
}
.tipo-info {
  position: sticky; bottom: 88px; z-index: 5; padding: 16px 18px; border-radius: 18px;
  /* Degradado de marca (el mismo verde → azul de la pregunta), igual en modo claro y oscuro */
  background: linear-gradient(120deg, #087A5F 0%, #0E7490 52%, #1D4ED8 100%); color: #fff;
  box-shadow: 0 16px 36px -16px rgba(14, 116, 144, .7), var(--shadow-lift);
}
.tipo-info h3 { font-size: 17px; font-weight: 800; margin: 0 0 8px; }
.tipo-more { display: none; }
.tipo-info dl { margin: 0; display: grid; gap: 6px; }
.tipo-info dl div { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 10px; }
.tipo-info dt { font-weight: 700; opacity: .82; font-size: 13px; padding-top: 2px; }
.tipo-info dd { margin: 0; font-size: 14.5px; line-height: 1.4; }
.tipo-nota { margin: 8px 0 0; padding: 10px 12px; border-radius: 12px; background: #FFF3CD; color: #5B4500; font-size: 13.5px; font-weight: 600; }

.wiz-nav {
  position: sticky; bottom: 0; z-index: 6; display: flex; align-items: center; gap: 10px; padding: 12px 16px;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-top: 1px solid var(--line);
}
.wiz-q { font-size: 20px; font-weight: 700; min-height: 84px; line-height: 1.3; }
.wiz-cfg { gap: 16px; }
/* Los textos de ayuda dentro de las cajas, en gris claro para que no parezcan ya escritos */
.wiz .input::placeholder, .wiz .textarea::placeholder { color: color-mix(in srgb, var(--mut) 50%, transparent); font-weight: 400; opacity: 1; }
.wiz-q::placeholder { font-size: 17px; line-height: 1.4; }
.wiz-summary { padding: 14px 16px; border-radius: 16px; background: var(--bg2); display: grid; gap: 6px; font-size: 14.5px; overflow-wrap: anywhere; }
.wiz-summary b { font-weight: 700; }
.cfg-demo { pointer-events: none; max-width: 360px; }

.oplist { display: flex; flex-direction: column; gap: 8px; }
.op-img {
  position: relative; width: 46px; height: 46px; flex: none; border: 1.5px dashed var(--line); border-radius: 12px;
  display: flex; align-items: center; justify-content: center; color: var(--mut); cursor: pointer; overflow: hidden;
}
.op-img:hover { border-color: var(--acc); color: var(--acc); }
.op-img input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.op-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.op-ok { position: relative; width: 36px; height: 36px; flex: none; }
.op-ok input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.op-ok span[aria-hidden] {
  width: 36px; height: 36px; border-radius: 50%; border: 1.5px solid var(--line); display: flex;
  align-items: center; justify-content: center; color: var(--line); font-weight: 800;
}
.op-ok input:checked + span { background: var(--acc); border-color: var(--acc); color: #fff; }
.op-ok input:focus-visible + span { outline: 2px solid var(--acc); outline-offset: 2px; }
.emoji-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(52px, 1fr)); gap: 8px; }
.emoji-pick label { position: relative; }
.emoji-pick input { position: absolute; opacity: 0; pointer-events: none; }
.emoji-pick span {
  display: flex; align-items: center; justify-content: center; height: 52px; font-size: 26px;
  border: 1.5px solid var(--line); border-radius: 14px; cursor: pointer; filter: grayscale(.9); opacity: .55;
}
.emoji-pick input:checked + span { border-color: var(--acc); background: var(--acc-soft); filter: none; opacity: 1; }
.emoji-pick input:focus-visible + span { outline: 2px solid var(--acc); outline-offset: 2px; }
.img-prev { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.img-prev img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 12px; border: 1px solid var(--line); }

@media (max-width: 700px) {
  .wiz-nav { bottom: calc(64px + env(safe-area-inset-bottom)); }
  .tipo-info { bottom: calc(152px + env(safe-area-inset-bottom)); padding: 12px 14px; }
  .tipo-info { display: flex; flex-direction: column; }
  .tipo-info dl div { grid-template-columns: 1fr; gap: 0; }
  .tipo-info:not(.is-open) dl div:nth-child(n+2), .tipo-info:not(.is-open) .tipo-nota { display: none; }
  .tipo-info:not(.is-open) dt { display: none; }
  .tipo-more {
    display: block; order: 9; align-self: flex-start; margin-top: 6px; padding: 0; border: 0; background: transparent;
    color: inherit; font-weight: 700; font-size: 13.5px; text-decoration: underline; opacity: .8; cursor: pointer;
  }
  .tipo-info dd { font-size: 13.5px; }
  .wiz-name { display: none; }
  .wiz-step { justify-content: center; }
}

/* ---------- Votar ---------- */
.poll-list { display: flex; flex-direction: column; gap: 8px; }
.poll-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.poll-opt.poll-card { flex-direction: column; align-items: stretch; gap: 0; padding: 0; overflow: hidden; text-align: center; }
.poll-card img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.poll-card > span { padding: 8px 10px 10px; }
.poll-card input { margin: 8px auto 0; }
.poll-hint { margin: 0; text-align: center; color: var(--mut); font-size: 13px; }
.poll-note { margin: 0; padding: 10px 12px; border-radius: 12px; background: #FFF3CD; color: #5B4500; font-size: 13.5px; font-weight: 600; }
.poll-wait { margin: 0; padding: 14px 16px; border-radius: 14px; background: var(--acc-soft); font-weight: 600; }

.yn { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.yn-btn {
  min-height: 64px; border-radius: 16px; border: 2px solid var(--line); background: var(--bg); cursor: pointer;
  font-size: 20px; font-weight: 800; display: flex; align-items: center; justify-content: center;
  transition: transform .12s ease, background .15s ease, color .15s ease;
}
.yn-0 { border-color: #0B9E7A; color: #0B9E7A; }
.yn-0:hover { background: #0B9E7A; color: #fff; }
.yn-1 { border-color: #E0245E; color: #E0245E; }
.yn-1:hover { background: #E0245E; color: #fff; }
.yn-2 { grid-column: 1 / -1; min-height: 44px; font-size: 15px; border-width: 1.5px; color: var(--mut); }
.yn-2:hover { border-color: var(--mut); }
.yn-btn:active { transform: scale(.97); }

/* ---------- Acceso y registro: el lema de la portada, con su degradado ---------- */
.guest {
  --grad: linear-gradient(115deg, #0B9E7A 0%, #14B8A6 30%, #3B82F6 65%, #8B5CF6 100%);
  --grad-title: linear-gradient(170deg, #0B9E7A 5%, #14B8A6 28%, #3B82F6 55%, #8B5CF6 82%);
}
html[data-theme="dark"] .guest {
  --grad: linear-gradient(115deg, #2FD3A2 0%, #22D3EE 35%, #60A5FA 65%, #A78BFA 100%);
  --grad-title: linear-gradient(170deg, #2FD3A2 5%, #22D3EE 28%, #60A5FA 55%, #A78BFA 82%);
}
@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) .guest {
    --grad: linear-gradient(115deg, #2FD3A2 0%, #22D3EE 35%, #60A5FA 65%, #A78BFA 100%);
    --grad-title: linear-gradient(170deg, #2FD3A2 5%, #22D3EE 28%, #60A5FA 55%, #A78BFA 82%);
  }
}
/* Fondo: patrón de iconos (bocadillos, barras, votos…) teñido con el degradado de la marca. Vale para claro y oscuro. */
.guest { position: relative; isolation: isolate; }
.guest::before {
  content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: .2;
  background: var(--grad);
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240' viewBox='0 0 240 240' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cg transform='translate(22 20) rotate(-8)'%3E%3Cpath d='M2 6a4 4 0 0 1 4-4h16a4 4 0 0 1 4 4v10a4 4 0 0 1-4 4H12l-6 5v-5a4 4 0 0 1-4-4z'/%3E%3C/g%3E%3Cg transform='translate(150 26) rotate(6)'%3E%3Cpath d='M2 4h20M2 12h13M2 20h7' stroke-width='4'/%3E%3C/g%3E%3Cg transform='translate(88 96) rotate(10)'%3E%3Cpath d='M4 7a7 7 0 1 1 10 6c-2 1-3 2-3 5'/%3E%3Ccircle cx='11' cy='24' r='1.3' fill='black'/%3E%3C/g%3E%3Cg transform='translate(186 124) rotate(-6)'%3E%3Ccircle cx='13' cy='13' r='11'/%3E%3Cpath d='M8 13.5l3.5 3.5L18.5 9.5'/%3E%3C/g%3E%3Cg transform='translate(28 164) rotate(-10)'%3E%3Cpath d='M13 23S2 16.5 2 8.8A6 6 0 0 1 13 6a6 6 0 0 1 11 2.8C24 16.5 13 23 13 23z'/%3E%3C/g%3E%3Cg transform='translate(126 184) rotate(8)'%3E%3Cpath d='M13 2l3.2 7 7.6.8-5.7 5.1 1.7 7.5L13 18.6l-6.8 3.8 1.7-7.5L2.2 9.8 9.8 9z'/%3E%3C/g%3E%3Cpath d='M112 34v10M107 39h10M214 60v8M210 64h8M60 128v8M56 132h8'/%3E%3Ccircle cx='70' cy='60' r='2' fill='black'/%3E%3Ccircle cx='222' cy='206' r='2' fill='black'/%3E%3Ccircle cx='96' cy='210' r='2' fill='black'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240' viewBox='0 0 240 240' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cg transform='translate(22 20) rotate(-8)'%3E%3Cpath d='M2 6a4 4 0 0 1 4-4h16a4 4 0 0 1 4 4v10a4 4 0 0 1-4 4H12l-6 5v-5a4 4 0 0 1-4-4z'/%3E%3C/g%3E%3Cg transform='translate(150 26) rotate(6)'%3E%3Cpath d='M2 4h20M2 12h13M2 20h7' stroke-width='4'/%3E%3C/g%3E%3Cg transform='translate(88 96) rotate(10)'%3E%3Cpath d='M4 7a7 7 0 1 1 10 6c-2 1-3 2-3 5'/%3E%3Ccircle cx='11' cy='24' r='1.3' fill='black'/%3E%3C/g%3E%3Cg transform='translate(186 124) rotate(-6)'%3E%3Ccircle cx='13' cy='13' r='11'/%3E%3Cpath d='M8 13.5l3.5 3.5L18.5 9.5'/%3E%3C/g%3E%3Cg transform='translate(28 164) rotate(-10)'%3E%3Cpath d='M13 23S2 16.5 2 8.8A6 6 0 0 1 13 6a6 6 0 0 1 11 2.8C24 16.5 13 23 13 23z'/%3E%3C/g%3E%3Cg transform='translate(126 184) rotate(8)'%3E%3Cpath d='M13 2l3.2 7 7.6.8-5.7 5.1 1.7 7.5L13 18.6l-6.8 3.8 1.7-7.5L2.2 9.8 9.8 9z'/%3E%3C/g%3E%3Cpath d='M112 34v10M107 39h10M214 60v8M210 64h8M60 128v8M56 132h8'/%3E%3Ccircle cx='70' cy='60' r='2' fill='black'/%3E%3Ccircle cx='222' cy='206' r='2' fill='black'/%3E%3Ccircle cx='96' cy='210' r='2' fill='black'/%3E%3C/svg%3E");
  -webkit-mask-size: 240px 240px; mask-size: 240px 240px;
}
.guest::after {
  content: ''; position: absolute; inset: 0; z-index: -2; pointer-events: none;
  background:
    radial-gradient(60% 50% at 0% 0%, rgba(11, 158, 122, .12), transparent 70%),
    radial-gradient(50% 50% at 100% 100%, rgba(139, 92, 246, .12), transparent 70%);
}
/* El formulario, sobre una tarjeta para que se lea bien encima del patrón */
.guest-card { background: var(--bg); border: 1px solid var(--line); border-radius: 24px; padding: 28px; box-shadow: var(--shadow); }
@media (max-width: 700px) { .guest-card { padding: 20px; } }
.guest-claim { display: flex; flex-direction: column; gap: 14px; }
.guest-pre { margin: 0; font-size: clamp(22px, 2.6vw, 30px); font-weight: 800; letter-spacing: -0.02em; line-height: 1.2; color: var(--fg); }
.guest-kicker {
  align-self: flex-start; font-size: 13px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.guest-title.guest-title-lp {
  font-size: clamp(36px, 5vw, 60px); width: fit-content; padding-bottom: .14em; margin-bottom: -.14em;
  background: var(--grad-title); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.guest-title-lp span, .guest-title-lp em { display: block; }
/* Botón principal («Crear cuenta») con el degradado de la portada */
.guest .btn-primary {
  background: var(--grad); background-size: 200% 100%; background-position: 0% 50%; border: 0; color: #fff;
  box-shadow: 0 8px 22px -8px rgba(59, 130, 246, .55);
  transition: background-position .6s ease, transform .2s ease, box-shadow .3s ease;
}
.guest .btn-primary:hover { background-position: 100% 50%; transform: translateY(-1px); box-shadow: 0 12px 28px -8px rgba(139, 92, 246, .55); }
.guest-op { display: block; padding: 10px 14px; border: 1.5px solid var(--line); border-radius: 12px; background: var(--bg); font-weight: 600; }
.guest-title.guest-title-lp em { color: transparent; }

/* ---------- Pie de la página del Opin: todo centrado ---------- */
.opin-stats {
  display: flex; justify-content: center; align-items: stretch; padding: 14px 0;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.opin-stat {
  flex: 1 1 0; min-width: 0; max-width: 230px; display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 3px; padding: 0 12px; text-align: center;
}
.opin-stat + .opin-stat { border-left: 1px solid var(--line); }
.opin-stat strong { font-size: 22px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.15; font-variant-numeric: tabular-nums; }
.opin-stat:first-child strong { color: var(--acc); }
.opin-stat span { color: var(--mut); font-size: 12px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; }
.opin-btns { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 8px; }
.opin-priv {
  margin: 0; display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 4px 8px;
  color: var(--mut); font-size: 13px; text-align: center;
}
@media (max-width: 700px) {
  .opin-stat { padding: 0 6px; }
  .opin-stat strong { font-size: 18px; }
  .opin-stat span { font-size: 11px; }
}

/* Respuesta elegida, antes de pulsar «Votar y ver resultados» */
.poll-go { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; margin-top: 4px; }
.poll-go span:empty { display: none; }
.poll-go .btn { min-width: min(260px, 100%); }
.imgpick-bar { flex-wrap: wrap; }
.yn-0.is-sel { background: #0B9E7A; color: #fff; }
.yn-1.is-sel { background: #E0245E; color: #fff; }
.yn-2.is-sel { border-color: var(--fg); color: var(--fg); background: var(--bg2); }
.versus-side.is-sel { border-color: var(--acc); background: var(--acc-soft); box-shadow: 0 0 0 3px var(--acc-soft); }
.emoji-btn.is-sel { border-color: var(--acc); background: var(--acc-soft); box-shadow: 0 0 0 3px var(--acc-soft); transform: scale(1.12); }
.star-btn.is-sel, .star-btn.is-sel ~ .star-btn { color: #F5B301; }
.scale-btn.is-sel { border-color: var(--acc); background: var(--acc); color: #fff; }

.versus { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: stretch; }
.versus-side {
  display: flex; flex-direction: column; justify-content: center; min-height: 72px; padding: 0; overflow: hidden;
  border: 2px solid var(--line); border-radius: 18px; background: var(--bg); cursor: pointer;
  font-weight: 800; font-size: 17px; text-align: center; overflow-wrap: anywhere;
}
.versus-side img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.versus-side span { padding: 12px 10px; }
.versus-side:hover { border-color: var(--acc); background: var(--acc-soft); }
.versus-vs {
  align-self: center; width: 40px; height: 40px; margin: 0 -14px; z-index: 1; border-radius: 50%;
  background: var(--fg); color: var(--bg); display: flex; align-items: center; justify-content: center;
  font-weight: 900; font-size: 13px; box-shadow: 0 0 0 3px var(--bg);
}

.emoji-vote { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.emoji-btn {
  width: 58px; height: 58px; font-size: 30px; border-radius: 16px; border: 1.5px solid var(--line);
  background: var(--bg); display: flex; align-items: center; justify-content: center; cursor: pointer;
  transition: transform .12s ease;
}
.emoji-btn:hover { transform: scale(1.18) rotate(-4deg); border-color: var(--acc); background: var(--acc-soft); }

.emoji-vote.is-all { gap: 6px; }
.emoji-vote.is-all .emoji-btn { width: 44px; height: 44px; font-size: 24px; border-radius: 12px; }
.poll-more { align-self: center; color: var(--mut); font-size: 13.5px; }
.react-res { display: flex; flex-direction: column; gap: 6px; }
.react-row { display: grid; grid-template-columns: 40px minmax(0, 1fr) 76px; align-items: center; gap: 8px; }
.react-emoji { font-size: 26px; line-height: 1.2; text-align: center; border-radius: 10px; }
.react-row.is-mine .react-emoji { background: var(--acc-soft); box-shadow: 0 0 0 2px var(--acc); }
.react-row .result-track { height: 16px; border-radius: 8px; }
.react-row .result-bar { border-radius: 8px; }
.react-pct { text-align: right; font-weight: 700; line-height: 1.15; }
.react-pct small { display: block; color: var(--mut); font-size: 12px; font-weight: 500; }

.stars-vote { display: flex; flex-direction: row-reverse; justify-content: center; gap: 2px; }
.star-btn {
  border: 0; background: transparent; padding: 2px; font-size: 44px; line-height: 1; color: var(--bg3);
  cursor: pointer; transition: transform .1s ease, color .1s ease;
}
.stars-vote.is-10 .star-btn { font-size: 30px; }
.star-btn:hover, .star-btn:hover ~ .star-btn,
.star-btn:focus-visible, .star-btn:focus-visible ~ .star-btn { color: #F5B301; }
.star-btn:hover { transform: scale(1.15); }

.scale-vote { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 4px; }
.scale-btn { min-height: 46px; padding: 0; border: 1.5px solid var(--line); border-radius: 10px; background: var(--bg); font-weight: 700; cursor: pointer; }
.scale-btn:hover { border-color: var(--acc); background: var(--acc); color: #fff; }
.scale-ends { display: flex; justify-content: space-between; gap: 12px; color: var(--mut); font-size: 13px; font-weight: 600; }

.rank-list, .rank-res { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.rank-item {
  display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 12px; border: 1.5px solid var(--line);
  border-radius: 14px; background: var(--bg); cursor: grab; font-weight: 600;
}
.rank-item.is-drag { opacity: .5; border-color: var(--acc); }
.rank-pos {
  width: 28px; height: 28px; border-radius: 50%; background: var(--acc-soft); color: var(--acc);
  display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: 13px; flex: none;
}
.rank-text { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.rank-item .icon-btn { width: 36px; height: 36px; font-size: 12px; color: var(--mut); }

.points { display: flex; flex-direction: column; gap: 12px; }
.points-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(90px, 1.2fr) 76px; align-items: center; gap: 10px; }
.points-label { font-weight: 600; overflow-wrap: anywhere; }
.points-row input[type="range"] { width: 100%; accent-color: var(--acc); }
.points-num { min-height: 42px; padding: 0 6px; text-align: center; }
.points-left { margin: 0; font-weight: 700; text-align: right; color: var(--mut); }
.points-left.is-ok { color: var(--acc); }
.points-left.is-over { color: var(--danger); }

.matrix { display: flex; flex-direction: column; gap: 14px; }
.matrix-row { display: flex; flex-direction: column; gap: 6px; }
.matrix-label { font-weight: 700; }
.matrix-scale { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 4px; }
.matrix-scale label { position: relative; }
.matrix-scale input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.matrix-scale span {
  display: flex; align-items: center; justify-content: center; min-height: 40px;
  border: 1.5px solid var(--line); border-radius: 10px; font-weight: 700;
}
.matrix-scale input:checked + span { background: var(--acc); border-color: var(--acc); color: #fff; }
.matrix-scale input:focus-visible + span { outline: 2px solid var(--acc); outline-offset: 2px; }

.num-vote { display: flex; align-items: center; gap: 10px; }
.num-unit { font-weight: 800; font-size: 18px; color: var(--mut); white-space: nowrap; }

.pin-box { position: relative; display: block; border-radius: 16px; overflow: hidden; border: 1px solid var(--line); cursor: crosshair; line-height: 0; }
.pin-box img { display: block; width: 100%; }
.pin-box.is-res { cursor: default; }
.pin-dot {
  position: absolute; width: 16px; height: 16px; margin: -8px 0 0 -8px; border-radius: 50%;
  background: rgba(224, 36, 94, .55); box-shadow: 0 0 0 1px rgba(255, 255, 255, .7); pointer-events: none;
}
[data-pin] .pin-dot, .pin-dot.is-mine {
  width: 18px; height: 18px; margin: -9px 0 0 -9px; z-index: 1; background: #E0245E;
  box-shadow: 0 0 0 3px #fff, 0 2px 8px rgba(0, 0, 0, .4);
}

/* ---------- Resultados ---------- */
.duel { display: flex; flex-direction: column; gap: 10px; }
.duel-imgs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.duel-img { aspect-ratio: 4 / 5; border-radius: 14px; overflow: hidden; background: var(--bg2); border: 2px solid transparent; opacity: .7; }
.duel-img.is-lead { border-color: var(--acc); opacity: 1; }
.duel-img img { width: 100%; height: 100%; object-fit: cover; }
.duel-bar { display: flex; gap: 3px; height: 28px; border-radius: 14px; overflow: hidden; background: var(--bg2); }
.duel-bar span { min-width: 0; }
.duel-legend { display: flex; justify-content: space-between; gap: 12px; }
.duel-legend > span { display: flex; flex-direction: column; gap: 2px; font-weight: 500; min-width: 0; overflow-wrap: anywhere; }
.duel-legend > span:last-child { text-align: right; align-items: flex-end; }
.duel-legend strong { font-size: 24px; font-weight: 800; line-height: 1; }
.duel-legend .is-lead { font-weight: 700; }
.duel-legend small { color: var(--mut); font-size: 13px; font-weight: 500; }

.avg { display: flex; align-items: center; gap: 14px; }
.avg-num { font-size: 52px; font-weight: 800; letter-spacing: -0.03em; line-height: 1; }
.avg-side { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
.avg-stars {
  font-size: 24px; letter-spacing: 2px; line-height: 1.1;
  background: linear-gradient(90deg, #F5B301 var(--pct), var(--bg3) var(--pct));
  -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent;
}
.dist { display: flex; flex-direction: column; gap: 5px; }
.dist-row { display: grid; grid-template-columns: 38px minmax(0, 1fr) 40px; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--mut); }
.dist-row .result-track { height: 12px; border-radius: 6px; }
.dist-row .result-bar { border-radius: 6px; background: #F5B301; }
.poll-res-escala .dist-row .result-bar { background: var(--acc); }
.dist-row.is-mine { color: var(--fg); }
.dist-pct { text-align: right; }

.rank-res .result-row { align-items: center; }
.result-thumb { width: 34px; height: 34px; border-radius: 8px; object-fit: cover; flex: none; align-self: center; }
.result-ok { display: inline-flex; align-items: center; gap: 4px; color: #0B7A4B; font-size: 13px; font-weight: 700; white-space: nowrap; }
.result.is-ok .result-bar { background: #0B9E7A; }
.result-names { margin: 0; color: var(--mut); font-size: 13px; overflow-wrap: anywhere; }
.quiz-out { margin-top: 6px; padding: 12px 14px; border-radius: 14px; background: var(--bg2); display: flex; flex-direction: column; gap: 4px; font-size: 14.5px; }
.quiz-out.is-ok { background: var(--acc-soft); }
.quiz-out.is-ko { background: var(--danger-soft); }
.quiz-out p { margin: 4px 0 0; color: var(--mut); }

.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.stats div { display: flex; flex-direction: column; gap: 2px; min-width: 0; padding: 12px; border-radius: 14px; background: var(--bg2); }
.stats strong { font-size: 19px; font-weight: 800; overflow-wrap: anywhere; }
.stats span { color: var(--mut); font-size: 12.5px; }
.histo { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 6px; height: 160px; }
.histo-col { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; justify-items: center; gap: 4px; height: 100%; min-width: 0; }
.histo-bar { width: 100%; align-self: end; min-height: 3px; border-radius: 8px 8px 3px 3px; background: var(--acc); }
.histo-pct, .histo-label { font-size: 11.5px; color: var(--mut); white-space: nowrap; }

.cloud { display: flex; flex-wrap: wrap; justify-content: center; align-items: baseline; gap: 6px 14px; padding: 10px 4px; }
.cloud-w { font-weight: 800; line-height: 1.1; color: var(--acc); overflow-wrap: anywhere; }
.cloud-1 { font-size: 15px; opacity: .6; }
.cloud-2 { font-size: 20px; opacity: .75; }
.cloud-3 { font-size: 27px; opacity: .85; }
.cloud-4 { font-size: 35px; }
.cloud-5 { font-size: 46px; }
.quotes { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.quotes li { padding: 10px 14px; border-radius: 14px; background: var(--bg2); overflow-wrap: anywhere; }

/* ---------- Denunciar y moderación ---------- */
.link-btn { padding: 0; border: 0; background: transparent; color: inherit; font: inherit; text-decoration: underline; cursor: pointer; }
.link-btn:hover { color: var(--danger); }
.imgpick.report { width: min(480px, calc(100vw - 24px)); }
.tag-warn { background: #FFF3CD; color: #5B4500; }
.tag-danger { background: var(--danger-soft); color: var(--danger); }
.mod-item { display: flex; flex-direction: column; gap: 10px; padding: 16px; border-bottom: 1px solid var(--line); }
.mod-head { display: flex; align-items: flex-start; gap: 12px; }
.mod-thumb { width: 64px; height: 64px; border-radius: 12px; object-fit: cover; flex: none; background: var(--bg2); }
.mod-q { font-weight: 700; overflow-wrap: anywhere; }
.mod-q:hover { text-decoration: underline; }
.mod-reasons, .mod-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.mod-notes { margin: 0; padding-left: 18px; color: var(--mut); font-size: 13.5px; }

/* ---------- Buscador de imágenes ---------- */
.imgpick {
  width: min(760px, calc(100vw - 24px)); max-height: min(86vh, 820px); padding: 0; border: 0;
  border-radius: 20px; background: var(--bg); color: var(--fg); box-shadow: var(--shadow-lift);
}
.imgpick::backdrop { background: rgba(15, 20, 25, .55); }
.imgpick-in { display: flex; flex-direction: column; gap: 12px; padding: 16px; }
.imgpick-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.imgpick-head h2 { font-size: 20px; font-weight: 800; }
.imgpick-bar { display: flex; align-items: center; gap: 8px; }
.imgpick-own { display: flex; flex-wrap: wrap; gap: 8px; }
.imgpick-msg { margin: 0; }
.imgpick-msg:empty { display: none; }
.imgpick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.imgpick-item {
  position: relative; aspect-ratio: 4 / 3; padding: 0; border: 3px solid transparent; border-radius: 14px;
  overflow: hidden; background: var(--bg2); cursor: pointer;
}
.imgpick-item img { display: block; width: 100%; height: 100%; object-fit: cover; }
.imgpick-item span {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 16px 8px 5px; color: #fff; font-size: 11.5px;
  text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  background: linear-gradient(transparent, rgba(0, 0, 0, .7));
}
.imgpick-item:hover, .imgpick-item:focus-visible { border-color: var(--acc); outline: none; }
.imgpick-more { align-self: center; }
.img-prev figure { position: relative; margin: 0; min-width: 0; }
.img-prev figcaption { margin-top: 2px; color: var(--mut); font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.img-del {
  position: absolute; top: 4px; right: 4px; width: 26px; height: 26px; padding: 0; border: 0; border-radius: 50%;
  background: rgba(0, 0, 0, .7); color: #fff; font-size: 17px; line-height: 1; cursor: pointer;
}
.opin-credit { margin: -8px 0 0; color: var(--mut); font-size: 12px; }
.opin-credit a { text-decoration: underline; }

/* ---------- Imágenes y vídeo ---------- */
.opin-gallery { display: flex; gap: 8px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; border-radius: var(--radius); }
.opin-gallery::-webkit-scrollbar { display: none; }
.opin-gallery .opin-img { flex: 0 0 78%; scroll-snap-align: start; max-height: 340px; padding: 0; }
.opin-gallery .opin-img img { width: 100%; height: 100%; max-height: 340px; object-fit: cover; }
.opin-video { position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; background: #000; }
.opin-video.is-vertical { aspect-ratio: 9 / 16; width: 100%; max-width: 340px; margin: 0 auto; }
.opin-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.opin-video-thumb { position: relative; display: block; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; background: #000; }
.opin-video-thumb img { width: 100%; height: 100%; object-fit: cover; opacity: .9; }
.opin-play {
  position: absolute; left: 50%; top: 50%; width: 60px; height: 60px; margin: -30px 0 0 -30px; padding-left: 4px;
  border-radius: 50%; background: rgba(0, 0, 0, .65); color: #fff; display: flex; align-items: center;
  justify-content: center; font-size: 22px;
}
