/* ---------- Watch Party ---------- */
:root {
  --party-w: 392px;
  --violet: #8b5cf6;
  --pink: #ec4899;
  --live: #34d399;
}

/* botão na barra superior: borda em gradiente animado */
.party-btn {
  position: relative; flex: none; display: inline-flex; align-items: center; gap: 9px; padding: 9px 14px 9px 12px;
  border-radius: 14px; font-size: 14px; font-weight: 600; color: #fff; border: 1px solid transparent;
  background:
    linear-gradient(#0f0f17, #0f0f17) padding-box,
    linear-gradient(110deg, #3aa5ff, var(--violet), var(--pink), #3aa5ff) border-box;
  background-size: 100% 100%, 300% 100%;
  animation: pt-border 7s linear infinite;
  transition: transform 0.4s var(--ease), box-shadow 0.4s;
}
.party-btn > svg { width: 19px; height: 19px; flex: none; }
.party-btn:hover { transform: translateY(-1px); box-shadow: 0 8px 28px rgba(139, 92, 246, 0.35); }
.party-btn:active { transform: scale(0.97); }
.party-btn.on {
  background:
    linear-gradient(135deg, rgba(58, 165, 255, 0.28), rgba(139, 92, 246, 0.32)) padding-box,
    linear-gradient(#0f0f17, #0f0f17) padding-box,
    linear-gradient(110deg, #3aa5ff, var(--violet), var(--pink), #3aa5ff) border-box;
  background-size: 100% 100%, 100% 100%, 300% 100%;
  animation-name: pt-border-on;
}
@keyframes pt-border-on { to { background-position: 0 0, 0 0, 300% 0; } }
@keyframes pt-border { to { background-position: 0 0, 300% 0; } }

.pb-count {
  display: inline-flex; align-items: center; gap: 6px; padding: 2px 9px 2px 8px; border-radius: 999px; font-size: 12.5px; font-weight: 700;
  color: #b9f5da; background: rgba(52, 211, 153, 0.14); border: 1px solid rgba(52, 211, 153, 0.35);
}
.pb-count i, .pt-live i { width: 7px; height: 7px; border-radius: 50%; background: var(--live); box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.6); animation: pt-pulse 1.8s infinite; }
@keyframes pt-pulse { 70% { box-shadow: 0 0 0 7px rgba(52, 211, 153, 0); } 100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0); } }
.pb-dot {
  position: absolute; top: -6px; right: -6px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px; display: grid; place-items: center;
  font-size: 11px; font-weight: 800; color: #fff; background: linear-gradient(135deg, var(--pink), #f43f5e); box-shadow: 0 4px 14px rgba(244, 63, 94, 0.5);
  animation: pt-pop 0.5s var(--ease);
}
@keyframes pt-pop { from { transform: scale(0); } }

/* ---------- painel ---------- */
.party {
  position: fixed; z-index: 42; top: var(--bar-h); right: 0; bottom: 0; width: var(--party-w);
  display: flex; flex-direction: column; overflow: hidden; isolation: isolate;
  background:
    radial-gradient(110% 46% at 100% 0%, rgba(139, 92, 246, 0.2), transparent 62%),
    radial-gradient(90% 42% at 0% 0%, rgba(35, 146, 238, 0.16), transparent 62%),
    #09090f;
  border-left: 1px solid var(--line); box-shadow: -30px 0 80px rgba(0, 0, 0, 0.45);
  transform: translateX(104%); visibility: hidden;
  transition: transform 0.6s var(--ease), visibility 0s 0.6s;
}
body.party-open .party { transform: none; visibility: visible; transition-delay: 0s; }

.stage { transition: right 0.6s var(--ease); }
.epnav { transition: transform 0.5s var(--ease), opacity 0.3s, background 0.3s, border-color 0.3s, box-shadow 0.4s, margin 0.6s var(--ease); }
@media (min-width: 901px) {
  body.party-open .stage { right: var(--party-w); }
  body.party-open .epnav.next { margin-right: var(--party-w); }
}

.pt-head { display: flex; align-items: center; gap: 12px; padding: 16px 16px 12px; flex: none; }
.pt-ic {
  width: 40px; height: 40px; flex: none; display: grid; place-items: center; border-radius: 13px;
  background: linear-gradient(135deg, #3aa5ff, var(--violet) 55%, var(--pink)); box-shadow: 0 8px 24px rgba(139, 92, 246, 0.45);
}
.pt-ic svg { width: 20px; height: 20px; }
.pt-title { flex: 1; min-width: 0; line-height: 1.25; }
.pt-title b { display: block; font-size: 16px; font-weight: 700; letter-spacing: -0.01em; }
.pt-title small { display: block; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pt-live {
  display: inline-flex; align-items: center; gap: 7px; padding: 5px 11px 5px 10px; border-radius: 999px; font-size: 12px; font-weight: 600;
  color: #b9f5da; background: rgba(52, 211, 153, 0.12); border: 1px solid rgba(52, 211, 153, 0.32);
}
.pt-live b { font-size: 13px; font-weight: 800; color: #fff; font-variant-numeric: tabular-nums; }
.pt-live.off { color: #ffd59a; background: rgba(255, 190, 60, 0.1); border-color: rgba(255, 190, 60, 0.3); }
.pt-live.off i { background: #ffbe3c; animation: none; }

/* ----- lobby ----- */
.pt-lobby { flex: 1; min-height: 0; overflow-y: auto; padding: 4px 16px 22px; display: flex; flex-direction: column; gap: 14px; }
.pt-hero {
  position: relative; overflow: hidden; text-align: center; padding: 28px 20px 22px; border-radius: 22px;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.02)); border: 1px solid rgba(255, 255, 255, 0.09);
}
.pt-hero .orb { position: absolute; border-radius: 50%; filter: blur(34px); opacity: 0.55; z-index: -1; animation: pt-float 9s ease-in-out infinite; }
.pt-hero .o1 { width: 130px; height: 130px; left: -30px; top: -34px; background: #2392ee; }
.pt-hero .o2 { width: 150px; height: 150px; right: -40px; top: 10px; background: var(--violet); animation-delay: -3s; }
.pt-hero .o3 { width: 120px; height: 120px; left: 38%; bottom: -60px; background: var(--pink); animation-delay: -6s; }
@keyframes pt-float { 50% { transform: translate(14px, -12px) scale(1.12); } }
.pt-hero-ic {
  width: 62px; height: 62px; margin: 0 auto 14px; display: grid; place-items: center; border-radius: 20px;
  background: linear-gradient(135deg, #3aa5ff, var(--violet) 55%, var(--pink)); box-shadow: 0 14px 38px rgba(139, 92, 246, 0.5);
}
.pt-hero-ic svg { width: 30px; height: 30px; }
.pt-hero h3 { font-size: 22px; font-weight: 800; letter-spacing: -0.02em; }
.pt-hero p { margin: 8px auto 0; max-width: 270px; font-size: 13.5px; line-height: 1.55; color: #c3c7d8; }
.pt-perks { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 16px; }
.pt-perks li { display: inline-flex; align-items: center; gap: 6px; padding: 6px 11px; border-radius: 999px; font-size: 12px; font-weight: 600; background: rgba(255, 255, 255, 0.07); border: 1px solid rgba(255, 255, 255, 0.08); }
.pt-perks svg { width: 14px; height: 14px; color: #8fc8ff; }

.pt-field { display: flex; flex-direction: column; gap: 7px; }
.pt-field span { font-size: 11px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.party input[type='text'] {
  width: 100%; min-width: 0; padding: 13px 16px; border-radius: 14px; outline: 0; font: inherit; font-size: 14.5px; color: #fff;
  background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 255, 255, 0.1); transition: border-color 0.3s, box-shadow 0.3s, background 0.3s;
}
.party input[type='text']::placeholder { color: #7d8399; }
.party input[type='text']:focus { background: rgba(255, 255, 255, 0.09); border-color: rgba(139, 92, 246, 0.7); box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.18); }
.pt-primary {
  display: flex; align-items: center; justify-content: center; gap: 10px; padding: 14px 18px; border-radius: 14px; font-size: 15px; font-weight: 700; color: #fff;
  background: linear-gradient(110deg, #2b9bff, var(--violet) 60%, var(--pink)); background-size: 160% 100%;
  box-shadow: 0 12px 32px rgba(139, 92, 246, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.25);
  transition: transform 0.35s var(--ease), box-shadow 0.35s, background-position 0.6s;
}
.pt-primary svg { width: 19px; height: 19px; stroke-width: 2.6; }
.pt-primary:hover { transform: translateY(-2px); background-position: 100% 0; box-shadow: 0 16px 40px rgba(139, 92, 246, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.3); }
.pt-primary:active { transform: scale(0.98); }
.pt-or { display: flex; align-items: center; gap: 12px; font-size: 11.5px; color: var(--muted); }
.pt-or::before, .pt-or::after { content: ''; flex: 1; height: 1px; background: rgba(255, 255, 255, 0.1); }
.pt-join { display: flex; gap: 8px; }
.pt-join input { letter-spacing: 0.18em; text-align: center; font-weight: 700; text-transform: uppercase; }
.pt-join input::placeholder { letter-spacing: 0.08em; font-weight: 500; }
.pt-join button {
  flex: none; padding: 0 20px; border-radius: 14px; font-size: 14px; font-weight: 700; text-align: center;
  background: rgba(255, 255, 255, 0.09); border: 1px solid rgba(255, 255, 255, 0.12); transition: background 0.3s, transform 0.3s var(--ease);
}
.pt-join button:hover { background: rgba(255, 255, 255, 0.16); }
.pt-join button:active { transform: scale(0.96); }
.pt-hint { min-height: 18px; font-size: 12.5px; line-height: 1.5; text-align: center; color: #ffd59a; }
.pt-hint:empty { display: none; }

/* sala pública (opção ao criar) */
.pt-pub {
  position: relative; display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 16px; cursor: pointer; user-select: none;
  background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.09); transition: background 0.35s, border-color 0.35s, box-shadow 0.35s;
}
.pt-pub:hover { background: rgba(255, 255, 255, 0.08); }
.pt-pub-ic { width: 36px; height: 36px; flex: none; display: grid; place-items: center; border-radius: 11px; color: #9aa0b4; background: rgba(255, 255, 255, 0.07); transition: all 0.4s var(--ease); }
.pt-pub-ic svg { width: 18px; height: 18px; }
.pt-pub-tx { flex: 1; min-width: 0; line-height: 1.3; }
.pt-pub-tx b { display: block; font-size: 14px; font-weight: 700; }
.pt-pub-tx small { display: block; margin-top: 1px; font-size: 11.5px; color: var(--muted); }
.pt-pub input { position: absolute; opacity: 0; pointer-events: none; }
.pt-pub i { position: relative; flex: none; width: 38px; height: 22px; border-radius: 999px; background: rgba(255, 255, 255, 0.16); transition: background 0.35s; }
.pt-pub i::after { content: ''; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4); transition: transform 0.4s var(--ease); }
.pt-pub:has(input:checked) { background: rgba(52, 211, 153, 0.09); border-color: rgba(52, 211, 153, 0.45); box-shadow: 0 0 0 4px rgba(52, 211, 153, 0.08); }
.pt-pub:has(input:checked) .pt-pub-ic { color: #052e1f; background: linear-gradient(135deg, #6ee7b7, #34d399); box-shadow: 0 6px 18px rgba(52, 211, 153, 0.4); }
.pt-pub input:checked + i { background: linear-gradient(110deg, #10b981, #34d399); }
.pt-pub input:checked + i::after { transform: translateX(16px); }
.pt-pub:has(input:focus-visible) { outline: 2px solid #8fc8ff; outline-offset: 2px; }
.pt-code.pub .pt-code-tx small { color: #6ee7b7; }
.pt-code.pub .pt-code-tx small::before { content: ''; display: inline-block; width: 6px; height: 6px; margin-right: 6px; border-radius: 50%; background: var(--live); vertical-align: 1px; }

/* ----- sala ----- */
.pt-room { flex: 1; min-height: 0; display: flex; flex-direction: column; position: relative; }
.pt-strip { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 2px 16px 12px; }
.pt-code {
  display: flex; align-items: center; gap: 12px; padding: 7px 8px 7px 14px; border-radius: 14px; min-width: 0;
  background: rgba(255, 255, 255, 0.06); border: 1px dashed rgba(255, 255, 255, 0.2); transition: background 0.3s, border-color 0.3s, transform 0.3s var(--ease);
}
.pt-code:hover { background: rgba(255, 255, 255, 0.1); border-color: rgba(139, 92, 246, 0.8); }
.pt-code:active { transform: scale(0.97); }
.pt-code-tx small { display: block; font-size: 9.5px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.pt-code-tx b { display: block; font-size: 16px; font-weight: 800; letter-spacing: 0.16em; font-variant-numeric: tabular-nums; }
.pt-code-cp {
  display: inline-flex; align-items: center; gap: 6px; padding: 7px 11px; border-radius: 10px; font-size: 12px; font-weight: 700;
  background: linear-gradient(110deg, #2b9bff, var(--violet)); box-shadow: 0 6px 18px rgba(79, 70, 229, 0.4);
}
.pt-code-cp svg { width: 14px; height: 14px; }
.pt-code-cp em { font-style: normal; }
.pt-code.copied .pt-code-cp { background: linear-gradient(110deg, #10b981, #34d399); box-shadow: 0 6px 18px rgba(16, 185, 129, 0.4); }
.pt-people { display: flex; align-items: center; flex-direction: row-reverse; justify-content: flex-end; padding-left: 8px; }

.av {
  --h: 210; width: 32px; height: 32px; flex: none; display: grid; place-items: center; border-radius: 50%;
  font-size: 13px; font-weight: 800; color: #fff; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
  background: linear-gradient(135deg, hsl(var(--h) 88% 62%), hsl(calc(var(--h) + 48) 78% 44%));
}
.av.sm { width: 30px; height: 30px; font-size: 12px; margin-left: -9px; border: 2px solid #0b0b12; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4); }
.av.sm.me { box-shadow: 0 0 0 2px rgba(52, 211, 153, 0.85), 0 4px 12px rgba(0, 0, 0, 0.4); }
.av.more { background: #232333; font-size: 11px; color: #c9cde0; }

.pt-banner {
  flex: none; margin: 0 16px 10px; padding: 9px 12px; border-radius: 12px; font-size: 12px; line-height: 1.5; color: #bcd6ff;
  background: rgba(35, 146, 238, 0.12); border: 1px solid rgba(35, 146, 238, 0.28);
}
.pt-banner.warn { color: #ffd59a; background: rgba(255, 190, 60, 0.09); border-color: rgba(255, 190, 60, 0.28); }

.pt-feed {
  flex: 1; min-height: 0; overflow-y: auto; padding: 8px 14px 12px; display: flex; flex-direction: column; gap: 10px; overscroll-behavior: contain;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 16px); mask-image: linear-gradient(to bottom, transparent 0, #000 16px);
}
.pt-feed::-webkit-scrollbar { width: 5px; }
.pt-empty { margin: auto; text-align: center; padding: 24px; display: flex; flex-direction: column; gap: 6px; align-items: center; }
.pt-empty span { font-size: 34px; }
.pt-empty b { font-size: 15px; }
.pt-empty small { max-width: 230px; font-size: 12.5px; line-height: 1.5; color: var(--muted); }

.pm { display: flex; align-items: flex-end; gap: 9px; max-width: 92%; animation: pt-in 0.45s var(--ease) both; }
@keyframes pt-in { from { opacity: 0; transform: translateY(10px) scale(0.97); } }
.pm.cont { margin-top: -6px; }
.pm.cont > .av { visibility: hidden; height: 0; }
.pm.cont:not(.mine) { padding-left: 41px; }
.pm.cont:not(.mine) > .av { display: none; }
.pm .bub { min-width: 0; padding: 8px 12px 6px; border-radius: 18px 18px 18px 6px; background: rgba(255, 255, 255, 0.075); border: 1px solid rgba(255, 255, 255, 0.07); }
.pm.cont .bub { border-top-left-radius: 6px; }
.pm .nm { display: block; margin-bottom: 2px; font-size: 12px; font-weight: 700; color: hsl(var(--h, 210) 90% 72%); }
.pm p { font-size: 14px; line-height: 1.45; overflow-wrap: anywhere; word-break: break-word; }
.pm time { display: block; margin-top: 2px; font-size: 10px; color: rgba(255, 255, 255, 0.4); text-align: right; font-variant-numeric: tabular-nums; }
.pm.mine { align-self: flex-end; flex-direction: row-reverse; }
.pm.mine .bub { border: 0; border-radius: 18px 18px 6px 18px; background: linear-gradient(135deg, #2b9bff, #6d5dfc 70%, #8b5cf6); box-shadow: 0 8px 22px rgba(79, 70, 229, 0.35); }
.pm.mine.cont .bub { border-top-right-radius: 6px; }
.pm.mine time { color: rgba(255, 255, 255, 0.7); }
.pm.sys { align-self: center; max-width: 100%; justify-content: center; align-items: center; gap: 8px; animation-duration: 0.6s; }
.pm.sys span { padding: 4px 12px; border-radius: 999px; font-size: 11.5px; color: #aab0c6; background: rgba(255, 255, 255, 0.05); text-align: center; }
.pm.sys button { padding: 4px 11px; border-radius: 999px; font-size: 11.5px; font-weight: 700; color: #fff; background: linear-gradient(110deg, #2b9bff, var(--violet)); }

.pt-jump {
  position: absolute; z-index: 3; left: 50%; bottom: 168px; transform: translateX(-50%); padding: 7px 14px; border-radius: 999px; font-size: 12px; font-weight: 700;
  background: linear-gradient(110deg, #2b9bff, var(--violet)); box-shadow: 0 10px 28px rgba(79, 70, 229, 0.5); animation: pt-in 0.4s var(--ease);
}

.pt-actions { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 14px 10px; }
.pt-react { display: flex; gap: 4px; padding: 4px; border-radius: 999px; background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 255, 255, 0.08); }
.pt-react button { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-size: 17px; text-align: center; transition: transform 0.3s var(--ease), background 0.3s; }
.pt-react button:hover { background: rgba(255, 255, 255, 0.12); transform: translateY(-3px) scale(1.18); }
.pt-react button:active { transform: scale(0.85); }
.pt-cd {
  display: inline-flex; align-items: center; gap: 7px; padding: 9px 13px; border-radius: 999px; font-size: 12.5px; font-weight: 700; white-space: nowrap;
  background: rgba(236, 72, 153, 0.14); border: 1px solid rgba(236, 72, 153, 0.4); color: #ffc4e1; transition: background 0.3s, transform 0.3s var(--ease);
}
.pt-cd svg { width: 15px; height: 15px; }
.pt-cd:hover { background: rgba(236, 72, 153, 0.26); }
.pt-cd:active { transform: scale(0.95); }

.pt-compose { flex: none; display: flex; gap: 8px; padding: 0 14px 10px; }
.pt-compose input { flex: 1; border-radius: 999px !important; padding-left: 18px !important; }
.pt-compose button {
  width: 46px; height: 46px; flex: none; display: grid; place-items: center; border-radius: 50%;
  background: linear-gradient(135deg, #2b9bff, var(--violet) 70%, var(--pink)); box-shadow: 0 8px 22px rgba(139, 92, 246, 0.45);
  transition: transform 0.35s var(--ease), box-shadow 0.35s;
}
.pt-compose button svg { width: 20px; height: 20px; stroke-width: 2.6; }
.pt-compose button:hover { transform: translateX(2px) scale(1.06); }
.pt-compose button:active { transform: scale(0.9); }

.pt-foot {
  flex: none; display: flex; align-items: center; gap: 6px; padding: 8px 12px calc(10px + env(safe-area-inset-bottom)); border-top: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(0, 0, 0, 0.25);
}
.pt-foot button { display: inline-flex; align-items: center; gap: 6px; padding: 7px 10px; border-radius: 10px; font-size: 12px; font-weight: 600; color: #aab0c6; transition: background 0.3s, color 0.3s; }
.pt-foot button svg { width: 14px; height: 14px; }
.pt-foot button:hover { background: rgba(255, 255, 255, 0.08); color: #fff; }
.pt-foot .danger { margin-left: auto; }
.pt-foot .danger:hover { background: rgba(244, 63, 94, 0.16); color: #ff9db2; }
.pt-switch { display: inline-flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 10px; font-size: 12px; font-weight: 600; color: #c3c7d8; cursor: pointer; user-select: none; }
.pt-switch input { position: absolute; opacity: 0; pointer-events: none; }
.pt-switch i { position: relative; width: 30px; height: 18px; border-radius: 999px; background: rgba(255, 255, 255, 0.16); transition: background 0.35s; }
.pt-switch i::after { content: ''; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: #fff; transition: transform 0.4s var(--ease); }
.pt-switch input:checked + i { background: linear-gradient(110deg, #2b9bff, var(--violet)); }
.pt-switch input:checked + i::after { transform: translateX(12px); }
.pt-switch input:focus-visible + i, .party button:focus-visible, .party-btn:focus-visible { outline: 2px solid #8fc8ff; outline-offset: 2px; }

/* ----- sobreposições sobre o player ----- */
.pt-float { position: fixed; z-index: 25; top: var(--bar-h); bottom: 0; left: 0; right: 0; pointer-events: none; overflow: hidden; transition: right 0.6s var(--ease); }
@media (min-width: 901px) { body.party-open .pt-float { right: var(--party-w); } }
.pt-float span {
  position: absolute; bottom: 8%; left: var(--x); font-size: 38px; filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.5));
  animation: pt-rise var(--dur) cubic-bezier(0.2, 0.7, 0.3, 1) forwards;
}
@keyframes pt-rise {
  0% { opacity: 0; transform: translate(0, 0) scale(0.4); }
  12% { opacity: 1; transform: translate(0, -30px) scale(1.15); }
  100% { opacity: 0; transform: translate(var(--sway), -62vh) scale(0.9); }
}

.pt-countdown {
  position: fixed; z-index: 60; inset: 0; display: grid; place-content: center; justify-items: center; gap: 18px; pointer-events: none;
  background: radial-gradient(circle at center, rgba(10, 8, 24, 0.82), rgba(0, 0, 0, 0.66)); backdrop-filter: blur(8px);
  animation: pt-fade 0.35s ease both;
}
@keyframes pt-fade { from { opacity: 0; } }
.pt-ring {
  position: relative; width: clamp(150px, 26vmin, 230px); aspect-ratio: 1; display: grid; place-items: center; border-radius: 50%;
  background: conic-gradient(from 0deg, #3aa5ff, var(--violet), var(--pink), #3aa5ff); padding: 6px;
  box-shadow: 0 0 80px rgba(139, 92, 246, 0.6);
}
.pt-ring::before { content: ''; position: absolute; inset: 6px; border-radius: 50%; background: #0a0a14; }
.pt-ring b { position: relative; font-size: clamp(70px, 14vmin, 120px); font-weight: 800; line-height: 1; background: linear-gradient(135deg, #fff, #c9b8ff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.pt-countdown.beat .pt-ring { animation: pt-beat 1s var(--ease); }
.pt-countdown.go .pt-ring { box-shadow: 0 0 120px rgba(52, 211, 153, 0.8); background: conic-gradient(#34d399, #3aa5ff, #34d399); }
@keyframes pt-beat { 0% { transform: scale(0.7); opacity: 0.4; } 35% { transform: scale(1.06); opacity: 1; } 100% { transform: scale(1); } }
.pt-countdown span { font-size: 15px; font-weight: 700; letter-spacing: 0.04em; color: #e6e8f5; text-shadow: 0 2px 12px rgba(0, 0, 0, 0.6); }

.pt-toast {
  position: fixed; z-index: 100; left: 50%; bottom: 28px; padding: 11px 18px; border-radius: 999px; font-size: 13.5px; font-weight: 600; color: #fff; max-width: calc(100vw - 32px);
  background: rgba(20, 20, 30, 0.92); border: 1px solid rgba(139, 92, 246, 0.5); backdrop-filter: blur(16px); box-shadow: 0 18px 50px rgba(0, 0, 0, 0.5);
  transform: translate(-50%, 20px); opacity: 0; transition: all 0.4s var(--ease);
}
.pt-toast.show { transform: translate(-50%, 0); opacity: 1; }

/* ----- telas pequenas: painel vira bottom sheet ----- */
@media (max-width: 900px) {
  .party-btn { padding: 8px 10px; gap: 6px; }
  .party-btn .pb-label { display: none; }
  .party {
    --sheet-h: min(74dvh, 640px);
    top: auto; left: 0; right: 0; width: auto; height: var(--sheet-h); border-left: 0; border-top: 1px solid var(--line);
    border-radius: 24px 24px 0 0; box-shadow: 0 -24px 70px rgba(0, 0, 0, 0.6); transform: translateY(104%);
  }
  .party::before { content: ''; position: absolute; z-index: 2; top: 7px; left: 50%; width: 38px; height: 4px; margin-left: -19px; border-radius: 4px; background: rgba(255, 255, 255, 0.22); }
  .pt-head { padding-top: 20px; }
  .pt-float { top: var(--bar-h); }
  .pt-jump { bottom: 160px; }
}
@media (max-width: 560px) {
  .servers { max-width: none; }
  .eps-btn { flex: none; }
  .srv-text small { display: none; }
  .pb-count i { display: none; }
}
@media (max-width: 480px) {
  .party-btn { padding: 7px 8px; }
  .pb-count { padding: 1px 7px; font-size: 11.5px; }
  .pt-react button { width: 29px; height: 29px; font-size: 15px; }
  .pt-cd span { display: none; }
  .pt-cd { padding: 9px 11px; }
  .pt-foot button span { display: none; }
  .pt-foot .pt-switch span { display: inline; }
}
@media (prefers-reduced-motion: reduce) {
  .party-btn, .pb-count i, .pt-live i, .pt-hero .orb, .pm, .pt-countdown, .pt-float span { animation: none !important; }
  .party, .stage, .pt-float { transition: none !important; }
}

.av.sm.host { box-shadow: 0 0 0 2px rgba(251, 191, 36, 0.95), 0 4px 12px rgba(0, 0, 0, 0.4); position: relative; }
.av.sm.host::after { content: '👑'; position: absolute; top: -9px; right: -5px; font-size: 11px; line-height: 1; filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.6)); }

/* convite sem login: só nome + Entrar */
.pt-p-invite { display: none; }
.pt-lobby.invite .pt-p-main, .pt-lobby.invite .pt-perks, .pt-lobby.invite .pt-pub, .pt-lobby.invite #ptCreate,
.pt-lobby.invite .pt-or, .pt-lobby.invite .pt-join input { display: none; }
.pt-lobby.invite .pt-p-invite { display: block; }
.pt-lobby.invite .pt-p-invite b { letter-spacing: 0.14em; color: #fff; }
.pt-lobby.invite .pt-join button { width: 100%; padding: 14px; color: #fff; background: linear-gradient(135deg, #3aa5ff, var(--violet) 55%, var(--pink)); box-shadow: 0 10px 28px rgba(139, 92, 246, 0.4); }

/* ----- mobile: tela fixa, sem rolagem e sem espaço sobrando ----- */
:root { --kb: 0px; }
html, body { position: fixed; inset: 0; width: 100%; height: 100%; overflow: hidden; overscroll-behavior: none; touch-action: manipulation; }
@supports (height: 100dvh) { html, body { height: 100dvh; } }
@media (max-width: 900px) {
  .party {
    left: 0; right: 0; width: 100%; max-width: 100vw;
    bottom: var(--kb);
    --sheet-h: min(calc(var(--vvh, 100dvh) - var(--bar-h) - 8px), 640px);
    height: var(--sheet-h);
    padding-bottom: env(safe-area-inset-bottom);
    transition: transform 0.6s var(--ease), visibility 0s 0.6s, bottom 0.25s;
  }
  body.party-open .party { transition-delay: 0s; }
  .pt-head { padding-right: 12px; }
  .pt-close, #ptClose { flex: none; }
}
@media (min-width: 640px) and (max-width: 900px) {
  .party { left: auto; right: 12px; width: min(460px, calc(100vw - 24px)); bottom: max(var(--kb), 8px); }
}
@media (max-width: 900px) and (max-height: 520px) {
  .party { --sheet-h: calc(var(--vvh, 100dvh) - 8px); top: 4px; height: auto; }
  .pt-hero { display: none; }
}
@media (max-width: 900px) and (max-height: 720px) {
  .pt-perks { display: none; }
  .pt-hero { padding-block: 14px; }
  .pt-hero-ic { width: 46px; height: 46px; margin-bottom: 6px; }
}

/* barra do topo: tudo cabe em qualquer largura */
.bar-right > * { min-width: 0; }
.eps-btn span { white-space: nowrap; }
.srv-text b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 14ch; display: block; }
@media (max-width: 420px) {
  .bar-left .logo img { height: 28px; }
  .bar { padding-inline: 6px; }
  .eps-btn { padding: 8px 7px; gap: 4px; }
  .eps-btn span { font-size: 11.5px; }
  .srv-text b { max-width: 9ch; }
}
@media (max-width: 340px) {
  .bar-left .logo { display: none; }
}
@media (max-width: 420px) {
  .srv-trigger { padding: 8px 8px 8px 9px; gap: 4px; }
  .srv-trigger .chev { width: 12px; height: 12px; }
  .srv-text b { max-width: 11ch; }
  .bar-left { gap: 2px; }
}

/* menu de servidores sempre acima do painel do Watch Party */
.bar:has(.servers.open) { z-index: 60; }

/* iOS dá zoom ao focar campos com fonte < 16px; evita o zoom e o deslocamento lateral */
@media (max-width: 900px) {
  .party input[type='text'], .party input[type='search'] { font-size: 16px !important; }
  .party, .party * { max-width: 100%; }
  .party { overflow-x: hidden; }
}
