:root {
  --bg: #14101c;
  --bg-2: #1c1627;
  --panel: #251d33;
  --panel-2: #30263f;
  --panel-3: #3b3050;
  --ink: #0b0810;
  --text: #f3ecd9;
  --muted: #a99cbf;
  --accent: #2f5fd0;
  --accent-hi: #5583ef;
  --green: #3fbf6a;
  --red: #e0484d;
  --yellow: #f2c14e;
  --font: 'Pixelify Sans', ui-monospace, 'Courier New', monospace;
  --sidebar: 300px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text); overflow: hidden; font-family: var(--font); font-size: 15px; font-variant-ligatures: none; }
[hidden] { display: none !important; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
canvas { image-rendering: pixelated; image-rendering: crisp-edges; }
.muted { color: var(--muted); }
.tiny { font-size: 12px; }
kbd {
  font-family: var(--font); background: var(--panel-3); border: 2px solid var(--ink); padding: 0 5px; font-size: 12px;
  box-shadow: inset 0 -2px 0 rgba(0,0,0,.35);
}

/* Caja estilo pixel: borde negro + bisel interno + sombra dura */
.box {
  background: var(--panel); border: 3px solid var(--ink);
  box-shadow: inset 0 0 0 2px var(--panel-3), 5px 5px 0 rgba(0,0,0,.45);
}

.btn {
  background: var(--panel-3); border: 3px solid var(--ink); padding: 7px 12px; color: var(--text);
  box-shadow: inset -3px -3px 0 rgba(0,0,0,.35), inset 3px 3px 0 rgba(255,255,255,.12);
  font-weight: 600; line-height: 1.1; transition: filter .1s;
}
.btn:hover { filter: brightness(1.15); }
.btn:active { box-shadow: inset 3px 3px 0 rgba(0,0,0,.4); transform: translate(1px, 1px); }
.btn:disabled { opacity: .45; cursor: not-allowed; filter: none; }
.btn.primary { background: var(--accent); }
.btn.danger { background: #8e2b33; }
.btn.small { padding: 4px 9px; font-size: 13px; }
.btn.big { padding: 12px 16px; font-size: 18px; }
.btn.icon { width: 42px; height: 42px; padding: 0; display: grid; place-items: center; flex: 0 0 auto; }
.btn.icon.small { width: 34px; height: 34px; font-size: 18px; }
.btn.icon svg { width: 20px; height: 20px; }
.btn.off { background: #6b2630; color: #ffb4b8; }
.btn.active { background: var(--accent); }

input[type=text], input:not([type]), input[type=password], select {
  background: var(--bg-2); border: 3px solid var(--ink); padding: 8px 10px; color: var(--text); outline: none;
  box-shadow: inset 2px 2px 0 rgba(0,0,0,.35);
}
input:focus { border-color: var(--accent-hi); }

/* ============ Entrada ============ */
.screen {
  position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 16px; overflow: auto;
  background-color: #17122a;
  background-image:
    linear-gradient(45deg, rgba(255,255,255,.025) 25%, transparent 25%, transparent 75%, rgba(255,255,255,.025) 75%),
    linear-gradient(45deg, rgba(255,255,255,.025) 25%, transparent 25%, transparent 75%, rgba(255,255,255,.025) 75%);
  background-size: 32px 32px; background-position: 0 0, 16px 16px;
}
.screen.dim { background: rgba(10, 8, 16, .75); }
.loading { padding: 18px 26px; font-size: 18px; }
.login-card { display: grid; grid-template-columns: 284px 330px 310px; max-width: 100%; }
.login-left {
  padding: 16px; display: flex; flex-direction: column; gap: 10px; align-items: stretch;
  background: #2b3a5e; border-right: 3px solid var(--ink);
}
.preview-stage {
  position: relative; height: 176px; display: grid; place-items: center; border: 3px solid var(--ink); overflow: hidden;
  background:
    radial-gradient(ellipse 70px 14px at 50% 86%, rgba(20,12,30,.45), transparent 70%),
    radial-gradient(circle at 50% 35%, rgba(255,236,190,.35), transparent 60%),
    linear-gradient(180deg, #3a4d7c 0 46%, #2b3a5e 46% 50%, transparent 50%),
    repeating-linear-gradient(90deg, #b7804c 0 22px, #a8743f 22px 24px);
  box-shadow: inset 0 0 0 2px rgba(255,255,255,.15);
}
#avatarPreview { width: 96px; height: 144px; margin-top: 8px; }
.rot {
  position: absolute; top: 50%; left: 6px; transform: translateY(-50%); width: 26px; height: 30px; padding: 0;
  background: rgba(11,8,16,.55); border: 2px solid var(--ink); color: var(--text); font-size: 12px;
}
.rot.right { left: auto; right: 6px; }
.rot:hover { background: var(--accent); }
.look-tabs { display: grid; grid-template-columns: repeat(4, 1fr); border: 3px solid var(--ink); }
.look-tabs button { background: var(--panel-2); border: 0; border-right: 2px solid var(--ink); padding: 5px 2px; font-size: 13px; color: var(--muted); }
.look-tabs button:last-child { border-right: 0; }
.look-tabs button.active { background: var(--yellow); color: #231a10; font-weight: 600; }
.look-pane { display: flex; flex-direction: column; gap: 9px; min-height: 196px; }
.look-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; }
.look-chip {
  display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 3px 2px 2px; background: var(--panel-2);
  border: 2px solid var(--ink); font-size: 10px; line-height: 1.05; color: var(--muted); min-width: 0;
}
.look-chip canvas { width: 32px; height: 28px; }
.look-chip span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.look-chip:hover { background: var(--panel-3); }
.look-chip.sel { background: #22357a; color: var(--text); outline: 2px solid var(--yellow); outline-offset: -2px; }
#bottomPicker .look-chip canvas { height: 24px; }
.pick-row.dim { opacity: .45; }
.pick-row { display: flex; flex-direction: column; gap: 4px; }
.pick-label { font-size: 13px; color: #c9d4f2; }
.swatches, .chips { display: flex; flex-wrap: wrap; gap: 5px; }
.swatch {
  width: 24px; height: 24px; border: 3px solid var(--ink); padding: 0;
  box-shadow: inset -2px -2px 0 rgba(0,0,0,.3), inset 2px 2px 0 rgba(255,255,255,.25);
}
.swatch.sel { outline: 3px solid var(--yellow); outline-offset: 1px; }
.swatch.wide { width: auto; height: auto; padding: 3px 7px; font-size: 12px; color: #fff; text-shadow: 1px 1px 0 #000; }
.chip { background: var(--panel-3); border: 3px solid var(--ink); padding: 2px 7px; font-size: 13px; }
.chip.sel { background: var(--yellow); color: #231a10; }

.login-mid { padding: 16px; display: flex; flex-direction: column; gap: 10px; min-height: 0; border-right: 3px solid var(--ink); }
.login-mid h2 { margin: 0; font-size: 18px; }
.jersey-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.seg { display: flex; border: 3px solid var(--ink); }
.seg button { background: var(--panel-2); border: 0; padding: 3px 8px; font-size: 13px; color: var(--muted); }
.seg button + button { border-left: 2px solid var(--ink); }
.seg button.active { background: var(--accent); color: #fff; }
.jerseys { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; overflow-y: auto; overflow-x: hidden; max-height: 470px; padding-right: 4px; }
.jersey span { min-width: 0; overflow-wrap: normal; word-break: normal; hyphens: manual; font-size: 12px; }
.jersey {
  display: flex; align-items: center; gap: 6px; text-align: left; padding: 4px 6px; background: var(--panel-2);
  border: 3px solid var(--ink); font-size: 12.5px; line-height: 1.1;
}
.jersey canvas { width: 32px; height: 48px; flex: 0 0 auto; }
.jersey small { display: block; color: var(--muted); font-size: 11px; }
.jersey.star { background: #22357a; }
.jersey.sel { outline: 3px solid var(--yellow); outline-offset: -1px; }
.login-right { padding: 22px; display: flex; flex-direction: column; gap: 14px; }
.login-right h1 { margin: 0; font-size: 30px; line-height: 1; color: #fff; text-shadow: 3px 3px 0 #1f3f9c; }
.login-right p { margin: 0; line-height: 1.35; }
.field { display: flex; flex-direction: column; gap: 6px; font-size: 14px; color: var(--muted); }
.toggles { display: flex; gap: 8px; }
.toggle { flex: 1; }
.toggle input { display: none; }
.toggle span {
  display: block; text-align: center; padding: 8px; border: 3px solid var(--ink); background: var(--panel-2);
  opacity: .5; cursor: pointer; user-select: none; font-size: 14px;
}
.toggle input:checked + span { opacity: 1; background: #2a3f78; }
.error { color: #ff8a8f; min-height: 1em; font-size: 14px; }

/* ============ Layout ============ */
#app {
  height: 100%; display: grid; grid-template-rows: 50px 1fr; grid-template-columns: 1fr var(--sidebar);
  grid-template-areas: 'top top' 'stage side';
}
#app.no-sidebar { grid-template-columns: 1fr 0; }
#app.no-sidebar #sidebar { display: none; }
#topbar {
  grid-area: top; display: flex; align-items: center; gap: 12px; padding: 0 12px;
  background: var(--panel); border-bottom: 3px solid var(--ink);
}
.brand { display: flex; gap: 8px; align-items: center; font-size: 18px; white-space: nowrap; }
.logo-px { width: 18px; height: 18px; background: var(--accent); border: 3px solid var(--ink); box-shadow: inset -3px -3px 0 #1f3f9c, inset 3px 3px 0 #fff; }
.badge { background: var(--panel-2); border: 3px solid var(--ink); padding: 3px 10px; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.badge.private { background: #22357a; }
.badge.quiet { background: #23573a; }
.top-right { margin-left: auto; display: flex; gap: 10px; align-items: center; font-size: 14px; }

#stage { grid-area: stage; position: relative; overflow: hidden; background: #0f0c16; min-width: 0; }
#game { position: absolute; inset: 0; width: 100%; height: 100%; display: block; outline: none; cursor: pointer; }
#game.editing { cursor: crosshair; }

/* ============ Videos ============ */
#videos {
  position: absolute; top: 10px; left: 50%; transform: translateX(-50%); display: flex; gap: 8px;
  max-width: calc(100% - 20px); overflow-x: auto; padding: 0 6px 6px 0; z-index: 5; pointer-events: none;
}
.tile {
  pointer-events: auto; position: relative; flex: 0 0 auto; width: 164px; height: 123px; overflow: hidden;
  background: var(--panel-2); border: 3px solid var(--ink); box-shadow: 4px 4px 0 rgba(0,0,0,.45); cursor: zoom-in;
}
.tile video { width: 100%; height: 100%; object-fit: cover; display: block; background: #0b0810; }
.tile.mirror video { transform: scaleX(-1); }
.tile.screen video { object-fit: contain; }
.tile.speaking { border-color: var(--green); box-shadow: 0 0 0 2px var(--green), 4px 4px 0 rgba(0,0,0,.45); }
.tile.far { opacity: .45; }
.tile .ph { position: absolute; inset: 0; display: grid; place-items: center; background: repeating-linear-gradient(0deg, #2b3a5e 0 6px, #273554 6px 12px); }
.tile .ph canvas { width: 48px; height: 72px; }
.tile .label { position: absolute; left: 4px; bottom: 4px; right: 4px; display: flex; gap: 4px; align-items: center; font-size: 13px; }
.tile .nm { background: rgba(11,8,16,.8); padding: 1px 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; border: 2px solid var(--ink); }
.tile .mic-off { background: var(--red); border: 2px solid var(--ink); width: 22px; height: 22px; display: grid; place-items: center; flex: 0 0 auto; }
.tile .mic-off svg { width: 13px; height: 13px; }
#spotlight { position: absolute; inset: 150px 20px 90px; z-index: 6; display: grid; place-items: center; }
#spotlight .tile { width: 100%; height: 100%; max-width: 1100px; cursor: zoom-out; }
#spotlight .tile video { object-fit: contain; }

/* ============ Controles ============ */
#controls {
  position: absolute; left: 50%; bottom: 12px; transform: translateX(-50%); z-index: 7;
  display: flex; align-items: center; gap: 6px; padding: 7px 9px; max-width: calc(100% - 16px); overflow-x: auto;
}
.sep { width: 3px; height: 28px; background: var(--ink); margin: 0 3px; flex: 0 0 auto; }
.emote-wrap { position: relative; }
#emotes { display: flex; gap: 2px; position: fixed; padding: 4px; z-index: 20; }
#emotes button { background: transparent; border: 0; font-size: 20px; width: 34px; height: 36px; padding: 0; }
#emotes button:hover { background: var(--panel-3); transform: translateY(-2px); }
#statusSelect { padding: 6px; font-size: 14px; }

#actionHint {
  position: absolute; left: 50%; bottom: 78px; transform: translateX(-50%); z-index: 7; font-size: 15px;
  background: var(--yellow); color: #231a10; animation: bob 1.2s steps(2) infinite;
}
#actionHint kbd { background: #231a10; color: var(--yellow); }
@keyframes bob { 50% { transform: translate(-50%, -3px); } }

#updateBanner {
  position: absolute; top: 146px; left: 50%; transform: translateX(-50%); z-index: 10; padding: 8px 10px 8px 14px;
  display: flex; gap: 12px; align-items: center; font-size: 15px; background: #22357a; white-space: nowrap;
}
#toasts { position: absolute; right: 12px; bottom: 80px; z-index: 8; display: flex; flex-direction: column; gap: 8px; align-items: flex-end; pointer-events: none; }
.toast { background: var(--panel); border: 3px solid var(--ink); padding: 7px 12px; font-size: 14px; box-shadow: 4px 4px 0 rgba(0,0,0,.45); max-width: 340px; animation: toastIn .15s steps(3); }
.toast.hide { opacity: 0; transition: opacity .3s steps(3); }
@keyframes toastIn { from { transform: translateY(10px); opacity: 0; } }

/* ============ Paneles ============ */
.panel { position: absolute; z-index: 9; display: flex; flex-direction: column; max-height: calc(100% - 24px); }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 10px; background: var(--panel-3); border-bottom: 3px solid var(--ink); font-size: 16px; }
.panel-body { padding: 10px; display: flex; flex-direction: column; gap: 10px; overflow-y: auto; }
.row { display: flex; gap: 8px; justify-content: space-between; }
.row.wrap { flex-wrap: wrap; justify-content: flex-start; }
.check { display: flex; gap: 8px; align-items: center; font-size: 14px; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--accent); }

#editor { top: 12px; left: 12px; width: 300px; max-height: calc(100% - 90px); }
.catalog { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px; }
.cat-tabs { display: flex; flex-wrap: wrap; gap: 4px; }
.cat-tabs button { background: var(--panel-2); border: 2px solid var(--ink); padding: 2px 7px; font-size: 12.5px; color: var(--muted); }
.cat-tabs button.active { background: var(--yellow); color: #231a10; }
.cat-item { position: relative; }
.paint-dot { position: absolute; top: 3px; right: 3px; width: 8px; height: 8px; border: 2px solid var(--ink); background: conic-gradient(#e0484d 0 25%, #f2c14e 0 50%, #3fbf6a 0 75%, #5583ef 0); }
.cat-item span { overflow-wrap: break-word; max-width: 100%; }
.cat-item {
  background: var(--panel-2); border: 3px solid var(--ink); padding: 3px; display: flex; flex-direction: column; align-items: center; gap: 2px;
  font-size: 10.5px; line-height: 1.05; text-align: center; min-height: 66px; justify-content: flex-end;
}
.cat-item canvas { max-width: 100%; height: 34px; object-fit: contain; }
.cat-item.sel { background: var(--accent); }
#removeTool.active { background: var(--red); }

.chess-panel { top: 12px; right: 12px; width: 344px; max-height: calc(100% - 90px); }
.board-wrap { position: relative; align-self: center; }
#chessBoard { width: 300px; height: 300px; display: block; border: 3px solid var(--ink); cursor: pointer; }
.seat { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 15px; padding: 4px 6px; background: var(--panel-2); border: 3px solid var(--ink); }
.seat.turn { border-color: var(--yellow); }
.seat .who { display: flex; align-items: center; gap: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.seat .chip-color { width: 14px; height: 14px; border: 2px solid var(--ink); flex: 0 0 auto; }
.chess-status { text-align: center; font-size: 16px; min-height: 20px; }
.chess-status.alert { color: var(--yellow); }
.moves { font-size: 13px; color: var(--muted); max-height: 70px; overflow-y: auto; line-height: 1.4; }
.promo { position: absolute; inset: auto 0 0 0; margin: auto; top: 0; height: fit-content; display: flex; gap: 6px; padding: 8px; justify-content: center; width: fit-content; left: 0; right: 0; }
.promo button canvas { width: 36px; height: 36px; }

/* ============ Sidebar ============ */
#sidebar { grid-area: side; background: var(--panel); border-left: 3px solid var(--ink); display: flex; flex-direction: column; min-height: 0; }
.tabs { display: flex; border-bottom: 3px solid var(--ink); }
.tabs button { flex: 1; background: var(--panel-2); border: 0; border-right: 3px solid var(--ink); padding: 10px 4px; font-size: 15px; color: var(--muted); }
.tabs button:last-child { border-right: 0; }
.tabs button.active { background: var(--panel); color: var(--text); box-shadow: inset 0 -3px 0 var(--accent-hi); }
.count { background: var(--ink); padding: 0 5px; font-size: 12px; margin-left: 3px; }
.count.alert { background: var(--red); color: #fff; }
.tab-body { flex: 1; min-height: 0; display: flex; flex-direction: column; }
#peopleList { list-style: none; margin: 0; padding: 8px; overflow-y: auto; display: flex; flex-direction: column; gap: 6px; }
#peopleList li { display: flex; align-items: center; gap: 8px; padding: 5px; background: var(--panel-2); border: 3px solid var(--ink); }
#peopleList canvas { width: 32px; height: 32px; background: #2b3a5e; border: 2px solid var(--ink); flex: 0 0 auto; }
.person-info { flex: 1; min-width: 0; }
.person-name { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.person-sub { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 5px; white-space: nowrap; overflow: hidden; }
.dot { width: 8px; height: 8px; flex: 0 0 auto; border: 1px solid var(--ink); }
#chatLog { flex: 1; overflow-y: auto; padding: 10px; display: flex; flex-direction: column; gap: 8px; }
.msg { font-size: 14px; line-height: 1.3; }
.msg .head { display: flex; gap: 6px; align-items: baseline; }
.msg .time { color: var(--muted); font-size: 11px; }
.msg .scope { font-size: 10px; background: #23573a; padding: 0 5px; }
.msg .body { overflow-wrap: anywhere; white-space: pre-wrap; }
.chat-empty { color: var(--muted); text-align: center; font-size: 14px; margin-top: 30px; }
#chatForm { display: flex; gap: 6px; padding: 8px; border-top: 3px solid var(--ink); }
#chatInput { flex: 1; min-width: 0; }
.help { padding: 4px 14px 14px; overflow-y: auto; font-size: 14px; line-height: 1.4; }
.help h3 { margin: 14px 0 4px; font-size: 16px; color: var(--yellow); }
.help p { margin: 0; }

@media (max-width: 980px) {
  .login-card { grid-template-columns: 1fr; }
  .login-left, .login-mid { border-right: 0; border-bottom: 3px solid var(--ink); }
  .jerseys { max-height: 260px; }
}
@media (max-width: 760px) {
  #app { grid-template-columns: 1fr 0; }
  #app #sidebar { display: none; }
  #app.show-sidebar { grid-template-columns: 1fr; grid-template-areas: 'top' 'side'; }
  #app.show-sidebar #sidebar { display: flex; }
  #app.show-sidebar #stage { display: none; }
  .tile { width: 112px; height: 84px; }
  #editor, .chess-panel { left: 8px; right: 8px; width: auto; }
}

/* ============ Novedades: ventanas, tarjetas, menú de persona ============ */
.modal-wrap { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; background: rgba(10, 8, 16, .6); padding: 16px; }
.modal { width: 420px; max-width: 100%; max-height: calc(100vh - 32px); display: flex; flex-direction: column; }
.modal.small { width: 380px; }
.modal select, .modal input[type=text], .modal input:not([type]) { width: 100%; }
.meter { height: 12px; background: var(--bg-2); border: 3px solid var(--ink); }
#micMeter { height: 100%; width: 0; background: var(--green); transition: width .08s steps(4); }
#camPreview { width: 100%; max-height: 200px; background: #0b0810; border: 3px solid var(--ink); object-fit: cover; transform: scaleX(-1); }
.welcome ol { margin: 0; padding-left: 20px; line-height: 1.5; display: flex; flex-direction: column; gap: 6px; }
.status-text-btn { max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }

#cards { position: absolute; top: 146px; left: 12px; z-index: 11; display: flex; flex-direction: column; gap: 8px; width: 300px; max-width: calc(100% - 24px); }
.card { background: var(--panel); border: 3px solid var(--ink); box-shadow: 5px 5px 0 rgba(0,0,0,.45); padding: 10px; display: flex; flex-direction: column; gap: 8px; animation: toastIn .15s steps(3); }
.card.hot { border-color: var(--yellow); }
.card .card-text { font-size: 15px; line-height: 1.3; }
.card .row { justify-content: flex-start; flex-wrap: wrap; gap: 6px; }

#ctxMenu { position: absolute; z-index: 12; display: flex; flex-direction: column; min-width: 210px; padding: 4px; }
#ctxMenu .ctx-head { display: flex; gap: 8px; align-items: center; padding: 6px; border-bottom: 3px solid var(--ink); margin-bottom: 4px; }
#ctxMenu .ctx-head canvas { width: 32px; height: 32px; background: #2b3a5e; border: 2px solid var(--ink); }
#ctxMenu button[data-act] { background: transparent; border: 0; text-align: left; padding: 7px 8px; font-size: 15px; }
#ctxMenu button[data-act]:hover { background: var(--panel-3); }

#followBadge { position: absolute; top: 146px; left: 50%; transform: translateX(-50%); z-index: 8; padding: 6px 12px; font-size: 14px; }
#updateBanner { top: 10px !important; z-index: 13 !important; }

/* Chat con conversaciones */
#threads { display: flex; gap: 6px; padding: 8px 8px 0; overflow-x: auto; flex: 0 0 auto; }
.thread { background: var(--panel-2); border: 3px solid var(--ink); padding: 3px 8px; font-size: 13px; white-space: nowrap; }
.thread.active { background: var(--accent); }
.thread .count { margin-left: 4px; }

/* Equipo */
.people-scroll { overflow-y: auto; flex: 1; min-height: 0; padding-bottom: 8px; }
.list-title { margin: 10px 10px 2px; font-size: 13px; color: var(--muted); font-weight: 500; text-transform: uppercase; letter-spacing: .04em; }
#peopleList, #offlineList { list-style: none; margin: 0; padding: 6px 8px; display: flex; flex-direction: column; gap: 6px; }
#offlineList li { opacity: .62; }
#offlineList li, #peopleList li { display: flex; align-items: center; gap: 8px; padding: 5px; background: var(--panel-2); border: 3px solid var(--ink); }
#offlineList canvas { width: 32px; height: 32px; background: #2b3a5e; border: 2px solid var(--ink); flex: 0 0 auto; filter: grayscale(.7); }
.person-status { font-size: 12px; color: #ffe39a; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.person-actions { display: flex; gap: 4px; }
.person-actions .btn { padding: 3px 7px; }

/* ============ Mi avatar (ventana dentro de la oficina) ============ */
.look-modal { width: 660px; }
.look-host { display: grid; grid-template-columns: 284px 1fr; min-height: 0; overflow: hidden; flex: 1; }
.look-host .login-left { border-right: 3px solid var(--ink); overflow-y: auto; }
.look-host .login-mid { border-right: 0; min-height: 0; }
.look-host .jerseys { max-height: none; flex: 1; min-height: 0; }
.look-actions { padding: 8px 10px; border-top: 3px solid var(--ink); background: var(--panel-2); justify-content: flex-end; }
@media (max-width: 700px) {
  .look-host { grid-template-columns: 1fr; overflow-y: auto; }
  .look-host .login-left { border-right: 0; border-bottom: 3px solid var(--ink); }
  .look-host .jerseys { max-height: 260px; }
}

/* ============ Pulido visual ============ */
.screen:not(.dim) {
  background-color: #151027;
  background-image:
    radial-gradient(ellipse at 50% 0%, rgba(85,131,239,.22), transparent 60%),
    radial-gradient(ellipse at 50% 110%, rgba(242,193,78,.12), transparent 55%),
    linear-gradient(45deg, rgba(255,255,255,.025) 25%, transparent 25%, transparent 75%, rgba(255,255,255,.025) 75%),
    linear-gradient(45deg, rgba(255,255,255,.025) 25%, transparent 25%, transparent 75%, rgba(255,255,255,.025) 75%);
  background-size: auto, auto, 32px 32px, 32px 32px;
  background-position: 0 0, 0 0, 0 0, 16px 16px;
}
.login-card { box-shadow: inset 0 0 0 2px var(--panel-3), 8px 8px 0 rgba(0,0,0,.5); }
.login-right h1 { font-size: 34px; letter-spacing: .5px; }
.btn { transition: filter .1s, transform .08s; }
.btn:hover:not(:disabled) { transform: translateY(-1px); }
.btn:active:not(:disabled) { transform: translate(1px, 1px); }
.btn.primary { background: linear-gradient(180deg, #3a6be0, #2852bd); }
.jersey { transition: background .1s; }
.jersey:hover { background: var(--panel-3); }
.jersey.star:hover { background: #2a4190; }
#peopleList li, #offlineList li { transition: background .1s; }
#peopleList li:hover { background: var(--panel-3); }
.panel-head { background: linear-gradient(180deg, #43375a, var(--panel-3)); }
#topbar { background: linear-gradient(180deg, #2c2340, var(--panel)); }
#controls { background: linear-gradient(180deg, #2c2340, var(--panel)); }
.swatch { transition: transform .08s; }
.swatch:hover { transform: translateY(-2px); }

/* ---------- Pizarrón */
.wb-panel { top: 12px; left: 50%; transform: translateX(-50%); width: min(980px, calc(100% - 24px)); max-height: calc(100% - 90px); }
.wb-panel .panel-body { gap: 8px; }
.wb-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.wb-colors { display: flex; gap: 4px; }
.wb-colors .swatch { width: 24px; height: 24px; }
.wb-sizes { display: flex; gap: 4px; }
.wb-size { width: 34px; height: 30px; padding: 0; display: grid; place-items: center; }
.wb-size i { display: block; border-radius: 50%; border: 1px solid var(--ink); }
#wbCanvas { width: 100%; height: auto; aspect-ratio: 960 / 600; max-height: calc(100vh - 260px); object-fit: contain; display: block;
  background: #fff; border: 4px solid #8d96a6; box-shadow: inset 0 0 0 2px #c4cad6; cursor: crosshair; touch-action: none; image-rendering: auto; }
#wbCanvas.erasing { cursor: cell; }
.wb-hint { color: var(--yellow); margin: 0; }

/* ---------- Música */
.music-panel { left: 12px; bottom: 84px; width: 330px; max-height: calc(100% - 110px); }
.music-panel .panel-body { gap: 8px; }
.music-panel [data-mpane] { display: flex; flex-direction: column; gap: 8px; }
.music-panel [data-mpane][hidden] { display: none; }
.music-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.music-grid .btn { text-align: left; }
#spotifyForm { gap: 6px; }
#spotifyForm input { flex: 1; min-width: 0; }
#spotifyBox iframe { display: block; border: 0; border-radius: 12px; }
#musicBtn.active { background: var(--accent); }
@media (max-width: 760px) {
  .music-panel { left: 8px; right: 8px; width: auto; }
}
