/* The party's room (party-room.js; docs/PARTY-ROOM.md): a 2D room over the site's tokens (../shared/ui/tokens.css). */
.pr-reactions { display:flex; flex-wrap:wrap; gap:8px; padding:8px 12px; }
.pr-reaction-tray { flex:1; min-width:130px; }
.pr-reaction-tray summary { display:flex; align-items:center; justify-content:center; min-height:48px; padding:8px 16px; border:1px solid #faf7f21c; border-radius:24px; cursor:pointer; font-weight:600; list-style:none; background:#faf7f208; }
.pr-reaction-tray summary::-webkit-details-marker { display:none; }
.pr-reaction-tray summary:focus-visible { outline:3px solid var(--lime); outline-offset:2px; }
.pr-reaction-tray[open] { flex-basis:100%; }
.pr-reaction-tray[open] summary { color:var(--lime); }
.pr-reaction-tray .pr-compose { max-height:160px; overflow-y:auto; }
.pr-chat-rule { font-size:14px; color:var(--tx-mid); margin:6px 16px 14px; }
.pr-head { display: flex; align-items: baseline; gap: 12px; margin: 8px 0 12px; }
.pr-head h1 { margin: 0; font-family: var(--font-display); font-weight: 600; font-size: 28px; }
.pr-count { color: var(--tx-lo); font-weight: 600; }

.pr-room { position: relative; width: 100%; max-width: 560px; margin: 0 auto; aspect-ratio: 2 / 3; border-radius: 24px; overflow: hidden;
  touch-action: manipulation; user-select: none; -webkit-user-select: none; cursor: pointer;
  background:
    radial-gradient(60% 40% at 50% 60%, var(--bg-glow), transparent 70%),
    repeating-linear-gradient(0deg, transparent 0 31px, rgba(250, 247, 242, 0.035) 31px 32px),
    repeating-linear-gradient(90deg, transparent 0 31px, rgba(250, 247, 242, 0.035) 31px 32px),
    var(--bg-1); }
.pr-wall { position: absolute; inset: 0 0 auto; height: 23%; background: linear-gradient(var(--bg-3), var(--bg-2)); border-bottom: 3px solid var(--bg-inset); }
.pr-wall.is-low { inset: auto 0 0; height: 24%; background: linear-gradient(var(--bg-2), var(--bg-3)); border-bottom: 0; border-top: 3px solid var(--bg-inset); }
.pr-dance { position: absolute; left: 32%; top: 40.5%; width: 36%; height: 18%; display: grid; grid-template-columns: repeat(8, 1fr); grid-template-rows: repeat(4, 1fr); gap: 3px;
  padding: 4px; border-radius: 14px; background: #0B0B11; box-shadow: 0 0 0 3px rgba(250, 247, 242, 0.08), 0 0 30px rgba(164, 123, 255, 0.18); pointer-events: none; transition: box-shadow 0.15s; }
.pr-dance.is-bar { box-shadow: 0 0 0 3px rgba(210, 255, 77, 0.35), 0 0 40px rgba(210, 255, 77, 0.3); }
.pr-dance i { border-radius: 3px; background: rgba(250, 247, 242, 0.05); transition: background 0.35s ease-out, box-shadow 0.35s ease-out; }
.pr-dance i.is-lit { transition: none; }
.pr-dance i.h0 { background: #D2FF4D; box-shadow: 0 0 12px #D2FF4D; } .pr-dance i.h1 { background: #A47BFF; box-shadow: 0 0 12px #A47BFF; }
.pr-dance i.h2 { background: #4DE3FF; box-shadow: 0 0 12px #4DE3FF; } .pr-dance i.h3 { background: #FF5FC8; box-shadow: 0 0 12px #FF5FC8; }
.pr-dance i.is-foot { background: rgba(250, 247, 242, 0.55); }
.pr-dance i.is-hit { background: #FAF7F2; box-shadow: 0 0 18px #FAF7F2; }
.pr-dance-l { position: absolute; left: 50%; top: 40%; transform: translate(-50%, -100%); font-size: 10px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: rgba(210, 255, 77, 0.6); pointer-events: none; }
/* Tap on the beat (standing on the floor): its ring closes on every beat */
.pr-beatrow { display: flex; justify-content: center; margin-bottom: 10px; }
.pr-beatrow:empty { display: none; }
.pr-beat { position: relative; min-height: 48px; padding: 0 20px 0 50px; border-radius: 999px; border: 0;
  background: var(--lime); color: var(--night); font: inherit; font-weight: 800; font-size: 15px; white-space: nowrap; cursor: pointer; }
.pr-beat:focus-visible { outline: 3px solid var(--ivory); outline-offset: 2px; }
.pr-beat-ring { position: absolute; left: 14px; top: 50%; width: 24px; height: 24px; margin-top: -12px; border-radius: 50%; border: 3px solid var(--night);
  animation: pr-ring var(--beat) linear infinite; animation-delay: var(--beat-at, 0ms); }
@keyframes pr-ring { 0% { transform: scale(1.5); opacity: 0.3; } 92% { transform: scale(0.6); opacity: 1; } 100% { transform: scale(0.5); opacity: 1; } }
.pr-judge { position: absolute; left: 50%; bottom: 100%; transform: translateX(-50%); display: grid; justify-items: center; font-family: var(--font-display); font-weight: 600; font-size: 16px;
  white-space: nowrap; text-shadow: 0 2px 4px #000; pointer-events: none; animation: pr-judge 0.7s ease-out forwards; z-index: 3; }
.pr-judge small { font-family: inherit; font-size: 12px; color: var(--ivory); }
.pr-judge.is-perfect { color: var(--lime); } .pr-judge.is-good { color: var(--cyan, #4DE3FF); } .pr-judge.is-miss { color: rgba(250, 247, 242, 0.55); }
@keyframes pr-judge { 0% { transform: translate(-50%, 6px) scale(0.6); opacity: 0; } 25% { transform: translate(-50%, 0) scale(1.15); opacity: 1; } 100% { transform: translate(-50%, -18px); opacity: 0; } }

/* a machine = a game: its cabinet (the game's colours) with the game's own picture on its screen, and its mat; standing on
   the mat is a vote. Each one lives in its own column (22 % wide, 24.5 % apart), so nothing lands on anything else. */
.pr-mc { position: absolute; width: 22%; transform: translate(-50%, 0); display: flex; flex-direction: column-reverse; align-items: center; gap: 1px; z-index: 2;
  padding: 0; border: 0; background: none; color: inherit; font: inherit; cursor: pointer; }
.pr-mc:focus-visible { outline: 3px solid var(--lime); outline-offset: 2px; border-radius: 12px; }
.pr-mc:hover .pr-cab { transform: translateY(-2px); }
.pr-cab { width: 68%; aspect-ratio: 3 / 4; border-radius: 10px 10px 4px 4px; background: var(--c1); border: 3px solid var(--bg-inset); position: relative; box-shadow: 0 5px 0 var(--bg-inset);
  display: block; transition: transform 0.15s; }
.pr-scr { position: absolute; inset: 9% 9% 30%; border-radius: 5px; overflow: hidden; background: #000; box-shadow: 0 0 10px rgba(0, 0, 0, 0.5) inset; }
.pr-scr img, .pr-scr video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.pr-pad { position: absolute; left: 30%; right: 30%; bottom: 11%; height: 9%; border-radius: 3px; background: var(--c3); }
.pr-mc.is-on .pr-cab { box-shadow: 0 5px 0 var(--bg-inset), 0 0 18px rgba(210, 255, 77, 0.6); border-color: var(--lime); }
.pr-mn, .pr-ms { display: block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: center; text-shadow: 0 1px 2px #000; }
.pr-mc.is-low { flex-direction: column; }
.pr-mn { font-size: 11px; font-weight: 800; line-height: 1.15; }
.pr-ms { font-size: 10px; line-height: 1.15; color: var(--tx-mid); }
.pr-cnt { position: absolute; bottom: 8%; right: 10%; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: var(--lime); color: var(--night); font-size: 12px; font-weight: 800; display: none; place-items: center; z-index: 3; }
.pr-mc.is-on .pr-cnt { display: grid; }
.pr-mat { position: absolute; width: 17%; height: 6%; transform: translate(-50%, -50%); border-radius: 50%; background: rgba(250, 247, 242, 0.06); border: 2px dashed rgba(250, 247, 242, 0.2); pointer-events: none; transition: background 0.2s, border-color 0.2s, box-shadow 0.2s; }
.pr-mat.is-on { background: rgba(210, 255, 77, 0.16); border: 2px solid var(--lime); }
.pr-mat.is-lead { box-shadow: 0 0 18px rgba(210, 255, 77, 0.55); }

.pr-status { margin: 0 0 10px; min-height: 22px; color: var(--tx-mid); text-align: center; }
.pr-status b { color: var(--lime); }
.pr-bar { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin: 0 auto 10px; max-width: 560px; min-height: 48px; }
.pr-btn { min-height: 48px; padding: 0 22px; border-radius: 999px; border: 0; background: var(--bg-2); color: var(--ivory); font: inherit; font-weight: 700; cursor: pointer; }
.pr-btn.is-go { background: var(--lime); color: var(--night); }
.pr-btn[disabled] { opacity: 0.45; cursor: default; }
.pr-btn:focus-visible { outline: 3px solid var(--lime); outline-offset: 2px; }
.pr-wait { align-self: center; color: var(--tx-lo); }

.pr-podium { position: absolute; left: 50%; top: 42%; transform: translateX(-50%); display: flex; align-items: flex-end; gap: 4px; z-index: 3; pointer-events: none; }
.pr-step { width: 68px; border-radius: 10px 10px 0 0; display: flex; flex-direction: column; align-items: center; padding-top: 4px; color: var(--night); }
.pr-step b { font-family: var(--font-display); font-weight: 600; font-size: 18px; }
.pr-step small { font-size: 10px; font-weight: 700; max-width: 64px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pr-step.is-1 { height: 70px; background: var(--lime); } .pr-step.is-2 { height: 52px; background: var(--violet); } .pr-step.is-3 { height: 38px; background: var(--cyan); }
.pr-five { position: absolute; z-index: 300; font-size: 28px; transform: translate(-50%, 0); pointer-events: none; animation: pr-five 0.9s ease-out forwards; }
@keyframes pr-five { 0% { transform: translate(-50%, 0) scale(0.3); opacity: 0; } 30% { transform: translate(-50%, 0) scale(1.3); opacity: 1; } 100% { transform: translate(-50%, -30px); opacity: 0; } }

.pr-room { --beat: 500ms; }
.pr-p { position: absolute; width: calc(var(--av, 58px) + 12px); height: calc(var(--av, 58px) + 26px); margin: calc(-1 * (var(--av, 58px) + 20px)) 0 0 calc(-0.5 * (var(--av, 58px) + 12px)); padding: 0; display: flex; flex-direction: column; align-items: center; background: none; border: 0; color: inherit; font: inherit; cursor: pointer; }
.pr-p:focus-visible { outline: 3px solid var(--lime); outline-offset: 2px; border-radius: 16px; }
.pr-p .pab-av { filter: drop-shadow(0 5px 4px rgba(0, 0, 0, 0.45)); transform-origin: 50% 100%; }
.pr-p.is-walking .pab-av { animation: pr-bob 0.28s ease-in-out infinite alternate; }
.pr-p.is-hop .pab-av { animation: pr-hop 0.5s linear; }
.pr-p.is-away { opacity: 0.45; }
.pr-p.is-dancing .pab-av { animation: pr-dance calc(2 * var(--beat, 500ms)) ease-in-out infinite; animation-delay: var(--beat-at, 0ms); }
/* Every jump falls with real gravity (the user, 2026-11-26: «cuando saltan parece que flotaran; cartoon y divertidas pero con una
   gravedad real»): the feet stay down a moment, a crouch, a stretched takeoff, a parabola in the air — fast off the floor, slowing to
   the top, speeding back down (cubic-bezier(.33,.67,.67,1) up, cubic-bezier(.33,0,.67,.33) down) — and a squash on landing, always on the beat, that springs back. */
/* two beats: a bounce on each, leaning left then right (the metronome swinging) */
@keyframes pr-dance {
  0% { transform: translateY(0) rotate(-12deg) scale(1.14, .86); animation-timing-function: cubic-bezier(.2,.9,.3,1); } 9% { transform: translateY(0) rotate(-10deg) scale(.97, 1.03); animation-timing-function: cubic-bezier(.4,0,.6,1); }
  13% { transform: translateY(0) rotate(-8deg) scale(.9, 1.12); animation-timing-function: cubic-bezier(.33,.67,.67,1); } 31% { transform: translateY(-11px) rotate(0deg) scale(1, 1); animation-timing-function: cubic-bezier(.33,0,.67,.33); }
  50% { transform: translateY(0) rotate(12deg) scale(1.14, .86); animation-timing-function: cubic-bezier(.2,.9,.3,1); } 59% { transform: translateY(0) rotate(10deg) scale(.97, 1.03); animation-timing-function: cubic-bezier(.4,0,.6,1); }
  63% { transform: translateY(0) rotate(8deg) scale(.9, 1.12); animation-timing-function: cubic-bezier(.33,.67,.67,1); } 81% { transform: translateY(-11px) rotate(0deg) scale(1, 1); animation-timing-function: cubic-bezier(.33,0,.67,.33); }
  100% { transform: translateY(0) rotate(-12deg) scale(1.14, .86); } }
/* four more dances, each two beats long like pr-dance (data-dance from the player's place in the party) */
.pr-p.is-dancing[data-dance="1"] .pab-av, .pr-dancer[data-dance="1"] .pab-av { animation-name: pr-dance-hop; }
.pr-p.is-dancing[data-dance="2"] .pab-av, .pr-dancer[data-dance="2"] .pab-av { animation-name: pr-dance-step; }
.pr-p.is-dancing[data-dance="3"] .pab-av, .pr-dancer[data-dance="3"] .pab-av { animation-name: pr-dance-bounce; }
.pr-p.is-dancing[data-dance="4"] .pab-av, .pr-dancer[data-dance="4"] .pab-av { animation-name: pr-dance-twist; }
.pr-dancer .pab-av { animation: pr-dance calc(2 * var(--beat, 500ms)) ease-in-out infinite; animation-delay: var(--beat-at, 0ms); transform-origin: 50% 100%; }
/* a big jump on every beat: crouch, launch stretched, stretch more as it falls, squash flat on the beat */
@keyframes pr-dance-hop {
  0% { transform: translateY(0) scale(1.2, .8); animation-timing-function: cubic-bezier(.2,.9,.3,1); } 7% { transform: translateY(0) scale(.96, 1.04); animation-timing-function: cubic-bezier(.4,0,.6,1); } 11% { transform: translateY(0) scale(1.1, .9); animation-timing-function: ease-in; }
  15% { transform: translateY(0) scale(.86, 1.16); animation-timing-function: cubic-bezier(.33,.67,.67,1); } 32.5% { transform: translateY(-20px) scale(1, 1); animation-timing-function: cubic-bezier(.33,0,.67,.33); }
  50% { transform: translateY(0) scale(1.2, .8); animation-timing-function: cubic-bezier(.2,.9,.3,1); } 57% { transform: translateY(0) scale(.96, 1.04); animation-timing-function: cubic-bezier(.4,0,.6,1); } 61% { transform: translateY(0) scale(1.1, .9); animation-timing-function: ease-in; }
  65% { transform: translateY(0) scale(.86, 1.16); animation-timing-function: cubic-bezier(.33,.67,.67,1); } 82.5% { transform: translateY(-20px) scale(1, 1); animation-timing-function: cubic-bezier(.33,0,.67,.33); }
  100% { transform: translateY(0) scale(1.2, .8); } }
/* a step to each side, one per beat: a little hop across, landing planted on the other foot */
@keyframes pr-dance-step {
  0% { transform: translate(-9px, 0) rotate(-6deg) scale(1.1, .9); animation-timing-function: cubic-bezier(.2,.9,.3,1); } 10% { transform: translate(-8px, 0) rotate(-5deg) scale(.94, 1.07); animation-timing-function: cubic-bezier(.33,.67,.67,1); }
  30% { transform: translate(0, -8px) rotate(0deg) scale(1, 1); animation-timing-function: cubic-bezier(.33,0,.67,.33); }
  50% { transform: translate(9px, 0) rotate(6deg) scale(1.1, .9); animation-timing-function: cubic-bezier(.2,.9,.3,1); } 60% { transform: translate(8px, 0) rotate(5deg) scale(.94, 1.07); animation-timing-function: cubic-bezier(.33,.67,.67,1); }
  80% { transform: translate(0, -8px) rotate(0deg) scale(1, 1); animation-timing-function: cubic-bezier(.33,0,.67,.33); }
  100% { transform: translate(-9px, 0) rotate(-6deg) scale(1.1, .9); } }
/* two little hops on the first beat's eighths, then a big jump on the second (it replaced the robot, which only snapped between poses:
   the user, 2026-11-26, «todas menos esa») */
@keyframes pr-dance-bounce {
  0% { transform: translateY(0) scale(1.14, .86); animation-timing-function: cubic-bezier(.2,.9,.3,1); } 4% { transform: translateY(0) scale(.93, 1.08); animation-timing-function: cubic-bezier(.33,.67,.67,1); } 12.5% { transform: translateY(-7px) scale(1, 1); animation-timing-function: cubic-bezier(.33,0,.67,.33); }
  25% { transform: translateY(0) scale(1.1, .9); animation-timing-function: cubic-bezier(.2,.9,.3,1); } 29% { transform: translateY(0) scale(.93, 1.08); animation-timing-function: cubic-bezier(.33,.67,.67,1); } 37.5% { transform: translateY(-7px) scale(1, 1); animation-timing-function: cubic-bezier(.33,0,.67,.33); }
  50% { transform: translateY(0) scale(1.12, .88); animation-timing-function: cubic-bezier(.2,.9,.3,1); } 55% { transform: translateY(0) scale(1.16, .84); animation-timing-function: ease-in; }
  60% { transform: translateY(0) scale(.84, 1.18); animation-timing-function: cubic-bezier(.33,.67,.67,1); } 80% { transform: translateY(-22px) scale(1, 1); animation-timing-function: cubic-bezier(.33,0,.67,.33); }
  100% { transform: translateY(0) scale(1.14, .86); } }
/* a twist: squash down, a hop on the first beat, a higher hop with a spin on the second */
@keyframes pr-dance-twist {
  0% { transform: translateY(0) rotateY(0deg) scale(1.16, .84); animation-timing-function: cubic-bezier(.2,.9,.3,1); } 8% { transform: translateY(0) rotateY(0deg) scale(.9, 1.12); animation-timing-function: cubic-bezier(.33,.67,.67,1); }
  29% { transform: translateY(-9px) rotateY(0deg) scale(1, 1); animation-timing-function: cubic-bezier(.33,0,.67,.33); }
  50% { transform: translateY(0) rotateY(0deg) scale(1.16, .84); animation-timing-function: cubic-bezier(.2,.9,.3,1); } 56% { transform: translateY(0) rotateY(0deg) scale(.88, 1.14); animation-timing-function: cubic-bezier(.33,.67,.67,1); }
  78% { transform: translateY(-15px) rotateY(180deg) scale(1, 1); animation-timing-function: cubic-bezier(.33,0,.67,.33); }
  100% { transform: translateY(0) rotateY(360deg) scale(1.16, .84); } }
@media (prefers-reduced-motion: reduce) { .pr-p.is-dancing .pab-av, .pr-dancer .pab-av { animation: none !important; } }
.pr-crown { display: none; }
.pr-p.is-host .pr-crown { display: inline; }
@keyframes pr-bob { from { transform: translateY(0) rotate(-4deg); } to { transform: translateY(-4px) rotate(4deg); } }
/* one hop (a tap on a player): crouch, up and down on the parabola, squash, settle */
@keyframes pr-hop { 0% { transform: translateY(0) scale(1.1, .9); animation-timing-function: ease-out; } 12% { transform: translateY(0) scale(.88, 1.14); animation-timing-function: cubic-bezier(.33,.67,.67,1); }
  44% { transform: translateY(-20px) scale(1, 1); animation-timing-function: cubic-bezier(.33,0,.67,.33); } 76% { transform: translateY(0) scale(1.18, .82); animation-timing-function: cubic-bezier(.2,.9,.3,1); } 100% { transform: translateY(0) scale(1, 1); } }
.pr-shadow { position: absolute; bottom: 18px; width: 62%; height: 9px; border-radius: 50%; background: rgba(0, 0, 0, 0.35); z-index: -1; }
.pr-tag { position: absolute; bottom: calc(100% + 4px); left: 50%; transform: translateX(-50%); display: inline-flex; align-items: center; gap: 3px; padding: 0 7px; border-radius: 999px; background: rgba(19, 19, 27, 0.82); font-size: 11px; font-weight: 700; white-space: nowrap; opacity: 0; visibility: hidden; pointer-events: none; }
.pr-p.is-named .pr-tag { opacity: 1; visibility: visible; }
.pr-p.is-named .pr-bub { bottom: calc(100% + 28px); }
.pr-p.is-me .pr-tag { background: var(--lime); color: var(--night); }
.pr-crown { color: #FFD34D; }
.pr-bub { position: absolute; bottom: calc(100% - 6px); left: 50%; transform: translate(-50%, 4px); max-width: 170px; width: max-content; padding: 5px 10px; border-radius: 14px 14px 14px 4px;
  background: var(--ivory); color: var(--night); font-weight: 700; font-size: 13px; line-height: 1.25; opacity: 0; transition: opacity 0.2s, transform 0.2s; pointer-events: none; z-index: 2; }
.pr-bub.is-on { opacity: 1; transform: translate(-50%, -4px); }
.pr-bub svg { width: 28px; height: 28px; display: block; }
.pr-tap { position: absolute; width: 24px; height: 10px; margin: -5px 0 0 -12px; border-radius: 50%; border: 2px solid var(--lime); pointer-events: none; animation: pr-tap 0.6s ease-out forwards; }
@keyframes pr-tap { from { transform: scale(0.4); opacity: 1; } to { transform: scale(1.6); opacity: 0; } }

.pr-card { position: absolute; left: 50%; bottom: 12px; transform: translateX(-50%); width: min(92%, 340px); z-index: 200; padding: 16px; border-radius: 24px; background: var(--bg-2);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5); display: grid; gap: 12px; cursor: default; }
.pr-who { display: flex; align-items: center; gap: 12px; }
.pr-who b { display: block; font-family: var(--font-display); font-weight: 600; font-size: 18px; }
.pr-who small { color: var(--tx-lo); }
.pr-acts { display: flex; gap: 8px; flex-wrap: wrap; }
.pr-acts button { min-height: 48px; padding: 0 18px; border-radius: 999px; border: 0; background: var(--bg-3); color: var(--ivory); font: inherit; font-weight: 700; cursor: pointer; }
.pr-acts .is-go { background: var(--lime); color: var(--night); }
.pr-card.is-game { top: 50%; bottom: auto; transform: translate(-50%, -50%); max-height: 94%; overflow-y: auto; }
.pr-prev { border-radius: 16px; overflow: hidden; background: #000; aspect-ratio: 9 / 12; max-height: 46vh; margin: 0 auto; }
.pr-prev.is-wide { aspect-ratio: 16 / 9; }
.pr-prev video, .pr-prev img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pr-x { position: absolute; top: 8px; right: 8px; z-index: 1; width: 36px; height: 36px; border-radius: 50%; border: 0; background: var(--bg-3); color: var(--ivory); cursor: pointer; }

.pr-hint { text-align: center; color: var(--tx-faint); font-size: 13px; margin: 8px 0 12px; }
/* the chat: beside the room on a wide screen; on a phone held at the bottom of the screen (its log opens taller with a tap) */
.pr-chat { border-radius: 24px; background: var(--bg-1); border: 1px solid var(--bg-3); }
.pr-chat-h { width: 100%; display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px; border: 0; background: none; color: var(--ivory); font: inherit; font-weight: 700; text-align: left; cursor: pointer; }
.pr-chat-h:focus-visible { outline: 3px solid var(--lime); outline-offset: -3px; border-radius: 20px; }
.pr-dot { width: 9px; height: 9px; border-radius: 50%; background: #FF3B4E; }
.pr-dot[hidden] { display: none; }
.pr-caret { margin-left: auto; width: 10px; height: 10px; border: solid var(--tx-mid); border-width: 2px 2px 0 0; transform: rotate(-45deg); transition: transform 0.2s; }
.pr-chat.is-open .pr-caret { transform: rotate(135deg); }
.pr-log { list-style: none; margin: 0; padding: 4px 16px 6px; display: flex; flex-direction: column; gap: 6px; height: 150px; overflow-y: auto; }
.pr-main { max-width: 560px; margin: 0 auto 24px; }
@media (max-width: 959px) {
  .pr-chat { position: sticky; bottom: 0; z-index: 400; margin-top: 8px; border-radius: 20px 20px 0 0; border-bottom: 0; box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.5); padding-bottom: env(safe-area-inset-bottom); }
  .pr-log { height: 0; padding-top: 0; padding-bottom: 0; transition: height 0.2s; }
  .pr-chat.is-open .pr-log { height: 38vh; padding-top: 4px; }
  .pr-chat-h { min-height: 40px; }
  .pr-type { padding-bottom: 10px; }
}
@media (min-width: 960px) {
  .pr-main { max-width: 1000px; display: grid; grid-template-columns: minmax(0, 580px) minmax(300px, 380px); gap: 24px; justify-content: center; align-items: start; }
  .pr-main .pr-room { max-width: min(500px, calc((100vh - 230px) * 2 / 3)); min-width: 380px; }
  .pr-chat { position: sticky; top: 16px; display: flex; flex-direction: column; height: min(calc(100vh - 32px), 800px); }
  .pr-chat-h { cursor: default; pointer-events: none; }
  .pr-caret, .pr-dot { display: none !important; }
  .pr-log { flex: 1; height: auto; min-height: 0; }
  .pr-compose { flex-wrap: wrap; overflow: visible; }
}
.pr-log li { display: flex; gap: 8px; align-items: baseline; font-size: 15px; line-height: 1.35; }
.pr-log li b { flex: none; }
.pr-log li span { min-width: 0; overflow-wrap: anywhere; color: var(--tx-mid); }
.pr-log li.is-sys span { color: var(--tx-faint); font-style: italic; }
.pr-emo-msg svg { width: 26px; height: 26px; vertical-align: middle; }
.pr-compose { display: flex; gap: 6px; padding: 0 12px 12px; overflow-x: auto; scrollbar-width: none; }
.pr-compose button { flex: none; min-height: 40px; padding: 0 14px; border-radius: 999px; border: 0; background: var(--bg-2); color: var(--ivory); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
.pr-compose .pr-emo { width: 40px; padding: 0; display: grid; place-items: center; }
.pr-compose .pr-emo svg { width: 26px; height: 26px; }
.pr-type { display: flex; gap: 8px; padding: 0 12px 12px; }
.pr-type input { flex: 1; min-width: 0; min-height: 48px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--bg-3); background: var(--bg-inset); color: var(--ivory); font: inherit; }

.pr-empty { display: grid; justify-items: center; gap: 16px; padding: 48px 0; text-align: center; }
.pr-empty img { width: 96px; }

/* the way in (party-invite.js; the user, 2026-11-21: «que la gente entienda el concepto»): the host's Invite, the invite open
   on the room while nobody else is here, the three steps with the one this player is on lit, and a first visit's guide */
.pr-inv { margin-left: auto; align-self: center; min-height: 44px; padding: 0 18px; border-radius: 999px; border: 0; background: var(--ivory); color: var(--night); font: inherit; font-weight: 800; cursor: pointer; }
.pr-inv:focus-visible { outline: 3px solid var(--lime); outline-offset: 2px; }
.pr-invite { margin: 0 0 14px; padding: 16px; border-radius: 24px; background: var(--bg-2); display: grid; gap: 12px; }
.pr-invite[hidden] { display: none; }
.pr-invite h2, .pr-dlg h2 { margin: 0; font-family: var(--font-display); font-weight: 600; font-size: 20px; }
.pr-wait-l { margin: 0; text-align: center; color: var(--tx-mid); font-weight: 600; }
.pr-steps { list-style: none; margin: 0 0 10px; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.pr-steps li { display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 40px; padding: 4px 8px; border-radius: 14px; background: var(--bg-2); color: var(--tx-mid);
  font-size: 13px; font-weight: 700; line-height: 1.2; text-align: center; }
.pr-steps b { flex: none; display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--bg-3); color: var(--ivory); font-size: 12px; }
.pr-steps li.is-on { background: var(--lime); color: var(--night); }
.pr-steps li.is-on b { background: var(--night); color: var(--lime); }
.pr-steps li.is-done b { background: var(--violet); color: var(--night); }
.pr-coach { top: 50%; bottom: auto; transform: translate(-50%, -50%); background: var(--ivory); color: var(--night); }
.pr-coach b { font-family: var(--font-display); font-weight: 600; font-size: 18px; }
.pr-coach p { margin: 0; line-height: 1.4; }
.pr-coach .pr-acts .is-go { background: var(--night); color: var(--lime); }
.pr-dlg { width: min(92vw, 400px); padding: 20px; border: 0; border-radius: 24px; background: var(--bg-2); color: var(--ivory); }
.pr-dlg[open] { display: grid; gap: 14px; }
.pr-dlg::backdrop { background: rgba(11, 11, 16, 0.7); }
/* the invite itself: the QR on ivory beside the code, then Send the invite (the one action) */
.pi { display: grid; gap: 10px; }
.pi-card { display: flex; align-items: center; gap: 14px; padding: 14px; border-radius: 20px; background: var(--ivory); color: var(--night); }
.pi-qr { flex: none; width: 132px; height: 132px; }
.pi-qr svg { display: block; width: 100%; height: 100%; }
.pi-words { display: grid; gap: 4px; min-width: 0; }
.pi-l { font-size: 13px; font-weight: 600; color: #55526A; }
.pi-code { justify-self: start; min-height: 44px; padding: 0; border: 0; background: none; color: var(--night); font-family: var(--font-display); font-weight: 600; font-size: 26px; letter-spacing: 0.04em; cursor: copy; }
.pi-code:focus-visible { outline: 3px solid var(--violet-deep); outline-offset: 2px; border-radius: 8px; }
.pi-send { min-height: 56px; border-radius: 999px; border: 0; background: var(--lime); color: var(--night); font-family: var(--font-display); font-weight: 600; font-size: 18px; cursor: pointer; }
.pi-send:focus-visible { outline: 3px solid var(--ivory); outline-offset: 2px; }
.pi-help { margin: 0; text-align: center; color: var(--tx-lo); font-size: 13px; }
.pi-code { white-space: nowrap; }
@media (max-width: 440px) { .pi-card { gap: 12px; padding: 12px; } .pi-qr { width: 112px; height: 112px; } .pi-code { font-size: 22px; } }
@media (max-width: 340px) { .pi-qr { width: 96px; height: 96px; } .pi-code { font-size: 19px; } }

@media (prefers-reduced-motion: reduce) { .pr-p .pab-av, .pr-tap, .pr-dance, .pr-five, .pr-beat-ring, .pr-judge { animation: none !important; } .pr-p, .pr-cab, .pr-log { transition: none !important; } }
