/* IATIC · portal del participante (móvil primero) */
body { padding-bottom: 76px; min-height: 100dvh; }
.top { position: sticky; top: 0; z-index: 20; background: #fff; box-shadow: 0 1px 0 var(--line); }
.top-in { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: .55rem 1rem; max-width: 760px; margin: 0 auto; }
.top img { height: 34px; width: auto; display: block; }
.pill { display: inline-flex; align-items: center; gap: .4rem; font-size: .72rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--navy); background: var(--primary-100); padding: .3rem .65rem; border-radius: 99px; }
.dot { width: .55rem; height: .55rem; border-radius: 50%; background: #aaa; }
.dot.on { background: var(--green); animation: beat 1.6s infinite; }
.dot.live { background: var(--red); animation: beat 1s infinite; }
@keyframes beat { 50% { transform: scale(1.6); opacity: .5; } }
main { max-width: 760px; margin: 0 auto; padding: 1rem; }

.tabs { position: fixed; z-index: 30; left: 0; right: 0; bottom: 0; background: #fff; box-shadow: 0 -1px 0 var(--line), 0 -8px 24px rgba(11, 37, 64, .08); padding-bottom: env(safe-area-inset-bottom); }
.tabs-in { display: grid; grid-template-columns: repeat(6, 1fr); max-width: 760px; margin: 0 auto; }
.tab { border: 0; background: none; padding: .55rem .2rem .5rem; display: grid; justify-items: center; gap: .15rem; font-size: .6rem; font-weight: 800; color: var(--muted); cursor: pointer; position: relative; }
.tab svg { width: 24px; height: 24px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tab[aria-selected="true"] { color: var(--primary); }
.tab[aria-selected="true"]::before { content: ""; position: absolute; top: 0; left: 22%; right: 22%; height: 3px; border-radius: 0 0 4px 4px; background: var(--primary); }
.tab .badge { position: absolute; top: .3rem; right: 26%; width: .6rem; height: .6rem; background: var(--red); border-radius: 50%; display: none; }
.tab .badge.on { display: block; animation: beat 1s infinite; }

.card { background: #fff; border-radius: var(--r-lg); padding: 1.1rem; box-shadow: 0 1px 2px rgba(11, 37, 64, .06), 0 4px 14px rgba(11, 37, 64, .05); margin-bottom: .9rem; }
.card h2, .card h3 { margin: 0 0 .35rem; font-weight: 900; line-height: 1.2; }
h1.title { font-size: 1.5rem; font-weight: 900; margin: .2rem 0 .8rem; line-height: 1.15; }
.muted { color: var(--muted); font-size: .9rem; }
.kicker { font-size: .72rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--primary); margin: 0 0 .3rem; }
.hero { background: linear-gradient(135deg, var(--primary), var(--cyan)); color: #fff; border-radius: var(--r-lg); padding: 1.3rem; margin-bottom: .9rem; position: relative; overflow: hidden; }
.hero .kicker { color: #fff; opacity: .9; } .hero h1, .hero h2 { margin: 0 0 .3rem; font-weight: 900; line-height: 1.12; }
.row { display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; }

/* formularios */
label.f { display: block; font-weight: 700; font-size: .85rem; margin: .8rem 0 .3rem; }
.in, select.in, textarea.in { width: 100%; padding: .8rem .9rem; border-radius: var(--r-md); border: 2px solid var(--line); background: #fff; font-size: 1rem; }
.in:focus { border-color: var(--primary); outline: none; }
textarea.in { resize: vertical; min-height: 90px; }
.chips { display: flex; flex-wrap: wrap; gap: .45rem; }
.chip { border: 2px solid var(--line); background: #fff; border-radius: 99px; padding: .45rem .85rem; font-weight: 700; font-size: .88rem; cursor: pointer; }
.chip[aria-pressed="true"], .chip.on { background: var(--primary); border-color: var(--primary); color: #fff; }

/* registro */
.join { max-width: 460px; margin: 0 auto; }
.join .logo { display: block; height: 120px; width: auto; margin: .2rem auto .8rem; }
.err { color: var(--red); font-weight: 700; font-size: .9rem; margin: .6rem 0 0; min-height: 1.2em; }

/* en vivo */
.wait { text-align: center; padding: 2rem 1rem; }
.wait .orb { width: 92px; height: 92px; margin: 0 auto 1rem; border-radius: 50%; background: conic-gradient(from 0deg, var(--purple), var(--red), var(--yellow), var(--primary), var(--cyan), var(--green), var(--purple)); animation: spin 5s linear infinite; position: relative; }
.wait .orb::after { content: ""; position: absolute; inset: 10px; background: #fff; border-radius: 50%; }
@keyframes spin { to { transform: rotate(360deg); } }
.banner { background: var(--yellow); color: #3a2b00; font-weight: 800; padding: .7rem 1rem; border-radius: var(--r-md); margin-bottom: .9rem; text-align: center; }
.q { font-size: 1.35rem; font-weight: 900; line-height: 1.2; margin: .2rem 0 1rem; }
.opt { display: flex; align-items: center; gap: .8rem; width: 100%; text-align: left; padding: 1rem; margin: 0 0 .6rem; border-radius: var(--r-md); border: 2px solid var(--line); background: #fff; font-weight: 700; font-size: 1rem; cursor: pointer; transition: transform .12s, border-color .12s, background .12s; }
.opt:active { transform: scale(.98); }
.opt .mk { flex: none; width: 2rem; height: 2rem; border-radius: 8px; display: grid; place-items: center; background: var(--primary-100); color: var(--primary); font-weight: 900; }
.opt.sel { border-color: var(--primary); background: var(--primary-100); }
.opt.sel .mk { background: var(--primary); color: #fff; }
.opt[disabled] { cursor: default; }
.quiz .opt { color: #fff; border: 0; padding: 1.1rem; font-size: 1.05rem; }
.quiz .opt:nth-child(4n+1) { background: #e0153a; } .quiz .opt:nth-child(4n+2) { background: #0071bb; }
.quiz .opt:nth-child(4n+3) { background: #c99a00; } .quiz .opt:nth-child(4n+4) { background: #3f9a34; }
.quiz .opt .mk { background: rgba(255, 255, 255, .25); color: #fff; }
.quiz .opt.dim { opacity: .35; }
.quiz .opt.right { outline: 4px solid #fff; box-shadow: 0 0 0 7px var(--green); }
.timer-bar { height: 10px; background: var(--line); border-radius: 9px; overflow: hidden; margin-bottom: 1rem; }
.timer-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--green), var(--yellow), var(--red)); transform-origin: left; }
.scale { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: .5rem; margin: .5rem 0; }
.scale button { aspect-ratio: 1; border-radius: var(--r-md); border: 2px solid var(--line); background: #fff; font-size: 1.5rem; font-weight: 900; cursor: pointer; }
.scale button.sel { background: var(--primary); border-color: var(--primary); color: #fff; }
.scale-l { display: flex; justify-content: space-between; font-size: .78rem; color: var(--muted); font-weight: 700; }
.bar { position: relative; margin: 0 0 .5rem; border-radius: 10px; background: var(--surface); overflow: hidden; }
.bar i { position: absolute; inset: 0 auto 0 0; background: var(--sky); }
.bar.me i { background: var(--primary); } .bar.me span { color: #fff; }
.bar.right i { background: var(--green); }
.bar span { position: relative; display: flex; justify-content: space-between; gap: 1rem; padding: .6rem .8rem; font-weight: 700; font-size: .92rem; }
.ok-note { background: #e8f6e5; color: #1f5a17; border-radius: var(--r-md); padding: .7rem .9rem; font-weight: 700; margin-top: .7rem; }
.bad-note { background: #fde6ea; color: #8f0024; border-radius: var(--r-md); padding: .7rem .9rem; font-weight: 700; margin-top: .7rem; }
.idea { display: flex; gap: .7rem; justify-content: space-between; align-items: flex-start; padding: .8rem 0; border-top: 1px solid var(--line); }
.idea:first-child { border-top: 0; }
.idea small { color: var(--muted); display: block; margin-top: .2rem; }
.like { flex: none; border: 2px solid var(--line); background: #fff; border-radius: 99px; padding: .35rem .7rem; font-weight: 800; cursor: pointer; }
.like.on { background: #fde6ea; border-color: var(--red); color: var(--red); }
.mine { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .7rem; }
.mine span { background: var(--primary-100); color: var(--primary-700); font-weight: 800; border-radius: 99px; padding: .3rem .7rem; font-size: .88rem; }

/* herramientas y prompts */
.tool { display: grid; gap: .5rem; }
.tool h3 { display: flex; justify-content: space-between; gap: .5rem; align-items: baseline; }
.tool small.who { color: var(--muted); font-weight: 700; }
.tag { display: inline-block; font-size: .68rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; padding: .2rem .55rem; border-radius: 99px; background: var(--primary-100); color: var(--primary-700); }
.tag.free { background: #e8f6e5; color: #1f5a17; }
.watch { background: #fff7dc; border-left: 4px solid var(--yellow); padding: .6rem .8rem; border-radius: 0 var(--r-sm) var(--r-sm) 0; font-size: .86rem; }
.prompt pre { white-space: pre-wrap; word-break: break-word; font: 500 .88rem/1.5 var(--font); background: var(--surface); padding: .8rem; border-radius: var(--r-md); margin: .6rem 0; max-height: 14rem; overflow: auto; }
.prompt mark { background: #fff0a8; border-radius: 4px; padding: 0 .15rem; }
.openers { display: flex; flex-wrap: wrap; gap: .4rem; }
details.gen { background: #fff; border-radius: var(--r-lg); margin-bottom: .7rem; box-shadow: 0 1px 2px rgba(11, 37, 64, .06), 0 4px 14px rgba(11, 37, 64, .05); }
details.gen > summary { list-style: none; cursor: pointer; padding: 1rem 1.1rem; font-weight: 900; display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
details.gen > summary::-webkit-details-marker { display: none; }
details.gen > summary::after { content: "＋"; font-size: 1.2rem; color: var(--primary); }
details.gen[open] > summary::after { content: "－"; }
details.gen .body { padding: 0 1.1rem 1.1rem; }
.out { white-space: pre-wrap; background: var(--navy); color: #eaf3fb; border-radius: var(--r-md); padding: 1rem; font-size: .88rem; line-height: 1.5; margin: .8rem 0; max-height: 18rem; overflow: auto; }
.kpi-big { font-size: 2.4rem; font-weight: 900; color: var(--primary); line-height: 1; }

/* pasaporte */
.stamps { display: grid; grid-template-columns: repeat(2, 1fr); gap: .6rem; }
.stamp { border: 2px dashed var(--line); border-radius: var(--r-md); padding: .8rem; text-align: center; color: var(--muted); font-weight: 800; font-size: .8rem; }
.stamp b { display: block; font-size: 1.6rem; }
.stamp.got { border: 2px solid var(--green); color: #1f5a17; background: #e8f6e5; transform: rotate(-1.5deg); }
.cert { position: fixed; inset: 0; z-index: 60; background: rgba(11, 37, 64, .8); display: grid; place-items: center; padding: 1rem; overflow: auto; }
.cert-paper { background: #fff; width: min(760px, 100%); padding: 2.2rem 1.5rem; text-align: center; border-radius: var(--r-md); border: 10px solid var(--primary-100); position: relative; }
.cert-paper img { height: 56px; }
.cert-paper h2 { font-size: 1.9rem; margin: 1rem 0 .3rem; font-weight: 900; color: var(--navy); }
.cert-paper .nm { font-size: 1.7rem; font-weight: 900; color: var(--primary); margin: .6rem 0; }
.cert .actions { position: fixed; top: .8rem; right: .8rem; display: flex; gap: .5rem; }
@media print { body * { visibility: hidden; } .cert-paper, .cert-paper * { visibility: visible; } .cert { position: absolute; background: #fff; padding: 0; } .cert-paper { border-color: #cfe6f4; width: 100%; } .cert .actions { display: none; } }
.toast { position: fixed; z-index: 70; left: 50%; bottom: 90px; transform: translateX(-50%); background: var(--navy); color: #fff; padding: .7rem 1.1rem; border-radius: 99px; font-weight: 700; box-shadow: var(--shadow); max-width: 90vw; }
.teamchip { font-size: .72rem; font-weight: 900; letter-spacing: .04em; padding: .3rem .65rem; border-radius: 99px; text-transform: uppercase; }
.team-splash { border-radius: var(--r-lg); padding: 2rem 1.3rem; text-align: center; box-shadow: var(--shadow); animation: tpop .6s cubic-bezier(.34,1.56,.64,1) both; }
.team-splash h1 { font-size: 2.2rem; font-weight: 900; margin: .2rem 0 0; }
.team-num { font-size: 6.5rem; font-weight: 900; line-height: 1; }
.team-name { font-size: 1.1rem; font-weight: 800; margin: .2rem 0 0; text-transform: uppercase; letter-spacing: .12em; }
@keyframes tpop { from { transform: scale(.6) rotate(-6deg); opacity: 0; } to { transform: none; opacity: 1; } }
