:root {
  --felt: #145048;
  --felt-dark: #0d3632;
  --felt-light: #1c6359;
  --panel: #0f2e2b;
  --panel-2: #163e3a;
  --line: rgba(255, 255, 255, .09);
  --text: #eef4ef;
  --muted: #9fbab3;
  --accent: #f2b33d;
  --accent-ink: #2a1c00;
  --danger: #ff6b5e;
  --ok: #6fd39a;

  --tile: #f7f0de;
  --tile-edge: #d8c9a2;
  --t-black: #1c1c22;
  --t-red: #d1342f;
  --t-blue: #1f5fc4;
  --t-orange: #e38a00;

  --tw: 44px;
  --th: 60px;
  --radius: 14px;
  font-family: 'Nunito', system-ui, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  color: var(--text);
  background:
    radial-gradient(1200px 700px at 30% 20%, var(--felt-light), transparent 70%),
    radial-gradient(900px 600px at 80% 90%, #0f453e, transparent 70%),
    var(--felt-dark);
  min-height: 100vh;
  -webkit-tap-highlight-color: transparent;
}
.hidden { display: none !important; }
.muted { color: var(--muted); }
button { font: inherit; cursor: pointer; }
input, select { font: inherit; }

/* ---------- botones ---------- */
.btn {
  border: 0; border-radius: 10px; padding: 10px 16px; font-weight: 700;
  background: var(--panel-2); color: var(--text); box-shadow: inset 0 0 0 1px var(--line);
  transition: transform .08s, filter .15s, opacity .15s;
}
.btn:hover:not(:disabled) { filter: brightness(1.15); }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:disabled { opacity: .4; cursor: not-allowed; }
.btn.primary { background: var(--accent); color: var(--accent-ink); box-shadow: 0 3px 0 #b07a17; }
.btn.ghost { background: transparent; }
.btn.big { padding: 14px 20px; font-size: 1.05rem; width: 100%; }
.btn.sm { padding: 8px 12px; font-size: .9rem; }
.chip {
  border: 0; border-radius: 999px; padding: 6px 12px; font-size: .85rem; font-weight: 700;
  background: rgba(255,255,255,.08); color: var(--text);
}
.chip:hover { background: rgba(255,255,255,.15); }
.chip.voice.on { background: var(--ok); color: #06301a; }
.chip.muted-on { background: var(--danger); color: #2b0603; }
.link-btn { background: none; border: 0; color: var(--muted); text-decoration: underline; margin-top: 18px; }

/* ---------- logo / fichas de letras ---------- */
.lt {
  display: inline-grid; place-items: center; width: 64px; height: 86px; margin: 0 4px;
  background: var(--tile); border-radius: 10px; font-family: 'Fredoka', sans-serif; font-weight: 700;
  font-size: 52px; box-shadow: 0 2px 0 var(--tile-edge), 0 8px 18px rgba(0,0,0,.35);
}
.lt:nth-child(odd) { transform: rotate(-4deg); }
.lt:nth-child(even) { transform: rotate(3deg) translateY(4px); }
.lt.sm { width: 28px; height: 38px; font-size: 22px; border-radius: 6px; margin: 0; transform: none; }
.c-black { color: var(--t-black); } .c-red { color: var(--t-red); }
.c-blue { color: var(--t-blue); } .c-orange { color: var(--t-orange); }

/* ---------- portada ---------- */
#home { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.home-card {
  width: min(420px, 100%); text-align: center; background: rgba(9, 32, 29, .72);
  border-radius: 22px; padding: 32px 26px; box-shadow: 0 30px 80px rgba(0,0,0,.4), inset 0 0 0 1px var(--line);
  backdrop-filter: blur(6px);
}
.logo { margin: 0 0 8px; line-height: 1; }
.tagline { color: var(--muted); margin: 18px 0 26px; }
.field { display: grid; gap: 6px; text-align: left; margin-bottom: 16px; font-weight: 700; font-size: .9rem; color: var(--muted); }
.field.inline { margin: 0; }
.field input, .field select, .join-row input, .chat-form input {
  width: 100%; padding: 12px 14px; border-radius: 10px; border: 0; color: var(--text);
  background: rgba(255,255,255,.07); box-shadow: inset 0 0 0 1px var(--line); outline: none;
}
.field select option { color: #111; }
input:focus, select:focus { box-shadow: inset 0 0 0 2px var(--accent) !important; }
.divider { display: flex; align-items: center; gap: 10px; margin: 22px 0 14px; color: var(--muted); font-size: .85rem; }
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.join-row { display: flex; gap: 8px; }
.join-row input { text-transform: uppercase; letter-spacing: .3em; text-align: center; font-weight: 800; }

/* ---------- barra superior ---------- */
#room { height: 100vh; height: 100dvh; display: flex; flex-direction: column; }
.topbar {
  position: relative; display: flex; align-items: center; gap: 16px; padding: 10px 16px;
  background: rgba(6, 24, 22, .7); border-bottom: 1px solid var(--line); flex-wrap: wrap;
}
.room-code { display: flex; align-items: center; gap: 8px; color: var(--muted); }
.room-code strong { color: var(--text); letter-spacing: .15em; font-size: 1.05rem; }
.turn-info { flex: 1; text-align: center; font-weight: 800; min-width: 160px; }
.turn-info .mine { color: var(--accent); }
.turn-info .time { font-variant-numeric: tabular-nums; margin-left: 8px; color: var(--muted); font-weight: 700; }
.turn-info .time.low { color: var(--danger); }
.top-actions { display: flex; gap: 8px; align-items: center; }
.pool { font-weight: 800; color: var(--muted); font-size: .9rem; margin-right: 4px; }
.timer-bar { position: absolute; left: 0; right: 0; bottom: -1px; height: 3px; }
#timerFill { height: 100%; width: 0; background: var(--accent); transition: width .25s linear; }
#timerFill.low { background: var(--danger); }

/* ---------- layout ---------- */
.layout { flex: 1; display: grid; grid-template-columns: 1fr 320px; min-height: 0; }
.board { display: flex; flex-direction: column; min-height: 0; min-width: 0; }
.side { display: flex; flex-direction: column; gap: 10px; padding: 10px; background: rgba(5, 22, 20, .55); border-left: 1px solid var(--line); min-height: 0; }
.panel { background: var(--panel); border-radius: var(--radius); padding: 12px; box-shadow: inset 0 0 0 1px var(--line); }
.panel h3 { margin: 0 0 8px; font-size: .8rem; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.panel-head h3 { margin: 0; }
.voice-ctl { display: flex; gap: 6px; }

/* ---------- jugadores ---------- */
.players { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 6px; }
.players li {
  display: grid; grid-template-columns: 34px 1fr auto; align-items: center; gap: 10px;
  padding: 8px; border-radius: 10px; background: rgba(255,255,255,.03); border: 1px solid transparent;
}
.players li.turn { border-color: var(--accent); background: rgba(242,179,61,.1); }
.players li.off { opacity: .45; }
.avatar {
  width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 800;
  color: #fff; position: relative; transition: box-shadow .12s;
}
.players li.speaking .avatar { box-shadow: 0 0 0 3px var(--ok), 0 0 14px var(--ok); }
.pname { font-weight: 800; line-height: 1.15; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pmeta { font-size: .78rem; color: var(--muted); display: flex; gap: 8px; flex-wrap: wrap; }
.badge { font-size: .7rem; font-weight: 800; padding: 1px 6px; border-radius: 6px; background: rgba(255,255,255,.1); }
.badge.open { background: rgba(111,211,154,.18); color: var(--ok); }
.pcount { text-align: right; font-weight: 800; font-size: 1.1rem; font-variant-numeric: tabular-nums; }
.pcount small { display: block; font-size: .7rem; color: var(--muted); font-weight: 700; }

/* ---------- chat ---------- */
.chat { flex: 1; display: flex; flex-direction: column; min-height: 220px; }
.chat-log { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 6px; padding-right: 4px; min-height: 0; }
.msg { font-size: .9rem; line-height: 1.35; word-wrap: break-word; }
.msg b { margin-right: 4px; }
.msg.sys { color: var(--muted); font-size: .8rem; font-style: italic; }
.chat-form { display: flex; gap: 6px; margin-top: 8px; }
.chat-form input { padding: 9px 12px; }

/* ---------- sala de espera ---------- */
.lobby { margin: auto; width: min(520px, calc(100% - 32px)); padding: 28px; background: rgba(9, 32, 29, .7); border-radius: 20px; box-shadow: inset 0 0 0 1px var(--line); }
.lobby h2 { margin: 0 0 6px; font-family: 'Fredoka', sans-serif; }
.lobby-players { list-style: none; padding: 0; margin: 18px 0; display: grid; gap: 8px; }
.lobby-players li { display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: rgba(255,255,255,.05); border-radius: 10px; font-weight: 700; }
.lobby-players li.empty { opacity: .4; font-weight: 600; font-style: italic; }
.host-controls { display: grid; gap: 14px; }

/* ---------- mesa ---------- */
.game { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.table {
  flex: 1; overflow: auto; padding: 18px; display: flex; flex-wrap: wrap; align-content: flex-start; gap: 18px 22px;
}
.table .empty-msg { margin: auto; color: var(--muted); font-weight: 700; text-align: center; opacity: .7; }
.set {
  display: flex; gap: 3px; padding: 6px; border-radius: 12px; min-height: calc(var(--th) + 12px);
  background: rgba(0,0,0,.14); box-shadow: inset 0 0 0 2px transparent; transition: box-shadow .15s, background .15s;
  position: relative;
}
.set.invalid { box-shadow: inset 0 0 0 2px var(--danger); background: rgba(255,107,94,.1); }
.set.locked { opacity: .78; }
.set.drop-hover, .new-set.drop-hover, .rack.drop-hover { box-shadow: inset 0 0 0 2px var(--accent); background: rgba(242,179,61,.12); }
.set.targetable { cursor: copy; }
.new-set {
  display: grid; place-items: center; min-width: 140px; min-height: calc(var(--th) + 12px); padding: 0 16px;
  border: 2px dashed rgba(255,255,255,.25); border-radius: 12px; color: var(--muted); font-weight: 800; font-size: .9rem;
  cursor: copy; user-select: none;
}
.insert-mark { width: 4px; margin: 0 -3px; border-radius: 2px; background: var(--accent); align-self: stretch; }

/* ---------- atril ---------- */
.rack-zone { padding: 10px 14px 14px; background: linear-gradient(180deg, rgba(5,22,20,.0), rgba(5,22,20,.55)); }
.controls { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; flex-wrap: wrap; }
.status { font-weight: 700; color: var(--muted); font-size: .92rem; }
.status .warn { color: var(--danger); }
.status .good { color: var(--ok); }
.btns { display: flex; gap: 6px; flex-wrap: wrap; }
.rack {
  display: flex; flex-wrap: wrap; gap: 4px; padding: 10px 12px 14px; min-height: calc(var(--th) + 26px);
  border-radius: 12px; align-content: flex-start;
  background: linear-gradient(180deg, #8a5a2b, #6a4119 70%, #4f2f10);
  box-shadow: inset 0 2px 0 rgba(255,255,255,.2), inset 0 -4px 0 rgba(0,0,0,.25), 0 8px 20px rgba(0,0,0,.35);
}

/* ---------- ficha ---------- */
.tile {
  width: var(--tw); height: var(--th); flex: none; border-radius: 7px; background: var(--tile);
  display: grid; place-items: center; position: relative; user-select: none; touch-action: none;
  box-shadow: 0 2px 0 var(--tile-edge), 0 3px 6px rgba(0,0,0,.3);
  font-family: 'Fredoka', sans-serif; font-weight: 700; font-size: 27px; line-height: 1;
  cursor: grab; transition: transform .1s, box-shadow .1s;
}
.tile::after { /* el punto de la ficha original */
  content: ''; position: absolute; bottom: 7px; width: 9px; height: 9px; border-radius: 50%;
  background: rgba(0,0,0,.06); box-shadow: inset 0 1px 2px rgba(0,0,0,.18);
}
.tile.joker::after { display: none; }
.tile .face { margin-top: -10px; }
.tile.joker .face { margin-top: -2px; width: 30px; height: 30px; }
.tile.fixed { cursor: default; }
.tile.fresh { background: #fff6c9; box-shadow: 0 2px 0 #e2c34f, 0 0 0 2px rgba(242,179,61,.55), 0 3px 6px rgba(0,0,0,.3); }
.tile.new-in-rack { animation: pop .6s ease; box-shadow: 0 2px 0 var(--tile-edge), 0 0 0 3px var(--ok); }
.tile.selected { transform: translateY(-6px); box-shadow: 0 2px 0 var(--tile-edge), 0 0 0 3px var(--accent), 0 10px 14px rgba(0,0,0,.35); }
.tile.dragging-src { opacity: .25; }
@keyframes pop { 0% { transform: scale(.6); } 60% { transform: scale(1.1); } 100% { transform: scale(1); } }

.drag-ghost { position: fixed; z-index: 1000; pointer-events: none; display: flex; gap: 3px; transform: translate(-50%, -60%) rotate(-3deg); }
.drag-ghost .tile { box-shadow: 0 14px 26px rgba(0,0,0,.45); }
body.is-dragging, body.is-dragging * { cursor: grabbing !important; }

/* ---------- modales y avisos ---------- */
.modal { position: fixed; inset: 0; z-index: 900; background: rgba(0,0,0,.55); display: grid; place-items: center; padding: 16px; }
.modal-card { position: relative; background: var(--panel); border-radius: 18px; padding: 26px; width: min(560px, 100%); max-height: 90vh; overflow: auto; box-shadow: 0 30px 80px rgba(0,0,0,.5), inset 0 0 0 1px var(--line); }
.modal-card h2 { margin-top: 0; font-family: 'Fredoka', sans-serif; }
.modal-card.rules p, .modal-card.rules li { line-height: 1.5; }
.close { position: absolute; top: 10px; right: 12px; background: none; border: 0; color: var(--muted); font-size: 28px; }
.results { width: 100%; border-collapse: collapse; margin: 14px 0; font-size: .92rem; }
.results th, .results td { padding: 8px 6px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
.results th { color: var(--muted); font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; }
.results .mini { display: flex; flex-wrap: wrap; gap: 2px; }
.results .mini .tile { --tw: 22px; --th: 30px; font-size: 14px; border-radius: 4px; cursor: default; }
.results .mini .tile::after { display: none; }
.results .mini .tile .face { margin: 0; }
.results .mini .tile.joker .face { width: 16px; height: 16px; }
.results .pos { color: var(--ok); font-weight: 800; }
.results .neg { color: var(--danger); font-weight: 800; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }

.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(20px); z-index: 1100;
  background: #1d2725; color: var(--text); padding: 12px 18px; border-radius: 12px; font-weight: 700;
  box-shadow: 0 10px 30px rgba(0,0,0,.45), inset 0 0 0 1px var(--line); opacity: 0; pointer-events: none;
  transition: opacity .2s, transform .2s; max-width: calc(100% - 32px); text-align: center;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.error { background: #4a1714; }
.toast.info { background: #173a33; }

/* ---------- móvil ---------- */
@media (max-width: 900px) {
  :root { --tw: 34px; --th: 47px; }
  .tile { font-size: 21px; border-radius: 5px; }
  .tile::after { width: 6px; height: 6px; bottom: 5px; }
  .tile .face { margin-top: -7px; }
  .tile.joker .face { width: 22px; height: 22px; }
  #room { height: auto; min-height: 100dvh; }
  .layout { grid-template-columns: 1fr; }
  .board { min-height: 72dvh; }
  .side { border-left: 0; border-top: 1px solid var(--line); }
  .chat { min-height: 300px; }
  .table { padding: 12px; gap: 12px 14px; }
  .topbar { gap: 8px 12px; padding: 8px 12px; }
  .turn-info { order: 5; flex-basis: 100%; }
  .brand-mini { display: none; }
  .lt { width: 52px; height: 70px; font-size: 42px; margin: 0 2px; }
}

/* =========================================================
   EMOTES
   ========================================================= */
.board { position: relative; }
.emote-btn { font-size: 1rem; padding: 6px 12px 6px 8px; display: inline-flex; align-items: center; gap: 6px; }
.emote-btn .emo { width: 22px; height: 24px; }
.emote-btn .emo * { animation: none !important; }
.emote-btn.cooling { opacity: .5; }

.emote-picker {
  position: fixed; z-index: 950; width: min(360px, calc(100vw - 24px));
  background: var(--panel); border-radius: 16px; padding: 12px;
  box-shadow: 0 20px 50px rgba(0,0,0,.5), inset 0 0 0 1px var(--line);
}
.emote-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.emote-grid button {
  background: rgba(255,255,255,.05); border: 0; border-radius: 12px; padding: 6px 2px 4px;
  color: var(--muted); font-size: .7rem; font-weight: 700; display: grid; justify-items: center; gap: 2px;
}
.emote-grid button:hover { background: rgba(255,255,255,.12); color: var(--text); }
.emote-grid .emo { width: 56px; height: 60px; }
.emote-grid .emo * { animation-play-state: paused; }
.emote-grid button:hover .emo * { animation-play-state: running; }
.emote-phrases { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.emote-phrases button { border: 0; border-radius: 999px; padding: 7px 12px; font-weight: 800; background: var(--tile); color: #2a2320; font-size: .85rem; }
.emote-phrases button:hover { filter: brightness(1.08); }
.emote-mute { display: flex; align-items: center; gap: 8px; margin-top: 12px; font-size: .82rem; color: var(--muted); font-weight: 700; }
.emote-picker:has(button:disabled) .emote-grid, .emote-picker:has(button:disabled) .emote-phrases { opacity: .45; }

.emote-stage {
  position: absolute; top: 14px; left: 0; right: 0; z-index: 60; pointer-events: none;
  display: flex; justify-content: center; align-items: flex-end; gap: 18px; flex-wrap: wrap; padding: 0 16px;
}
.emote-pop {
  display: grid; justify-items: center; position: relative;
  animation: emote-in .45s cubic-bezier(.2, 1.6, .4, 1) both;
  filter: drop-shadow(0 12px 18px rgba(0,0,0,.35));
}
.emote-pop.out { animation: emote-out .35s ease-in forwards; }
.emote-pop .emo { width: 130px; height: 140px; }
.emote-name {
  margin-top: -6px; background: rgba(6, 24, 22, .85); color: var(--text); font-weight: 800; font-size: .85rem;
  padding: 3px 10px; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--line);
}
.emote-bubble {
  order: -1; position: relative; margin-bottom: 4px; white-space: nowrap; background: #fff; color: #2a2320;
  font-family: 'Fredoka', sans-serif; font-weight: 700; font-size: 1.1rem; padding: 7px 14px; border-radius: 16px;
  animation: bubble-in .35s .15s cubic-bezier(.2, 1.6, .4, 1) both;
}
.emote-bubble::after { content: ''; position: absolute; left: 50%; bottom: -8px; transform: translateX(-50%); border: 8px solid transparent; border-top-color: #fff; border-bottom: 0; }
@keyframes emote-in { 0% { transform: scale(.2) translateY(30px); opacity: 0; } 100% { transform: none; opacity: 1; } }
@keyframes emote-out { to { transform: scale(.6) translateY(-20px); opacity: 0; } }
@keyframes bubble-in { 0% { transform: scale(.3); opacity: 0; } 100% { transform: none; opacity: 1; } }

/* partes animadas de la mascota */
.emo .emo-body { transform-box: view-box; transform-origin: 60px 116px; }
.emo .fx-zzz text, .emo .fx-q text, .emo .fx-bang { font-family: 'Fredoka', sans-serif; font-weight: 700; fill: #8ab4ff; }
.emo [class*="fx-"], .emo .z, .emo .q, .emo .drip, .emo .p1, .emo .p2, .emo .p3 { transform-box: fill-box; transform-origin: center; }

.emo-sleep .emo-body { animation: emo-breathe 2.6s ease-in-out infinite; }
.emo-sleep .z { font-size: 18px; opacity: 0; animation: emo-z 2.4s ease-out infinite; }
.emo-sleep .z2 { font-size: 14px; animation-delay: .8s; }
.emo-sleep .z3 { font-size: 11px; animation-delay: 1.6s; }
.emo-sleep .fx-bubble { animation: emo-snot 2.6s ease-in-out infinite; }
@keyframes emo-breathe { 0%, 100% { transform: rotate(-3deg) scaleY(1); } 50% { transform: rotate(-6deg) scaleY(.96); } }
@keyframes emo-z { 0% { opacity: 0; transform: translate(-8px, 10px) scale(.6); } 30% { opacity: 1; } 100% { opacity: 0; transform: translate(10px, -16px) scale(1.2); } }
@keyframes emo-snot { 0%, 100% { transform: scale(.4); } 50% { transform: scale(1.3); } }

.emo-laugh .emo-body { animation: emo-shake-rot .22s ease-in-out infinite alternate; }
.emo-laugh .fx-tear { animation: emo-tear .5s ease-in-out infinite alternate; }
@keyframes emo-shake-rot { from { transform: rotate(-4deg) translateY(0); } to { transform: rotate(4deg) translateY(-3px); } }
@keyframes emo-tear { from { transform: translateY(0) scale(.9); } to { transform: translateY(-4px) scale(1.15); } }

.emo-angry .emo-body { animation: emo-shake-x .09s linear infinite alternate; }
.emo-angry .fx-flush { opacity: 0; animation: emo-flush 1.2s ease-in-out infinite alternate; }
.emo-angry .fx-steam circle { fill: #d9d9d9; opacity: 0; animation: emo-steam 1s ease-out infinite; }
.emo-angry .fx-steam .p2 { animation-delay: .35s; }
.emo-angry .fx-steam .p3 { animation-delay: .7s; }
@keyframes emo-shake-x { from { transform: translateX(-2px); } to { transform: translateX(2px); } }
@keyframes emo-flush { to { opacity: .35; } }
@keyframes emo-steam { 0% { opacity: .9; transform: translateY(8px) scale(.5); } 100% { opacity: 0; transform: translateY(-14px) scale(1.6); } }

.emo-cry .emo-body { animation: emo-sob .5s ease-in-out infinite alternate; }
.emo-cry .drip { opacity: 0; animation: emo-drip 1.1s ease-in infinite; }
.emo-cry .d1 { animation-delay: .37s; }
.emo-cry .d2 { animation-delay: .74s; }
@keyframes emo-sob { from { transform: scaleY(1); } to { transform: scaleY(.95) translateY(1px); } }
@keyframes emo-drip { 0% { opacity: 1; transform: translateY(0); } 100% { opacity: 0; transform: translateY(42px); } }

.emo-clap .emo-body { animation: emo-hop .7s ease-in-out infinite; }
.emo-clap .hl { animation: emo-clap-l .35s ease-in-out infinite alternate; }
.emo-clap .hr { animation: emo-clap-r .35s ease-in-out infinite alternate; }
.emo-clap .fx-spark { animation: emo-flash .35s ease-in-out infinite alternate; }
@keyframes emo-hop { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
@keyframes emo-clap-l { to { transform: translateX(22px); } }
@keyframes emo-clap-r { to { transform: translateX(-22px); } }
@keyframes emo-flash { from { opacity: 0; } to { opacity: 1; } }

.emo-think .emo-body { animation: emo-sway 2s ease-in-out infinite alternate; }
.emo-think .q { font-size: 20px; animation: emo-float 1.6s ease-in-out infinite alternate; }
.emo-think .q2 { font-size: 14px; animation-delay: .5s; }
@keyframes emo-sway { from { transform: rotate(-3deg); } to { transform: rotate(3deg); } }
@keyframes emo-float { from { transform: translateY(2px); opacity: .6; } to { transform: translateY(-5px); opacity: 1; } }

.emo-cool .emo-body { animation: emo-bob 1s ease-in-out infinite alternate; }
.emo-cool .fx-shades { animation: emo-shades .6s cubic-bezier(.3, 1.6, .5, 1) both; }
.emo-cool .fx-twinkle { animation: emo-twinkle 1s ease-in-out infinite; }
@keyframes emo-bob { from { transform: rotate(-2deg); } to { transform: rotate(3deg) translateY(-2px); } }
@keyframes emo-shades { from { transform: translateY(-40px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes emo-twinkle { 0%, 100% { transform: scale(.4) rotate(0); opacity: .3; } 50% { transform: scale(1.1) rotate(45deg); opacity: 1; } }

.emo-wow .emo-body { animation: emo-jump .8s cubic-bezier(.3, 1.5, .5, 1) infinite; }
.emo-wow .fx-bang { font-size: 30px; fill: #f2b33d; animation: emo-pop .8s ease-out infinite; }
@keyframes emo-jump { 0%, 100% { transform: translateY(0) scaleY(1); } 15% { transform: translateY(0) scaleY(.9); } 45% { transform: translateY(-12px) scaleY(1.04); } }
@keyframes emo-pop { 0% { transform: scale(.3); } 40% { transform: scale(1.2); } 100% { transform: scale(1); } }

.emo-happy .emo-body { animation: emo-hop 1s ease-in-out infinite; }
.emo-impatient .fx-tap { animation: emo-tap .25s ease-in-out infinite alternate; }
.emo-impatient .fx-clock { animation: emo-ring .12s linear infinite alternate; }
@keyframes emo-tap { to { transform: translateY(-5px); } }
@keyframes emo-ring { from { transform: rotate(-10deg); } to { transform: rotate(10deg); } }
.emo-oops .emo-body { animation: emo-sway .4s ease-in-out infinite alternate; }
.emo-oops .fx-sweat { animation: emo-drip 1.4s ease-in infinite; }

/* jugador que tarda: su avatar se convierte en la mascota dormida */
.sleepy-mini { display: none; position: absolute; inset: -14px -10px -6px -10px; }
.sleepy-mini .emo { width: 100%; height: 100%; }
.players li.sleepy .avatar { background: transparent !important; color: transparent; }
.players li.sleepy .sleepy-mini { display: block; }
.players li.sleepy .pname::after { content: ' · zzz'; color: #8ab4ff; font-weight: 700; font-size: .8rem; }

@media (prefers-reduced-motion: reduce) {
  .emo *, .emote-pop, .emote-bubble { animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
@media (max-width: 900px) {
  .emote-pop .emo { width: 96px; height: 104px; }
  .emote-bubble { font-size: .95rem; }
}
.result-turn { margin-right: auto; display: flex !important; align-items: center; gap: 8px; }
.result-turn select { width: auto; padding: 8px 10px; }
