/* CV Hotel: la cara de PawHotel, tal cual la armo su dueño. Ventanas celestes con borde grueso,
   sombra dura, encabezado azul en degrade, la letra de la barra de abajo, botones naranjas para "ir" y la
   cruz roja para cerrar; abajo la barra azul con el chat. Los colores de las ventanas son las
   variables --win-* (los temas de Configuracion las cambian). Sin fuentes ni imagenes de afuera. */
:root {
  --bg: #000000;
  --sidebar: #12131f;
  --panel: #1a1b2e;
  --border: #2a2b45;
  --accent: #7c5cbf;
  --accent2: #e85d8a;
  --accent3: #4ecdc4;
  --text: #e0dff5;
  --muted: #6b6a8a;
  --gold: #f0c040;
  /* las ventanas (Navigator, inventario, catalogo...) */
  --win-bg: #c8d8e8;
  --win-border: #7a96b0;
  --win-shadow: #3a5a7a;
  --win-header1: #5a8ab0;
  --win-header2: #3a6a90;
  --win-header-border: #2a5a80;
  --win-body: #e8f0f8;
  --win-body2: #d0dce8;
  --win-body3: #b8d0e8;
  --win-item: #c8d8e8;
  --win-item-border: #7a96b0;
  --win-text: #1a3a5a;
  --win-muted: #3a6a9a;
  --win-tab: #a8c0d8;
  --win-tab-active: #e8f0f8;
  --win-tab-text: #3a5a7a;
  --win-go1: #e87020;
  --win-go2: #c05010;
  --win-go-border: #8a3000;
  --win-go-shadow: #5a1800;
  /* La letra de todo el hotel: la de la barra de abajo (Enviar, Log, Mochila...), la del sistema. Antes las ventanas
     (Navigator, Tienda, Mochila, Ajustes, las notas...) y el nombre de la sala usaban otra, de maquina de escribir: el dueño
     pidio una sola. */
  --fuente: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, "Noto Sans", "Helvetica Neue", sans-serif;
  --barra: 100px; /* lo que mide la barra de abajo (hotel.js la mide de verdad) */
}
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
html, body { height: 100%; overflow: hidden; background: #000; }
body {
  font-family: var(--fuente);
  color: var(--text); -webkit-user-select: none; user-select: none; overscroll-behavior: none;
}
input, textarea, [contenteditable="true"] { -webkit-user-select: text; user-select: text; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3 { font-size: inherit; font-weight: inherit; }
ul, ol { list-style: none; }

#hotel { position: fixed; inset: 0; display: flex; flex-direction: column; background: #000; }

/* ── La sala ── */
#game-wrap { flex: 1; min-height: 0; position: relative; overflow: hidden; background: #000; }
#escena { position: absolute; inset: 0; overflow: hidden; background: #000; touch-action: none; }
#lienzo { position: absolute; inset: 0; width: 100%; height: 100%; display: block; image-rendering: pixelated; cursor: pointer; }
#lienzo.colocando { cursor: crosshair; }
#capa-burbujas { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.speech-bubble { position: absolute; max-width: min(360px, 86vw); background: white; color: #111; padding: 4px 10px; border-radius: 10px; font-size: 12px; font-weight: 600; line-height: 1.3; box-shadow: 0 1px 4px rgba(0,0,0,0.25), 0 0 0 1px var(--c, #bbb); pointer-events: none; border: 1.5px solid var(--c, #bbb); white-space: pre-wrap; word-break: break-word; transition: top 350ms cubic-bezier(0.4,0,0.2,1); }
.speech-bubble b { font-weight: 800; margin-right: 3px; }
#move-hint { position: absolute; bottom: 12px; left: 50%; transform: translateX(-50%); background: rgba(0,0,0,0.6); border: 1px solid var(--border); border-radius: 20px; padding: 5px 14px; font-size: 11px; color: var(--muted); pointer-events: none; user-select: none; white-space: nowrap; }
.place-hint { position: absolute; bottom: 50px; left: 50%; transform: translateX(-50%); background: #7c5cbfcc; color: #fff; font-size: 12px; padding: 6px 8px 6px 14px; border-radius: 20px; white-space: nowrap; display: flex; align-items: center; gap: 6px; z-index: 20; max-width: calc(100% - 12px); }
.place-hint span { overflow: hidden; text-overflow: ellipsis; }
.place-hint .fp-btn { flex: 0 0 auto; padding: 4px 10px; }
#aviso-red { position: absolute; top: 56px; left: 50%; transform: translateX(-50%); z-index: 30; background: rgba(90,20,30,0.95); color: #fff; font-size: 13px; font-weight: 700; padding: 8px 20px; border-radius: 20px; border: 1px solid #cc3333; box-shadow: 0 4px 16px rgba(0,0,0,0.5); white-space: nowrap; }

/* ── Arriba: volver, nombre de la sala, gente, encajar y ajustes ── */
#arriba { position: absolute; left: 0; right: 0; top: 0; z-index: 6; display: flex; align-items: center; gap: 6px; padding: max(8px, env(safe-area-inset-top)) 8px 8px; pointer-events: none; }
#arriba > * { pointer-events: auto; }
#arriba .bar-icon-btn { padding: 6px 9px; font-size: 15px; min-width: 34px; }
.arriba-hueco { flex: 1; pointer-events: none !important; }
.cv-pill { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 10px; border-radius: 10px; border: 1px solid var(--win-header-border); background: linear-gradient(180deg, var(--win-header1), var(--win-header2)); color: #fff; font-size: 12px; font-weight: 900; white-space: nowrap; box-shadow: inset 0 1px 0 rgba(255,255,255,0.32), inset 0 -2px 0 rgba(0,0,0,0.18); text-shadow: 0 1px 0 rgba(0,0,0,0.35); min-width: 0; }
button.cv-pill:hover { filter: brightness(1.05); }
#titulo-sala { font-family: var(--fuente); font-size: 13px; max-width: min(46vw, 420px); }
#sala-nombre { overflow: hidden; text-overflow: ellipsis; }

/* ── La barra de abajo ── */
#chat-bar { height: 100px; flex-shrink: 0; position: relative; z-index: 6; background: linear-gradient(180deg, var(--win-header1), var(--win-header2)); border-top: 2px solid var(--win-header-border); display: flex; align-items: center; justify-content: center; gap: 0; padding: 0; box-shadow: inset 0 2px 0 rgba(255,255,255,0.38), inset 0 -3px 0 rgba(0,0,0,0.22), inset 0 1px 18px rgba(255,255,255,0.08); }
#chat-bar-inner { display: flex; align-items: center; gap: 6px; padding: 0 12px; max-width: 1100px; width: 100%; height: 100%; }
#user-section { display: flex; align-items: center; gap: 8px; padding-right: 10px; border-right: 1px solid rgba(255,255,255,0.18); flex-shrink: 0; height: 52px; min-width: 0; }
#my-avatar-mini { width: 48px; height: 48px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; cursor: pointer; overflow: hidden; background: none; border: none; border-radius: 0; padding: 0; }
#my-avatar-mini canvas { width: 48px; height: 48px; image-rendering: pixelated; display: block; background: transparent; }
#user-section-info { flex: 0 1 auto; min-width: 0; max-width: 160px; overflow: hidden; }
#my-name-display { font-size: 13px; font-weight: 900; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-shadow: 0 1px 0 rgba(0,0,0,0.35); }
#my-motto-display { font-size: 10px; color: #fff; font-style: italic; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-shadow: 0 1px 0 rgba(0,0,0,0.2); margin-top: 1px; }
#user-section-btns { display: flex; flex-direction: column; gap: 2px; flex-shrink: 0; }
.usec-btn { border: none; border-radius: 6px; padding: 3px 8px; font-size: 10px; font-weight: 700; cursor: pointer; transition: all .12s; white-space: nowrap; }
#edit-avatar-btn { background: var(--accent); color: #fff; }
#edit-avatar-btn:hover { filter: brightness(1.15); }
#coins-pill { display: flex; align-items: center; justify-content: center; height: 32px; padding: 0 10px; border-radius: 10px; border: 1px solid var(--win-header-border); background: linear-gradient(180deg, var(--win-header1), var(--win-header2)); color: #fff; font-size: 12px; font-weight: 900; white-space: nowrap; box-shadow: inset 0 1px 0 rgba(255,255,255,0.32), inset 0 -2px 0 rgba(0,0,0,0.18); text-shadow: 0 1px 0 rgba(0,0,0,0.35); }
#chat-input-area { flex: 1; display: flex; align-items: center; gap: 6px; padding: 0 8px; min-width: 0; }
#chat-input { flex: 1; min-width: 0; background: rgba(0,0,0,0.78); border: 1px solid var(--win-border); border-radius: 10px; padding: 8px 14px; color: #fff; font-size: 13px; outline: none; box-shadow: inset 0 2px 0 rgba(255,255,255,0.05), inset 0 -2px 0 rgba(0,0,0,0.35); }
#chat-input:focus { border-color: var(--win-header2); }
#chat-log-btn, #send-btn { border: 1px solid var(--win-border); border-radius: 10px; padding: 8px 14px; color: var(--win-text); font-weight: 900; font-size: 13px; cursor: pointer; transition: transform .12s, filter .12s, background .12s; flex-shrink: 0; box-shadow: inset 0 1px 0 rgba(255,255,255,0.45), inset 0 -2px 0 rgba(0,0,0,0.14); }
#chat-log-btn { background: linear-gradient(180deg, var(--win-header1), var(--win-header2)); color: #fff; border-color: var(--win-header-border); text-shadow: 0 1px 0 rgba(0,0,0,0.35); box-shadow: inset 0 1px 0 rgba(255,255,255,0.32), inset 0 -2px 0 rgba(0,0,0,0.18); }
#chat-log-btn:hover { filter: brightness(1.05); transform: scale(1.03); }
#send-btn { background: linear-gradient(180deg, var(--win-go1), var(--win-go2)); color: #fff; border-color: var(--win-go-border); box-shadow: inset 0 1px 0 rgba(255,255,255,0.35), inset 0 -2px 0 rgba(0,0,0,0.22); }
#send-btn:hover { filter: brightness(1.06); transform: scale(1.04); }
#bar-sep { width: 1px; height: 36px; background: var(--win-border); flex-shrink: 0; opacity: .7; }
#bar-action-btns { display: flex; align-items: center; gap: 4px; flex-shrink: 0; padding-left: 6px; }
.bar-icon-btn { position: relative; background: linear-gradient(180deg, var(--win-header1), var(--win-header2)); border: 1px solid var(--win-header-border); border-radius: 10px; padding: 7px 10px; color: #fff; font-size: 17px; cursor: pointer; transition: filter .12s; line-height: 1; flex-shrink: 0; box-shadow: inset 0 1px 0 rgba(255,255,255,0.32), inset 0 -2px 0 rgba(0,0,0,0.18); text-shadow: 0 1px 0 rgba(0,0,0,0.35); }
.bar-icon-btn:hover, .bar-icon-btn.activo { filter: brightness(1.05); }
.bar-icon-btn.activo { box-shadow: inset 0 2px 3px rgba(0,0,0,0.3); }
#inv-count { font-size: 10px; margin-left: 1px; vertical-align: middle; font-weight: 900; }
/* afuera de las salas: sin chat, sin gestos, sin la gente ni encajar */
#hotel.afuera #chat-input-area, #hotel.afuera #bar-sep, #hotel.afuera #b-gestos, #hotel.afuera #b-gente, #hotel.afuera #b-encajar, #hotel.afuera #move-hint, #hotel.afuera #b-enlace-sala, #hotel.afuera #sala-info { display: none !important; }
/* Abajo a la izquierda, chiquito y en blanco: el nombre de la sala y su dueño */
#sala-info { position: absolute; left: 10px; bottom: 10px; z-index: 4; max-width: min(40vw, 340px); font-family: var(--fuente); font-size: 11px; line-height: 1.4; color: #f2f2f6; text-shadow: 1px 0 0 #000, -1px 0 0 #000, 0 1px 0 #000, 0 -1px 0 #000; pointer-events: none; user-select: none; }
#sala-info > div { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#sala-info .si-k { color: #b8c4d8; }
#titulo-sala { min-width: 0; }
#hotel.afuera #chat-bar { height: 78px; }
#hotel.afuera #chat-bar-inner { max-width: 760px; justify-content: flex-start; gap: 12px; }
#hotel.afuera #bar-action-btns { margin-left: auto; }

/* ── Afuera (y mientras carga): la portada ── */
#portada { position: absolute; inset: 0; z-index: 5; display: flex; overflow: hidden; background: #2b3140; }
/* el fondo de la portada: la ciudad en miniatura del Obelisco, con el edificio de CV Hotel y los autos andando, en
   pixel art propio. La dibuja src/app/ciudad.js en este lienzo (sin suavizar) y aparece cuando termina de armarse */
#ciudad { position: absolute; left: 0; top: 0; image-rendering: crisp-edges; image-rendering: pixelated; opacity: 0; transition: opacity .35s ease; }
#ciudad.lista { opacity: 1; }
#portada::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(8,11,16,0) 45%, rgba(8,11,16,0.3)); pointer-events: none; }
#landing-scene { position: relative; z-index: 1; display: flex; align-items: flex-end; width: 100%; height: 100%; padding: 24px; }
#landing-copy { max-width: 420px; padding: 18px 20px; border-radius: 18px; background: rgba(10,14,20,0.62); border: 1px solid rgba(255,255,255,0.08); box-shadow: 0 20px 60px rgba(0,0,0,0.35); }
#landing-kicker { font-size: 12px; font-weight: 900; letter-spacing: 2px; color: #f2d37c; text-transform: uppercase; margin-bottom: 8px; }
#landing-title { font-size: 34px; line-height: 1.02; font-weight: 900; color: #fff; margin-bottom: 10px; text-shadow: 0 3px 10px rgba(0,0,0,0.35); }
#portada-txt { font-size: 13px; line-height: 1.65; color: rgba(255,255,255,0.82); }
#portada-botones { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
/* cargando: solo el cartel, sin el titulo de elegir sala */
#portada:not(.afuera) #landing-title { display: none; }

/* ── Ficha de una persona y del mueble (abajo a la derecha) ── */
.profile-panel, .furniture-panel { position: absolute; bottom: 4px; right: 4px; width: 160px; background: transparent; border: none; box-shadow: none; padding: 0; pointer-events: auto; text-align: center; z-index: 200; }
.pp-char-wrap, .fp-img-wrap { width: 160px; height: 120px; display: flex; align-items: flex-end; justify-content: center; background: transparent; position: relative; }
#pp-canvas, #fp-canvas { image-rendering: pixelated; display: block; }
.pp-info-bar { background: rgba(20,20,20,0.88); padding: 9px 14px 13px; border-top: 2px solid rgba(255,255,255,0.12); }
.pp-name { font-size: 15px; font-weight: 900; color: #fff; line-height: 1.3; word-break: break-word; }
.pp-sub { font-size: 11px; color: rgba(255,255,255,0.55); margin-top: 5px; font-weight: 600; line-height: 1.5; word-break: break-word; }
.pp-sub:empty { display: none; }
.pp-close-x { position: absolute; top: 4px; right: 6px; background: none; border: none; color: rgba(255,255,255,0.45); font-size: 16px; cursor: pointer; line-height: 1; padding: 2px 4px; z-index: 1; }
.pp-close-x:hover { color: #fff; }
.fp-buttons { display: flex; gap: 6px; margin-top: 8px; justify-content: center; flex-wrap: wrap; }
.fp-btn { flex: 1 1 auto; padding: 5px 6px; background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.15); border-radius: 6px; color: #fff; font-size: 11px; cursor: pointer; transition: background 0.15s; white-space: nowrap; }
.fp-btn:hover { background: rgba(255,255,255,0.18); }
.fp-btn-pickup { background: #7c5cbf33; }
.fp-btn-rojo { background: #c0392b; border-color: #922b21; }
.fp-btn-rojo:hover { background: #d04535; }
.pp-buttons { gap: 4px; }
/* la ficha de una persona: el Javo a la izquierda, del tamaño de la sala y siempre parado en el mismo lugar (abajo
   a la izquierda de la ficha, que se apoya abajo a la derecha); a su lado el nombre y los botones en dos columnas
   parejas, los del equipo (rojos) al final */
#profile-panel { width: auto; max-width: calc(100% - 12px); display: flex; align-items: flex-end; text-align: left; background: rgba(20,20,20,0.88); border-top: 2px solid rgba(255,255,255,0.12); border-radius: 6px 6px 0 0; }
#profile-panel .pj-javo { flex: 0 0 96px; height: 160px; display: flex; align-items: flex-end; justify-content: center; align-self: flex-end; }
#profile-panel #pp-canvas { width: 96px; height: 160px; }
#profile-panel .pj-lado { flex: 1 1 auto; min-width: 0; padding: 10px 12px 10px 4px; }
#profile-panel .pp-name { padding-right: 24px; }
#profile-panel .pp-sub { margin-top: 2px; }
#profile-panel[hidden] { display: none; }
.pj-botones { display: grid; grid-template-columns: repeat(2, minmax(104px, 1fr)); gap: 5px; margin-top: 8px; }
.pj-botones .fp-btn { display: flex; align-items: center; justify-content: center; gap: 5px; min-height: 28px; padding: 4px 8px; font-size: 11px; font-weight: 700; }
.pj-botones .fp-btn[hidden] { display: none; }
.pj-botones .fp-btn-rojo { order: 2; }

/* ── La gente de la sala ── */
#userlist-popup { position: absolute; bottom: 8px; left: 8px; width: 220px; max-height: min(320px, calc(100% - 64px)); background: var(--panel); border: 1px solid var(--border); border-radius: 12px; z-index: 250; box-shadow: 0 8px 32px rgba(0,0,0,0.5); padding: 8px; display: flex; flex-direction: column; }
.userlist-head { position: relative; min-height: 20px; }
.sidebar-label { font-size: 10px; font-weight: 900; color: var(--muted); letter-spacing: 1.5px; text-transform: uppercase; margin-bottom: 8px; }
.userlist-head .pp-close-x { top: -4px; right: -2px; }
#lista-gente { overflow-y: auto; flex: 1; min-height: 0; scrollbar-width: thin; scrollbar-color: var(--border) transparent; }
.user-item { display: flex; align-items: center; gap: 8px; padding: 6px 6px; border-radius: 10px; transition: background .12s; cursor: pointer; }
.user-item:hover, .user-item:focus-visible { background: #22243c; outline: none; }
.avatar-mini { width: 28px; height: 28px; flex-shrink: 0; image-rendering: pixelated; }
.user-info-mini { flex: 1; overflow: hidden; }
.user-name-mini { font-size: 12px; font-weight: 900; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-status-mini { font-size: 10px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-badge-mini { font-size: 10px; color: var(--accent3); font-weight: 900; }
.online-dot { width: 6px; height: 6px; border-radius: 50%; background: #4ade80; flex-shrink: 0; }
#b-denunciar-sala { margin-top: 8px; flex: 0 0 auto; }

/* ── Las ventanas ── */
.panel[data-ventana] { position: fixed; z-index: 300; max-width: calc(100vw - 8px); max-height: calc(100vh - var(--barra) - 8px); }

/* Registro de conversacion */
#chat-log-modal { right: 18px; bottom: calc(var(--barra) + 4px); width: min(760px, 96vw); height: min(55vh, 440px); background: var(--panel); border: 1px solid var(--border); border-radius: 14px; display: flex; flex-direction: column; box-shadow: 0 12px 40px rgba(0,0,0,0.45); overflow: hidden; z-index: 320; }
#chat-log-header { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; border-bottom: 1px solid var(--border); font-weight: 900; color: var(--text); cursor: move; background: linear-gradient(180deg, #1b1831, #161426); user-select: none; touch-action: none; }
#chat-log-close { background: transparent; border: none; color: var(--muted); font-size: 18px; cursor: pointer; line-height: 1; padding: 0 2px; }
#chat-log-close:hover { color: var(--text); }
#chat-messages { flex: 1; overflow-y: auto; padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; scrollbar-width: thin; scrollbar-color: var(--border) transparent; -webkit-user-select: text; user-select: text; }
#chat-messages::-webkit-scrollbar { width: 4px; }
#chat-messages::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
.msg { display: flex; gap: 8px; align-items: flex-start; animation: msgIn .18s ease; }
@keyframes msgIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.msg-avatar { width: 24px; height: 24px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 900; flex-shrink: 0; margin-top: 1px; user-select: none; color: #fff; }
.msg-body { flex: 1; min-width: 0; }
.msg-header { display: flex; gap: 6px; align-items: baseline; }
.msg-username { font-size: 12px; font-weight: 900; }
.msg-time { font-size: 10px; color: var(--muted); }
.msg-text { font-size: 13px; color: #c8c7e0; line-height: 1.35; word-break: break-word; }
.msg.sistema .msg-text { color: var(--muted); font-style: italic; font-size: 12px; }
.msg-acc { margin-left: auto; display: inline-flex; gap: 2px; align-self: center; height: 16px; align-items: center; }
.log-btn { background: none; border: 1px solid transparent; padding: 0 4px; min-width: 24px; min-height: 18px; color: var(--muted); font-size: 12px; line-height: 16px; cursor: pointer; border-radius: 6px; }
.log-btn:hover, .log-btn:focus-visible { color: var(--text); border-color: var(--border); background: rgba(255,255,255,0.06); outline: none; }

/* PLAZA NAVIGATOR */
#room-navigator { width: 380px; height: 360px; background: var(--win-bg); border: 3px solid var(--win-border); border-radius: 6px; box-shadow: 4px 4px 0 var(--win-shadow), 0 8px 32px rgba(0,0,0,0.6); top: 120px; right: 20px; font-family: var(--fuente); display: flex; flex-direction: column; overflow: hidden; }
#nav-header { background: linear-gradient(180deg, var(--win-header1), var(--win-header2)); padding: 8px 12px; display: flex; align-items: center; justify-content: space-between; border-bottom: 2px solid var(--win-header-border); cursor: grab; user-select: none; touch-action: none; }
#nav-header h2 { font-size: 13px; font-weight: 900; color: #fff; text-shadow: 1px 1px 0 #000; letter-spacing: .5px; }
#nav-close, #settings-close, #edit-room-close, .win-close, .room-modal-close { width: 20px; height: 20px; background: #cc3333; border: none; border-radius: 50%; color: #fff; font-size: 11px; font-weight: 900; cursor: pointer; display: flex; align-items: center; justify-content: center; line-height: 1; padding: 0; flex-shrink: 0; }
#nav-close:hover, #settings-close:hover, #edit-room-close:hover, .win-close:hover, .room-modal-close:hover { background: #ee4444; }
#nav-tabs { display: flex; background: var(--win-tab); border-bottom: 2px solid var(--win-border); flex-shrink: 0; }
.nav-tab { flex: 1; padding: 7px 4px; font-size: 11px; font-weight: 900; text-align: center; cursor: pointer; color: var(--win-tab-text); background: transparent; border: none; font-family: var(--fuente); transition: background .1s; border-right: 1px solid var(--win-border); }
.nav-tab:last-child { border-right: none; flex: 0 0 auto; padding: 7px 8px; }
.nav-tab.active { background: var(--win-tab-active); color: var(--win-text); border-bottom: 2px solid var(--win-tab-active); margin-bottom: -2px; }
#nav-buscar { display: flex; gap: 6px; padding: 6px 8px; background: var(--win-body2); border-bottom: 1px solid var(--win-item-border); flex-shrink: 0; }
#nav-buscar input { flex: 1; min-width: 0; background: var(--win-body); border: 1px solid var(--win-border); border-radius: 4px; color: var(--win-text); font-size: 12px; padding: 5px 8px; outline: none; font-family: var(--fuente); }
#nav-buscar input:focus { border-color: var(--win-header2); }
#nav-list { flex: 1 1 auto; min-height: 0; overflow-y: auto; background: var(--win-body); }
.nav-room-row { display: flex; align-items: center; gap: 6px; padding: 8px 10px; border-bottom: 1px solid var(--win-item-border); cursor: pointer; transition: background .1s; }
.nav-room-row:hover, .nav-room-row:focus-visible { background: var(--win-body3); outline: none; }
.nav-room-row.selected { background: var(--win-body2); }
.nav-dot { width: 10px; height: 10px; border-radius: 50%; background: #44bb44; border: 1px solid #229922; flex-shrink: 0; }
.nav-dot.empty { background: var(--win-tab); border-color: var(--win-border); }
.nav-room-name { flex: 1; font-size: 12px; font-weight: 800; color: var(--win-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav-room-lock { font-size: 11px; flex-shrink: 0; }
.nav-room-count { font-size: 11px; font-weight: 700; color: var(--win-text); background: var(--win-bg); border: 1px solid var(--win-border); border-radius: 4px; padding: 2px 7px; flex-shrink: 0; }
.nav-room-count.has-people { background: #44bb44; color: #fff; border-color: #229922; }
.nav-go { background: linear-gradient(180deg, var(--win-go1), var(--win-go2)); border: 2px solid var(--win-go-border); border-radius: 4px; color: #fff; font-size: 10px; font-weight: 900; padding: 3px 8px; cursor: pointer; font-family: var(--fuente); box-shadow: 0 2px 0 var(--win-go-shadow); flex-shrink: 0; }
.nav-go:hover { filter: brightness(1.15); }
.nav-go:active { transform: translateY(1px); box-shadow: none; }
.nav-vacio { padding: 16px; text-align: center; font-size: 11px; color: #5a7a9a; font-style: italic; }
#nav-detail { background: var(--win-body2); border-top: 2px solid var(--win-border); padding: 10px 12px; min-height: 80px; flex-shrink: 0; }
#nav-mine-footer { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 12px; background: var(--win-body2); border-top: 2px solid var(--win-border); flex-shrink: 0; }
#nav-mine-hint { font-size: 11px; color: var(--win-muted); font-style: italic; }
#nav-create-room-btn { background: linear-gradient(180deg, var(--win-go1), var(--win-go2)); border: 2px solid var(--win-go-border); border-radius: 5px; color: #fff; font-size: 11px; font-weight: 900; padding: 5px 14px; cursor: pointer; font-family: var(--fuente); box-shadow: 0 2px 0 var(--win-go-shadow); transition: all .1s; white-space: nowrap; }
#nav-create-room-btn:hover { filter: brightness(1.15); }
#nav-create-room-btn:active { transform: translateY(1px); box-shadow: none; }
#nav-detail-empty { font-size: 11px; color: var(--win-muted); font-style: italic; text-align: center; padding: 10px 0; }
#nav-detail-name { font-size: 13px; font-weight: 900; color: var(--win-text); margin-bottom: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#nav-detail-owner { font-size: 10px; color: var(--win-muted); margin-bottom: 3px; }
#nav-detail-desc { font-size: 11px; color: var(--win-text); margin-bottom: 6px; min-height: 14px; font-style: italic; }
#nav-detail-footer { display: flex; align-items: center; justify-content: space-between; }
#nav-detail-capacity { font-size: 12px; font-weight: 700; color: var(--win-text); }
#nav-go-btn { background: linear-gradient(180deg, var(--win-go1), var(--win-go2)); border: 2px solid var(--win-go-border); border-radius: 5px; color: #fff; font-size: 12px; font-weight: 900; padding: 5px 18px; cursor: pointer; font-family: var(--fuente); box-shadow: 0 2px 0 var(--win-go-shadow); transition: all .1s; }
#nav-go-btn:hover { filter: brightness(1.15); }
#nav-go-btn:active { transform: translateY(1px); box-shadow: none; }

/* MI INVENTARIO */
.inventory-panel { width: 280px; background: var(--win-bg); border: 3px solid var(--win-border); border-radius: 6px; display: flex; flex-direction: column; pointer-events: auto; box-shadow: 4px 4px 0 var(--win-shadow), 0 8px 32px rgba(0,0,0,0.6); font-family: var(--fuente); }
.inv-header { display: flex; align-items: center; justify-content: space-between; padding: 8px 12px; background: linear-gradient(180deg, var(--win-header1), var(--win-header2)); border-bottom: 2px solid var(--win-header-border); cursor: grab; user-select: none; flex-shrink: 0; position: relative; touch-action: none; }
.inv-header:active { cursor: grabbing; }
.inv-title { font-size: 12px; font-weight: 900; color: #fff; text-shadow: 1px 1px 0 #000; letter-spacing: .5px; }
.inv-header .pp-close-x, .room-modal-header .pp-close-x { position: static; color: rgba(255,255,255,0.75); }
.inv-header .pp-close-x:hover, .room-modal-header .pp-close-x:hover { color: #fff; }
.inv-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; padding: 8px; overflow-y: auto; min-height: 160px; max-height: 340px; align-content: start; }
.inv-item { background: var(--win-item); border: 1px solid var(--win-item-border); border-radius: 6px; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; transition: all .15s; position: relative; overflow: hidden; width: 100%; aspect-ratio: 1; }
.inv-item:hover, .inv-item.selected, .inv-item:focus-visible { border-color: var(--accent); background: #7c5cbf22; outline: none; }
.inv-item canvas { image-rendering: pixelated; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); pointer-events: none; }
.inv-item-name { font-size: 7px; color: var(--muted); text-align: center; line-height: 1; padding: 0 2px 2px; position: relative; z-index: 1; width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.inv-qty { position: absolute; top: 2px; left: 3px; background: #7c5cbf; color: #fff; font-size: 8px; font-weight: 900; min-width: 14px; height: 13px; border-radius: 6px; display: flex; align-items: center; justify-content: center; padding: 0 2px; pointer-events: none; line-height: 1; z-index: 2; }
.inv-empty { padding: 20px; text-align: center; font-size: 12px; color: var(--muted); line-height: 1.6; }
.win-hint { font-size: 11px; color: var(--win-muted); font-style: italic; padding: 6px 10px 8px; border-top: 1px solid var(--win-item-border); background: var(--win-body2); border-radius: 0 0 3px 3px; }

/* CATALOGO */
.catalogue-panel { width: 460px; height: 420px; max-height: calc(100vh - var(--barra) - 8px); background: var(--win-bg); border: 3px solid var(--win-border); border-radius: 6px; display: flex; flex-direction: column; pointer-events: auto; box-shadow: 4px 4px 0 var(--win-shadow), 0 8px 32px rgba(0,0,0,0.6); font-family: var(--fuente); overflow: hidden; }
.cat-topbar { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 10px; background: linear-gradient(180deg, var(--win-header1), var(--win-header2)); cursor: grab; user-select: none; border-bottom: 2px solid var(--win-header-border); flex-shrink: 0; touch-action: none; }
.cat-topbar:active { cursor: grabbing; }
.cat-topbar-title { color: #fff; font-size: 12px; font-weight: 900; letter-spacing: .5px; text-shadow: 1px 1px 0 #000; }
.cat-topbar-coins { color: #f0c040; font-size: 11px; font-weight: 900; text-shadow: 1px 1px 0 #000; }
.cat-topbar-close { width: 18px; height: 18px; background: #cc3333; border: 1px solid #aa1111; border-radius: 50%; color: #fff; font-size: 10px; font-weight: 900; cursor: pointer; display: flex; align-items: center; justify-content: center; line-height: 1; padding: 0; margin-left: auto; }
.cat-topbar-close:hover { background: #ee4444; }
.cat-body { display: flex; flex: 1; min-height: 0; }
.cat-left { flex: 1; display: flex; flex-direction: column; min-width: 0; border-right: 2px solid #9a8a6a; }
.cat-banner { background: linear-gradient(135deg, #4a3a70, #2a1a50); padding: 8px 10px; border-bottom: 2px solid #9a8a6a; flex-shrink: 0; }
.cat-banner-title { color: #f0c040; font-size: 14px; font-weight: 900; text-shadow: 2px 2px 0 #000, 0 0 8px #f0c04060; letter-spacing: 2px; text-transform: uppercase; text-align: center; }
.cat-items-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; padding: 8px; overflow-y: auto; flex: 1; background: var(--win-body3); min-height: 0; align-content: start; grid-auto-rows: minmax(84px, auto); }
.cat-item { background: var(--win-body); border: 2px solid var(--win-border); padding: 4px; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; transition: all .1s; position: relative; border-radius: 4px; min-height: 84px; aspect-ratio: 1 / 1; }
.cat-item:hover, .cat-item:focus-visible { border-color: var(--win-header2); filter: brightness(1.05); outline: none; }
.cat-item.selected { border-color: #f0c040; background: #fff8e0; box-shadow: 0 0 0 1px #f0c040; }
.cat-item canvas { image-rendering: pixelated; display: block; width: 72px; height: 72px; max-width: 100%; max-height: 100%; }
.cat-vacio { grid-column: 1 / -1; padding: 16px; text-align: center; font-size: 11px; color: var(--win-muted); font-style: italic; }
.cat-detail { background: var(--win-body2); border-top: 2px solid var(--win-border); padding: 8px 10px; flex-shrink: 0; min-height: 90px; display: flex; gap: 10px; align-items: flex-start; }
.cat-detail-preview { width: 72px; height: 72px; background: var(--win-body3); border: 2px solid var(--win-border); flex-shrink: 0; display: flex; align-items: center; justify-content: center; border-radius: 4px; }
.cat-detail-preview canvas { image-rendering: pixelated; width: 68px; height: 68px; }
.cat-detail-info { flex: 1; min-width: 0; }
.cat-detail-name { font-size: 12px; font-weight: 900; color: var(--win-text); margin-bottom: 2px; }
.cat-detail-desc { font-size: 10px; color: var(--win-muted); margin-bottom: 6px; line-height: 1.3; }
.cat-detail-buy { display: flex; align-items: center; gap: 8px; }
.cat-detail-price { font-size: 11px; color: var(--win-text); font-weight: 700; }
.cat-buy-btn { padding: 3px 12px; background: linear-gradient(180deg, var(--win-go1), var(--win-go2)); color: #fff; border: 2px solid var(--win-go-border); border-radius: 4px; font-size: 11px; font-weight: 900; cursor: pointer; font-family: var(--fuente); box-shadow: 0 2px 0 var(--win-go-shadow); transition: all .1s; }
.cat-buy-btn:hover { filter: brightness(1.15); transform: translateY(-1px); }
.cat-buy-btn:active { transform: translateY(1px); box-shadow: none; }
.cat-buy-btn.sin-monedas { filter: grayscale(.75); opacity: .75; }
.pintar-precios { font-weight: 400; text-transform: none; letter-spacing: 0; opacity: .8; }
.cat-buy-btn:disabled { background: #888; border-color: #666; cursor: not-allowed; transform: none; box-shadow: none; }
.cat-tabs-wrap { display: flex; width: 110px; flex-shrink: 0; min-height: 0; background: var(--win-tab); border-left: 2px solid var(--win-border); }
.cat-tabs { width: 100%; flex-shrink: 0; overflow-y: auto; background: var(--win-tab); display: flex; flex-direction: column; min-height: 0; }
.cat-tabs-arrow { display: none; }
.cat-tab { padding: 5px 8px; font-size: 11px; font-weight: 700; color: var(--win-tab-text); cursor: pointer; border: none; border-bottom: 1px solid var(--win-border); background: var(--win-body3); transition: background .1s; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-family: var(--fuente); text-align: left; }
.cat-tab:hover { filter: brightness(1.05); }
.cat-tab.active { background: var(--win-tab-active); color: var(--win-text); font-weight: 900; border-left: 3px solid var(--win-header2); padding-left: 5px; }

/* CONFIGURACION */
#settings-window { width: 360px; background: var(--win-bg); border: 3px solid var(--win-border); border-radius: 6px; box-shadow: 4px 4px 0 var(--win-shadow), 0 8px 32px rgba(0,0,0,0.6); font-family: var(--fuente); display: flex; flex-direction: column; overflow: hidden; }
#settings-header { background: linear-gradient(180deg, var(--win-header1), var(--win-header2)); padding: 8px 12px; display: flex; align-items: center; justify-content: space-between; border-bottom: 2px solid var(--win-header-border); cursor: grab; user-select: none; touch-action: none; }
#settings-header h2 { font-size: 13px; font-weight: 900; color: #fff; text-shadow: 1px 1px 0 #000; letter-spacing: .5px; }
#settings-tabs { display: flex; background: var(--win-tab); border-bottom: 2px solid var(--win-border); }
.settings-tab { flex: 1; padding: 8px 12px; background: transparent; border: none; border-right: 2px solid var(--win-border); color: var(--win-muted); font-size: 11px; font-weight: 900; cursor: pointer; font-family: var(--fuente); transition: all .1s; }
.settings-tab:last-child { border-right: none; }
.settings-tab:hover { background: var(--win-tab-active); color: var(--win-text); }
.settings-tab.active { background: var(--win-tab-active); color: var(--win-tab-text); }
#settings-body { background: var(--win-body); overflow-y: auto; max-height: 400px; }
.settings-subtitle { font-size: 10px; color: var(--win-muted); padding: 8px 12px 4px; }
#theme-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; padding: 12px; }
/* Configuracion → Sonido */
.snd-caja { margin: 8px 12px 12px; padding: 10px 12px; background: var(--win-body2); border: 2px solid var(--win-border); border-radius: 4px; color: var(--win-text); font-size: 11px; font-weight: 700; }
.snd-fila { display: flex; align-items: center; gap: 8px; padding: 4px 0; cursor: pointer; }
.snd-fila input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--win-go1); margin: 0; }
.snd-vol input[type="range"] { flex: 1; min-width: 0; accent-color: var(--win-go1); }
.snd-vol input[type="range"]:disabled { opacity: .45; }
.snd-n { min-width: 42px; text-align: right; color: var(--win-muted); font-variant-numeric: tabular-nums; }
.snd-acciones { display: flex; justify-content: flex-end; padding-top: 6px; }
.snd-acciones .win-go:disabled { opacity: .5; cursor: default; }
.snd-nota { margin: 8px 0 0; font-size: 10px; font-weight: 400; color: var(--win-muted); }
.theme-card { border: 3px solid transparent; border-radius: 6px; cursor: pointer; overflow: hidden; transition: border-color .15s; background: none; padding: 0; display: block; width: 100%; font-family: var(--fuente); }
.theme-card:hover, .theme-card:focus-visible { border-color: var(--win-header1); outline: none; }
.theme-card.active { border-color: #f0c040; box-shadow: 0 0 0 1px #f0c040; }
.theme-card-preview { height: 52px; display: flex; flex-direction: column; }
.theme-card-swatch-header { height: 16px; flex-shrink: 0; }
.theme-card-swatch-body { flex: 1; display: flex; }
.theme-card-swatch-sidebar { width: 30%; }
.theme-card-swatch-content { flex: 1; }
.theme-card-label { font-size: 10px; font-weight: 900; text-align: center; padding: 4px 2px; background: var(--win-body2); color: var(--win-text); }

/* EDITAR PERSONAJE, CREAR NUEVA SALA (las ventanas grandes del medio) */
.room-modal-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,0.75); z-index: 9998; }
.room-modal-box { position: fixed; background: var(--win-bg); border: 3px solid var(--win-border); border-radius: 6px; width: min(92vw, 660px); display: flex; flex-direction: column; overflow: hidden; box-shadow: 4px 4px 0 var(--win-shadow), 0 8px 32px rgba(0,0,0,0.6); font-family: var(--fuente); z-index: 9999 !important; }
.room-modal-header { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 12px; background: linear-gradient(180deg, var(--win-header1), var(--win-header2)); border-bottom: 2px solid var(--win-header-border); font-size: 13px; font-weight: 900; color: #fff; letter-spacing: .5px; text-shadow: 1px 1px 0 #000; user-select: none; cursor: move; flex-shrink: 0; touch-action: none; }
.room-modal-body { display: flex; gap: 0; overflow: hidden; min-height: 0; }
.room-layout-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; padding: 12px; overflow-y: auto; width: 320px; flex-shrink: 0; border-right: 2px solid var(--win-border); background: var(--win-body3); max-height: 420px; align-content: start; }
.room-layout-opt { background: var(--win-body); border: 2px solid var(--win-border); border-radius: 6px; padding: 6px; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; transition: all .15s; aspect-ratio: 1; font-family: var(--fuente); color: var(--win-text); font-size: 10px; font-weight: 900; }
.room-layout-opt:hover, .room-layout-opt:focus-visible { border-color: var(--win-header2); filter: brightness(1.05); outline: none; }
.room-layout-opt.selected { border-color: #f0c040; box-shadow: 0 0 0 1px #f0c040; }
.room-layout-opt canvas { image-rendering: pixelated; width: 100%; max-width: 100%; height: auto; min-height: 0; }
.room-layout-opt span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.room-modal-right { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 14px 14px; gap: 8px; background: var(--win-body2); min-width: 0; overflow-y: auto; }
#room-preview-canvas { image-rendering: pixelated; border-radius: 6px; background: var(--win-body3); border: 2px solid var(--win-border); flex-shrink: 0; }
.room-layout-name { font-size: 14px; font-weight: 900; color: var(--win-text); text-align: center; }
.room-layout-tiles { font-size: 11px; color: var(--win-muted); }
.room-modal-fila { display: flex; align-items: center; gap: 6px; width: 100%; }
.room-modal-fila label { font-size: 11px; color: #a080ff; font-weight: 700; white-space: nowrap; }
.room-modal-fila select { flex: 1; min-width: 0; background: #1e1e2e; border: 1px solid #3a3a54; border-radius: 6px; color: #fff; font-size: 12px; padding: 5px 7px; outline: none; }
.room-create-confirm { margin-top: 6px; width: 100%; padding: 11px; background: linear-gradient(180deg, var(--win-go1), var(--win-go2)); color: #fff; border: 2px solid var(--win-go-border); border-radius: 5px; font-size: 14px; font-weight: 900; cursor: pointer; transition: all .1s; box-shadow: 0 3px 0 var(--win-go-shadow); letter-spacing: .5px; font-family: var(--fuente); }
.room-create-confirm:hover { filter: brightness(1.15); transform: translateY(-1px); }
.room-create-confirm:active { transform: translateY(2px); box-shadow: none; }
.status-input { width: 100%; background: var(--bg); border: 1px solid var(--border); border-radius: 10px; padding: 7px 10px; color: var(--text); font-size: 12px; outline: none; }
.status-input:focus { border-color: var(--accent); }

#avatar-editor-modal { width: 95%; max-width: min(580px, calc(100vw - 8px)); }
.avatar-editor-inner { padding: 16px 20px; display: flex; flex-direction: column; gap: 16px; overflow-y: auto; min-height: 0; }
.avatar-editor-body { display: flex; gap: 16px; align-items: flex-start; justify-content: center; }
.avatar-editor-preview-col { display: flex; flex-direction: column; align-items: center; gap: 8px; flex-shrink: 0; }
#avatar-editor-preview { image-rendering: pixelated; background: rgba(255,255,255,0.04); border-radius: 8px; border: 1px solid var(--border); }
.avatar-editor-caption { font-size: 11px; color: var(--muted); }
.avatar-editor-parts-col { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 14px; max-width: 360px; }
#avatar-editor-parts { display: flex; flex-direction: column; gap: 4px; }
.avatar-editor-motto-col { display: flex; flex-direction: column; gap: 4px; }
.avatar-editor-motto-col label { font-size: 11px; font-weight: 700; color: var(--accent); text-transform: uppercase; letter-spacing: .4px; }
.avatar-editor-actions { display: flex; gap: 8px; justify-content: flex-end; }
.avatar-editor-row { display: flex; align-items: center; gap: 6px; padding: 2px 0; }
.avatar-editor-row .part-btn { width: 28px; height: 28px; border-radius: 5px; border: 2px solid var(--win-go-border); background: linear-gradient(180deg, var(--win-go1), var(--win-go2)); color: #fff; font-weight: 900; cursor: pointer; font-size: 12px; line-height: 1; display: flex; align-items: center; justify-content: center; box-shadow: 0 1px 0 var(--win-go-shadow); flex-shrink: 0; padding: 0; }
.avatar-editor-row .part-btn:hover { filter: brightness(1.1); }
.avatar-editor-row .part-count { font-size: 12px; color: var(--win-text); font-weight: 800; min-width: 32px; text-align: center; }
.avatar-editor-row .part-icon { font-size: 18px; width: 22px; text-align: center; flex-shrink: 0; }
.avatar-editor-row .part-label { font-size: 13px; color: var(--win-text); width: 64px; flex-shrink: 0; overflow: hidden; text-overflow: ellipsis; }
.avatar-editor-row .part-color { width: 20px; height: 20px; border-radius: 4px; border: 1px solid var(--border); flex-shrink: 0; }
.avatar-editor-row .part-sep { width: 1px; height: 18px; background: var(--border); margin: 0 2px; flex-shrink: 0; }
.room-modal-cancel, .win-cancel { padding: 8px 16px; border-radius: 5px; border: 2px solid var(--win-border); background: transparent; color: var(--win-text); font-size: 12px; font-weight: 900; cursor: pointer; transition: all .15s; font-family: var(--fuente); }
.room-modal-cancel:hover, .win-cancel:hover { background: rgba(255,255,255,0.08); }
.room-modal-confirm, .win-go { padding: 8px 20px; border-radius: 5px; border: 2px solid var(--win-go-border); background: linear-gradient(180deg, var(--win-go1), var(--win-go2)); color: #fff; font-size: 12px; font-weight: 900; cursor: pointer; transition: all .15s; font-family: var(--fuente); box-shadow: 0 2px 0 var(--win-go-shadow); }
.room-modal-confirm:hover, .win-go:hover { filter: brightness(1.1); }
.room-modal-confirm:disabled, .win-go:disabled { filter: grayscale(.6); cursor: default; }
.win-go.chico { padding: 5px 14px; font-size: 11px; align-self: flex-start; }
#portada .win-cancel { color: #fff; border-color: rgba(255,255,255,0.4); }
/* la primera vez: el personaje en el medio, sin poder cerrarlo y sin las barras */
#hotel.bienvenida #avatar-editor-close, #hotel.bienvenida #avatar-editor-cancel { display: none; }
#hotel.bienvenida #chat-bar, #hotel.bienvenida #arriba { visibility: hidden; }

/* EDITAR SALA */
#edit-room-modal { width: 340px; background: var(--win-bg); border: 3px solid var(--win-border); border-radius: 6px; display: flex; flex-direction: column; overflow: hidden; box-shadow: 4px 4px 0 var(--win-shadow), 0 8px 32px rgba(0,0,0,0.6); }
#edit-room-header { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 12px; background: linear-gradient(180deg, var(--win-header1), var(--win-header2)); border-bottom: 2px solid var(--win-header-border); font-size: 13px; font-weight: 900; color: #fff; letter-spacing: .5px; text-shadow: 1px 1px 0 #000; cursor: grab; user-select: none; font-family: var(--fuente); flex-shrink: 0; touch-action: none; }
#f-editar-sala { display: flex; flex-direction: column; min-height: 0; }
#edit-room-body { padding: 12px; display: flex; flex-direction: column; gap: 8px; font-family: var(--fuente); overflow-y: auto; min-height: 0; background: var(--win-body); }
.edit-room-field { display: flex; flex-direction: column; gap: 4px; }
.edit-room-field label { font-size: 11px; font-weight: 700; color: var(--win-text); text-transform: uppercase; letter-spacing: .4px; }
.edit-room-field input, .edit-room-field textarea, .edit-room-field select { background: var(--win-body); border: 1px solid var(--win-border); border-radius: 4px; color: var(--win-text); font-size: 12px; padding: 6px 8px; outline: none; resize: none; font-family: inherit; min-width: 0; }
.edit-room-field input:focus, .edit-room-field textarea:focus, .edit-room-field select:focus { border-color: var(--accent); }
.edit-room-pintar { display: grid; grid-template-columns: 44px minmax(0, 1fr) minmax(0, 1fr); gap: 4px; align-items: center; font-size: 11px; color: var(--win-text); }
#edit-room-footer { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 12px; border-top: 2px solid var(--win-border); background: var(--win-body2); flex-shrink: 0; }
#edit-room-delete { background: #ff4444; border: 2px solid #cc3333; border-radius: 7px; color: #fff; font-size: 11px; font-weight: 700; padding: 5px 12px; cursor: pointer; }
#edit-room-delete:hover { background: #ff5555; }
#edit-room-save { background: linear-gradient(180deg, #5a4a9a, #3a2a7a); border: 2px solid #4a3a8a; border-radius: 7px; color: #fff; font-size: 11px; font-weight: 700; padding: 5px 16px; cursor: pointer; }
#edit-room-save:hover { background: linear-gradient(180deg, #6a5aaa, #4a3a8a); }

/* Las ventanas que PawHotel no tenia (gestos, denuncias, la pregunta de si o no): mismas piezas */
.win { background: var(--win-bg); border: 3px solid var(--win-border); border-radius: 6px; display: flex; flex-direction: column; overflow: hidden; box-shadow: 4px 4px 0 var(--win-shadow), 0 8px 32px rgba(0,0,0,0.6); font-family: var(--fuente); color: var(--win-text); }
.win-header { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 12px; background: linear-gradient(180deg, var(--win-header1), var(--win-header2)); border-bottom: 2px solid var(--win-header-border); cursor: grab; user-select: none; flex-shrink: 0; touch-action: none; }
.win-title { font-size: 13px; font-weight: 900; color: #fff; text-shadow: 1px 1px 0 #000; letter-spacing: .5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.win-form { padding: 12px; display: flex; flex-direction: column; gap: 8px; background: var(--win-body); overflow-y: auto; min-height: 0; }
.win-pie { display: flex; gap: 8px; justify-content: flex-end; }
.win-nota { font-size: 11px; color: var(--win-muted); font-style: italic; line-height: 1.4; }
.win-error { font-size: 12px; color: #c0392b; font-weight: 700; min-height: 1em; }
.win-error:empty { display: none; }
#p-denuncia { width: 340px; }
#p-gestos { width: 300px; }
.gestos { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; padding: 10px; background: var(--win-body3); }
.gestos button { min-height: 58px; background: var(--win-body); border: 2px solid var(--win-border); border-radius: 4px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-family: var(--fuente); font-size: 10px; font-weight: 900; color: var(--win-text); transition: all .1s; }
.gestos button span { font-size: 22px; }
.gestos button:hover, .gestos button:focus-visible { border-color: var(--win-header2); filter: brightness(1.05); outline: none; }

/* La pregunta de si o no */
.fondo-modal { position: fixed; inset: 0; z-index: 10050; display: grid; place-items: center; background: rgba(0,0,0,0.75); padding: 16px; }
.dialogo { width: min(340px, 100%); }
.dialogo #dialogo-texto { padding: 12px 12px 4px; font-size: 12px; line-height: 1.5; background: var(--win-body); }
.dialogo .win-pie { padding: 10px 12px 12px; background: var(--win-body); }

/* Avisos */
#toasts { position: fixed; left: 50%; bottom: calc(var(--barra) + 12px); transform: translateX(-50%); z-index: 99999; display: flex; flex-direction: column; align-items: center; gap: 6px; pointer-events: none; width: min(460px, calc(100vw - 16px)); }
.toast { background: rgba(30,20,50,0.95); color: #fff; font-size: 13px; font-weight: 700; padding: 8px 20px; border-radius: 20px; border: 1px solid #4a3a7a; box-shadow: 0 4px 16px rgba(0,0,0,0.5); text-align: center; animation: aparece .2s ease-out; max-width: 100%; }
.toast.error { border-color: #cc3333; }
.toast.bien { border-color: #44bb44; }
@keyframes aparece { from { opacity: 0; } to { opacity: 1; } }

/* ── Pantallas medianas y celulares (los cortes de PawHotel) ── */
@media (max-width: 1200px) {
  #chat-bar { height: auto; flex-wrap: wrap; padding: 0; gap: 0; padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 4px); }
  #hotel.afuera #chat-bar { height: auto; }
  #chat-bar-inner { flex-wrap: wrap; width: 100%; padding: 5px 8px 6px; gap: 4px; }
  /* fila 1: el chat, Enviar y Log */
  #chat-input-area { order: 1; width: 100%; flex: none; padding: 0; gap: 6px; }
  #chat-input { font-size: 16px; padding: 8px 12px; flex: 1; }
  #send-btn { padding: 8px 14px; font-size: 14px; flex-shrink: 0; }
  #chat-log-btn { padding: 8px 12px; font-size: 14px; flex-shrink: 0; }
  /* fila 2: el personaje y los botones */
  #user-section { order: 2; width: auto; max-width: none; flex: 1; border-right: 1px solid rgba(255,255,255,0.18); border-bottom: none; padding: 0 8px 0 0; height: auto; min-height: 48px; }
  #user-section-btns { gap: 4px; flex-direction: row; flex-wrap: wrap; align-items: center; }
  .usec-btn { font-size: 12px; padding: 6px 12px; }
  #bar-sep { display: none; }
  #bar-action-btns { order: 3; flex-shrink: 0; gap: 4px; padding: 2px 0; align-self: center; }
  .bar-icon-btn { padding: 8px 10px; font-size: 20px; }
  #move-hint { font-size: 10px; padding: 4px 10px; bottom: 6px; }
  #sala-info { font-size: 10px; bottom: 34px; left: 8px; max-width: 60vw; }
  .profile-panel { bottom: 6px; right: 6px; }
}
@media (max-width: 900px) {
  .furniture-panel { width: 140px; }
  .fp-img-wrap { height: 80px; width: 100%; }
  #fp-canvas { width: 93px; height: 80px; }
  .fp-btn { font-size: 10px; padding: 4px 4px; }
  .pp-info-bar { padding: 7px 8px 9px; }
}
@media (max-width: 760px) {
  .catalogue-panel { width: min(96vw, 420px); height: min(72vh, 620px); border-width: 2px; border-radius: 10px; }
  .cat-topbar { padding: 8px 10px; }
  .cat-topbar-title { font-size: 11px; }
  .cat-body { flex-direction: column; }
  .cat-left { border-right: none; border-bottom: 2px solid var(--win-border); min-height: 0; }
  .cat-banner { padding: 7px 8px; }
  .cat-banner-title { font-size: 12px; letter-spacing: 1px; }
  .cat-items-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); padding: 6px; gap: 4px; grid-auto-rows: minmax(76px, auto); }
  .cat-item canvas { max-width: 100%; height: auto; }
  .cat-detail { min-height: 78px; padding: 7px 8px; gap: 8px; }
  .cat-detail-preview { width: 58px; height: 58px; }
  .cat-detail-preview canvas { width: 54px; height: 54px; }
  .cat-detail-name { font-size: 11px; }
  .cat-detail-desc { font-size: 9px; margin-bottom: 4px; }
  .cat-detail-buy { gap: 6px; flex-wrap: wrap; }
  .cat-buy-btn { padding: 3px 10px; font-size: 10px; }
  .cat-tabs-wrap { width: auto; border-left: none; border-top: 2px solid var(--win-border); display: grid; grid-template-columns: 36px minmax(0, 1fr) 36px; align-items: stretch; min-height: 44px; }
  .cat-tabs { width: auto; max-width: none; flex-direction: row; overflow-x: auto; overflow-y: hidden; min-height: 42px; scrollbar-width: none; }
  .cat-tabs::-webkit-scrollbar { display: none; }
  .cat-tabs-arrow { display: flex; align-items: center; justify-content: center; border: none; border-right: 1px solid var(--win-border); background: linear-gradient(180deg, #d4e2f4, #b9cce4); color: #324765; font-size: 16px; font-weight: 900; font-family: var(--fuente); cursor: pointer; padding: 0; }
  .cat-tabs-arrow.right { border-right: none; border-left: 1px solid var(--win-border); }
  .cat-tabs-arrow:active { filter: brightness(.95); }
  .cat-tab { flex: 0 0 auto; min-width: 104px; border-bottom: none; border-right: 1px solid var(--win-border); padding: 8px 10px; text-align: center; }
  .cat-tab.active { border-left: none; border-bottom: 3px solid var(--win-header2); padding-left: 10px; margin-bottom: 0; }
  /* crear sala: las formas arriba, el resto abajo */
  .room-modal-body { flex-direction: column; overflow-y: auto; }
  .room-layout-grid { width: auto; grid-template-columns: repeat(4, minmax(0, 1fr)); border-right: none; border-bottom: 2px solid var(--win-border); max-height: none; padding: 8px; gap: 6px; overflow: visible; }
  .room-modal-right { overflow: visible; padding: 10px 12px 12px; }
  #room-preview-canvas { display: none; }
  .avatar-editor-inner { padding: 12px; gap: 10px; }
  .avatar-editor-body { gap: 10px; }
  #landing-title { font-size: 26px; }
  #landing-scene { padding: 16px; }
}
@media (max-width: 520px) {
  #chat-log-modal { right: 4px; left: 4px; width: auto; }
  .avatar-editor-body { flex-direction: column; align-items: center; }
  #avatar-editor-preview { width: 96px; height: 120px; }
  .avatar-editor-parts-col { max-width: none; width: 100%; }
  .avatar-editor-row { gap: 4px; justify-content: space-between; }
  .avatar-editor-row .part-label { width: auto; flex: 1; font-size: 12px; }
  .avatar-editor-row .part-count { min-width: 28px; font-size: 11px; }
  #userlist-popup { width: min(240px, calc(100% - 16px)); }
}
@media (max-width: 480px) {
  /* celulares angostos: los botones van a una tercera fila */
  #bar-action-btns { order: 4; width: 100%; justify-content: center; }
  #user-section { border-right: none; }
  #titulo-sala { max-width: 40vw; }
}
@media (max-width: 420px) {
  .catalogue-panel { width: calc(100vw - 10px); max-width: calc(100vw - 10px); height: min(74vh, 560px); }
  .cat-items-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: minmax(78px, auto); }
}
/* con el dedo: nada chico de tocar (24 px o mas) */
@media (pointer: coarse) {
  .nav-go { padding: 5px 10px; min-height: 28px; font-size: 11px; }
  .nav-tab { min-height: 32px; }
  #nav-close, #settings-close, #edit-room-close, .win-close, .room-modal-close, .cat-topbar-close { width: 26px; height: 26px; font-size: 13px; }
  .pp-close-x { min-width: 28px; min-height: 28px; }
  .fp-btn { min-height: 28px; }
  .cat-tab { min-height: 32px; }
  .cat-buy-btn { min-height: 28px; }
  .usec-btn { min-height: 28px; }
  .log-btn { min-height: 28px; min-width: 30px; }
}
@media (prefers-reduced-motion: reduce) { .toast, .msg, .speech-bubble { animation: none; transition: none; } #ciudad { transition: none; } }

/* ── TRADE PANEL ─ compacto (el de PawHotel) ── */
#trade-panel { position: fixed; z-index: 5000; top: 60px; left: 50%; transform: translateX(-50%); pointer-events: none; }
#trade-panel[hidden] { display: none; }
#trade-box { pointer-events: auto; background: #2a2a3e; border: 2px solid #4a3a7a; border-radius: 10px; width: fit-content; min-width: 280px; max-width: min(96vw, 480px); display: flex; flex-direction: column; overflow: hidden; box-shadow: 0 12px 40px rgba(0,0,0,0.7); user-select: none; }
#trade-header { display: flex; align-items: center; justify-content: space-between; padding: 7px 12px; background: linear-gradient(180deg, #5a4a9a, #3a2a7a); border-bottom: 2px solid #4a3a8a; font-size: 12px; font-weight: 900; color: #fff; letter-spacing: .5px; text-shadow: 1px 1px 0 #000; cursor: move; touch-action: none; }
#trade-header span { pointer-events: none; }
#trade-header-close { background: none; border: none; color: #fff; font-size: 15px; font-weight: 900; cursor: pointer; line-height: 1; padding: 0 2px; min-width: 24px; min-height: 24px; opacity: 0.8; pointer-events: auto; }
#trade-header-close:hover { opacity: 1; }
#trade-body { display: flex; padding: 10px; gap: 10px; width: fit-content; }
.trade-side { display: flex; flex-direction: column; gap: 4px; }
#trade-side-them, #trade-side-me { flex: 0 0 auto; }
.trade-side-name { font-size: 10px; font-weight: 900; color: #a080ff; text-transform: uppercase; letter-spacing: .4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 170px; }
#trade-slots-them, #trade-slots-me { display: grid; grid-template-columns: repeat(3, 52px); gap: 3px; background: #1e1e2e; border-radius: 6px; padding: 4px; }
.trade-slot { background: #2e2e44; border: 2px solid #3a3a54; border-radius: 5px; width: 52px; height: 52px; box-sizing: border-box; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; position: relative; overflow: hidden; }
.trade-slot canvas { image-rendering: pixelated; pointer-events: none; position: absolute; top: 1px; left: 50%; transform: translateX(-50%); width: 46px; height: 40px; }
.trade-slot-name { position: absolute; bottom: 1px; left: 0; right: 0; font-size: 7px; font-weight: 700; color: #ccc; text-align: center; line-height: 1; padding: 0 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; pointer-events: none; }
.trade-slot-qty { position: absolute; top: 2px; left: 3px; color: #fff; font-size: 9px; font-weight: 900; text-shadow: 0 0 3px #000; pointer-events: none; line-height: 1; }
.trade-slot-remove { position: absolute; top: 1px; right: 1px; background: #ff444488; border: none; color: #fff; font-size: 8px; border-radius: 3px; width: 12px; height: 12px; display: flex; align-items: center; justify-content: center; cursor: pointer; line-height: 1; padding: 0; }
.trade-check-row { display: flex; align-items: center; gap: 4px; font-size: 10px; color: #ccc; margin-top: 3px; }
.trade-check-row input[type=checkbox] { width: 12px; height: 12px; cursor: pointer; accent-color: #a080ff; }
.trade-check-label { cursor: pointer; font-size: 10px; }
#trade-check-them-label { color: #8878aa; font-style: italic; }
.trade-hint { font-size: 9px; color: #8878aa; margin-top: 1px; min-height: 12px; }
.trade-pie { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 4px 10px 10px; box-sizing: border-box; }
.trade-win-btn { background: #2a2a3e; border: 2px solid #4a3a7a; border-radius: 7px; color: #a080ff; font-size: 11px; font-weight: 700; padding: 5px 14px; cursor: pointer; }
.trade-win-btn:hover { background: #3a2a6a; }
@media (pointer: coarse) {
  .trade-slot-remove { width: 18px; height: 18px; font-size: 11px; }
  .trade-check-row input[type=checkbox] { width: 18px; height: 18px; }
  .trade-check-label { font-size: 12px; }
}
@media (max-width: 420px) {
  #trade-panel { top: 52px; }
  #trade-body { padding: 8px; gap: 6px; }
  #trade-slots-them, #trade-slots-me { grid-template-columns: repeat(3, 46px); }
  .trade-slot { width: 46px; height: 46px; }
}

/* ── Muebles de la comunidad (fase 5): "Mis muebles", los botones del catalogo y "Hecho por" ── */
.cat-banner-btns { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; margin-top: 6px; }
.cat-banner-btn { padding: 3px 8px; background: var(--win-body); color: var(--win-text); border: 2px solid var(--win-border); border-radius: 4px; font-family: var(--fuente); font-size: 10px; font-weight: 900; cursor: pointer; }
.cat-banner-btn:hover { filter: brightness(1.08); }
.cat-detail-autor { font-size: 10px; font-weight: 900; color: var(--win-go2); margin-bottom: 2px; }
#p-mis-muebles { width: 360px; max-height: min(520px, calc(100vh - var(--barra) - 16px)); }
.mm-ganado { padding: 8px 12px; background: var(--win-body2); border-bottom: 1px solid var(--win-item-border); font-size: 11px; font-weight: 900; color: var(--win-text); }
.mm-lista { background: var(--win-body); overflow-y: auto; min-height: 80px; flex: 1; }
.mm-fila { display: flex; align-items: center; gap: 8px; padding: 6px 10px; border-bottom: 1px solid var(--win-item-border); cursor: pointer; }
.mm-fila:hover, .mm-fila:focus-visible { background: var(--win-body3); outline: none; }
.mm-mini { width: 52px; height: 46px; flex-shrink: 0; background: var(--win-item); border: 1px solid var(--win-item-border); border-radius: 4px; image-rendering: pixelated; }
.mm-txt { flex: 1; min-width: 0; }
.mm-arriba { display: flex; align-items: center; gap: 6px; }
.mm-nombre { font-size: 12px; color: var(--win-text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.mm-chip { flex-shrink: 0; font-size: 9px; font-weight: 900; padding: 1px 6px; border-radius: 8px; background: var(--win-body3); color: var(--win-text); }
.mm-chip.vota { background: #3a6a90; color: #fff; }
.mm-chip.lista, .mm-chip.ok { background: #2fa04a; color: #fff; }
.mm-chip.cambios { background: var(--win-go1); color: #fff; }
.mm-chip.gris { background: #7a7a8a; color: #fff; }
.mm-detalle { font-size: 10px; color: var(--win-muted); margin-top: 2px; overflow-wrap: anywhere; }
.mm-vacio { padding: 16px 12px; font-size: 11px; color: var(--win-muted); font-style: italic; text-align: center; }
.mm-nota { padding: 6px 12px; background: var(--win-body); border-top: 1px solid var(--win-item-border); }
.mm-pie { padding: 8px 12px 10px; background: var(--win-body); }
@media (max-width: 600px) { #p-mis-muebles { width: calc(100vw - 16px); } }

/* ── Las notas de la pared: la ventanita de stickyNoteRuntime de PawHotel (260 px, el papel del color de la nota, sombra
   dura, 12 px, 13 renglones) y, abajo, quien la pego y Denunciar ── */
.sn-panel { width: 260px; padding: 8px; border-radius: 4px; font-family: var(--fuente); z-index: 400; color: #3a3110; }
.sn-c-rosa { background: #ff8fb8; box-shadow: inset 0 -3px 0 #c4587f, 4px 4px 0 rgba(0,0,0,0.4), 0 8px 32px rgba(0,0,0,0.5); color: #3a1f2a; }
.sn-c-amarillo { background: #ffe066; box-shadow: inset 0 -3px 0 #c9ad33, 4px 4px 0 rgba(0,0,0,0.4), 0 8px 32px rgba(0,0,0,0.5); color: #3a3110; }
.sn-c-verde { background: #b5e88a; box-shadow: inset 0 -3px 0 #7fae5a, 4px 4px 0 rgba(0,0,0,0.4), 0 8px 32px rgba(0,0,0,0.5); color: #1f3315; }
.sn-c-celeste { background: #8fcfe8; box-shadow: inset 0 -3px 0 #4f93b1, 4px 4px 0 rgba(0,0,0,0.4), 0 8px 32px rgba(0,0,0,0.5); color: #15293a; }
.sn-header { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-bottom: 4px; cursor: move; user-select: none; touch-action: none; min-height: 20px; }
.sn-swatches, .sn-botones { display: flex; gap: 4px; align-items: center; }
.sn-sw { width: 14px; height: 14px; border-radius: 2px; cursor: pointer; padding: 0; border: 2px solid transparent; }
.sn-sw-rosa { background: #ff8fb8; border-color: #c4587f; }
.sn-sw-amarillo { background: #ffe066; border-color: #c9ad33; }
.sn-sw-verde { background: #b5e88a; border-color: #7fae5a; }
.sn-sw-celeste { background: #8fcfe8; border-color: #4f93b1; }
.sn-sw.elegido { border-color: #000; }
.sn-delete { background: #c0392b; color: #fff; border: none; border-radius: 3px; padding: 2px 6px; font-size: 11px; cursor: pointer; }
.sn-close { background: rgba(0,0,0,0.1); border: none; border-radius: 3px; width: 20px; height: 20px; cursor: pointer; font-weight: bold; font-size: 12px; line-height: 1; color: inherit; padding: 0; }
.sn-text { display: block; width: 100%; box-sizing: border-box; height: 200px; border: none; background: transparent; resize: none; outline: none; overflow: hidden; font-family: var(--fuente); font-size: 12px; line-height: 1.15; letter-spacing: 0.5px; padding: 4px; color: inherit; }
.sn-panel.solo-leer .sn-text { cursor: default; }
.sn-footer { display: flex; justify-content: space-between; align-items: center; gap: 6px; font-size: 10px; opacity: 0.7; margin-top: 2px; }
.sn-pie { display: flex; justify-content: space-between; align-items: center; gap: 6px; font-size: 10px; margin-top: 4px; padding-top: 4px; border-top: 1px dashed rgba(0,0,0,0.25); }
.sn-autor { opacity: 0.8; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sn-denunciar { background: rgba(0,0,0,0.1); border: none; border-radius: 3px; padding: 2px 6px; font-size: 10px; cursor: pointer; color: inherit; font-family: inherit; flex-shrink: 0; }
.sn-denunciar:hover, .sn-close:hover { background: rgba(0,0,0,0.2); }

/* La mesa de juego: "Jugar" con el naranja de los botones de ir */
.fp-btn-jugar { background: linear-gradient(180deg, var(--win-go1), var(--win-go2)); border-color: var(--win-go-border); font-weight: 900; }
.fp-btn-jugar:hover { filter: brightness(1.1); background: linear-gradient(180deg, var(--win-go1), var(--win-go2)); }

/* ── Barra de abajo: iconos de pixel art propios (src/ui/iconos.js) con su nombre abajo ── */
#bar-action-btns .bar-icon-btn { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-width: 56px; height: 54px; padding: 5px 6px 4px; font-size: 0; }
.bar-ico { display: block; width: 26px; height: 26px; flex: none; }
.bar-ico canvas, .usec-ico canvas { display: block; width: 100%; height: 100%; image-rendering: pixelated; }
.bar-lbl { font-size: 10px; font-weight: 800; letter-spacing: 0.2px; line-height: 1; color: #fff; text-shadow: 0 1px 0 rgba(0, 0, 0, 0.45); }
#bar-action-btns #inv-count { position: absolute; top: 2px; right: 3px; font-size: 10px; line-height: 14px; min-width: 14px; padding: 0 3px; border-radius: 7px; background: #d0303a; color: #fff; }
#coins-pill { gap: 6px; height: 54px; font-size: 14px; font-weight: 900; }
#coins-pill .bar-ico { width: 22px; height: 22px; }
.usec-ico { display: inline-block; width: 12px; height: 12px; margin-right: 4px; vertical-align: -2px; }
/* la cara del Javo (no el cuerpo entero), en un marquito redondo */
#my-avatar-mini { border-radius: 10px; background: rgba(255, 255, 255, 0.18); box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.25); }
@media (max-width: 720px) {
  #bar-action-btns .bar-icon-btn { min-width: 48px; height: 48px; padding: 4px 4px 3px; }
  .bar-ico { width: 22px; height: 22px; }
  #coins-pill { height: 48px; }
}

/* ENTRAR O CREAR LA CUENTA (el hotel suelto, en su dominio): la intro de la ciudad de fondo, sin la barra de abajo ni
   los botones de arriba, y en el medio la ventana con el estilo de las del juego */
#hotel.ingreso #chat-bar, #hotel.ingreso #arriba, #hotel.ingreso #landing-copy, #hotel.ingreso #sala-info, #hotel.ingreso #move-hint { display: none !important; }
/* (la ventana va donde la ciudad deja lugar para la de las salas, arriba a la derecha: asi no tapa el hotel ni el
   Obelisco. En el celular, abajo, donde va el cartel del lobby) */
#ingreso { right: 20px; top: 120px; width: min(92vw, 380px); max-height: calc(100dvh - 132px); overflow-y: auto; }
#terminos { left: 50%; top: 50%; transform: translate(-50%, -50%); max-height: calc(100dvh - 24px); }
@media (max-width: 760px), (max-height: 560px) {
  #ingreso { right: auto; left: 50%; top: auto; bottom: max(12px, env(safe-area-inset-bottom)); transform: translateX(-50%); max-height: calc(100dvh - 24px); }
}
#ingreso .room-modal-header, #terminos .room-modal-header { cursor: default; }
#terminos { width: min(94vw, 560px); z-index: 10000 !important; }
.ingreso-tabs { display: flex; background: var(--win-tab); border-bottom: 2px solid var(--win-border); flex-shrink: 0; }
.ingreso-cuerpo { display: flex; flex-direction: column; gap: 9px; padding: 12px 14px 14px; background: var(--win-body); color: var(--win-text); }
.ingreso-campo { display: flex; flex-direction: column; gap: 3px; font-size: 11px; font-weight: 900; color: var(--win-muted); }
.ingreso-campo input { background: #fff; border: 1px solid var(--win-border); border-radius: 4px; color: var(--win-text); font-size: 14px; padding: 8px 9px; outline: none; font-family: var(--fuente); }
.ingreso-campo input:focus { border-color: var(--win-header2); box-shadow: 0 0 0 2px rgba(58,106,144,0.25); }
.ingreso-check { display: flex; align-items: flex-start; gap: 7px; font-size: 12px; color: var(--win-text); line-height: 1.35; cursor: pointer; }
.ingreso-check input { margin-top: 1px; flex-shrink: 0; }
.ingreso-link { background: none; border: 0; padding: 0; color: var(--win-header2); font: inherit; font-weight: 900; text-decoration: underline; cursor: pointer; }
#b-ingreso { align-self: stretch; padding: 10px; font-size: 13px; }
.ingreso-pie { font-size: 11px; text-align: center; color: var(--win-muted); }
.ingreso-pie a { color: var(--win-header2); font-weight: 900; }
.terminos-texto { padding: 12px 14px; background: var(--win-body); color: var(--win-text); font-size: 12px; line-height: 1.5; overflow-y: auto; max-height: min(60vh, 520px); white-space: pre-wrap; overflow-wrap: anywhere; }
.terminos-sep { text-align: center; color: var(--win-muted); font-size: 11px; margin: 14px 0; }
#terminos .avatar-editor-actions { padding: 10px 14px; background: var(--win-body2); border-top: 1px solid var(--win-item-border); }
a.win-go { display: inline-block; text-decoration: none; }
.ingreso-con-chat { display: flex; flex-direction: column; gap: 6px; }
.ingreso-con-chat .room-modal-confirm { width: 100%; }
.ingreso-o { font-size: 11px; text-align: center; color: var(--win-muted); }
.ingreso-centro { align-self: center; font-size: 12px; }
