/* Estilos de la interfaz flotante, editores y fases visuales (en el orden en que se aplican) */

body { -webkit-font-smoothing: antialiased; }
header { backdrop-filter: blur(8px); box-shadow: 0 2px 18px #0006; z-index: 2; }
button { border-radius: 10px; background: linear-gradient(180deg, #151c3a, #0c1124); box-shadow: inset 0 1px 0 #ffffff0d; }
button.primary { background: linear-gradient(180deg, #6f9bff, #4a78f0); border-color: #6f9bff; }
.bar { gap: 8px; padding: 10px 12px; }
.bar input[type=text] { border-radius: 10px; }
aside { box-shadow: -8px 0 30px #0005; }
aside h2 { display: flex; align-items: center; gap: 8px; } aside h2::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.card { border-left: 3px solid var(--st, var(--line)); background: linear-gradient(180deg, #121935cc, #0c112499); transition: transform .12s, border-color .12s; }
.card[title]:hover { transform: translateX(2px); border-color: var(--accent); }
.daybar { display: flex; height: 6px; border-radius: 3px; overflow: hidden; background: #ffffff10; margin: 7px 0 3px; } .daybar i { display: block; height: 100%; }
.room { transition: transform .12s; } .room:hover { transform: translateX(2px); }
.ask { backdrop-filter: blur(6px); animation: pop .18s ease-out; } @keyframes pop { from { transform: translateY(-8px); opacity: 0; } }
#wrap { background: radial-gradient(ellipse at 50% 38%, #27305a 0%, #121730 55%, #0b0f1e 100%); }
::-webkit-scrollbar { width: 8px; height: 8px; } ::-webkit-scrollbar-thumb { background: #2c3558; border-radius: 4px; } ::-webkit-scrollbar-track { background: transparent; }
.pop { position: relative; } .pop > .menu { display: none; position: absolute; bottom: calc(100% + 8px); left: 0; flex-direction: column; gap: 6px; min-width: 210px; padding: 8px; background: var(--panel2); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 14px 44px #000b; z-index: 6; }
.pop.open > .menu { display: flex; } .pop.down > .menu { bottom: auto; top: calc(100% + 8px); } .pop.right > .menu { left: auto; right: 0; } .pop > .menu button { text-align: left; white-space: nowrap; }
#talkBar { display: flex; gap: 8px; padding: 0 12px 10px; background: var(--panel); } #talkBar input { flex: 1; min-width: 120px; }

#banner { position: absolute; top: 18%; left: 50%; transform: translateX(-50%); font-size: 26px; font-weight: 700; letter-spacing: .04em; color: #fff; text-shadow: 0 4px 24px #000c; pointer-events: none; opacity: 0; z-index: 3; white-space: nowrap; }
#banner.show { animation: banner 1.9s ease-out; } @keyframes banner { 0% { opacity: 0; transform: translate(-50%, 10px); } 18% { opacity: 1; transform: translate(-50%, 0); } 70% { opacity: 1; } 100% { opacity: 0; } }
#banner small { display: block; font-size: 12px; font-weight: 500; letter-spacing: .2em; text-transform: uppercase; color: #b9c4ee; text-align: center; margin-top: 4px; }
#tip { position: absolute; display: none; pointer-events: none; z-index: 4; background: #0c1124f2; border: 1px solid var(--accent); border-radius: 8px; padding: 4px 9px; font-size: 12px; white-space: nowrap; box-shadow: 0 6px 20px #0008; }

#login { background: #0a0e1c; overflow: hidden; }
#login::before, #login::after { content: ''; position: absolute; width: 60vmax; height: 60vmax; border-radius: 50%; filter: blur(90px); opacity: .55; animation: drift 18s ease-in-out infinite alternate; }
#login::before { background: #2d49b8; top: -25vmax; left: -15vmax; } #login::after { background: #7a2f9c; bottom: -30vmax; right: -18vmax; animation-delay: -9s; }
@keyframes drift { to { transform: translate(8vmax, 6vmax) scale(1.15); } }
#login form { position: relative; z-index: 1; width: 380px; padding: 30px; border-radius: 20px; background: rgba(20,26,48,.78); backdrop-filter: blur(16px); border: 1px solid #ffffff1f; gap: 14px; }
#login h2 { font-size: 24px; text-align: center; background: linear-gradient(90deg, #9fc0ff, #d6a8ff); -webkit-background-clip: text; background-clip: text; color: transparent; }
#login p { text-align: center; } #login input[type=text] { padding: 11px 13px; font-size: 15px; } #login button { padding: 11px; font-size: 15px; }
#loginAvatar { width: 74px; height: 74px; border-radius: 50%; margin: 0 auto; display: flex; align-items: center; justify-content: center; font-size: 30px; font-weight: 700; color: #fff; box-shadow: 0 8px 26px #0008, inset 0 -8px 16px #0003; transition: background .2s; }
header h1 { background: linear-gradient(90deg, #cfe0ff, #b7a8ff); -webkit-background-clip: text; background-clip: text; color: transparent; }
#toast { backdrop-filter: blur(6px); border-color: var(--accent); padding: 9px 16px; }

.mfloor { display: flex; gap: 5px; align-items: stretch; margin-bottom: 5px; }
.mlabel { writing-mode: vertical-rl; transform: rotate(180deg); font-size: 9px; color: var(--muted); text-align: center; letter-spacing: .12em; text-transform: uppercase; width: 12px; }
.mgrid { flex: 1; display: grid; gap: 4px; min-width: 0; }
.mroom { border: 1px solid var(--line); border-radius: 7px; background: #0c112480; padding: 4px 5px; min-height: 40px; min-width: 0; cursor: pointer; font-size: 10px; line-height: 1.25; transition: border-color .12s, background .12s; }
.mroom:hover { border-color: var(--accent); background: #131a36; } .mroom.here { border-color: var(--accent); background: #16204a; box-shadow: inset 0 0 0 1px var(--accent); }
.mroom b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; }
.mdots { display: flex; flex-wrap: wrap; gap: 3px; margin-top: 4px; } .mdot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; border: 1px solid #0009; } .mdot.me { box-shadow: 0 0 0 2px #fff; } .mdot.npc { border-radius: 2px; }
.mlegend { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: 10px; color: var(--muted); padding: 2px 0 4px 17px; } .mlegend span { display: flex; align-items: center; gap: 4px; }
#mapToggle { margin-left: auto; padding: 2px 8px; font-size: 11px; text-transform: none; letter-spacing: 0; }

.layB main { position: relative; }
.layB #stage { position: relative; }
.layB header { position: absolute; top: 12px; left: 12px; right: 12px; z-index: 6; background: none; border: 0; padding: 0; pointer-events: none; gap: 8px; }
.layB header > * { pointer-events: auto; }
.layB header h1, .layB #roomTitle { background: #121733ee; border: 1px solid var(--line); border-radius: 12px; padding: 8px 14px; margin: 0; backdrop-filter: blur(6px); }
.layB #roomTitle { margin-left: 0; }
.layB header h1 { -webkit-text-fill-color: #fff; background-clip: border-box; -webkit-background-clip: border-box; }
.layB #summary { display: flex; gap: 6px; flex-wrap: wrap; background: #121733ee; border: 1px solid var(--line); border-radius: 12px; padding: 6px; backdrop-filter: blur(6px); }
.layB #clock { margin-left: auto; background: #121733ee; padding: 8px 12px; border-radius: 12px; }
.layB #soundBtn { background: #121733ee; border-radius: 12px; padding: 7px 11px !important; }
.layB #asks, .layB #toast { top: 72px; bottom: auto; }
.layB #viewers { top: 72px !important; }
.layB #musicBox { top: 72px; bottom: auto !important; left: auto !important; right: 64px; }
.layB #dock { position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 5; display: flex; flex-direction: column; align-items: center; gap: 8px; max-width: calc(100% - 32px); pointer-events: none; }
.layB #dock > * { pointer-events: auto; }
.layB #dock .bar { border: 1px solid var(--line); border-radius: 16px; background: #121733f0; box-shadow: 0 14px 36px #0008; backdrop-filter: blur(8px); justify-content: center; }
.layB #goBar { padding: 6px 10px; } .layB #goBar button { border-color: transparent; background: transparent; }
.layB #goBar button:hover { background: #1c2246; }
.layB #talkBar { position: absolute; left: 16px; bottom: 16px; z-index: 5; width: 340px; flex-direction: column; padding: 12px; border: 1px solid var(--line); border-radius: 16px; background: #121733f0; box-shadow: 0 14px 36px #0008; backdrop-filter: blur(8px); }
.layB #talkBar input { width: 100%; }
.layB #talkBar > div { justify-content: space-between; }
.layB .panelBtn.sel { background: #2a3260; border-color: var(--accent); }
.layB aside { position: absolute; top: 72px; right: 16px; z-index: 5; width: 340px; max-height: calc(100% - 260px); border: 1px solid var(--line); border-radius: 16px; background: #121733f2; box-shadow: 0 16px 40px #0009; backdrop-filter: blur(8px); overflow: hidden; }
.layB aside.closed { display: none; }
.layB aside .sec { display: none; flex-direction: column; min-height: 0; flex: 1; overflow: hidden; }
.layB aside .sec.sel { display: flex; }
.layB aside .sec > div:last-child { flex: 1; overflow: auto; max-height: none; }
.layB aside h2 { padding-top: 14px; }
.layB aside .x { position: absolute; top: 8px; right: 8px; width: 30px; height: 30px; padding: 0; z-index: 1; }
.layB #taskIn { margin: 0 10px 8px; }
.layB #zoomBox { bottom: 16px; right: 16px; }
@media (max-width: 1300px) {
  .layB #dock { width: calc(100% - 32px); }
}
@media (max-width: 860px) { .layB aside { left: 16px; width: auto; max-height: 50%; } }

.layB .grip { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 34px; margin-right: 2px; border-radius: 8px; cursor: grab; touch-action: none; user-select: none; color: #8e99c2; font-size: 18px; line-height: 1; }
.layB .grip::before { content: '⠿'; }
.layB .grip:hover { color: #fff; background: #ffffff14; } .layB .grip:active { cursor: grabbing; }
.layB aside > .grip, .layB #talkBar > .grip { position: absolute; top: 6px; left: 8px; z-index: 2; height: 24px; }
.layB aside h2 { padding-left: 34px !important; } .layB #talkBar > .grip + * { margin-top: 18px; }
.layB #goBar { position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 5; max-width: calc(100% - 32px); }
.layB #dock { bottom: 80px; }
.layB .hidden { display: none !important; }
.layB.locked .grip { display: none !important; } .layB.locked .fpanel h2 { cursor: default !important; } 
.layB #dock > .bar, .layB #goBar, .layB #talkBar, .layB .fpanel { border: 1px solid var(--line) !important; border-radius: 16px !important; background: #121733f0 !important; box-shadow: 0 14px 36px #0008 !important; backdrop-filter: blur(8px); }
.layB #dock > .bar, .layB #goBar { padding: 8px 10px !important; gap: 8px; }
.layB #goBar button { border: 1px solid var(--line) !important; background: #0c1124 !important; } .layB #goBar button:hover { border-color: var(--accent) !important; background: #131a36 !important; }
.layB #talkBar > .grip + * { margin-top: 22px; }
.layB .winBtn { background: #121733ee; border-radius: 12px; padding: 7px 11px; }
.layB .winBtn.off { opacity: .45; }
.layB .moved { transform: none !important; right: auto !important; bottom: auto !important; }

.layB aside { display: none !important; }
.layB .fpanel { position: absolute; top: 72px; z-index: 5; width: 340px; max-height: calc(100% - 260px); display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 16px; background: #121733f2; box-shadow: 0 16px 40px #0009; backdrop-filter: blur(8px); overflow: hidden; }
.layB .fpanel.front { z-index: 6; }
.layB .fpanel .sec { display: flex; flex-direction: column; min-height: 0; flex: 1; overflow: hidden; }
.layB .fpanel .sec > div:last-child { flex: 1; overflow: auto; max-height: none; }
.layB .fpanel h2 { padding: 8px 46px 8px !important; margin: 0 !important; line-height: 30px; text-align: center; justify-content: center; }   /* título centrado y a la altura de la manija y la X */
.layB .fpanel h2::after { display: none !important; }
.layB .fpanel > .grip { top: 11px !important; }
.layB .fpanel > .grip { position: absolute; top: 8px; left: 8px; z-index: 2; height: 24px; }
.layB .fpanel > .x { position: absolute; top: 8px; right: 8px; width: 30px; height: 30px; padding: 0; z-index: 2; }
.layB .fpanel.moved { right: auto !important; }

.layB.editing #dock, .layB.editing #goBar, .layB.editing #talkBar, .layB.editing .fpanel, .layB.editing header .winBtn, .layB.editing #summary { display: none !important; }
.layB #editBar { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 7; width: min(1100px, calc(100vw - 32px)); justify-content: center; padding: 14px 16px !important; border: 1px solid var(--line); border-radius: 16px; background: #121733f8 !important; box-shadow: 0 20px 50px #000a; }
.layB #editBar > button.primary { margin-left: auto; }

.layB #editBar { left: auto !important; right: 16px !important; top: 72px !important; bottom: 16px !important; transform: none !important; width: 360px !important; flex-direction: column !important; flex-wrap: nowrap !important; align-items: stretch !important; justify-content: flex-start !important; gap: 14px !important; overflow-y: auto; padding: 0 16px 16px !important; }
#editBar .oHead { position: sticky; top: 0; z-index: 1; display: flex; align-items: center; justify-content: space-between; padding: 14px 0 10px; background: #121733; border-bottom: 1px solid var(--line); font-size: 15px; }
#editBar .oHead button { margin: 0 !important; }
#editBar .oSec { display: flex; flex-direction: column; gap: 10px; }
#editBar .oSec h3 { margin: 0; font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
#editBar .oHint { margin: 0; font-size: 12px; color: var(--muted); line-height: 1.4; }
#editBar .oSec label { display: grid !important; grid-template-columns: 120px 1fr; align-items: center; gap: 8px; font-size: 13px !important; color: var(--text) !important; }
#editBar .oSec label input[type=text], #editBar .oSec label select { width: 100%; min-width: 0; }
#editBar .oSec label input[type=color] { width: 100% !important; height: 34px !important; padding: 3px !important; border-radius: 8px; cursor: pointer; }
#editBar input[type=search] { width: 100%; }
#editBar .oGrid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
#editBar .oItemBtn { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 4px; min-height: 64px; border-radius: 10px; }
#editBar .oItemBtn span { font-size: 22px; line-height: 1; } #editBar .oItemBtn small { font-size: 10.5px; color: var(--muted); text-align: center; line-height: 1.2; }
#editBar .oItemBtn.sel { border-color: var(--accent); background: #1c2a5a; } #editBar .oItemBtn.sel small { color: #fff; }

#chatLog { max-height: 170px; min-height: 40px; overflow-y: auto; display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; padding: 2px 2px 6px; }
#chatLog .m { line-height: 1.35; } #chatLog .m b { color: #8fb3ff; font-weight: 600; } #chatLog .m time { color: var(--muted); font-size: 11px; margin-left: 4px; }
#chatLog .empty { color: var(--muted); font-style: italic; }
#chatTop { display: flex; align-items: center; justify-content: space-between; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
#dmBtn { position: relative; text-transform: none; letter-spacing: 0; font-size: 12px; padding: 4px 10px; }
#dmBtn .badge { position: absolute; top: -6px; right: -6px; min-width: 18px; height: 18px; border-radius: 9px; background: #e5484d; color: #fff; font-size: 11px; font-weight: 700; display: none; align-items: center; justify-content: center; padding: 0 4px; }
.modalW { position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 9; width: min(760px, calc(100vw - 32px)); max-height: calc(100vh - 80px); display: flex; flex-direction: column; background: #121733f8; border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 24px 60px #000a; }
.modalW header { position: static; display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid var(--line); background: none; pointer-events: auto; }
.modalW .body { overflow: auto; padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; }
.dmList button { display: flex; width: 100%; text-align: left; gap: 10px; align-items: center; padding: 10px; }
.dmList .u { min-width: 0; flex: 1; } .dmList .u small { display: block; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dmList .n { background: #e5484d; color: #fff; border-radius: 9px; padding: 1px 7px; font-size: 11px; font-weight: 700; }
.thread { display: flex; flex-direction: column; gap: 6px; } .thread .b { max-width: 75%; padding: 7px 11px; border-radius: 12px; background: #1f2745; font-size: 13px; line-height: 1.4; } .thread .b.mine { align-self: flex-end; background: #2b4a9a; } .thread .b time { display: block; font-size: 10.5px; color: #aab1d6; margin-top: 2px; }
.wk { border-collapse: collapse; width: 100%; font-size: 13px; } .wk th, .wk td { padding: 7px 8px; border-bottom: 1px solid var(--line); text-align: right; white-space: nowrap; } .wk th:first-child, .wk td:first-child { text-align: left; } .wk th { color: var(--muted); font-weight: 600; font-size: 12px; }
.wk td.z { color: #4a5275; }

.ib { display: inline-flex !important; align-items: center; justify-content: center; width: 42px; height: 42px; padding: 0 !important; border-radius: 12px !important; position: relative; }
.ib.on { color: #3ddc84; } .ib.live { color: #ff8a8a; }
[data-tip] { position: relative; }
[data-tip]:hover::after { content: attr(data-tip); position: absolute; left: 50%; bottom: calc(100% + 8px); transform: translateX(-50%); white-space: nowrap; background: #0b0f20f2; color: #e9edff; border: 1px solid var(--line); padding: 5px 9px; border-radius: 8px; font-size: 12px; font-weight: 500; pointer-events: none; z-index: 30; box-shadow: 0 6px 18px #0008; }
header [data-tip]:hover::after { bottom: auto; top: calc(100% + 8px); }
.ib.attn::before { content: ''; position: absolute; top: 6px; right: 6px; width: 8px; height: 8px; border-radius: 50%; background: #ffb74d; box-shadow: 0 0 0 0 #ffb74d; animation: attn 1.6s infinite; }
@keyframes attn { 0% { box-shadow: 0 0 0 0 #ffb74d99; } 70% { box-shadow: 0 0 0 8px #ffb74d00; } 100% { box-shadow: 0 0 0 0 #ffb74d00; } }
.layB #dock .bar { gap: 6px !important; }
.layB #presSel { height: 42px; border-radius: 12px; }
.layB #presDur { height: 42px; border-radius: 12px; }
/* Caras de quienes están conectados, en vez de los contadores */
.layB #summary { gap: 0 !important; padding: 4px 8px !important; align-items: center; }
.face { width: 30px; height: 30px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; color: #fff; font-size: 11px; font-weight: 700; margin-left: -6px; border: 2px solid #121733; box-shadow: 0 0 0 2px var(--fc); cursor: default; }
.face:first-child { margin-left: 0; } .face.more { background: #2a3260; box-shadow: none; }
.faceN { margin-left: 10px; font-size: 12px; color: var(--muted); white-space: nowrap; }
.layB header .winBtn { width: 38px; height: 38px; padding: 0 !important; display: inline-flex; align-items: center; justify-content: center; }

:root {
  --bg: #0b0f1e; --surface: #131935; --surface-2: #1a2147; --raised: #0d1228; --line: #29315a; --line-strong: #3a4475;
  --text: #e9edff; --muted: #8f9ac4; --accent: #5b8cff; --accent-soft: #1d2a5c; --ok: #3ddc84; --warn: #ffb74d; --bad: #ff6b6b;
  --r: 14px; --r-sm: 10px; --shadow: 0 16px 40px rgba(0,0,0,.45); --blur: blur(10px);
  --fs-xs: 11px; --fs-s: 12.5px; --fs-m: 14px; --fs-l: 16px; --font: Inter, "Segoe UI", system-ui, sans-serif;
}
body, button, input, select, textarea { font-family: var(--font) !important; }
body { font-size: var(--fs-m); background: var(--bg); }
/* Controles: mismo alto, borde y radio */
button, input, select { border-radius: var(--r-sm); border-color: var(--line); background-color: var(--raised); }
button:hover:not(:disabled) { border-color: var(--accent) !important; background-color: var(--surface-2) !important; }
button.primary { background: var(--accent) !important; border-color: var(--accent) !important; color: #fff; }
button.primary:hover:not(:disabled) { filter: brightness(1.08); background: var(--accent) !important; }
input:focus, select:focus, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
/* Un solo estilo de ventana: fondo, borde, radio, sombra y desenfoque iguales en todas */
.ask, .modalW, .layB .fpanel, .layB #dock > .bar, .layB #goBar, .layB #talkBar, #lookBar, .layB #editBar, .pop > .menu,
.layB header h1, .layB #roomTitle, .layB #summary, .layB #clock, .layB header .winBtn {
  background: color-mix(in srgb, var(--surface) 94%, transparent) !important; border: 1px solid var(--line) !important;
  border-radius: var(--r) !important; box-shadow: var(--shadow) !important; backdrop-filter: var(--blur);
}
.layB header h1, .layB #roomTitle, .layB #clock { font-size: var(--fs-m) !important; font-weight: 600; }
.ask { border-color: var(--line-strong) !important; padding: 12px 14px !important; gap: 10px !important; font-size: var(--fs-m); }
.ask#needShare { border-color: color-mix(in srgb, var(--warn) 60%, var(--line)) !important; }
#tip, #toast { background: #0a0e1df2 !important; border: 1px solid var(--line-strong) !important; border-radius: var(--r-sm) !important; font-size: var(--fs-s) !important; box-shadow: var(--shadow); }
/* Títulos de sección y textos */
.layB .fpanel h2 { font-size: var(--fs-l) !important; font-weight: 700 !important; letter-spacing: 0 !important; text-transform: none !important; color: var(--text) !important; }
#editBar .oSec h3, #team .tHead, #chatTop { font-size: var(--fs-xs) !important; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted) !important; }
#team .tCard, .room, .card, .dmList button { border-radius: var(--r-sm) !important; border-color: var(--line) !important; background: var(--raised) !important; }
#log div { font-size: var(--fs-s); }
small, .oHint, #team .tSub { font-size: var(--fs-s); }
/* Botones con ícono y texto (Ir a, menú Más) */
.it { display: inline-flex !important; align-items: center; gap: 8px; }
.it svg { flex: none; opacity: .9; }
.pop > .menu button.it { justify-content: flex-start; width: 100%; }
.layB #goBar .it { padding: 8px 12px !important; }
#goBar > b { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-xs) !important; text-transform: uppercase; letter-spacing: .08em; color: var(--muted) !important; }

/* Fondo alrededor de la sala: el piso del edificio en penumbra (rejilla isométrica suave) con viñeta */
.layB #wrap:not(.outdoor) {
  background:
    radial-gradient(ellipse at 50% 48%, rgba(70,90,170,.22) 0%, rgba(11,15,30,0) 55%),
    radial-gradient(ellipse at 50% 50%, transparent 40%, rgba(5,7,15,.85) 100%),
    repeating-linear-gradient(26.565deg, rgba(120,140,220,.06) 0 1px, transparent 1px 44px),
    repeating-linear-gradient(-26.565deg, rgba(120,140,220,.06) 0 1px, transparent 1px 44px),
    linear-gradient(180deg, #0d1226 0%, #0a0e1d 100%) !important;
}
/* Al entrar a otra sala: aparece con un leve acercamiento */
#cv.enter { animation: roomIn .65s cubic-bezier(.2,.7,.2,1); }
@keyframes roomIn { from { opacity: .15; transform: scale(.965); filter: blur(2px); } to { opacity: 1; transform: none; filter: none; } }
/* Pantalla de ingreso */
#login { background:
    radial-gradient(ellipse at 30% 20%, rgba(91,140,255,.25), transparent 55%),
    radial-gradient(ellipse at 80% 85%, rgba(217,119,87,.18), transparent 50%),
    repeating-linear-gradient(26.565deg, rgba(120,140,220,.07) 0 1px, transparent 1px 48px),
    repeating-linear-gradient(-26.565deg, rgba(120,140,220,.07) 0 1px, transparent 1px 48px),
    #0a0e1d !important; }
#loginForm { width: min(400px, calc(100vw - 32px)) !important; padding: 30px 28px !important; gap: 14px !important; border-radius: 20px !important; background: color-mix(in srgb, var(--surface) 92%, transparent) !important; border: 1px solid var(--line-strong) !important; backdrop-filter: blur(14px); box-shadow: 0 30px 80px rgba(0,0,0,.55) !important; }
#loginForm h2 { font-size: 24px !important; text-align: center; margin: 2px 0 0 !important; letter-spacing: -.01em; }
#loginForm > p:first-of-type { text-align: center; line-height: 1.5; }
#loginForm input[type=text], #loginForm input[type=password] { height: 44px; padding: 0 14px !important; font-size: 15px; }
#loginForm button.primary { height: 46px; font-size: 15px; font-weight: 600; }
#loginBrand { text-align: center; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
#loginAvatar { width: 84px !important; height: 84px !important; box-shadow: 0 0 0 4px rgba(255,255,255,.08), 0 12px 30px rgba(0,0,0,.4) !important; }
/* Celular: la sala arriba, controles abajo en una fila deslizable, paneles como hojas inferiores */
@media (max-width: 760px) {
  .layB header { left: 8px !important; right: 8px !important; top: 8px !important; flex-wrap: nowrap !important; overflow-x: auto; }
  .layB header h1, .layB #summary .faceN, .layB header .winBtn[data-k="sliders"], .layB header .winBtn[data-k="full"] { display: none !important; }
  .layB #dock { left: 8px !important; right: 8px !important; transform: none !important; bottom: 66px !important; width: auto !important; max-width: none !important; top: auto !important; }
  .layB #dock > .bar { flex-wrap: nowrap !important; overflow-x: auto; justify-content: flex-start !important; }
  .layB #goBar { left: 8px !important; right: 8px !important; transform: none !important; bottom: 8px !important; top: auto !important; max-width: none !important; flex-wrap: nowrap !important; overflow-x: auto; justify-content: flex-start !important; }
  .layB #goBar .it span { display: none; } .layB #goBar > b { display: none !important; }
  .layB #talkBar { left: 8px !important; right: 8px !important; width: auto !important; top: auto !important; bottom: 132px !important; }
  .layB #chatLog { display: none; } .layB #talkBar:focus-within #chatLog { display: flex; max-height: 120px; }   /* en celular el historial aparece al escribir */
  .layB header > * { white-space: nowrap; flex: none; } .layB #roomTitle { max-width: 46vw; overflow: hidden; text-overflow: ellipsis; }
  .layB .fpanel { left: 8px !important; right: 8px !important; width: auto !important; top: auto !important; bottom: 8px !important; max-height: 70vh !important; z-index: 8 !important; border-radius: 18px 18px 14px 14px !important; }
  .layB .grip { display: none !important; }
  .layB #editBar { left: 8px !important; right: 8px !important; width: auto !important; top: 30vh !important; }
  #lookBar { width: calc(100vw - 16px) !important; max-height: calc(100vh - 32px); overflow-y: auto; }
  #lookBar .lgrid { grid-template-columns: 1fr !important; }
  .modalW { width: calc(100vw - 16px); }
  .layB #zoomBox { display: none !important; }
  .layB #wrap { align-items: flex-start !important; padding-top: 66px; }   /* la sala arriba, los controles abajo */
}
