:root{
  --white:#fff; --dim:rgba(255,255,255,.72); --faint:rgba(255,255,255,.55);
  --pill:rgba(0,0,0,.28); --pill2:rgba(0,0,0,.36);
  --red:#fe2c55; --pink:#ff3b5c; --orange:#ff8a3d;
  --sheet:#fff; --sheet-ink:#161823;
  --font:"TikTok Sans", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
}
*{box-sizing:border-box;margin:0;padding:0;-webkit-tap-highlight-color:transparent}
html,body{height:100%;background:#000;color:var(--white);font-family:var(--font);overflow:hidden;overscroll-behavior:none}
button{font:inherit;color:inherit;background:none;border:0;cursor:pointer}
svg{display:block}

#phone{position:relative;height:100dvh;width:100%;max-width:440px;margin:0 auto;overflow:hidden;background:#000}
@media (min-width:600px){ body{display:flex;align-items:center;justify-content:center;background:#111} #phone{height:min(100dvh,940px);aspect-ratio:9/19.5;width:auto;border-radius:22px} }

#video{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;background:#000}
#offline{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:14px;background:#0b0d12;color:var(--dim);font-size:14px}
#offline.hide{display:none}
.off-ring{width:84px;height:84px;border-radius:50%;background:#10151f;display:grid;place-items:center;box-shadow:0 0 0 3px var(--red)}
.off-ring img{width:60px}
#shade-top{position:absolute;left:0;right:0;top:0;height:120px;background:linear-gradient(rgba(0,0,0,.35),transparent);pointer-events:none}
#shade-bottom{position:absolute;left:0;right:0;bottom:0;height:46%;background:linear-gradient(transparent,rgba(0,0,0,.28) 45%,rgba(0,0,0,.5));pointer-events:none}

/* cabecera */
#top{position:absolute;top:calc(env(safe-area-inset-top) + 10px);left:8px;right:6px;display:flex;align-items:center;justify-content:space-between;z-index:5}
.host-pill{display:flex;align-items:center;gap:6px;background:var(--pill);border-radius:20px;padding:3px 3px 3px 3px;max-width:62%}
.host-av{width:32px;height:32px;border-radius:50%;background:#0d1320;display:grid;place-items:center;flex:none;overflow:hidden}
.host-av img{width:24px}
.host-av.big{width:76px;height:76px;margin:0 auto 14px;box-shadow:0 0 0 3px var(--red)} .host-av.big img{width:54px}
.host-txt{display:flex;flex-direction:column;line-height:1.1;min-width:0}
.host-txt b{font-size:13.5px;font-weight:700;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:84px}
.host-txt span{display:flex;align-items:center;gap:3px;font-size:11px;color:var(--dim)}
.i-heart-s{width:10px;height:10px;fill:var(--dim)}
.follow{background:var(--red);color:#fff;font-size:13px;font-weight:600;border-radius:16px;padding:6px 11px;flex:none}
.follow.joined{background:linear-gradient(90deg,#ff8f4a,#ff5a6e);padding:6px 10px}
.top-right{display:flex;align-items:center;gap:4px}
#top-avs{display:flex}
#top-avs .tav{width:26px;height:26px;border-radius:50%;border:1.5px solid rgba(255,255,255,.85);margin-left:-8px;display:grid;place-items:center;font-size:11px;font-weight:700;color:#111}
#top-avs .tav:first-child{margin-left:0}
.vcount{background:var(--pill);border-radius:14px;font-size:12.5px;font-weight:600;padding:5px 9px;min-width:32px;text-align:center}
.x{width:30px;height:30px;display:grid;place-items:center}
.x svg{width:20px;height:20px;stroke:#fff;stroke-width:2.2;stroke-linecap:round;fill:none}

#chips{position:absolute;top:calc(env(safe-area-inset-top) + 52px);left:8px;right:8px;display:flex;gap:6px;z-index:5;font-size:11px}
.chip{display:flex;align-items:center;gap:4px;background:var(--pill);border-radius:12px;padding:4px 8px;white-space:nowrap;color:#fff}
.chip b{font-weight:500;margin-left:2px}
.chip em{font-style:normal}
.chip-r{margin-left:auto}
.i-chip{width:12px;height:12px;fill:#ffcf3d}

/* sonido */
#sound-chip{position:absolute;top:calc(env(safe-area-inset-top) + 84px);left:50%;transform:translateX(-50%);z-index:6;background:rgba(0,0,0,.6);padding:8px 12px;border-radius:18px;font-size:13px;display:flex;gap:6px;align-items:center}
#sound-chip svg{width:16px;height:16px;stroke:#fff;fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}

/* regalos que entran */
#gift-lane{position:absolute;left:8px;top:calc(env(safe-area-inset-top) + 86px);z-index:5;display:flex;flex-direction:column;gap:6px}
.gift-row{display:flex;align-items:center;gap:6px;background:linear-gradient(90deg,rgba(255,59,92,.85),rgba(255,59,92,.15));border-radius:20px;padding:3px 12px 3px 3px;animation:gin .35s ease-out}
.gift-row .av{width:28px;height:28px}
.gift-row div{line-height:1.15}
.gift-row b{display:block;font-size:12.5px}
.gift-row span{font-size:11px;color:#ffe4ea}
.gift-row .g{width:30px;height:30px;margin-left:4px}
.gift-row .x2{font-weight:800;font-size:20px;font-style:italic;margin-left:4px}
@keyframes gin{from{transform:translateX(-110%)}to{transform:none}}

/* chat */
#chat-wrap{position:absolute;left:0;right:64px;bottom:calc(env(safe-area-inset-bottom) + 58px);z-index:4;padding:0 10px 0 10px}
#chat{list-style:none;max-height:28vh;overflow:hidden;display:flex;flex-direction:column;justify-content:flex-end;-webkit-mask-image:linear-gradient(transparent,#000 28%);mask-image:linear-gradient(transparent,#000 28%)}
@media (min-width:600px){ #chat{max-height:240px} }
#chat li{display:flex;gap:8px;align-items:flex-start;padding:4px 0;animation:cin .18s ease-out}
@keyframes cin{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:none}}
.av{width:26px;height:26px;border-radius:50%;flex:none;display:grid;place-items:center;font-size:11px;font-weight:700;color:#111;overflow:hidden}
.av img{width:20px}
.av.host{background:#0d1320}
.cm{min-width:0;line-height:1.25}
.cm .nm{display:flex;align-items:center;gap:4px;font-size:13px;color:var(--faint);font-weight:500}
.cm .tx{font-size:14px;font-weight:600;color:#fff;word-wrap:break-word;text-shadow:0 1px 1px rgba(0,0,0,.25)}
.badge-host{font-size:10px;background:var(--red);color:#fff;border-radius:3px;padding:0 4px;font-weight:700}
.badge-lvl{font-size:10px;background:#5b7cff;color:#fff;border-radius:7px;padding:0 5px;font-weight:700}
.badge-pin{font-size:10.5px;color:var(--dim);display:flex;align-items:center;gap:2px}
#chat li.sys{font-size:13px;color:#fff;font-weight:600;gap:6px;align-items:center}
#chat li.sys .ico{width:18px;height:18px;flex:none;fill:#fff}

#pinned{display:flex;gap:8px;background:rgba(0,0,0,.35);border-radius:10px;padding:7px 9px;margin-bottom:6px;align-items:flex-start}
#pinned .tx{font-size:14px}
#popular{display:inline-flex;gap:6px;align-items:baseline;background:rgba(0,0,0,.32);border-radius:12px;padding:4px 10px;margin-bottom:4px;font-size:13px;font-weight:600}
#popular i{font-style:italic;font-weight:800;font-size:15px}
#sysline{height:26px;display:flex;align-items:center;gap:6px;font-size:13px;font-weight:600;margin-top:2px;white-space:nowrap;overflow:hidden}
#sysline .wave{width:22px;height:22px;border-radius:50%;background:rgba(255,255,255,.18);display:grid;place-items:center;flex:none}
#sysline .wave svg{width:13px;height:13px;fill:#fff}
#sysline .sl{animation:cin .2s ease-out;display:flex;align-items:center;gap:6px}
#sysline .ico{width:18px;height:18px;flex:none}

/* corazones */
#hearts{position:absolute;right:6px;bottom:calc(env(safe-area-inset-bottom) + 64px);width:70px;height:300px;pointer-events:none;z-index:4}
.fh{position:absolute;bottom:0;left:22px;width:30px;height:30px;animation:fly 2.2s ease-out forwards}
.fh svg{width:100%;height:100%}
@keyframes fly{0%{transform:translate(0,0) scale(.4);opacity:0}10%{opacity:1;transform:translate(0,-12px) scale(1)}100%{transform:translate(var(--dx),-280px) scale(.9);opacity:0}}
.tapheart{position:absolute;width:86px;height:86px;z-index:7;pointer-events:none;animation:tap .8s ease-out forwards}
@keyframes tap{0%{transform:translate(-50%,-50%) scale(.3) rotate(var(--r));opacity:0}20%{transform:translate(-50%,-50%) scale(1.1) rotate(var(--r));opacity:1}100%{transform:translate(-50%,-110%) scale(1) rotate(var(--r));opacity:0}}

/* barra */
#bar{position:absolute;left:0;right:0;bottom:0;padding:8px 8px calc(env(safe-area-inset-bottom) + 10px);display:flex;align-items:center;gap:4px;z-index:6}
#form{flex:1;display:flex;align-items:center;background:rgba(255,255,255,.16);border-radius:22px;height:40px;padding:0 6px 0 14px;min-width:0}
#msg{flex:1;min-width:0;background:none;border:0;outline:0;color:#fff;font:500 14px var(--font)}
#msg::placeholder{color:rgba(255,255,255,.75)}
.emo svg{width:22px;height:22px;stroke:#fff;stroke-width:1.7;fill:none}
.emo circle[r="1"]{fill:#fff;stroke:none}
.ic{width:36px;height:36px;border-radius:50%;display:grid;place-items:center;flex:none}
.ic svg{width:22px;height:22px}
.ic-people{background:linear-gradient(135deg,#ff4f8a,#1de9e2)} .ic-people svg{fill:#fff}
.ic-coin{background:#ffb02e} .ic-coin svg{stroke:#7a3d00;stroke-width:1.6;fill:#ffd36b}
.ic-gift{background:var(--pink)} .ic-gift svg{stroke:#fff;stroke-width:1.6;fill:none}
.ic-share svg{fill:#fff;width:24px;height:24px}

/* hoja de regalos */
#gift-sheet{position:absolute;left:0;right:0;bottom:0;z-index:9;background:#1c1c1e;border-radius:14px 14px 0 0;padding:12px 12px calc(env(safe-area-inset-bottom) + 14px)}
.gs-head{display:flex;justify-content:space-between;font-weight:700;font-size:15px;margin-bottom:10px}
.gs-x{font-size:22px;line-height:1}
.gs-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}
.gs-grid button{display:flex;flex-direction:column;align-items:center;gap:4px;padding:10px 4px;border-radius:10px;font-size:12px;background:rgba(255,255,255,.06)}
.gs-grid small{color:#ffcf3d}
.gs-note{font-size:11px;color:#999;margin-top:10px;text-align:center}
.g{width:40px;height:40px;border-radius:10px;display:grid;place-items:center;font-weight:800}
.g-rosa{background:radial-gradient(circle at 50% 40%,#ff4d6d 0 38%,#c9184a 39% 52%,transparent 53%),linear-gradient(transparent 60%,#2d6a4f 60% 66%,transparent 66%)}
.g-tt{background:#111;box-shadow:inset 3px 0 0 #25f4ee,inset -3px 0 0 #fe2c55}
.g-gg{background:#8338ec;color:#fff;font-size:15px}
.g-cor{background:radial-gradient(circle,#ff5c8a 0 45%,transparent 46%)}
.g-donut{background:radial-gradient(circle,transparent 0 22%,#ff8fab 23% 55%,#e09f3e 56% 62%,transparent 63%)}
.g-uni{background:radial-gradient(circle at 30% 30%,#7b2ff7,#0d1b4c 70%)}

/* entrada */
#join{position:absolute;inset:0;z-index:20;background:rgba(0,0,0,.72);backdrop-filter:blur(6px);display:flex;align-items:flex-end}
#join.hide{display:none}
.join-card{width:100%;background:#fff;color:var(--sheet-ink);border-radius:16px 16px 0 0;padding:26px 20px calc(env(safe-area-inset-bottom) + 22px);text-align:center}
.join-card h1{font-size:18px;font-weight:700;margin-bottom:6px}
.join-card p{font-size:14px;color:#555;margin-bottom:16px}
.join-card form{display:flex;flex-direction:column;gap:10px}
.join-card input{height:46px;border-radius:8px;border:1px solid #e3e3e4;background:#f1f1f2;padding:0 14px;font:500 15px var(--font);color:#161823;outline:0}
.join-card input:focus{border-color:#bbb}
.join-card button{height:46px;border-radius:8px;background:var(--red);color:#fff;font-weight:700;font-size:15px}
.join-card small{display:block;margin-top:12px;font-size:12px;color:#8a8b91}
