/* DeTown. · buzon de historias (/ideas/). Se carga despues de style.css y personajes.css. */
.box { display: flex; flex-direction: column; gap: 22px; max-width: 760px; }
.bstep { border: 0; padding: 0; margin: 0; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
fieldset.bstep { display: block; }   /* Safari no maneja bien un fieldset con display:flex: dejaba la rejilla de personajes con el alto mal calculado y las filas caian sobre los pasos siguientes */
fieldset.bstep > * + * { margin-top: 10px; }
fieldset.bstep > legend + * { margin-top: 0; }
.bstep legend, .blabel { font: 600 1.15rem/1.2 var(--display); letter-spacing: -0.02em; padding: 0; display: block; }
fieldset.bstep > legend { margin-bottom: 12px; }   /* en un fieldset el hueco (gap) no cuenta para la leyenda: sin esto el titulo queda pegado a lo de abajo */
.bhint { margin: 0; color: var(--mute); font-size: 0.92rem; line-height: 1.45; }
.pick { list-style: none; margin: 4px 0 0; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; max-width: 520px; }   /* movil: 6 filas de 5 */
.pick-c { display: block; cursor: pointer; }
.pick-img { display: block; position: relative; height: 0; padding-bottom: calc(100% - 4px); border-radius: 8px; overflow: hidden; background: var(--raise); border: 2px solid transparent; position: relative; transition: border-color .15s, transform .15s var(--ease); }
.pick-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center; display: block; }
.pick-c:hover .pick-img { transform: translateY(-2px); }
.pick-c input:checked + .pick-img { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent); }
.pick-c input:checked + .pick-img::after { content: "✓"; position: absolute; top: 3px; right: 3px; width: 18px; height: 18px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; font: 700 0.7rem/1 var(--body); }
.pick-c input:focus-visible + .pick-img { outline: 3px solid var(--accent); outline-offset: 2px; }
.bsel { margin: 0; font: 500 0.85rem/1.2 var(--mono); color: var(--accent); }
.box textarea, .box select, .box input[type="text"] { width: 100%; font: inherit; color: var(--fg); background: var(--surface); border: 1.5px solid var(--line); border-radius: 12px; padding: 12px 14px; min-height: 48px; }
.box textarea { resize: none; line-height: 1.5; overflow: hidden; min-height: 160px; }
.box textarea:focus, .box select:focus, .box input[type="text"]:focus { outline: 3px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
.bcount { margin: 0; text-align: right; font: 500 0.8rem/1 var(--mono); color: var(--mute); }
.brow { display: grid; grid-template-columns: 1fr; gap: 12px; }
.brow label { display: flex; flex-direction: column; gap: 6px; font-size: 0.88rem; font-weight: 600; }
.bimg { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.bimg label.cta { cursor: pointer; min-height: 48px; }
#imgprev { max-width: 220px; max-height: 220px; border-radius: 12px; border: 1px solid var(--line); }
.chip { min-height: 40px; padding: 0 14px; border: 1.5px solid var(--line); border-radius: 12px; font: 600 0.85rem/1 var(--body); }
.bchecks { gap: 12px; }
.bcheck { display: flex; gap: 12px; align-items: flex-start; font-size: 0.92rem; line-height: 1.45; cursor: pointer; }
.bcheck input { width: 24px; height: 24px; flex: none; margin: 1px 0 0; accent-color: var(--accent); }
.hpwrap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.berr { margin: 0; padding: 10px 14px; border-radius: 12px; border: 1.5px solid #c0392b; color: #c0392b; font-weight: 600; font-size: 0.92rem; }
.box .cta { align-self: flex-start; border: 0; }
.box .cta[disabled] { opacity: .6; cursor: wait; }
.thanks { max-width: 640px; padding: 22px; border: 1.5px solid var(--accent); border-radius: 18px; background: var(--surface); display: flex; flex-direction: column; gap: 10px; }
.thanks h2 { font-size: 1.6rem; }
.thanks p { margin: 0; }
@media (min-width: 560px) { .brow { grid-template-columns: 1fr 1fr; } }

/* redes sociales: una fila por red, el lector llena las que quiera */
.nets { display: grid; grid-template-columns: 1fr; gap: 8px; max-width: 520px; }
.netrow { display: grid; grid-template-columns: 96px 1fr; align-items: center; gap: 10px; font-size: 0.9rem; font-weight: 600; }
/* foto: el cuadro cuadrado es el propio espacio para la imagen */
.bimg { align-items: flex-end; }
.photo { position: relative; width: 168px; aspect-ratio: 1 / 1; border: 2px dashed var(--line); border-radius: 16px; background: var(--surface); display: grid; place-content: center; justify-items: center; gap: 4px; cursor: pointer; overflow: hidden; color: var(--mute); text-align: center; padding: 8px; }
.photo:hover, .photo:focus-within { border-color: var(--accent); color: var(--accent); }
.photo-plus { font: 300 2.6rem/1 var(--body); }
.photo-t { font-weight: 600; font-size: 0.85rem; }
.photo #imgprev { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none; object-fit: cover; border: 0; border-radius: 0; }
.photo.has { border-style: solid; }
.photo.has .photo-plus, .photo.has .photo-t { display: none; }
.photo-side { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.input:focus-visible ~ .photo { outline: 3px solid var(--accent); }
@media (min-width: 900px) { .pick { grid-template-columns: repeat(10, 1fr); max-width: 800px; } }   /* en PC: filas de 10 */

/* pagina «Empieza aqui» (enlace de la biografia) */
.gointro { margin: 0 0 18px; color: var(--mute); }
.golist { display: flex; flex-direction: column; gap: 12px; margin: 0; }
.golist .cta { text-align: center; justify-content: center; }
.golist .cta.alt { background: none; color: var(--accent); border: 1.5px solid var(--accent); }

/* pagina de stickers */
.stkgrid { column-width: 150px; column-gap: 10px; margin: 12px 0; }
.stk { margin: 0 0 10px; padding: 6px; break-inside: avoid; border-radius: 12px; background: rgba(255, 255, 255, 0.07); border: 1px solid rgba(255, 255, 255, 0.12); display: flex; flex-direction: column; align-items: center; gap: 6px; }
.stk img { width: 100%; height: auto; display: block; border-radius: 8px; }
.stk figcaption { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.stk .cta { min-height: 30px; padding: 0 10px; font-size: 0.75rem; }
.stknote { color: var(--mute); font-size: 0.85rem; }


/* filtros de stickers: dos botones que abren una burbuja hacia abajo */
.stkfil { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 14px; }
.stkfil .fb { position: relative; }
.fbtn { display: inline-flex; align-items: center; gap: 8px; min-height: 38px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line, rgba(255,255,255,.25)); background: var(--soft, rgba(255,255,255,.08)); color: var(--fg, inherit); font: inherit; font-size: 0.85rem; font-weight: 600; cursor: pointer; }
.fbtn .fv { color: var(--accent, #e0b04a); }
.fbtn svg { transition: transform 0.2s; }
.fbtn[aria-expanded="true"] svg { transform: rotate(180deg); }
.fbtn.on { border-color: var(--accent, #e0b04a); }
.bub { position: absolute; z-index: 30; top: calc(100% + 10px); left: 0; width: min(92vw, 360px); max-height: 60vh; overflow-y: auto; padding: 12px; border-radius: 18px; background: var(--glassx, var(--surface, #1d1b22)); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); color: var(--fg, inherit); border: 1px solid var(--line, rgba(255,255,255,.2)); box-shadow: 0 14px 34px rgba(0, 0, 0, 0.35); display: flex; flex-wrap: wrap; gap: 6px; transform-origin: 24px -8px; opacity: 0; transform: scale(0.6) translateY(-10px); }
.bub[hidden] { display: none; }
.bub.open { opacity: 1; transform: none; transition: transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.18s; }
.opt { display: inline-flex; align-items: center; gap: 6px; min-height: 30px; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line, rgba(255,255,255,.2)); background: var(--soft, rgba(255,255,255,.07)); color: var(--fg, inherit); font: inherit; font-size: 0.78rem; cursor: pointer; }
.opt:hover { border-color: var(--accent, #e0b04a); }
.opt i { font-style: normal; }
.bc .opt { width: 50px; height: 50px; min-height: 0; padding: 0; border-radius: 12px; overflow: hidden; justify-content: center; }
.bc .opt img, .bc .opt .q { width: 100%; height: 100%; object-fit: cover; display: flex; align-items: center; justify-content: center; background: var(--raise, rgba(255,255,255,.12)); font-weight: 700; border-radius: 0; }
.bc .opt:hover { transform: translateY(-2px); }
.fvimg { width: 24px; height: 24px; border-radius: 50%; object-fit: cover; vertical-align: middle; }
.bc { gap: 8px; }
.stk[hidden] { display: none; }

.stkfil { align-items: center; }
.stkfil .zipall { margin-left: auto; }
html.vidrio body.wide a.cta, html.vidrio body.wide button.cta, html.vidrio body.wide .cta.alt { background: color-mix(in srgb, var(--fg, #fff) 11%, transparent) !important; color: var(--fg, #fff) !important; border: 1px solid color-mix(in srgb, var(--fg, #fff) 30%, transparent) !important; -webkit-backdrop-filter: blur(14px) saturate(1.3); backdrop-filter: blur(14px) saturate(1.3); box-shadow: inset 0 1px 0 color-mix(in srgb, var(--fg, #fff) 18%, transparent), 0 4px 14px rgba(0, 0, 0, 0.18) !important; }
html.vidrio body.wide a.cta:hover, html.vidrio body.wide button.cta:hover { background: color-mix(in srgb, var(--fg, #fff) 20%, transparent) !important; }

.bc .opt { width: 62px; height: 62px; border-radius: 14px; }
/* burbuja de nombre (mismo estilo que las burbujas de los filtros) */
.dt-tip { position: fixed; z-index: 1000; padding: 7px 12px; border-radius: 12px; font: 600 0.8rem var(--body, sans-serif); color: var(--fg, #fff); background: var(--glassx, rgba(24, 22, 30, 0.94)); border: 1px solid var(--line, rgba(255,255,255,.22)); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); box-shadow: 0 10px 26px rgba(0, 0, 0, 0.35); pointer-events: none; white-space: nowrap; opacity: 0; transform: translateY(6px) scale(0.92); transition: opacity 0.14s, transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1); }
.dt-tip[hidden] { display: none; }
.dt-tip.open { opacity: 1; transform: none; }
.dt-tip.below { transform: translateY(-6px) scale(0.92); }
.dt-tip.below.open { transform: none; }
.dt-tip::after { content: ""; position: absolute; left: var(--ax, 50%); bottom: -5px; width: 9px; height: 9px; margin-left: -5px; background: inherit; border-right: 1px solid var(--line, rgba(255,255,255,.22)); border-bottom: 1px solid var(--line, rgba(255,255,255,.22)); transform: rotate(45deg); }
.dt-tip.below::after { bottom: auto; top: -5px; transform: rotate(225deg); }
