:root{color-scheme:dark;font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;--bg:#0b0e13;--rail:#111318;--sidebar:#171a21;--sidebar2:#1d212a;--panel:#20242d;--panel2:#272c37;--border:#303641;--text:#f3f5f7;--muted:#949ba4;--accent:#5865f2;--accent2:#6d78f4;--success:#23a559;--danger:#da373c;--warning:#f0b232}
*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--text);overflow:hidden}button,input,select,textarea{font:inherit}button{cursor:pointer}.hidden{display:none!important}.helper{color:var(--muted);font-size:12px;line-height:1.45}.optional{color:var(--muted);font-weight:400}.error-text{min-height:18px;color:#ff8f94;font-size:12px;margin:0}
input,select,textarea{width:100%;padding:11px 12px;border:1px solid var(--border);border-radius:8px;background:#11141a;color:var(--text);outline:none}input:focus,select:focus,textarea:focus{border-color:var(--accent);box-shadow:0 0 0 3px rgba(88,101,242,.16)}label{display:grid;gap:6px;color:#d3d7de;font-size:13px}.field-label{display:block;margin-bottom:8px;color:#d3d7de;font-size:13px}.primary-button,.secondary-button,.danger-button{border:0;border-radius:8px;padding:10px 14px;font-weight:700}.primary-button{background:var(--accent);color:#fff}.primary-button:hover{background:var(--accent2)}.secondary-button{background:var(--panel2);color:var(--text);border:1px solid var(--border)}.secondary-button:hover{background:#303642}.danger-button{background:rgba(218,55,60,.14);color:#ff9c9f;border:1px solid rgba(218,55,60,.42)}.danger-button:hover{background:rgba(218,55,60,.24)}.ghost-icon,.icon-button{border:0;background:transparent;color:var(--muted);border-radius:7px}.ghost-icon:hover,.icon-button:hover{background:var(--panel2);color:var(--text)}.icon-button{width:36px;height:36px;font-size:22px}.modal-close{border:0;background:transparent;color:var(--muted);border-radius:7px;width:36px;height:36px;font-size:22px;cursor:pointer}.modal-close:hover{background:var(--panel2);color:var(--text)}.check-row{display:flex;align-items:center;gap:9px}.check-row input{width:auto}.connect-view{height:100vh;display:grid;place-items:center;background:radial-gradient(circle at 50% 10%,#20285a 0,var(--bg) 38%)}.connect-card{width:min(440px,calc(100vw - 32px));display:grid;gap:15px;padding:28px;border:1px solid var(--border);border-radius:16px;background:rgba(23,26,33,.95)}.brand-large{display:flex;align-items:center;gap:13px;margin-bottom:8px}.brand-large>span,.home-logo{display:grid;place-items:center;background:var(--accent);font-weight:900}.brand-large>span{width:50px;height:50px;border-radius:16px;font-size:22px}.brand-large strong{font-size:22px}.brand-large small{display:block;color:var(--muted);margin-top:3px}
.app-shell{height:100vh;min-height:0;overflow:hidden;display:grid;grid-template-columns:72px 260px minmax(0,1fr) 220px}.server-rail{min-height:0;display:flex;flex-direction:column;align-items:center;gap:8px;padding:12px 8px;background:var(--rail);overflow:hidden}.server-list{display:flex;flex:1;min-height:0;width:56px;flex-direction:column;align-items:center;gap:8px;overflow-y:auto;overflow-x:hidden;padding:2px 0}.server-icon{width:48px;height:48px;border:0;border-radius:16px;background:#242832;color:#fff;font-weight:800;font-size:13px;transition:.14s}.server-icon:hover,.server-icon.active{border-radius:12px;background:var(--accent)}.server-icon.add{color:#48c779;font-size:25px}.server-icon.add:hover{background:var(--success);color:#fff}.rail-separator{width:32px;height:2px;background:var(--border);border-radius:2px}.channel-sidebar{min-width:0;display:flex;flex-direction:column;background:var(--sidebar);border-right:1px solid rgba(0,0,0,.28)}.server-header{height:52px;display:flex;align-items:center;justify-content:space-between;padding:0 12px 0 16px;border-bottom:1px solid rgba(0,0,0,.35)}.server-title-wrap{min-width:0}.server-title-wrap strong{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.server-title-wrap small{color:var(--muted);font-size:10px}.channel-list{flex:1;min-height:0;padding:14px 8px;overflow-y:auto}.sidebar-empty{padding:18px;color:var(--muted);font-size:13px}.category-block{margin-bottom:12px}.category-header{display:flex;align-items:center;justify-content:space-between;padding:5px 7px;color:var(--muted);font-size:11px;font-weight:800;text-transform:uppercase;letter-spacing:.05em}.category-header button{border:0;background:transparent;color:var(--muted);padding:2px 5px}.channel-row{display:flex;align-items:center;gap:8px;width:100%;min-height:34px;padding:6px 8px;border:0;border-radius:6px;background:transparent;color:var(--muted);text-align:left}.channel-row:hover{background:rgba(255,255,255,.045);color:#d8dbe0}.channel-row.active{background:rgba(255,255,255,.08);color:#fff}.channel-row .channel-name{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.channel-row .channel-icon{width:18px;text-align:center}.voice-users{display:grid;margin:2px 0 4px 25px}.voice-user{display:flex;align-items:center;gap:7px;padding:4px 5px;border-radius:5px;color:var(--muted);font-size:12px}.voice-user .mini-avatar{width:22px;height:22px;border-radius:50%;display:grid;place-items:center;background:#2b303b;font-size:9px;font-weight:800;border:2px solid transparent}.voice-user.speaking{color:#fff}.voice-user.speaking .mini-avatar{border-color:var(--success)}.voice-user .share-mini{margin-left:auto;color:var(--success)}.user-panel{height:58px;display:flex;align-items:center;gap:8px;padding:8px;background:#12151b}.avatar{display:grid;place-items:center;background:var(--accent);font-weight:800}.avatar.small{width:34px;height:34px;border-radius:50%;font-size:10px;flex:0 0 auto}.user-panel-info{min-width:0;flex:1 1 auto}.user-panel-info strong,.user-panel-info small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.user-panel-info strong{font-size:13px}.user-panel-info small{color:var(--muted);font-size:10px}
.main-panel{min-width:0;min-height:0;background:#1b1e25}.home-view{height:100%;display:grid;place-items:center;padding:24px}.home-hero{text-align:center;max-width:560px}.home-logo{width:82px;height:82px;margin:0 auto 18px;border-radius:28px;font-size:34px}.home-hero h1{margin:0;font-size:30px}.home-hero p{color:var(--muted);line-height:1.55}.home-actions{display:flex;justify-content:center;gap:10px;flex-wrap:wrap;margin-top:20px}.channel-view{height:100%;min-height:0;display:grid;grid-template-rows:52px minmax(0,1fr) auto}.main-header{display:flex;align-items:center;justify-content:space-between;padding:0 14px;border-bottom:1px solid rgba(0,0,0,.32);background:#1e2128}.main-header>div{display:flex;align-items:center;gap:8px}.main-header small{color:var(--muted);font-size:11px;margin-left:4px}.channel-symbol{color:var(--muted);font-size:20px}.message-list{min-height:0;overflow-y:auto;padding:18px 20px}.message{display:grid;grid-template-columns:40px 1fr;gap:11px;padding:8px 0}.message-avatar{width:40px;height:40px;border-radius:50%;display:grid;place-items:center;background:#303642;font-size:11px;font-weight:800}.message-head{display:flex;align-items:baseline;gap:8px}.message-head strong{font-size:14px}.message-head time{color:var(--muted);font-size:10px}.message-body{margin-top:3px;color:#dbdee1;white-space:pre-wrap;word-break:break-word;font-size:14px}.message-composer{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:end;gap:8px;padding:12px 16px 16px;background:#1b1e25;border-top:1px solid rgba(0,0,0,.18)}.message-input-wrap{min-width:0;display:grid;gap:5px}.message-composer textarea{min-height:44px;max-height:140px;resize:none;overflow-y:auto;background:#292d36;border:1px solid transparent;border-radius:9px;padding:11px 12px;line-height:1.35;color:var(--text)}.message-composer textarea:focus{border-color:var(--accent)}.message-composer textarea:disabled{opacity:.65;cursor:not-allowed}.message-composer small{color:var(--muted);font-size:10px;padding-left:3px}.message-composer.read-only small{color:var(--warning)}.send-button{min-height:44px;border:0;border-radius:8px;background:var(--accent);color:#fff;padding:0 16px;font-weight:700}.send-button:disabled{opacity:.5;cursor:not-allowed}
.voice-view{grid-template-rows:52px auto minmax(0,1fr)}.voice-landing{display:grid;place-items:center;align-content:center;text-align:center;padding:30px}.voice-landing h2{margin:12px 0 0}.voice-landing p{color:var(--muted)}.voice-logo{font-size:48px}.voice-connected{min-height:0;display:grid;grid-template-rows:minmax(0,1fr) auto}.voice-participants{align-content:start;display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:12px;padding:18px;overflow-y:auto}.voice-card{position:relative;display:grid;place-items:center;min-height:128px;border-radius:12px;background:#252a33;border:2px solid transparent;overflow:hidden;transition:transform .15s ease,border-color .15s ease,box-shadow .15s ease}.voice-card.speaking{border-color:var(--success)}.voice-card.clickable{cursor:pointer}.voice-card.clickable:hover{transform:translateY(-2px);border-color:rgba(255,255,255,.28);box-shadow:0 6px 18px rgba(0,0,0,.35)}.voice-card.clickable:active{transform:translateY(0) scale(.98)}.voice-card.watching{border-color:var(--accent)}.voice-card-avatar{width:62px;height:62px;border-radius:50%;display:grid;place-items:center;background:#363c48;font-weight:800}.voice-card-name{position:relative;z-index:1;margin-top:8px;font-size:13px;padding:2px 8px;border-radius:6px}.voice-card.has-video .voice-card-name{position:absolute;left:8px;right:64px;bottom:8px;margin-top:0;text-align:left;background:rgba(0,0,0,.55);text-shadow:0 1px 2px rgba(0,0,0,.6)}.voice-card-video{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;background:#171a21}.voice-card-video.mirrored{transform:scaleX(-1)}.voice-card-badges{position:absolute;right:8px;bottom:8px;display:flex;gap:5px;z-index:1}.mini-badge{padding:3px 6px;border-radius:5px;background:#12151b;color:var(--muted);font-size:10px}.call-controls{display:flex;justify-content:center;gap:9px;padding:12px 16px 16px}.control-button{min-width:72px;display:grid;gap:4px;place-items:center;border:1px solid var(--border);border-radius:11px;padding:9px 10px;background:#282d36;color:#fff;transition:background .12s ease,border-color .12s ease}.control-button:hover{background:#323844;border-color:#454b59}.control-button span{font-size:17px}.control-button small{font-size:10px}.control-button.active{background:#3a4050}.control-button.active:hover{background:#454c5f}.control-button.krisp-active{border-color:var(--success)}.control-button.danger{background:rgba(218,55,60,.18);border-color:rgba(218,55,60,.45)}.control-button.danger:hover{background:rgba(218,55,60,.3)}.control-button:disabled{opacity:.45;cursor:not-allowed}.stream-tabs{display:flex;align-items:center;gap:5px;padding:8px 12px;background:#171a20;border-bottom:1px solid rgba(0,0,0,.25);overflow-x:auto}.stream-tab{border:0;border-radius:7px;padding:6px 10px;background:transparent;color:var(--muted);white-space:nowrap}.stream-tab.active{background:var(--panel2);color:#fff}.screen-stage{min-height:0;background:#0b0d11;padding:12px;overflow-y:auto;overflow-x:hidden}.screen-grid{width:100%;height:auto;display:grid;grid-template-columns:repeat(auto-fit,minmax(min(320px,100%),1fr));gap:10px;align-items:start}.screen-grid.focused{display:flex;justify-content:center;align-items:flex-start}.screen-grid.focused .screen-tile{width:100%;max-width:100%}@keyframes tile-in{from{opacity:0;transform:scale(.96)}to{opacity:1;transform:scale(1)}}.screen-tile{position:relative;width:100%;min-width:0;min-height:0;aspect-ratio:var(--share-aspect,16/9);border:1px solid #303641;border-radius:10px;overflow:hidden;background:#050609;animation:tile-in .18s ease-out}.screen-tile video{position:absolute;inset:0;width:100%;height:100%;display:block;object-fit:contain;background:#050609}.screen-tile-label{position:absolute;left:8px;bottom:8px;padding:4px 7px;border-radius:6px;background:rgba(0,0,0,.72);font-size:11px;z-index:2}.screen-audio{position:absolute;right:8px;bottom:8px;padding:4px 6px;border-radius:6px;background:rgba(35,165,89,.85);font-size:10px;z-index:2}
.member-sidebar{background:var(--sidebar);border-left:1px solid rgba(0,0,0,.25);min-width:0}.member-sidebar header{height:52px;display:flex;align-items:center;justify-content:space-between;padding:0 14px;border-bottom:1px solid rgba(0,0,0,.3)}.member-sidebar header small{color:var(--muted)}.member-list{padding:12px 8px;overflow-y:auto;height:calc(100vh - 52px)}.member-row{display:grid;grid-template-columns:34px 1fr;gap:8px;align-items:center;padding:7px;border-radius:7px}.member-row:hover{background:rgba(255,255,255,.04)}.member-row.offline{opacity:.48}.member-avatar{width:34px;height:34px;border-radius:50%;display:grid;place-items:center;background:#303642;font-size:10px;font-weight:800;position:relative}.member-avatar::after{content:"";position:absolute;right:-1px;bottom:-1px;width:9px;height:9px;border:2px solid var(--sidebar);border-radius:50%;background:#747f8d}.member-row.online .member-avatar::after{background:var(--success)}.member-info{min-width:0}.member-info strong,.member-info small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.member-info strong{font-size:12px}.member-info small{color:var(--muted);font-size:9px}
.modal{position:fixed;inset:0;z-index:40;display:grid;place-items:center;padding:24px;background:rgba(0,0,0,.72)}.modal-card{width:min(860px,94vw);max-height:88vh;overflow:auto;border:1px solid var(--border);border-radius:14px;background:#181b22;padding:18px}.modal-card.narrow{width:min(520px,94vw)}.modal-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:15px}.modal-header small{display:block;color:var(--muted);font-size:10px;letter-spacing:.1em}.modal-header h2{margin:3px 0 0;font-size:20px}.modal-pane{display:grid;gap:13px;margin-top:15px}.segmented{display:flex;gap:5px;padding:4px;border-radius:9px;background:#11141a}.segmented button{flex:1;border:0;border-radius:6px;padding:8px;background:transparent;color:var(--muted)}.segmented button.active{background:var(--panel2);color:#fff}.modal-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:16px}.role-checks{display:grid;gap:6px;max-height:180px;overflow-y:auto;padding:6px 0}.role-check{display:flex;align-items:center;gap:8px;padding:7px 8px;border-radius:7px;background:#20242c}.role-check input{width:auto}.input-copy{display:grid;grid-template-columns:1fr auto;gap:7px}.input-copy button{border:1px solid var(--border);border-radius:8px;background:var(--panel2);color:#fff;padding:0 12px}.settings-card{width:min(900px,95vw);height:min(650px,88vh);overflow:hidden}.settings-grid{height:calc(100% - 56px);display:grid;grid-template-columns:180px minmax(0,1fr);gap:16px}.settings-nav{display:grid;align-content:start;gap:4px}.settings-nav button{border:0;border-radius:7px;padding:9px 10px;background:transparent;color:var(--muted);text-align:left}.settings-nav button.active{background:var(--panel2);color:#fff}.settings-content{min-height:0;overflow-y:auto;padding-right:4px}.settings-content section{display:grid;gap:14px}.section-title{display:flex;justify-content:space-between;align-items:center}.section-title h3{margin:0}.section-title small{color:var(--muted)}.role-editor,.member-editor-row{border:1px solid var(--border);border-radius:10px;padding:12px;margin-bottom:10px;background:#20242c}.role-editor-head{display:flex;align-items:center;gap:8px;margin-bottom:10px}.role-color{width:12px;height:12px;border-radius:50%}.permission-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}.permission-grid label{display:flex;align-items:center;gap:7px;padding:6px;border-radius:6px;background:#181b22;font-size:11px}.permission-grid input{width:auto}.source-modal-card{width:min(960px,95vw)}.source-toolbar{display:grid;grid-template-columns:330px 1fr;gap:10px;margin-bottom:12px}.source-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;max-height:56vh;overflow-y:auto}.source-item{overflow:hidden;border:1px solid var(--border);border-radius:9px;background:#20242c;color:#fff;text-align:left;padding:0}.source-item:hover{border-color:var(--accent)}.source-item img{width:100%;aspect-ratio:16/9;object-fit:cover;display:block;background:#090b0e}.source-item span{display:block;padding:8px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12px}.system-audio{margin-top:13px}.toast{position:fixed;right:18px;bottom:18px;z-index:60;max-width:390px;padding:11px 14px;border:1px solid var(--border);border-radius:9px;background:#252a33;box-shadow:0 12px 36px rgba(0,0,0,.36);font-size:13px}
@media(max-width:1080px){.app-shell{grid-template-columns:64px 230px minmax(0,1fr)}.member-sidebar{display:none!important}.server-icon{width:44px;height:44px}.source-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:760px){.app-shell{grid-template-columns:56px 200px minmax(0,1fr)}.source-grid{grid-template-columns:1fr}.source-toolbar{grid-template-columns:1fr}.call-controls{gap:5px}.control-button{min-width:54px}.control-button small{display:none}}

/* v0.4.2: rolagem e atualização visível */
.server-list,.channel-list,.message-list,.member-list,.voice-participants,.source-grid,.settings-content{scrollbar-width:thin;scrollbar-color:#454b59 transparent}
.server-list::-webkit-scrollbar,.channel-list::-webkit-scrollbar,.message-list::-webkit-scrollbar,.member-list::-webkit-scrollbar,.voice-participants::-webkit-scrollbar,.source-grid::-webkit-scrollbar,.settings-content::-webkit-scrollbar{width:8px}
.server-list::-webkit-scrollbar-thumb,.channel-list::-webkit-scrollbar-thumb,.message-list::-webkit-scrollbar-thumb,.member-list::-webkit-scrollbar-thumb,.voice-participants::-webkit-scrollbar-thumb,.source-grid::-webkit-scrollbar-thumb,.settings-content::-webkit-scrollbar-thumb{background:#454b59;border-radius:999px}
.desktop-titlebar{position:fixed;z-index:12000;top:0;margin-left:env(titlebar-area-x,0);width:env(titlebar-area-width,100%);height:env(titlebar-area-height,36px);display:flex;align-items:center;gap:8px;padding:0 6px 0 10px;border-bottom:1px solid rgba(0,0,0,.32);background:#111318;color:#cdd2da;app-region:drag;-webkit-app-region:drag;user-select:none}.desktop-titlebar-brand{min-width:0;display:flex;align-items:center;gap:7px;font-size:11px;font-weight:700}.desktop-titlebar-brand img{width:18px;height:18px;border-radius:5px}.desktop-titlebar .desktop-update-button{app-region:no-drag;-webkit-app-region:no-drag;margin-left:auto;position:relative;flex:0 0 auto;width:30px;height:28px;border:0;border-radius:6px;background:transparent;color:#aeb4c0;display:grid;place-items:center;padding:0;transition:background .16s ease,color .16s ease,box-shadow .16s ease}.desktop-titlebar .desktop-update-button:hover{background:#303642;color:#fff}.desktop-update-button svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}.desktop-update-button.update-available{background:var(--success);color:#fff;box-shadow:0 0 0 2px rgba(35,165,89,.16)}.desktop-update-button.update-available:hover{background:#2fbd69}.desktop-update-button.update-error{color:#ff8f94}.desktop-update-button.update-checking svg{animation:update-button-pulse .85s ease-in-out infinite alternate}.desktop-update-button:disabled{cursor:default;opacity:.78}.desktop-update-badge{position:absolute;right:-3px;top:-3px;min-width:15px;height:15px;padding:0 2px;display:grid;place-items:center;border:2px solid #111318;border-radius:999px;background:#fff;color:#167d42;font-size:6px;font-weight:900;line-height:1}.desktop-update-button.update-error .desktop-update-badge{background:var(--danger);color:#fff}@keyframes update-button-pulse{from{opacity:.4;transform:translateY(-1px)}to{opacity:1;transform:translateY(1px)}}body.desktop-window{padding-top:env(titlebar-area-height,36px)}body.desktop-window .connect-view{height:calc(100vh - env(titlebar-area-height,36px))}body.desktop-window .startup-update-view,body.desktop-window .reconnect-view{top:env(titlebar-area-height,36px)}body.desktop-window.screen-share-fullscreen{padding-top:0}.screen-share-fullscreen .desktop-titlebar{display:none!important}body.desktop-window.screen-share-fullscreen .app-shell{height:100vh}
@media(max-width:980px){.app-shell{grid-template-columns:64px 230px minmax(0,1fr)}.member-sidebar{display:none!important}}

/* hotfix compartilhamento: preserva a proporção real da fonte e evita faixas pretas causadas pelo container */

/* hotfix layout/scroll v0.4.x: cada coluna controla apenas a propria rolagem */
html,body{width:100%;height:100%;min-height:0;overflow:hidden}
.app-shell{
  width:100%;height:100%;max-height:100vh;min-height:0;
  grid-template-columns:72px 300px minmax(0,1fr) 240px;
  overflow:hidden;
}

/* Barra extrema esquerda fica fixa. Nao deve rolar junto com canais. */
.server-rail{height:100%;min-height:0;overflow:hidden}
.server-list{
  flex:1 1 0;min-height:0;overflow:hidden;
  scrollbar-width:none;
}
.server-list::-webkit-scrollbar{display:none}

/* Somente a lista de canais rola entre cabecalho e painel do usuario. */
.channel-sidebar{
  height:100%;min-height:0;min-width:0;overflow:hidden;
  display:flex;flex-direction:column;
}
.server-header{flex:0 0 52px;min-height:52px}
.channel-list{
  flex:1 1 0;min-height:0;max-height:none;
  overflow-x:hidden;overflow-y:auto;
  overscroll-behavior:contain;
  scrollbar-gutter:stable;
}
.noServerSidebar{flex:1 1 0;min-height:0;overflow:hidden}
.user-panel{flex:0 0 58px;min-height:58px}

/* Nomes importados do Discord podem ser longos/decorados: nao cortar com reticencias. */
.channel-row{height:auto;min-height:34px;align-items:flex-start}
.channel-row .channel-icon{flex:0 0 18px;padding-top:1px}
.channel-row .channel-name{
  min-width:0;white-space:normal;overflow:visible;text-overflow:clip;
  overflow-wrap:anywhere;word-break:break-word;line-height:1.28;
}
.category-header>span{min-width:0;overflow-wrap:anywhere;line-height:1.25}
.voice-user>span:not(.share-mini){min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}

/* Area central: cabecalho e composer fixos; somente mensagens rolam. */
.main-panel{height:100%;min-height:0;overflow:hidden}
.channel-view{height:100%;min-height:0;overflow:hidden}
.message-list{
  min-height:0;height:100%;overflow-y:auto;overflow-x:hidden;
  overscroll-behavior:contain;scrollbar-gutter:stable;
}
.message-composer{min-height:0;flex:none}

/* Membros: cabecalho fixo e somente a lista rola. */
.member-sidebar{
  height:100%;min-height:0;overflow:hidden;
  display:grid;grid-template-rows:52px minmax(0,1fr);
}
.member-sidebar header{height:52px;min-height:52px}
.member-list{
  height:auto;min-height:0;overflow-y:auto;overflow-x:hidden;
  overscroll-behavior:contain;scrollbar-gutter:stable;
}

/* Barra visivel somente nas regioes que realmente rolam. */
.channel-list,.message-list,.member-list{scrollbar-width:thin;scrollbar-color:#454b59 transparent}
.channel-list::-webkit-scrollbar,.message-list::-webkit-scrollbar,.member-list::-webkit-scrollbar{width:8px}
.channel-list::-webkit-scrollbar-thumb,.message-list::-webkit-scrollbar-thumb,.member-list::-webkit-scrollbar-thumb{background:#454b59;border-radius:999px}

@media(max-width:1080px){
  .app-shell{grid-template-columns:64px 270px minmax(0,1fr)}
}
@media(max-width:760px){
  .app-shell{grid-template-columns:56px 240px minmax(0,1fr)}
}

/* hotfix Discord-like sidebar v0.4.x
   - server icons scroll only when needed
   - channel list is the only scrollable area in the channel sidebar
   - server header and account footer remain pinned
*/

/* The whole shell never scrolls. */
html,body,#appView,.app-shell{height:100%;min-height:0;overflow:hidden}

/* SERVER RAIL ------------------------------------------------------------ */
.server-rail{
  height:100%;
  min-height:0;
  overflow:hidden;
  display:flex;
  flex-direction:column;
  align-items:center;
}

/* Home and add buttons stay pinned. Only the middle server list scrolls. */
#homeServer,.server-rail>.rail-separator,#addServerButton{flex:0 0 auto}
.server-list{
  flex:1 1 auto;
  min-height:0;
  max-height:100%;
  overflow-y:auto;
  overflow-x:hidden;
  overscroll-behavior:contain;
  scrollbar-width:none;
  padding:2px 0;
}
.server-list::-webkit-scrollbar{width:0;height:0;display:none}

/* CHANNEL SIDEBAR -------------------------------------------------------- */
.channel-sidebar{
  height:100%;
  min-height:0;
  overflow:hidden;
  display:grid;
  grid-template-rows:52px minmax(0,1fr) auto auto;
}

.server-header{
  grid-row:1;
  min-height:52px;
  height:52px;
  overflow:hidden;
}

/* Friends panel shares the same flexible middle slot as the channel list. */
.home-sidebar{
  grid-row:2;
  min-height:0;
  overflow:hidden;
}

/* The channel list owns ALL vertical scrolling in this column. */
.channel-list{
  grid-row:2;
  min-height:0;
  height:auto;
  max-height:none;
  overflow-y:auto;
  overflow-x:hidden;
  overscroll-behavior:contain;
  scrollbar-gutter:stable;
  padding:10px 8px 14px;
}

/* Empty-state occupies the same middle slot as the channel list. */
#noServerSidebar{
  grid-row:2;
  min-height:0;
  overflow:hidden;
}

/* Voice call dock is pinned right above the account controls, Discord-style. */
.call-dock{
  grid-row:3;
}

/* Account controls are pinned to the bottom, Discord-style. */
.user-panel{
  grid-row:4;
  position:relative;
  z-index:5;
  min-height:58px;
  height:58px;
  width:100%;
  overflow:hidden;
  border-top:1px solid rgba(0,0,0,.32);
  background:#12151b;
}

/* Keep imported Discord names readable without stretching the row badly. */
.channel-row{
  min-width:0;
  width:100%;
}
.channel-row .channel-name{
  min-width:0;
  max-width:100%;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.category-header>span{
  min-width:0;
  overflow:hidden;
  white-space:nowrap;
  text-overflow:ellipsis;
}

/* Discord-like subtle channel scrollbar: visible only in the scroll region. */
.channel-list{scrollbar-width:thin;scrollbar-color:#303642 transparent}
.channel-list::-webkit-scrollbar{width:8px}
.channel-list::-webkit-scrollbar-track{background:transparent}
.channel-list::-webkit-scrollbar-thumb{background:#303642;border-radius:999px}
.channel-list::-webkit-scrollbar-thumb:hover{background:#454b59}

/* MAIN + MEMBERS --------------------------------------------------------- */
.main-panel,.channel-view,.member-sidebar{min-height:0;overflow:hidden}
.message-list,.member-list{
  min-height:0;
  overflow-y:auto;
  overflow-x:hidden;
  overscroll-behavior:contain;
}

/* Prevent wheel events on the fixed rails from making the document move. */
.server-header,.user-panel,.main-header{overscroll-behavior:none}


/* v0.5 moderation context menu */
.member-context-menu{position:fixed;z-index:90;width:245px;max-height:min(520px,calc(100vh - 16px));overflow-y:auto;padding:7px;border:1px solid #353a45;border-radius:8px;background:#202229;box-shadow:0 12px 34px rgba(0,0,0,.46)}
.context-member-head{display:grid;grid-template-columns:34px minmax(0,1fr);gap:9px;align-items:center;padding:7px 8px 10px}.context-member-head strong,.context-member-head small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.context-member-head small{margin-top:2px;color:var(--muted);font-size:10px}.context-action{display:flex;width:100%;align-items:center;justify-content:space-between;border:0;border-radius:5px;padding:8px 9px;background:transparent;color:#d7dae0;text-align:left;font-size:12px}.context-action:hover{background:var(--accent);color:#fff}.context-action.danger-text{color:#ff7c82}.context-action.danger-text:hover{background:var(--danger);color:#fff}.context-separator{height:1px;margin:5px 7px;background:#343944}.context-submenu{margin:2px 0 5px 12px;padding-left:5px;border-left:1px solid #3b414d}.context-submenu .context-action{font-size:11px;color:var(--muted)}.context-submenu .context-action:hover{color:#fff}.voice-user,.voice-card,.member-row{user-select:none}

/* Monkey Calls 1.0 - identidade, login e transmissão */
.brand-logo{width:64px;height:64px;border-radius:18px;object-fit:cover;box-shadow:0 10px 28px rgba(0,0,0,.35)}
.brand-large{display:flex;align-items:center;gap:14px}.brand-large>div{display:grid;gap:2px}.brand-large strong{font-size:22px}.brand-large small{color:var(--muted)}
.login-card{width:min(420px,calc(100vw - 32px))}.home-monkey{padding:0!important;overflow:hidden}.home-monkey img{width:100%;height:100%;object-fit:cover;border-radius:inherit}.home-logo-img{width:92px;height:92px;border-radius:24px;object-fit:cover;box-shadow:0 12px 34px rgba(0,0,0,.36);margin-bottom:12px}
.admin-users-card{width:min(760px,95vw)}.admin-create-user{display:grid;grid-template-columns:1fr 1.4fr 1fr auto;gap:10px;align-items:end;margin-bottom:18px}.admin-create-user label{margin:0}.admin-users-list{display:grid;gap:7px;max-height:430px;overflow-y:auto}.admin-user-row{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:11px 12px;border:1px solid var(--border);border-radius:10px;background:#20242c}.admin-user-info{min-width:0}.admin-user-info strong,.admin-user-info small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.admin-user-info small{color:var(--muted);font-size:11px;margin-top:2px}.admin-user-actions{display:flex;gap:7px;flex:0 0 auto}
.voice-view{overflow:hidden}.voice-connected{min-height:0;overflow:hidden;display:grid;grid-template-rows:minmax(0,1fr) auto;transition:grid-template-rows .22s ease}.voice-connected.has-screen{grid-template-rows:auto minmax(0,1fr) 150px auto}.voice-connected.has-screen.users-hidden{grid-template-rows:auto minmax(0,1fr) auto}.voice-connected.users-hidden .voice-participants{display:none}.stream-tabs{min-height:44px;flex:0 0 auto}.screen-stage{min-height:0;height:100%;display:grid;grid-template-rows:auto minmax(0,1fr);gap:10px;background:#080a0e;padding:12px;overflow:hidden}.screen-stage-toolbar{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}.screen-stage-info{display:grid;gap:2px}.screen-stage-info strong{font-size:14px}.screen-stage-info small{font-size:11px;color:var(--muted)}.screen-stage-actions{display:flex;align-items:center;gap:7px;flex-wrap:wrap}.ghost-button.compact{border:1px solid var(--border);border-radius:8px;background:#20242c;color:#fff;padding:8px 10px;font-size:12px}.ghost-button.compact:hover{background:#2a2f39}.ghost-button.compact:disabled{opacity:.45;cursor:not-allowed}.screen-viewport{min-height:0;overflow:hidden;display:flex;align-items:center;justify-content:center;background:#050609;border-radius:10px}.screen-viewport:fullscreen{background:#000;padding:0}.screen-grid{width:100%;height:100%;min-height:0;overflow:hidden;display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:10px;align-content:stretch}.screen-grid.focused{grid-template-columns:minmax(0,1fr)}.screen-tile{position:relative;min-height:0;height:100%;display:flex;align-items:center;justify-content:center;border:1px solid #303641;border-radius:10px;overflow:hidden;background:#050609}.screen-tile video{width:100%;height:100%;display:block;object-fit:contain;background:#000}.voice-connected.has-screen .voice-participants{display:grid;grid-auto-flow:column;grid-auto-columns:150px;grid-template-columns:none;overflow-x:auto;overflow-y:hidden;padding:10px 14px;border-top:1px solid rgba(255,255,255,.05);background:#171a20}.voice-connected.has-screen .voice-card{min-height:105px}.call-controls{flex:0 0 auto}
@media(max-width:820px){.admin-create-user{grid-template-columns:1fr}.screen-stage-actions{width:100%}.screen-stage-actions button{flex:1}.voice-connected.has-screen{grid-template-rows:auto minmax(0,1fr) 125px auto}}
.voice-view{grid-template-rows:52px minmax(0,1fr)!important}

.screen-viewers-badge{position:absolute;z-index:4;top:9px;right:9px;display:flex;align-items:center;gap:5px;min-height:28px;padding:5px 8px;border:1px solid rgba(255,255,255,.15);border-radius:999px;background:rgba(10,12,16,.78);color:#fff;font-size:11px;font-weight:800;line-height:1;backdrop-filter:blur(8px);cursor:default}.screen-viewers-badge>svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.8}.screen-viewers-tooltip{position:absolute;z-index:8;top:calc(100% + 8px);right:0;display:none;min-width:170px;max-width:min(260px,70vw);max-height:220px;overflow-y:auto;padding:9px;border:1px solid #3a404c;border-radius:9px;background:#181b22;box-shadow:0 10px 28px rgba(0,0,0,.45);font-size:11px;font-weight:500;line-height:1.35;white-space:normal}.screen-viewers-badge:hover .screen-viewers-tooltip,.screen-viewers-badge:focus-within .screen-viewers-tooltip{display:grid;gap:5px}.screen-viewers-tooltip strong{color:#fff;font-size:10px;text-transform:uppercase;letter-spacing:.04em}.screen-viewers-tooltip span{max-width:230px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#d8dce3}

/* Mensagens não lidas em servidores e conversas privadas */
.server-icon{position:relative;overflow:visible}.server-icon-label{display:grid;width:100%;height:100%;place-items:center}.home-monkey{overflow:visible!important}.home-monkey>img{display:block;overflow:hidden}.rail-unread-badge{position:absolute;z-index:5;top:-4px;right:-5px;display:grid;place-items:center;min-width:19px;height:19px;padding:0 5px;border:2px solid var(--rail);border-radius:999px;background:#ed4245;color:#fff;font-size:9px;font-weight:900;line-height:1;pointer-events:none}.friend-unread-badge,.channel-unread-badge{display:grid;place-items:center;min-width:20px;height:20px;padding:0 6px;border-radius:999px;background:#ed4245;color:#fff;font-size:9px;font-weight:900}.channel-unread-badge{flex:0 0 auto;min-width:18px;height:18px;padding:0 5px}.friend-row:has(.friend-unread-badge) .friend-info strong{color:#fff}


/* Canais estilo Discord: edição, menus e drag & drop */
.channel-row-wrap{position:relative;border-radius:7px}.channel-row-wrap[draggable="true"]{cursor:grab}.channel-row-wrap.dragging,.category-header.dragging{opacity:.42}.channel-row-wrap.drag-before{box-shadow:0 -2px 0 0 var(--accent)}.category-block.drag-over-category{outline:1px dashed rgba(88,101,242,.8);outline-offset:2px;border-radius:8px;background:rgba(88,101,242,.06)}
.category-header{cursor:default}.category-header[draggable="true"]{cursor:grab}.category-actions{display:flex;align-items:center;gap:2px}.category-actions button{font-size:15px;line-height:1}.channel-more{opacity:0;flex:0 0 auto;margin-left:auto;padding:0 2px;font-size:16px;line-height:1;color:var(--muted)}.channel-row:hover .channel-more,.channel-row.active .channel-more{opacity:1}.channel-create-shortcut{margin-bottom:8px;border:1px dashed rgba(255,255,255,.08)}
.channel-context-menu{width:255px}.context-head{display:grid;gap:2px;padding:8px 9px 9px;border-bottom:1px solid rgba(255,255,255,.07);margin-bottom:5px}.context-head strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.context-head small{color:var(--muted);font-size:10px}.context-action{width:100%;display:flex;align-items:center;gap:9px;border:0;border-radius:5px;background:transparent;color:#dbdee1;padding:8px 9px;text-align:left}.context-action:hover{background:var(--accent);color:#fff}.context-action span:nth-child(2){flex:1}.context-arrow{margin-left:auto}.context-separator{height:1px;background:rgba(255,255,255,.08);margin:5px}.danger-text{color:#f26c72}.context-submenu{display:grid;gap:2px;margin:3px 4px 5px;padding:5px;border:1px solid rgba(255,255,255,.08);border-radius:6px;background:#181a20;max-height:220px;overflow-y:auto}.context-sub-action{border:0;border-radius:5px;background:transparent;color:#c7cad1;padding:7px 9px;text-align:left}.context-sub-action:hover,.context-sub-action.selected{background:#30333b;color:#fff}.context-sub-action.selected::after{content:' ✓';float:right;color:var(--success)}

.category-header.drag-category-before{box-shadow:0 -2px 0 0 var(--accent);background:rgba(88,101,242,.08);border-radius:6px}

/* Perfil, login e configurações do usuário */
.auth-tabs{margin-bottom:4px}.auth-pane{display:grid;gap:12px}.avatar.has-image,.member-avatar.has-image,.voice-card-avatar.has-image,.message-avatar.has-image,.profile-avatar.has-image{background-size:cover;background-position:center;background-repeat:no-repeat;color:transparent}.member-info .member-bio{margin-top:3px;white-space:normal;line-height:1.25;color:#9da7b5;font-size:10px}.user-settings-card .settings-grid{grid-template-columns:190px minmax(0,1fr)}.profile-editor-head{display:grid;grid-template-columns:96px minmax(0,1fr);gap:14px;align-items:center}.profile-avatar{width:96px;height:96px;border-radius:50%;font-size:28px}.profile-avatar-actions{display:grid;gap:8px}.profile-avatar-actions strong{font-size:15px}.file-button{display:inline-flex;align-items:center;justify-content:center;cursor:pointer;width:max-content}.profile-actions{justify-content:space-between}.info-card{border:1px solid var(--border);border-radius:12px;background:#20242c;padding:14px;display:grid;gap:8px}.info-card p{margin:0;color:#b7bfca;line-height:1.45}.user-panel .ghost-icon{font-size:18px}.connect-card.login-card{gap:13px}


/* Dispositivos de voz, testes e estados de mute */
.voice-settings-grid{display:grid;gap:16px}.voice-setting-toggle{padding:11px 12px;border:1px solid var(--border);border-radius:9px;background:#20242c}.mic-test-card,.speaker-test-row{display:grid;gap:10px;padding:13px;border:1px solid var(--border);border-radius:10px;background:#20242c}.mic-test-card>div:first-child small,.speaker-test-row small{display:block;margin-top:3px;color:var(--muted);font-size:11px}.speaker-test-row{grid-template-columns:minmax(0,1fr) auto;align-items:center}.mic-level{height:10px;overflow:hidden;border-radius:999px;background:#11141a}.mic-level span{display:block;width:0;height:100%;border-radius:inherit;background:linear-gradient(90deg,var(--success),#f0b232,#da373c);transition:width .08s linear}.voice-state-icons{display:inline-flex;align-items:center;gap:4px;margin-left:auto}.voice-state-icon{position:relative;display:inline-grid;place-items:center;width:19px;height:19px;color:#d8dbe0}.voice-state-icon svg{width:17px;height:17px;overflow:visible;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}.voice-state-icon::after{content:"";position:absolute;width:18px;height:2px;border-radius:2px;background:#f04747;transform:rotate(-45deg);box-shadow:0 0 0 1px rgba(0,0,0,.3)}.voice-card>.voice-state-icons{position:absolute;z-index:2;right:8px;top:8px;margin:0;padding:3px;border-radius:7px;background:rgba(18,21,27,.9)}.voice-card-live{cursor:pointer}.voice-card-live:hover{border-color:var(--success);background:#29342f}.mini-badge.live-action{color:#8ee7af;border:1px solid rgba(35,165,89,.45);cursor:pointer}.mini-badge.live-action.watching{color:#ffb1b4;border-color:rgba(218,55,60,.5)}
.voice-user .share-mini{border:0;background:transparent;font-size:9px;font-weight:800}.screen-loading{width:100%;height:100%;display:grid;place-items:center;color:var(--muted);font-size:13px;background:radial-gradient(circle,#161c25,#050609 68%)}
.control-button.muted-state>span{position:relative}.control-button.muted-state>span::after{content:"";position:absolute;left:-2px;top:9px;width:22px;height:3px;border-radius:3px;background:#f04747;transform:rotate(-45deg);box-shadow:0 0 0 1px rgba(0,0,0,.3)}
.call-dock-actions #dockMuteButton{position:relative}.call-dock-actions #dockMuteButton.active::after{content:"";position:absolute;left:50%;top:50%;width:22px;height:3px;border-radius:3px;background:#f04747;transform:translate(-50%,-50%) rotate(-45deg);box-shadow:0 0 0 1px rgba(0,0,0,.3)}
.report-form{display:grid;gap:13px}.report-form textarea{resize:vertical;min-height:150px}.report-card .modal-actions{margin-top:8px}
.avatar-crop-card{overflow:visible}.avatar-crop-viewport{position:relative;width:min(360px,76vw);aspect-ratio:1;margin:0 auto;overflow:hidden;border-radius:14px;background:#090b0f;cursor:grab;touch-action:none}.avatar-crop-viewport.dragging{cursor:grabbing}.avatar-crop-viewport canvas{display:block;width:100%;height:100%}.avatar-crop-ring{pointer-events:none;position:absolute;inset:7%;border:3px solid rgba(255,255,255,.9);border-radius:50%;box-shadow:0 0 0 999px rgba(0,0,0,.48),inset 0 0 0 1px rgba(0,0,0,.3)}.avatar-zoom-label{display:grid;grid-template-columns:auto minmax(0,1fr);align-items:center;gap:12px;margin-top:14px}.avatar-zoom-label input{margin:0}.avatar-crop-card>.helper{display:block;margin-top:8px;text-align:center;color:var(--muted)}
.context-volume-controls{display:grid;gap:8px;padding:8px;border-top:1px solid rgba(255,255,255,.08);border-bottom:1px solid rgba(255,255,255,.08);margin:3px 0 6px}.context-volume-controls label{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:3px 8px;color:#d7dae0;font-size:11px}.context-volume-controls output{color:var(--muted);font-variant-numeric:tabular-nums}.context-volume-controls input{grid-column:1/-1;width:100%;margin:0}.voice-user[draggable="true"],.voice-card[draggable="true"]{cursor:grab}.voice-user.dragging,.voice-card.dragging{opacity:.45}.channel-row-wrap.member-drop-target>.channel-row{outline:2px solid var(--success);background:rgba(35,165,89,.13)}
.stream-quality-settings{display:grid;grid-template-columns:repeat(4,minmax(120px,1fr));gap:10px;align-items:end;padding:11px 12px;border:1px solid var(--border);border-radius:10px;background:#20242c}.stream-quality-settings label{margin:0}.stream-quality-settings .adaptive-quality{grid-column:1/-1;align-self:center}.stream-quality-settings>small{grid-column:1/-1;color:var(--muted);font-size:10px}.stream-quality-settings select{margin-top:5px}
@media(max-width:900px){.stream-quality-settings{grid-template-columns:1fr 1fr}.stream-quality-settings .adaptive-quality,.stream-quality-settings>small{grid-column:1/-1}}
.server-danger-zone{margin-top:22px;padding:14px;border:1px solid rgba(218,55,60,.62);border-radius:10px;background:rgba(218,55,60,.07);display:flex;align-items:center;justify-content:space-between;gap:18px}.server-danger-zone strong{display:block;color:#fff}.server-danger-zone p{max-width:480px;margin:4px 0 0;color:#b9bec8;font-size:11px;line-height:1.45}.server-danger-zone .danger-button{flex:0 0 auto}
.delete-server-card{border-color:rgba(218,55,60,.5)}.delete-server-warning{margin:0 0 14px;color:#d5d8df;line-height:1.55}.delete-server-warning strong{color:#ff9c9f}.danger-button:disabled,.primary-button:disabled{opacity:.45;cursor:not-allowed}

/* Amigos e mensagens privadas */
.home-view.social-home{display:block;padding:0;min-height:0}.social-shell{height:100%;min-height:0;display:grid;grid-template-columns:290px minmax(0,1fr)}.social-sidebar{min-height:0;display:flex;flex-direction:column;background:#171a21;border-right:1px solid rgba(0,0,0,.3);overflow:hidden}.social-sidebar-head{min-height:58px;display:flex;align-items:center;padding:10px 13px;border-bottom:1px solid var(--border)}.social-sidebar-head strong,.social-sidebar-head small{display:block}.social-sidebar-head small{margin-top:2px;color:var(--muted);font-size:10px}.friend-search{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:6px;padding:10px}.friend-search input{padding:9px 10px}.friend-search button{padding:8px 10px}.friend-search-results{display:grid;gap:4px;max-height:190px;overflow-y:auto;padding:0 8px 8px;border-bottom:1px solid var(--border)}.social-section{padding:8px}.social-section-title{padding:5px;color:var(--muted);font-size:10px;font-weight:800;text-transform:uppercase}.social-friends-section{flex:1;min-height:0;overflow-y:auto}.friends-list,#friendRequestsList,#friendOutgoingList{display:grid;gap:3px}.friend-row{display:grid;grid-template-columns:34px minmax(0,1fr) auto;align-items:center;gap:8px;padding:7px;border-radius:8px}.friend-row:hover,.friend-row.active{background:rgba(255,255,255,.065)}.friend-row.clickable{cursor:pointer}.friend-avatar{position:relative;width:34px;height:34px;border-radius:50%;display:grid;place-items:center;background:#303642;font-size:10px;font-weight:800}.friend-avatar::after{content:"";position:absolute;right:-1px;bottom:-1px;width:8px;height:8px;border:2px solid #171a21;border-radius:50%;background:#747f8d}.friend-row.online .friend-avatar::after{background:var(--success)}.friend-info{min-width:0}.friend-info strong,.friend-info small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.friend-info strong{font-size:12px}.friend-info small{color:var(--muted);font-size:10px}.friend-actions{display:flex;gap:4px}.friend-actions button{border:0;border-radius:6px;background:#292e38;color:#dfe2e7;padding:6px 7px;font-size:10px}.friend-actions button:hover{background:var(--accent)}.friend-actions button.danger-text:hover{background:var(--danger);color:#fff}.social-empty{padding:12px 7px;color:var(--muted);font-size:11px}.social-content{min-width:0;min-height:0;display:grid;place-items:center}.dm-conversation{width:100%;height:100%;min-height:0;display:grid;grid-template-rows:58px minmax(0,1fr) auto}.dm-header{display:grid;grid-template-columns:34px minmax(0,1fr) auto;align-items:center;gap:9px;padding:9px 14px;border-bottom:1px solid rgba(0,0,0,.32);background:#1e2128}.dm-header strong,.dm-header small{display:block}.dm-header small{margin-top:2px;color:var(--muted);font-size:10px}.dm-header .ghost-button{border:1px solid var(--border);border-radius:7px;background:transparent;padding:7px 9px}.dm-message-list{width:100%;padding:16px 20px}.dm-composer{width:100%}@media(max-width:900px){.social-shell{grid-template-columns:230px minmax(0,1fr)}.friend-search{grid-template-columns:1fr}.dm-header .ghost-button{font-size:0}.dm-header .ghost-button::after{content:"Remover";font-size:11px}}

/* Navegação inicial e painel persistente da chamada */
.home-sidebar{flex:1;min-height:0;display:flex;flex-direction:column;overflow:hidden;background:linear-gradient(180deg,#171a21,#15181e)}
.home-sidebar .social-sidebar-head{min-height:52px;padding:8px 13px}.home-sidebar .friend-search{grid-template-columns:minmax(0,1fr) 38px}.home-sidebar .friend-search button{font-size:20px;padding:0}.home-view.social-home{display:grid;place-items:stretch;background:radial-gradient(circle at 55% 15%,rgba(88,101,242,.13),transparent 42%),#1b1e25}.social-home>.social-content{width:100%;height:100%}
.call-dock{flex:0 0 auto;border-top:1px solid rgba(255,255,255,.06);background:#11141a;padding:8px}.call-dock-main{width:100%;display:grid;grid-template-columns:10px minmax(0,1fr) auto;align-items:center;gap:8px;border:0;border-radius:8px;background:transparent;color:#fff;padding:7px;text-align:left}.call-dock-main:hover{background:#20242c}.call-dock-main span:nth-child(2){min-width:0}.call-dock-main strong,.call-dock-main small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.call-dock-main strong{color:#43d17b;font-size:12px}.call-dock-main small{margin-top:2px;color:var(--muted);font-size:10px}.call-live-dot{width:8px;height:8px;border-radius:50%;background:#43d17b;box-shadow:0 0 0 3px rgba(67,209,123,.13)}.call-dock-actions{display:grid;grid-template-columns:repeat(4,1fr);gap:5px;margin-top:5px}.call-dock-actions button{height:32px;border:1px solid transparent;border-radius:7px;background:#242933;color:#dfe3e8}.call-dock-actions button:hover{background:#303642}.call-dock-actions button.active{border-color:#ff6b70;background:rgba(218,55,60,.15)}.call-dock-actions button.sharing{border-color:#43d17b;color:#43d17b}.call-dock-actions button.danger{color:#ff868a}.user-panel{height:auto;min-height:58px}

/* Controles visuais da transmissão */
.stream-quality-settings{display:grid;grid-template-columns:1fr 1fr;gap:14px;padding:14px;border:1px solid var(--border);border-radius:12px;background:linear-gradient(145deg,#20242c,#1b1f27);margin-bottom:12px}.quality-choice{display:grid;gap:7px}.quality-choice>span{color:#cfd3da;font-size:11px;font-weight:800;text-transform:uppercase;letter-spacing:.045em}.choice-row{display:flex;gap:5px;flex-wrap:wrap;padding:4px;border-radius:9px;background:#12151b}.choice-row button{flex:1;min-width:58px;border:1px solid transparent;border-radius:7px;background:transparent;color:#9ca3af;padding:8px 9px;font-size:11px;font-weight:700}.choice-row button:hover{background:#292e38;color:#fff}.choice-row button.selected{border-color:rgba(124,110,255,.65);background:linear-gradient(135deg,#5865f2,#795cff);color:#fff;box-shadow:0 5px 15px rgba(88,101,242,.2)}.pretty-check{position:relative;display:flex!important;align-items:center;gap:10px;border:1px solid var(--border);border-radius:10px;background:#181c23;padding:10px 11px;cursor:pointer}.pretty-check input{position:absolute;opacity:0;pointer-events:none}.pretty-check-box{width:21px;height:21px;flex:0 0 auto;display:grid;place-items:center;border:1px solid #4b5260;border-radius:6px;background:#11141a;color:transparent;font-size:12px;font-weight:900}.pretty-check input:checked+.pretty-check-box{border-color:#6d6cff;background:#5865f2;color:#fff}.pretty-check strong,.pretty-check small{display:block}.pretty-check strong{font-size:12px}.pretty-check small{margin-top:2px;color:var(--muted);font-size:10px;line-height:1.35}.pretty-check.disabled{opacity:.52;cursor:not-allowed}.adaptive-quality{grid-column:1/-1}.system-audio{margin-top:12px}.live-share-actions{display:flex;align-items:center;justify-content:space-between;gap:14px;border-top:1px solid var(--border);padding-top:13px}.live-share-actions span{color:var(--muted);font-size:11px}.source-modal-card{width:min(1000px,96vw)}

/* Tela cheia confiável: overlay local mesmo se o SO negar a troca nativa. */
body.screen-share-fullscreen{overflow:hidden}.screen-share-fullscreen #screenStage{position:fixed;inset:0;z-index:9000;width:100vw;height:100vh;border-radius:0;padding:10px;background:#000}.screen-share-fullscreen #screenViewport{border-radius:0}.screen-share-fullscreen #screenStage .screen-stage-toolbar{position:absolute;z-index:3;left:18px;right:18px;top:14px;padding:9px 11px;border-radius:10px;background:rgba(13,15,20,.78);backdrop-filter:blur(10px);opacity:.18;transition:opacity .15s}.screen-share-fullscreen #screenStage .screen-stage-toolbar:hover{opacity:1}.screen-share-fullscreen #screenGrid{padding:0}.screen-share-fullscreen #screenGrid .screen-tile{border:0;border-radius:0}
@media(max-width:900px){.stream-quality-settings{grid-template-columns:1fr}.adaptive-quality{grid-column:1}.live-share-actions{align-items:stretch;flex-direction:column}.live-share-actions button{width:100%}}

/* Contenção visual para texto Unicode complexo e conteúdo vindo de versões antigas. */
.message>div:last-child{min-width:0}.message-body{max-width:100%;overflow-wrap:anywhere;word-break:break-word;unicode-bidi:plaintext;isolation:isolate;line-height:1.42}.message-head strong,.friend-info strong,.member-info strong,.voice-card-name{max-width:100%;overflow:hidden;text-overflow:ellipsis;unicode-bidi:plaintext;isolation:isolate}.voice-card-name{padding:0 8px;text-align:center;white-space:nowrap}

/* Composer rico, perfis e mensagens interativas */
.message-composer{align-items:stretch}.message-input-wrap{align-content:end}.send-button{height:44px;align-self:end}.composer-toolbar{display:flex;align-items:center;gap:5px;min-height:30px}.composer-toolbar button{border:0;border-radius:6px;background:#242933;color:#cfd3da;padding:5px 8px;font-size:11px}.composer-toolbar button:hover{background:#343a46;color:#fff}.composer-toolbar #messageAttachmentButton,.composer-toolbar #dmAttachmentButton{margin-left:auto}.attachment-preview{display:flex;gap:6px;overflow-x:auto}.attachment-chip{display:flex;align-items:center;gap:7px;max-width:220px;border:1px solid var(--border);border-radius:7px;background:#20242c;padding:6px 8px;font-size:10px}.attachment-chip span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.attachment-chip button{border:0;background:transparent;color:#ff8b8f}.message-avatar{border:0;color:#fff;cursor:pointer}.message-author{border:0;background:transparent;color:#fff;font-weight:700;padding:0;cursor:pointer}.message-author:hover{text-decoration:underline}.message-actions{display:flex;gap:4px;margin-left:auto;opacity:0;transition:opacity .12s}.message:hover .message-actions{opacity:1}.message-actions button{border:0;background:transparent;color:var(--muted);font-size:10px}.message-actions button:hover{color:#fff}.message-attachments{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,360px));gap:8px;margin-top:8px}.message-attachments img,.message-attachments video{display:block;width:100%;max-height:320px;object-fit:contain;border-radius:9px;background:#0b0d11}.message-attachments a{color:#aeb7ff}.message-body code{border-radius:4px;background:#11141a;padding:2px 5px;font-family:Consolas,monospace}.profile-popover-card{position:relative;overflow:hidden;padding-top:82px}.profile-popover-banner{position:absolute;inset:0 0 auto;height:105px;background:linear-gradient(135deg,#5865f2,#8b5cf6)}.profile-popover-close{position:absolute;right:12px;top:12px}.profile-popover-card .profile-avatar{position:relative;border:5px solid #181b22}.profile-popover-card h2{margin:10px 0 0}.profile-popover-card>small{color:var(--muted)}.profile-card-bio{white-space:pre-wrap;color:#cbd0d8}.profile-card-roles{display:flex;gap:6px;flex-wrap:wrap}.profile-card-roles span{border:1px solid;border-radius:999px;padding:4px 8px;font-size:10px}.role-display-options{display:grid;grid-template-columns:130px minmax(0,1fr);gap:10px;margin:8px 0 12px}.role-display-options label{margin:0}.member-group-title{padding:12px 7px 5px;color:var(--muted);font-size:10px;font-weight:900;text-transform:uppercase}.home-sidebar .social-friends-section{display:block;flex:1;min-height:100px;overflow-y:auto}.home-sidebar .friends-list{display:grid!important;min-height:36px}.home-sidebar .social-sidebar-head{justify-content:space-between}.friend-stats{display:flex;gap:6px;padding:0 10px 8px}.friend-stats span{border-radius:999px;background:#242933;color:#aeb4c0;padding:4px 7px;font-size:9px}.user-panel{gap:4px;padding:7px 6px}.user-panel .ghost-icon{position:relative;flex:0 0 auto;width:26px;height:30px;font-size:15px}.notification-badge{position:absolute;right:-3px;top:-3px;min-width:15px;height:15px;display:grid;place-items:center;border:2px solid #12151b;border-radius:999px;background:#ed4245;color:#fff;font-size:8px}.has-unread{color:#ffd166!important}.admin-reports-card{width:min(920px,95vw)}.report-admin-filters{display:flex;gap:6px;margin-bottom:12px}.report-admin-filters button{border:1px solid var(--border);border-radius:8px;background:#20242c;color:var(--muted);padding:7px 11px}.report-admin-filters button.active{border-color:#6d6cff;background:#5865f2;color:#fff}.admin-reports-list{display:grid;gap:10px}.admin-report-item{display:grid;gap:10px;border:1px solid var(--border);border-radius:11px;background:#20242c;padding:13px}.admin-report-item.resolved{opacity:.76}.admin-report-head{display:flex;align-items:start;justify-content:space-between;gap:12px}.admin-report-head strong,.admin-report-head small{display:block}.admin-report-head small{margin-top:3px;color:var(--muted)}.admin-report-head>span{border-radius:999px;background:rgba(255,184,77,.12);color:#ffc86a;padding:5px 8px;font-size:9px}.admin-report-item.resolved .admin-report-head>span{background:rgba(67,209,123,.12);color:#43d17b}.admin-report-item p{margin:0;white-space:pre-wrap;overflow-wrap:anywhere;color:#d5d9e0}.admin-report-item>.primary-button{justify-self:end}.report-resolution{border-left:3px solid #43d17b;background:#171b21;padding:9px;color:#bfc6cf;font-size:11px}.notifications-list{display:grid;gap:8px}.private-notification{display:grid;gap:5px;width:100%;border:1px solid var(--border);border-radius:10px;background:#20242c;color:#fff;padding:11px;text-align:left}.private-notification.unread{border-color:#6d6cff;background:rgba(88,101,242,.12)}.private-notification span{color:#cdd2da;white-space:pre-wrap}.private-notification small{color:var(--muted)}

/* Compositor e visualizador de anexos */
#messageComposer{grid-template-columns:minmax(0,1fr)}.message-entry-row{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:end;gap:8px}.message-entry-row .send-button{height:44px;align-self:end}.message-image-attachment{min-width:0;margin:0;overflow:hidden;border:1px solid var(--border);border-radius:10px;background:#11141a}.message-image-open{position:relative;display:block;width:100%;padding:0;border:0;background:#0b0d11;cursor:zoom-in}.message-image-open::after{content:'Ampliar';position:absolute;right:9px;bottom:9px;border-radius:7px;background:rgba(8,10,14,.78);color:#fff;padding:5px 8px;font-size:10px;opacity:0;transition:opacity .15s}.message-image-open:hover::after{opacity:1}.message-image-open img{border-radius:0}.message-image-attachment figcaption{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:7px 9px}.message-image-attachment figcaption span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--muted);font-size:10px}.message-image-attachment figcaption a{flex:0 0 auto;font-size:10px;font-weight:700;text-decoration:none}.attachment-viewer-modal{z-index:70;padding:14px;background:rgba(0,0,0,.9)}.attachment-viewer-card{width:100%;height:100%;min-width:0;min-height:0;display:grid;grid-template-rows:auto minmax(0,1fr);gap:10px}.attachment-viewer-card>header{display:flex;align-items:center;justify-content:space-between;gap:14px;color:#fff}.attachment-viewer-card>header>strong{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.attachment-viewer-card>header>div{display:flex;align-items:center;gap:8px}.attachment-viewer-card .secondary-button{display:inline-flex;align-items:center;height:36px;text-decoration:none}.attachment-viewer-canvas{min-width:0;min-height:0;display:grid;place-items:center;overflow:auto}.attachment-viewer-canvas img{display:block;max-width:100%;max-height:100%;object-fit:contain;border-radius:7px;box-shadow:0 16px 60px rgba(0,0,0,.5)}

/* Verificação obrigatória de atualização na inicialização */
.home-sidebar .friend-search button{width:38px;min-width:38px;overflow:hidden;font-size:16px;line-height:1}.system-friend{margin-bottom:5px;border:1px solid rgba(88,101,242,.28);background:rgba(88,101,242,.07)}.system-avatar{background-image:url("assets/monkey-calls-logo.png")!important;background-size:cover!important;color:transparent}.system-unread{min-width:19px;height:19px;display:grid;place-items:center;border-radius:999px;background:#5865f2;color:#fff;font-size:9px;font-weight:800}.system-message-title{display:block;margin:3px 0;color:#aeb7ff}.system-message .message-body{margin-top:2px}.friend-row{min-height:48px}

/* Verificação obrigatória de atualização na inicialização */
.startup-update-view{position:fixed;inset:0;z-index:10000;display:grid;place-items:center;padding:28px;background:radial-gradient(circle at 50% 20%,#28316d 0,#111522 42%,#090c12 100%)}.startup-update-card{width:min(520px,calc(100vw - 40px));display:grid;justify-items:center;gap:18px;text-align:center}.startup-update-logo{width:112px;height:112px;border-radius:32px;object-fit:cover;box-shadow:0 22px 70px rgba(0,0,0,.5);animation:startup-logo-pulse 1.8s ease-in-out infinite}.startup-update-copy{display:grid;gap:5px}.startup-update-copy small{color:#aeb7ff;font-size:11px;font-weight:900;letter-spacing:.18em}.startup-update-copy h1{margin:0;font-size:25px}.startup-update-copy p{margin:0;color:#aeb4c0;font-size:13px}.startup-update-progress{position:relative;width:100%;height:12px;overflow:hidden;border-radius:999px;background:#202534;box-shadow:inset 0 1px 3px rgba(0,0,0,.4)}.startup-update-progress span{display:block;width:0;height:100%;border-radius:inherit;background:linear-gradient(90deg,#5865f2,#8790ff);transition:width .25s ease}.startup-update-progress.checking span{width:32%;animation:startup-progress-search 1.35s ease-in-out infinite}.startup-update-stats{width:100%;display:flex;align-items:center;justify-content:space-between;color:#949ba4;font-size:11px}.startup-update-stats strong{color:#fff}.startup-update-actions{display:flex;justify-content:center;gap:9px;flex-wrap:wrap}.startup-update-view.installing .startup-update-logo{animation:startup-logo-spin 1.1s linear infinite}@keyframes startup-progress-search{0%{transform:translateX(-120%)}100%{transform:translateX(420%)}}@keyframes startup-logo-pulse{0%,100%{transform:scale(1);filter:brightness(1)}50%{transform:scale(1.045);filter:brightness(1.15)}}@keyframes startup-logo-spin{to{transform:rotate(360deg)}}
.reconnect-view{position:fixed;inset:0;z-index:9000;display:grid;place-items:center;padding:24px;background:rgba(7,9,14,.92);backdrop-filter:blur(9px)}.reconnect-card{width:min(420px,calc(100vw - 40px));display:grid;justify-items:center;gap:12px;text-align:center}.reconnect-card img{width:88px;height:88px;border-radius:25px;object-fit:cover;box-shadow:0 18px 55px rgba(0,0,0,.5)}.reconnect-card h2{margin:4px 0 0}.reconnect-card p{max-width:390px;margin:0;color:#aeb4c0;line-height:1.5}.reconnect-card small{color:#7f89ff}.reconnect-spinner{width:34px;height:34px;margin-top:5px;border:3px solid #30364a;border-top-color:#7f89ff;border-radius:50%;animation:reconnect-spin .8s linear infinite}@keyframes reconnect-spin{to{transform:rotate(360deg)}}

/* A lista de amigos ocupa o espaço livre; chamada e perfil permanecem no rodapé. */
.channel-sidebar{height:100%;min-height:0;overflow:hidden}.home-sidebar{flex:1 1 0;min-height:0;overflow:hidden;display:flex;flex-direction:column}.home-sidebar .social-sidebar-head,.home-sidebar .friend-stats,.home-sidebar .friend-search{flex:0 0 auto}.home-sidebar .friend-search-results{flex:0 0 auto;max-height:160px;overflow-y:auto}.home-sidebar #friendRequestsSection,.home-sidebar #friendOutgoingSection{flex:0 0 auto;max-height:150px;overflow-y:auto}.home-sidebar .social-friends-section{display:block;flex:1 1 0;min-height:0;overflow-y:auto}.call-dock{flex:0 0 auto}.user-panel{flex:0 0 auto}

/* Navegação mobile: uma tela por vez (lista de servidores+canais, ou conteúdo). */
.mobile-back-button{display:none;border:0;background:transparent;color:#fff;font-size:22px;line-height:1;padding:4px 8px}
.mobile-back-overlay{position:absolute;left:8px;top:8px;z-index:6;border-radius:8px;background:rgba(15,17,22,.82);backdrop-filter:blur(4px)}
@media(max-width:680px){
  .app-shell{grid-template-columns:100vw!important}
  .main-panel{grid-column:1}
  .member-sidebar{display:none!important}
  .app-shell.mobile-main .server-rail,.app-shell.mobile-main .channel-sidebar{display:none!important}
  .app-shell.mobile-main .main-panel{position:relative}
  .app-shell.mobile-servers .main-panel,.app-shell.mobile-channels .main-panel{display:none!important}
  .app-shell.mobile-servers,.app-shell.mobile-channels{grid-template-columns:72px 1fr!important}
  .app-shell.mobile-servers .server-rail,.app-shell.mobile-channels .server-rail{display:flex;grid-column:1}
  .app-shell.mobile-servers .channel-sidebar,.app-shell.mobile-channels .channel-sidebar{grid-column:2;width:100%}
  .mobile-back-button{display:inline-flex;align-items:center}
  #mobileBackToServers{display:none}
  .voice-participants{grid-template-columns:repeat(auto-fill,minmax(120px,1fr))}
  .call-controls{flex-wrap:wrap;row-gap:8px}
  .modal .modal-card{width:calc(100vw - 24px)!important;max-width:calc(100vw - 24px)!important}
  .settings-grid{grid-template-columns:1fr!important;height:auto!important;overflow-y:auto}
  .profile-editor-head{grid-template-columns:1fr!important}
}

/* Botão de baixar o app desktop, visível só na versão web. */
.download-app-wrap{position:relative;display:flex;justify-content:center;margin:2px 0 -4px}
.download-app-menu{position:absolute;top:100%;left:50%;transform:translateX(-50%);z-index:20;margin-top:6px;display:grid;gap:2px;padding:6px;min-width:150px;border:1px solid var(--border);border-radius:10px;background:#20242c;box-shadow:0 12px 34px rgba(0,0,0,.45)}
.download-app-option{display:flex;align-items:center;gap:8px;padding:8px 12px;border-radius:7px;color:#fff;text-decoration:none;font-size:13px;white-space:nowrap}
.download-app-option:hover{background:#2a2f39}
.in-app-download-wrap{flex:0 0 auto;margin:0}.in-app-download-button{width:40px;height:40px;border-radius:13px;color:#48c779;font-size:22px}.in-app-download-button:hover{border-radius:11px;background:var(--success);color:#fff}.in-app-download-wrap .download-app-menu{left:calc(100% + 9px);top:auto;bottom:0;transform:none;margin:0;min-width:160px}.in-app-download-wrap .download-app-menu::before{content:"";position:absolute;left:-9px;bottom:10px;width:9px;height:32px}

/* Camera presentation: preserve the source by default and let the selected mode override it inline. */
.voice-card.has-video{min-height:110px;background:#000}
.voice-card-video{object-fit:contain;background:#000}
.voice-card-video.mirrored,.screen-tile video.mirrored{transform:scaleX(-1)}
.camera-settings-help{margin:0 0 12px;line-height:1.45}

/* User actions, ordered roles, and WhatsApp-style own messages. */
.context-action:disabled{opacity:.48;cursor:not-allowed}.context-action:disabled:hover{background:transparent;color:#d7dae0}
.friend-row,.message:not(.own-message),.dm-header,.profile-popover-card{user-select:none}
.friend-avatar.has-image{background-size:cover;background-position:center;background-repeat:no-repeat;color:transparent}
.message{--message-bubble:#252a33;grid-template-columns:34px minmax(0,1fr);align-items:start;gap:8px;padding:5px 0}.message>.message-avatar{width:34px;height:34px;font-size:10px}.message>div:last-child{position:relative;justify-self:start;width:fit-content;min-width:0;max-width:min(64%,540px);padding:6px 9px;border-radius:4px 12px 12px 12px;background:var(--message-bubble);box-shadow:0 2px 7px rgba(0,0,0,.14)}.message>div:last-child::before{content:"";position:absolute;left:-6px;top:0;width:0;height:0;border-top:7px solid var(--message-bubble);border-left:7px solid transparent}.message .message-head{gap:6px}.message .message-head strong,.message .message-author{font-size:12px}.message .message-head time{font-size:9px}.message .message-body{margin-top:2px;font-size:13px;line-height:1.35}
.message.own-message{--message-bubble:#3b478f;grid-template-columns:minmax(0,1fr) 34px;justify-content:stretch;padding-left:0}.message.own-message>.message-avatar{grid-column:2;grid-row:1}.message.own-message>div:last-child{grid-column:1;grid-row:1;justify-self:end;border-radius:12px 4px 12px 12px}.message.own-message>div:last-child::before{left:auto;right:-6px;border-left:0;border-right:7px solid transparent}.message.own-message .message-head{justify-content:flex-end}.message.own-message .message-actions{margin-left:4px}.message.own-message .message-body{text-align:left;color:#f1f3ff}
.role-order-help{margin-bottom:10px;padding:10px 12px;border:1px solid rgba(88,101,242,.3);border-radius:9px;background:rgba(88,101,242,.09);color:#cbd0ff;font-size:11px;line-height:1.45}
.role-editor[draggable="true"]{cursor:grab}.role-editor.dragging{opacity:.45}.role-editor.drag-before{box-shadow:0 -3px 0 var(--accent)}
.role-editor-head{flex-wrap:wrap}.role-drag-handle{flex:0 0 auto;color:var(--muted);font-weight:900;letter-spacing:-2px}.role-order-actions{display:flex;gap:4px}.role-order-actions button{width:30px;height:30px;border:1px solid var(--border);border-radius:7px;background:#181b22;color:#fff}.role-order-actions button:disabled{opacity:.3;cursor:not-allowed}
.role-display-options{display:block;grid-template-columns:none}.role-display-options .check-row{width:max-content;max-width:100%}.role-editor.system-role{opacity:.72}.role-editor.system-role .role-drag-handle{letter-spacing:0}
@media(max-width:680px){.message-list{padding-inline:10px}.message{grid-template-columns:30px minmax(0,1fr);gap:7px}.message>.message-avatar{width:30px;height:30px}.message>div:last-child{max-width:82%;padding:6px 8px}.message.own-message{grid-template-columns:minmax(0,1fr) 30px}.role-editor-head>input:not([type="color"]){flex-basis:calc(100% - 90px)!important}.role-order-actions{margin-left:auto}}

/* Modo jogo: mapa compartilhado por servidor e salas ligadas aos canais de voz. */
.app-shell.game-mode{grid-template-columns:72px 300px minmax(0,1fr)}
.server-mode-switch{display:flex;flex:0 0 auto;gap:4px;margin:9px 8px 0;padding:4px;border:1px solid rgba(255,255,255,.055);border-radius:9px;background:#11141a}.server-mode-switch button{flex:1;border:0;border-radius:6px;padding:6px 5px;background:transparent;color:var(--muted);font-size:11px;font-weight:750}.server-mode-switch button:hover{color:#fff}.server-mode-switch button.active{background:#303648;color:#fff;box-shadow:0 1px 3px rgba(0,0,0,.3)}
.game-view{height:100%;min-height:0;display:grid;grid-template-rows:52px minmax(0,1fr);background:#101722}.game-header{position:relative;z-index:4;background:#17212c}.game-stage{position:relative;min-width:0;min-height:0;overflow:auto;overscroll-behavior:contain;background:radial-gradient(circle at 50% 0,rgba(77,121,146,.22),transparent 42%),#101720;outline:none}.game-stage:focus-visible{box-shadow:inset 0 0 0 2px var(--accent)}
.game-world{position:relative;width:max(100%,1040px);min-height:690px;isolation:isolate;background-color:#17242a;background-image:linear-gradient(rgba(255,255,255,.025) 1px,transparent 1px),linear-gradient(90deg,rgba(255,255,255,.025) 1px,transparent 1px);background-size:32px 32px;box-shadow:inset 0 0 90px rgba(0,0,0,.38)}
.game-world::before{content:"PRAÇA CENTRAL";position:absolute;left:50%;bottom:36px;transform:translateX(-50%);padding:9px 18px;border:1px solid rgba(140,190,171,.2);border-radius:999px;color:rgba(196,229,215,.66);background:rgba(21,52,47,.58);font-size:11px;font-weight:900;letter-spacing:.14em}
.game-help{position:sticky;left:16px;top:14px;z-index:8;width:max-content;max-width:calc(100% - 32px);display:grid;gap:2px;padding:8px 11px;border:1px solid rgba(255,255,255,.1);border-radius:9px;background:rgba(12,17,24,.84);box-shadow:0 7px 22px rgba(0,0,0,.25);backdrop-filter:blur(6px);pointer-events:none}.game-help strong{font-size:11px}.game-help span{color:var(--muted);font-size:10px}
.game-room{position:absolute;display:grid;grid-template-rows:auto 1fr;border:5px solid #40505a;border-bottom-width:10px;border-radius:12px 12px 7px 7px;background:#263840;box-shadow:0 11px 22px rgba(0,0,0,.34),inset 0 0 0 2px rgba(255,255,255,.035);overflow:visible}.game-room::after{content:"";position:absolute;left:50%;bottom:-12px;width:54px;height:14px;transform:translateX(-50%);border-radius:4px 4px 0 0;background:#17242a;box-shadow:inset 0 4px #819098}.game-room.connected{border-color:#397d62;box-shadow:0 0 0 2px rgba(47,187,125,.15),0 11px 24px rgba(0,0,0,.36)}.game-room-title{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:8px 11px;border-bottom:1px solid rgba(255,255,255,.08);background:rgba(10,16,21,.34);font-size:12px;font-weight:850}.game-room-title small{color:#9fb2bc;font-size:9px;font-weight:600}.game-room-floor{position:relative;margin:12px;border-radius:7px;background-color:#314851;background-image:linear-gradient(45deg,rgba(255,255,255,.027) 25%,transparent 25%,transparent 75%,rgba(255,255,255,.027) 75%),linear-gradient(45deg,rgba(255,255,255,.027) 25%,transparent 25%,transparent 75%,rgba(255,255,255,.027) 75%);background-position:0 0,12px 12px;background-size:24px 24px}.game-room-floor::before,.game-room-floor::after{content:"";position:absolute;top:10px;width:34px;height:19px;border-radius:4px;background:#1d2c32;border:3px solid #17242a}.game-room-floor::before{left:10px}.game-room-floor::after{right:10px}
.game-empty-map{position:absolute;inset:0;display:grid;place-items:center;color:var(--muted);text-align:center}.game-empty-map strong{display:block;color:#fff;margin-bottom:6px}
.game-actor{--actor-scale:1;position:absolute;z-index:5;width:52px;height:69px;transform:translate(-50%,-83%) scale(var(--actor-scale));transform-origin:50% 100%;transition:left .085s linear,top .085s linear;filter:drop-shadow(0 5px 4px rgba(0,0,0,.38));pointer-events:none}.game-actor.self{z-index:7;--actor-scale:1.06}.game-actor.speaking .game-character{filter:drop-shadow(0 0 5px #38d689)}.game-actor-name{position:absolute;left:50%;bottom:-17px;max-width:130px;transform:translateX(-50%);padding:2px 6px;border-radius:5px;background:rgba(5,8,12,.78);color:#fff;font-size:10px;font-weight:750;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.game-actor.self .game-actor-name{color:#cfd3ff;background:rgba(40,45,84,.9)}
.game-character{--skin:#d99a6c;--hair:#59351f;--outfit:#7167d9;position:relative;width:52px;height:60px}.game-character-head{position:absolute;left:12px;top:4px;width:28px;height:29px;border-radius:45% 45% 48% 48%;background:var(--skin);border:2px solid rgba(40,22,18,.32);z-index:3}.game-character-head::before{content:"··";position:absolute;left:6px;top:7px;color:#20191b;font-size:15px;font-weight:900;letter-spacing:4px;line-height:7px}.game-character-head::after{content:"";position:absolute;left:10px;bottom:5px;width:7px;height:3px;border-bottom:2px solid rgba(80,35,35,.58);border-radius:50%}.game-character-hair{position:absolute;left:10px;top:0;width:32px;height:15px;border-radius:14px 14px 5px 5px;background:var(--hair);z-index:4}.game-character.hair-spiky .game-character-hair{clip-path:polygon(0 100%,7% 27%,24% 48%,34% 0,51% 46%,68% 2%,78% 48%,100% 26%,94% 100%)}.game-character.hair-curly .game-character-hair{height:17px;border-radius:50% 50% 30% 30%;box-shadow:-3px 3px var(--hair),3px 3px var(--hair)}.game-character.hair-cap .game-character-hair{height:13px;border-radius:13px 13px 3px 3px;background:var(--outfit)}.game-character.hair-cap .game-character-hair::after{content:"";position:absolute;right:-7px;bottom:-2px;width:13px;height:4px;border-radius:4px;background:var(--outfit)}.game-character-body{position:absolute;left:8px;top:29px;width:36px;height:25px;border-radius:12px 12px 8px 8px;background:var(--outfit);border:2px solid rgba(15,20,25,.32);z-index:2}.game-character-body::before,.game-character-body::after{content:"";position:absolute;top:3px;width:8px;height:20px;border-radius:7px;background:var(--skin);z-index:-1}.game-character-body::before{left:-7px;transform:rotate(7deg)}.game-character-body::after{right:-7px;transform:rotate(-7deg)}.game-character-legs{position:absolute;left:13px;top:49px;width:11px;height:11px;border-radius:0 0 4px 4px;background:#17212b;box-shadow:15px 0 #17212b}.game-character-legs::after{content:"";position:absolute;left:-2px;bottom:-2px;width:14px;height:4px;border-radius:5px;background:#0c1016;box-shadow:15px 0 #0c1016}
.game-ghost{position:relative;width:48px;height:52px;margin:2px auto 0;border-radius:50% 50% 38% 38%;background:linear-gradient(160deg,#f2f4ff,#aeb9d5);opacity:.78;box-shadow:inset -7px -6px 0 rgba(76,87,130,.18)}.game-ghost::before{content:"••";position:absolute;left:10px;top:11px;color:#313850;font-size:18px;font-weight:900;letter-spacing:5px}.game-ghost::after{content:"";position:absolute;left:0;right:0;bottom:-1px;height:13px;background:#17242a;clip-path:polygon(0 100%,0 0,20% 55%,40% 0,60% 55%,80% 0,100% 55%,100% 100%)}
.game-touch-controls{display:none;position:fixed;right:20px;bottom:22px;z-index:12;width:138px;height:138px;grid-template-columns:repeat(3,42px);grid-template-rows:repeat(3,42px);gap:4px;padding:4px;border-radius:28px;background:rgba(8,12,17,.55);backdrop-filter:blur(5px)}.game-touch-controls button{border:1px solid rgba(255,255,255,.16);border-radius:12px;background:rgba(48,58,70,.9);color:#fff;font-size:15px;touch-action:none;user-select:none}.game-touch-controls button:active,.game-touch-controls button.pressed{background:var(--accent)}.game-touch-controls [data-game-direction="up"]{grid-column:2}.game-touch-controls [data-game-direction="left"]{grid-column:1;grid-row:2}.game-touch-controls [data-game-direction="down"]{grid-column:2;grid-row:2}.game-touch-controls [data-game-direction="right"]{grid-column:3;grid-row:2}
.game-character-card{overflow:auto}.game-character-preview{height:118px;display:grid;place-items:center;margin-bottom:14px;border:1px solid rgba(255,255,255,.07);border-radius:12px;background:radial-gradient(circle,#2d4650,#152129 68%)}.game-character-preview .game-character{transform:scale(1.55)}.game-character-options{display:grid;gap:11px}.game-character-options fieldset{min-width:0;margin:0;padding:9px 11px 11px;border:1px solid var(--border);border-radius:9px}.game-character-options legend{padding:0 5px;color:#b8bec8;font-size:11px;font-weight:800}.game-option-row{display:flex;gap:7px;flex-wrap:wrap}.game-option-row button{min-width:38px;height:34px;display:grid;place-items:center;border:1px solid transparent;border-radius:8px;padding:3px;background:#252a33;color:var(--muted);font-size:11px}.game-option-row button:hover{border-color:#596172;color:#fff}.game-option-row button.selected{border-color:#8a93ff;box-shadow:0 0 0 2px rgba(88,101,242,.24);color:#fff}.game-option-row button span{width:24px;height:24px;border-radius:6px;background:var(--swatch);box-shadow:inset 0 0 0 1px rgba(255,255,255,.16)}.game-text-options button{padding-inline:9px}.game-character-card>.helper{text-align:center}
@media(pointer:coarse),(max-width:680px){.game-touch-controls{display:grid}.game-help{max-width:calc(100% - 178px)}.game-world{width:1040px}.game-stage{padding-bottom:160px}}
@media(max-width:1080px){.app-shell.game-mode{grid-template-columns:64px 270px minmax(0,1fr)}}
@media(max-width:760px){.app-shell.game-mode{grid-template-columns:56px 240px minmax(0,1fr)}}
@media(max-width:680px){.game-header{padding-left:44px}.game-header small{display:none}.game-header .ghost-button{font-size:10px;padding:7px}.server-mode-switch{margin-top:7px}.game-character-card{max-height:calc(100vh - 24px)!important}.game-character-preview{height:92px}.game-character-preview .game-character{transform:scale(1.3)}}

/* Game world v2: full-window, tile-based presentation using Kenney CC0 art. */
.app-shell.game-mode{grid-template-columns:72px 300px minmax(0,1fr) 220px}
.game-view{position:fixed;inset:0;z-index:8000;height:100vh;display:grid;grid-template-rows:64px minmax(0,1fr);overflow:hidden;background:#182c2c}
body.desktop-window .game-view{top:env(titlebar-area-height,36px);height:calc(100vh - env(titlebar-area-height,36px))}
.game-header{position:relative;z-index:20;display:flex;align-items:center;justify-content:center;padding:0 18px;border-bottom:4px solid #2e4240;background:linear-gradient(#203937,#182e2d);box-shadow:0 5px 18px rgba(6,18,18,.35)}
.game-exit-button{position:absolute;left:18px;top:12px;height:36px;display:flex;align-items:center;gap:8px;padding:0 13px;border:1px solid rgba(255,255,255,.17);border-radius:10px;background:#102322;color:#f4f7f4;font-size:12px;font-weight:850;box-shadow:0 3px 0 #091817;transition:transform .12s,background .12s}.game-exit-button:hover{background:#294c45}.game-exit-button:active{transform:translateY(2px);box-shadow:0 1px 0 #091817}.game-exit-button span{font-size:18px}
.game-header-actions{position:absolute;right:18px;top:12px;height:36px;display:flex;align-items:center;gap:8px}.game-voice-controls{height:36px;display:flex;align-items:center;gap:5px}.game-audio-button{position:relative;height:36px;min-width:62px;display:flex;align-items:center;justify-content:center;gap:5px;padding:0 9px;border:1px solid rgba(255,255,255,.17);border-radius:10px;background:#102322;color:#f4f7f4;box-shadow:0 3px 0 #091817}.game-audio-button:hover{background:#294c45}.game-audio-button:active{transform:translateY(2px);box-shadow:0 1px 0 #091817}.game-audio-button>span{font-size:15px}.game-audio-button>small{font-size:9px;font-weight:850}.game-audio-button.muted-state{border-color:#e06c75;background:#642f37;color:#fff}.game-audio-button.muted-state>span::after{content:"";position:absolute;left:7px;top:17px;width:20px;height:3px;border-radius:3px;background:#ff858d;transform:rotate(-45deg);box-shadow:0 0 0 1px rgba(0,0,0,.28)}.game-audio-button:disabled{cursor:not-allowed;opacity:.45}.game-editor-button{position:static;height:36px;display:flex;align-items:center;gap:7px;padding:0 13px;border:1px solid #75c896;border-radius:10px;background:#245b42;color:#f2fff7;font-size:11px;font-weight:850;box-shadow:0 3px 0 #123626}.game-editor-button:hover{background:#327755}.game-editor-button span{font-size:16px}
.game-server-hud{min-width:0;display:grid!important;gap:1px;text-align:center}.game-server-hud strong{font-size:14px}.game-server-hud small{margin:0!important;color:#9fc9b6!important;font-size:10px!important}
.game-stage{position:relative;min-width:0;min-height:0;overflow:auto;overscroll-behavior:contain;outline:none;background:#203d35}.game-stage:focus-visible{box-shadow:inset 0 0 0 3px #78c79a}
.game-world{position:relative;min-width:1180px;min-height:760px;margin:0 auto;isolation:isolate;overflow:hidden;background-color:#4b8b58;background-image:linear-gradient(90deg,transparent 47%,rgba(215,194,145,.96) 47%,rgba(215,194,145,.96) 53%,transparent 53%),linear-gradient(0deg,transparent 45%,rgba(215,194,145,.96) 45%,rgba(215,194,145,.96) 55%,transparent 55%),radial-gradient(circle at 15% 20%,rgba(255,255,255,.08) 0 2px,transparent 3px);background-size:100% 100%,100% 100%,28px 28px;box-shadow:inset 0 0 100px rgba(20,52,31,.4)}
.game-world-layer{position:absolute;inset:0;overflow:visible;pointer-events:none}.game-world-layer>*{pointer-events:auto}.game-world-layer-ground,.game-world-layer-roomBack,.game-world-layer-depthEntities,.game-world-layer-foreground,.game-world-layer-effects,.game-world-layer-editorOverlay{isolation:isolate}.game-world-layer-depthEntities>.game-room-object,.game-world-layer-depthEntities>.game-actor{position:absolute}.game-world-layer-foreground{pointer-events:none}.game-world-layer-effects{pointer-events:none}.game-world-layer-editorOverlay{pointer-events:none}
.game-world::before{content:"MONKEY TOWN";position:absolute;left:50%;bottom:35px;z-index:1;transform:translateX(-50%);padding:8px 18px;border:4px solid #6c4a2b;border-radius:3px;background:#d49a50;color:#442c1d;box-shadow:0 5px 0 rgba(37,64,42,.42),inset 0 0 0 2px #f2c978;font:900 12px/1 ui-monospace,monospace;letter-spacing:.12em}
.game-world::after{content:"";position:absolute;left:0;right:0;top:48%;height:10%;z-index:0;border-top:3px solid rgba(111,88,54,.25);border-bottom:3px solid rgba(111,88,54,.25);pointer-events:none}
.game-help{position:fixed;left:18px;top:82px;z-index:8020;width:max-content;max-width:calc(100vw - 36px);display:grid;gap:2px;padding:9px 12px;border:2px solid rgba(255,255,255,.2);border-radius:8px;background:rgba(15,34,32,.92);box-shadow:0 5px 0 rgba(8,22,21,.45);backdrop-filter:blur(5px);pointer-events:none}.game-help strong{font-size:11px}.game-help span{color:#b5d0c4;font-size:10px}
.game-room{position:absolute;z-index:2;display:grid;grid-template-rows:34px minmax(0,1fr);overflow:visible;border:8px solid #d4c39f;border-top-color:#eee0bf;border-bottom-color:#9e8662;border-radius:2px;background:#ccb98f;box-shadow:0 10px 0 rgba(39,65,44,.28),0 14px 24px rgba(25,46,31,.26),inset 0 0 0 3px #76654d}.game-room::before{content:"";position:absolute;inset:-4px;pointer-events:none;box-shadow:inset 0 0 0 2px rgba(255,255,255,.25)}.game-room::after{content:"";position:absolute;left:50%;bottom:-13px;width:54px;height:18px;z-index:4;transform:translateX(-50%);border:4px solid #6f583e;border-top:0;background:repeating-linear-gradient(90deg,#c99854 0 8px,#b98248 8px 10px);box-shadow:0 3px 0 rgba(43,63,40,.3)}.game-room.connected{border-color:#70d69a;box-shadow:0 0 0 4px rgba(57,205,126,.25),0 10px 0 rgba(39,65,44,.28),0 14px 24px rgba(25,46,31,.26)}
.game-room-title{position:relative;z-index:3;display:flex;align-items:center;justify-content:space-between;gap:8px;padding:0 10px;border:0;border-bottom:3px solid #806c52;background:#3b5a55;color:#fff;text-shadow:0 2px #20312f;font:850 11px/1 ui-monospace,monospace}.game-room-title span::before{content:"◉ ";color:#8aefad}.game-room-title small{padding:3px 6px;border-radius:4px;background:rgba(10,30,27,.35);color:#d2e9df;font:700 9px/1 ui-monospace,monospace}
.game-room-floor{position:relative;min-height:0;margin:0;border-radius:0;background-color:#d7d4cc;background-image:linear-gradient(rgba(117,124,126,.12) 2px,transparent 2px),linear-gradient(90deg,rgba(117,124,126,.12) 2px,transparent 2px);background-size:32px 32px;overflow:hidden}.room-theme-1 .game-room-floor{background-color:#c79762;background-image:linear-gradient(90deg,rgba(92,57,31,.17) 1px,transparent 1px),linear-gradient(rgba(255,255,255,.08) 1px,transparent 1px);background-size:32px 16px}.room-theme-2 .game-room-floor{background-color:#7ca6a2;background-image:linear-gradient(45deg,rgba(255,255,255,.08) 25%,transparent 25%,transparent 75%,rgba(255,255,255,.08) 75%),linear-gradient(45deg,rgba(255,255,255,.08) 25%,transparent 25%,transparent 75%,rgba(255,255,255,.08) 75%);background-position:0 0,16px 16px;background-size:32px 32px}
.game-pixel-sprite,.game-character{--direction-col:24;display:block;width:48px;height:48px;background-image:url('assets/game/kenney-rpg-urban-tilemap.png');background-repeat:no-repeat;background-size:1374px 915px;background-position:calc(var(--sprite-col,var(--direction-col)) * -51px) calc(var(--sprite-row,var(--avatar-row)) * -51px);image-rendering:pixelated}
.game-room-prop{position:absolute;z-index:1}.game-room-prop.prop-0{left:50%;top:50%;transform:translate(-50%,-50%) scale(1.35)}.game-room-prop.prop-1{left:18px;bottom:14px;transform:scale(1.2)}.game-room-prop.prop-2{right:20px;bottom:14px;transform:scale(1.2)}.game-room-prop.prop-3{right:12px;top:8px;transform:scale(1.35)}
.game-room-object{--object-scale-x:1;--object-scale-y:1;--visual-anchor-x:-50%;--visual-anchor-y:-50%;position:absolute;z-index:2;transform:translate(var(--visual-anchor-x),var(--visual-anchor-y)) rotate(0) scale(var(--object-scale-x),var(--object-scale-y));filter:drop-shadow(0 4px 1px rgba(32,44,37,.28))}.game-room-object.direction-right{transform:translate(var(--visual-anchor-x),var(--visual-anchor-y)) rotate(90deg) scale(var(--object-scale-x),var(--object-scale-y))}.game-room-object.direction-down{transform:translate(var(--visual-anchor-x),var(--visual-anchor-y)) rotate(180deg) scale(var(--object-scale-x),var(--object-scale-y))}.game-room-object.direction-left{transform:translate(var(--visual-anchor-x),var(--visual-anchor-y)) rotate(-90deg) scale(var(--object-scale-x),var(--object-scale-y))}.game-world.editing .game-room-object:not(.locked-object){cursor:grab;touch-action:none}.game-world.editing .game-room-object:not(.locked-object):hover,.game-world.editing .game-room-object.selected-object{filter:drop-shadow(0 0 5px #fff) drop-shadow(0 4px 1px rgba(32,44,37,.28))}.game-room-object.locked-object{opacity:.62;filter:saturate(.55) drop-shadow(0 3px 1px rgba(32,44,37,.22))}.game-room-object.dragging,.game-room-object.resizing{z-index:20;cursor:grabbing!important;filter:drop-shadow(0 0 7px #77ecaa)}.game-object-remove{position:absolute;right:-8px;top:-9px;width:19px;height:19px;display:grid;place-items:center;padding:0;border:2px solid #fff;border-radius:50%;background:#b83949;color:#fff;font:900 13px/1 sans-serif;box-shadow:0 2px 4px #0008;transform:scale(.87);opacity:0;transition:opacity .12s}.game-room-object:hover .game-object-remove,.game-room-object.selected-object .game-object-remove{opacity:1}.game-room-object.direction-right>.game-object-control{rotate:-90deg}.game-room-object.direction-down>.game-object-control{rotate:-180deg}.game-room-object.direction-left>.game-object-control{rotate:90deg}
.object-table{width:86px!important;height:56px!important;background:none!important;border-radius:9px}.object-table::before{content:"";position:absolute;inset:3px 2px 9px;border:4px solid #5b321d;border-radius:8px;background:repeating-linear-gradient(90deg,rgba(255,255,255,.07) 0 2px,transparent 2px 17px),linear-gradient(#c37a3f,#9b572d);box-shadow:inset 0 3px #e0a365,inset 0 -4px #744020,0 5px 0 #432819}.object-table::after{content:"";position:absolute;left:9px;right:9px;top:12px;height:20px;border:2px solid rgba(91,48,25,.38);border-radius:5px;background:linear-gradient(90deg,transparent 48%,rgba(104,55,28,.28) 49% 51%,transparent 52%)}.game-table-legs{position:absolute;z-index:-1;left:8px;bottom:3px;width:9px;height:16px;border-radius:2px;background:#57321f;box-shadow:61px 0 #57321f,3px 2px #78472b,58px 2px #78472b}.game-object-size-handle{position:absolute;z-index:10;width:23px;height:23px;display:grid;place-items:center;padding:0;border:2px solid #fff;border-radius:7px;background:#2b7752;color:#fff;font:900 11px/1 sans-serif;box-shadow:0 3px 6px #0008;scale:.87}.game-object-size-handle.size-x{right:-17px;top:50%;translate:0 -50%;cursor:ew-resize}.game-object-size-handle.size-y{left:50%;bottom:-17px;translate:-50% 0;cursor:ns-resize}.game-object-size-handle.size-xy{right:-17px;bottom:-17px;cursor:nwse-resize}.game-object-rotate-controls{position:absolute;z-index:9;left:50%;bottom:-42px;display:grid;grid-template-columns:repeat(4,22px);gap:3px;transform:translateX(-50%);scale:.87;transform-origin:50% 0}.game-object-rotate-controls button{width:22px;height:22px;padding:0;border:1px solid #b9d2c7;border-radius:5px;background:#26483c;color:#d9eee5;font:900 11px/1 sans-serif;box-shadow:0 2px 4px #0007}.game-object-rotate-controls button.active{border-color:#8cf0b4;background:#37805a;color:#fff}
.object-television{width:72px!important;height:45px!important;background:none!important;overflow:visible;z-index:3;filter:drop-shadow(0 9px 3px rgba(20,29,28,.5))}.object-television::before{content:"";position:absolute;inset:0;border:5px solid #20292d;border-radius:5px;background:#0b1013;box-shadow:inset 0 0 0 2px #68757a,0 5px 0 #11181b,0 8px 0 #694f39}.object-television::after{content:"";position:absolute;z-index:-1;left:-7px;right:-7px;top:5px;height:48px;border-radius:3px;background:linear-gradient(90deg,#81664a,#a18460 12%,#927253 88%,#6d533c);clip-path:polygon(4% 0,96% 0,100% 82%,88% 100%,12% 100%,0 82%);box-shadow:0 5px 0 #4b382a}.game-tv-screen{position:absolute;z-index:1;inset:6px;display:grid;place-items:center;overflow:hidden;border-radius:2px;background:linear-gradient(135deg,#16272d,#273c46);color:#89a9ad;font:900 8px/1 ui-monospace,monospace;letter-spacing:.08em}.game-tv-screen::after{content:"";position:absolute;inset:0;background:linear-gradient(145deg,rgba(255,255,255,.2),transparent 30% 70%,rgba(0,0,0,.24));pointer-events:none}.game-tv-screen video{width:100%;height:100%;object-fit:cover}.object-television.broadcasting .game-tv-screen{box-shadow:0 0 10px #64eaa9;background:#12271d;color:#7dffc0}.object-television.broadcasting .game-tv-screen:not(:has(video)) span{animation:game-tv-live 1.1s steps(2) infinite}@keyframes game-tv-live{50%{opacity:.35}}
.game-map-prop{position:absolute;left:var(--map-x);top:var(--map-y);z-index:1;transform:scale(1.55);filter:drop-shadow(0 5px 1px rgba(31,67,37,.28))}
.game-empty-map{position:absolute;inset:0;z-index:3;display:grid;place-items:center;color:#23402f;text-align:center}.game-empty-map>div{padding:16px 20px;border:5px solid #a57a48;background:#f0d69f;box-shadow:0 7px 0 rgba(39,65,44,.28)}.game-empty-map strong{display:block;margin-bottom:6px;color:#442d20}
.game-actor{--actor-scale:1;--visual-anchor-x:-50%;--visual-anchor-y:-76%;position:absolute;z-index:8;width:48px;height:62px;transform:translate(var(--visual-anchor-x),var(--visual-anchor-y)) scale(var(--actor-scale));transform-origin:50% 100%;transition:left .08s linear,top .08s linear;filter:drop-shadow(0 5px 2px rgba(21,43,28,.4));pointer-events:none}.game-actor.self{z-index:10;--actor-scale:1.1;transition:none}.game-actor.speaking .game-character{filter:drop-shadow(0 0 5px #35ed80) drop-shadow(0 0 2px #fff)}.game-character{position:relative}.game-character.moving{animation:game-pixel-walk .34s steps(1) infinite}@keyframes game-pixel-walk{0%,100%{background-position-y:calc(var(--avatar-row) * -51px)}50%{background-position-y:calc((var(--avatar-row) + 1) * -51px)}}
.game-actor.seated{transform:translate(var(--visual-anchor-x),var(--visual-anchor-y)) scale(var(--actor-scale));z-index:3}.game-actor.seated .game-character{transform:none;clip-path:inset(0 0 6px 0)}.game-actor.seated.direction-up .game-character{translate:0 3px}.game-actor.seated.direction-down .game-character{translate:0 1px}.game-actor.seated.direction-left .game-character{translate:2px 2px}.game-actor.seated.direction-right .game-character{translate:-2px 2px}.game-actor.seated .game-actor-name{bottom:-18px}
.game-actor-name{position:absolute;left:50%;bottom:-14px;max-width:150px;transform:translateX(-50%);padding:3px 6px;border:2px solid rgba(255,255,255,.18);border-radius:5px;background:rgba(14,30,28,.88);color:#fff;font:750 9px/1 ui-monospace,monospace;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;text-shadow:0 1px #000}.game-actor.self .game-actor-name{border-color:#9d9cff;background:#393c77;color:#fff}
.game-ghost{position:relative;width:42px;height:42px;margin:4px auto 0;border:3px solid #8796b8;border-radius:50% 50% 34% 34%;background:#e8edff;opacity:.86;image-rendering:pixelated;box-shadow:inset -6px -5px 0 #b8c2df}.game-ghost::before{content:"••";position:absolute;left:8px;top:7px;color:#34405f;font:900 15px/1 monospace;letter-spacing:4px}.game-ghost::after{content:"";position:absolute;left:-3px;right:-3px;bottom:-4px;height:11px;background:#e8edff;clip-path:polygon(0 100%,0 0,25% 55%,50% 0,75% 55%,100% 0,100% 100%)}
.game-touch-controls{z-index:8030}
.game-action-prompt{position:fixed;z-index:8040;left:50%;bottom:24px;display:flex;align-items:center;gap:12px;max-width:min(620px,calc(100vw - 190px));padding:9px 10px 9px 14px;border:2px solid #729a89;border-radius:12px;background:rgba(17,34,31,.95);color:#ecfff5;box-shadow:0 7px 0 rgba(7,17,15,.55),0 15px 36px #0007;transform:translateX(-50%);backdrop-filter:blur(7px)}.game-action-prompt span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:11px;font-weight:750}.game-action-prompt button{flex:none;padding:8px 13px;border:1px solid #8aefb0;border-radius:8px;background:#2d7650;color:#fff;font-size:10px;font-weight:900}.game-action-prompt button::before{content:"E  ";color:#b4ffd0}.game-action-prompt button:disabled{border-color:#65706b;background:#3c4843;color:#aeb8b3}.game-action-prompt button:disabled::before{content:""}
.game-screen-viewer{position:fixed;z-index:8050;left:50%;top:50%;width:min(940px,calc(100vw - 54px));overflow:hidden;border:3px solid #5f8075;border-radius:14px;background:#101917;box-shadow:0 24px 90px #000d,0 0 0 9999px rgba(5,12,11,.58);transform:translate(-50%,-47%)}.game-screen-viewer>header{height:46px;display:flex;align-items:center;justify-content:space-between;padding:0 12px 0 15px;border-bottom:1px solid #405a52;background:#1b302b}.game-screen-viewer>header>div{display:grid;gap:1px}.game-screen-viewer>header strong{font-size:12px}.game-screen-viewer>header small{color:#8db3a3;font-size:9px}.game-screen-viewer>header button{width:30px;height:30px;padding:0;border:0;border-radius:8px;background:#314b43;color:#fff;font-size:21px}.game-screen-viewer-media{aspect-ratio:16/9;display:grid;place-items:center;background:#030504}.game-screen-viewer-media video{width:100%;height:100%;object-fit:contain;background:#000}.game-screen-loading{color:#a8c2b7;font-size:12px;font-weight:750}
.game-tv-menu{position:fixed;z-index:8055;left:50%;top:50%;width:min(390px,calc(100vw - 28px));overflow:hidden;border:3px solid #5e8b79;border-radius:14px;background:#162a25;box-shadow:0 20px 70px #000c,0 0 0 9999px rgba(5,12,11,.45);transform:translate(-50%,-50%)}.game-tv-menu>header{height:54px;display:flex;align-items:center;justify-content:space-between;padding:0 12px 0 15px;border-bottom:1px solid #426356;background:#1e3931}.game-tv-menu>header>div{display:grid;gap:2px}.game-tv-menu>header strong{font-size:13px}.game-tv-menu>header small{color:#9bc1b0;font-size:9px}.game-tv-menu>header>button{width:30px;height:30px;padding:0;border:0;border-radius:8px;background:#345448;color:#fff;font-size:21px}.game-tv-menu-actions{display:grid;gap:8px;padding:12px}.game-tv-menu-actions>button{min-width:0;display:grid;grid-template-columns:38px minmax(0,1fr);align-items:center;gap:10px;padding:10px 12px;border:2px solid #3c6554;border-radius:10px;background:#24483a;color:#f4fff9;text-align:left}.game-tv-menu-actions>button:hover{border-color:#78d9a2;background:#2c5946}.game-tv-menu-actions>button:disabled{cursor:default;opacity:.5}.game-tv-menu-actions>button>span[aria-hidden]{display:grid;place-items:center;width:34px;height:34px;border-radius:8px;background:#173429;color:#8cf0b4;font-size:18px}.game-tv-menu-actions>button>span:last-child{display:grid;gap:2px}.game-tv-menu-actions strong{font-size:11px}.game-tv-menu-actions small{color:#a6c6b8;font-size:9px}.game-tv-menu-actions>button.danger{border-color:#74464d;background:#4a2930}.game-tv-menu-actions>button.danger>span[aria-hidden]{background:#341c22;color:#ff9ca8}.game-tv-stream-list{display:grid;gap:6px;max-height:230px;overflow:auto;padding:2px}.game-tv-stream-choice{min-width:0;display:grid;grid-template-columns:42px minmax(0,1fr);align-items:center;gap:10px;padding:9px 10px;border:2px solid #35594b;border-radius:10px;background:#1d3b30;color:#f4fff9;text-align:left}.game-tv-stream-choice:hover,.game-tv-stream-choice.active{border-color:#78d9a2;background:#285442}.game-tv-stream-choice>span:last-child{display:grid;gap:2px;min-width:0}.game-tv-stream-choice strong,.game-tv-stream-choice small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.game-tv-stream-live{display:grid;place-items:center;width:38px;height:24px;border-radius:6px;background:#b42f43;color:#fff;font-size:8px;font-weight:900;letter-spacing:.08em;box-shadow:0 0 10px rgba(255,64,91,.24)}
.game-source-modal{z-index:9200;background:rgba(5,12,11,.86);backdrop-filter:blur(8px)}.game-source-modal .source-modal-card{border:3px solid #527b6b;background:linear-gradient(145deg,#172a25,#121d1a);box-shadow:0 22px 80px #000d,0 5px 0 #0a1714}.game-source-modal .stream-quality-settings{border-color:#416356;background:linear-gradient(145deg,#20382f,#182a24)}#appView.game-mode~#toast{z-index:9400}
.game-character-modal{z-index:9000}.game-character-card{width:min(520px,calc(100vw - 28px));overflow:auto;border:3px solid #4b635c;border-radius:14px;background:#172622;box-shadow:0 18px 60px rgba(0,0,0,.55)}.game-character-preview{height:140px;display:grid;place-items:center;margin-bottom:14px;border:3px solid #735334;border-radius:8px;background-color:#4f8c59;background-image:linear-gradient(90deg,transparent 47%,#d7c291 47%,#d7c291 53%,transparent 53%),radial-gradient(circle,rgba(255,255,255,.09) 0 2px,transparent 3px);background-size:100% 100%,24px 24px;box-shadow:inset 0 0 30px rgba(25,60,35,.3)}.game-character-preview .game-character{transform:scale(2.25);filter:drop-shadow(0 4px 1px rgba(20,49,28,.35))}
.game-character-options{display:block}.game-preset-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:8px}.game-preset-grid button{min-width:0;height:96px;display:grid;place-items:center;align-content:center;gap:2px;border:2px solid #354841;border-radius:9px;background:#20332e;color:#dce8e2}.game-preset-grid button:hover{border-color:#79ae91;background:#29443a}.game-preset-grid button.selected{border-color:#8ce4aa;background:#315b46;box-shadow:0 0 0 3px rgba(73,210,126,.17)}.game-preset-grid .game-character{transform:scale(1.1)}.game-preset-grid b{font:750 10px/1 ui-monospace,monospace}.game-character-card>.helper{text-align:center}
@media(pointer:coarse),(max-width:680px){.game-touch-controls{display:grid;right:14px;bottom:16px}.game-help{top:76px;left:12px;max-width:calc(100% - 24px)}.game-help span{display:none}.game-world{min-width:1180px}.game-stage{padding-bottom:0}.game-header{padding:0 10px}.game-exit-button{left:10px;padding:0 10px;font-size:0}.game-exit-button span{font-size:18px}.game-header-actions{right:9px;gap:5px}.game-voice-controls{gap:4px}.game-audio-button{min-width:36px;width:36px;padding:0}.game-audio-button>small{display:none}.game-editor-button{padding:0 9px}.game-server-hud{max-width:calc(100vw - 220px);padding-left:0}.game-server-hud strong{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.game-server-hud small{display:none}.game-character-card{max-height:calc(100vh - 24px)!important}.game-character-preview{height:110px}.game-character-preview .game-character{transform:scale(1.8)}.game-preset-grid{grid-template-columns:repeat(2,1fr)}.game-preset-grid button{height:82px}}
@media(pointer:coarse),(max-width:680px){.game-action-prompt{left:12px;right:164px;bottom:18px;max-width:none;transform:none}.game-action-prompt button::before{content:""}.game-screen-viewer{width:calc(100vw - 20px);top:51%;border-width:2px}.game-screen-viewer>header{height:42px}}

/* Visual editor that stays inside the full-screen game. */
.game-editor-panel{position:fixed;right:14px;top:78px;z-index:8060;width:350px;max-height:calc(100vh - 94px);display:flex;flex-direction:column;overflow:auto;border:3px solid #496f60;border-radius:13px;background:rgba(19,35,32,.97);color:#eef9f3;box-shadow:0 14px 42px rgba(0,0,0,.5),0 5px 0 #0c1b18;backdrop-filter:blur(8px)}body.desktop-window .game-editor-panel{top:calc(env(titlebar-area-height,36px) + 78px);max-height:calc(100vh - env(titlebar-area-height,36px) - 94px)}.game-editor-panel-head{position:sticky;top:0;z-index:2;display:flex;align-items:center;justify-content:space-between;padding:12px 13px;border-bottom:1px solid #3d5a51;background:#1a302b}.game-editor-panel-head>div{display:grid;gap:2px}.game-editor-panel-head strong{font-size:13px}.game-editor-panel-head small{color:#91b7a7;font-size:9px}.game-editor-panel-head>button{width:28px;height:28px;padding:0;border:0;border-radius:7px;background:#2d4941;color:#fff;font-size:20px}.game-editor-section{display:grid;gap:9px;padding:12px 13px;border-bottom:1px solid #314b43}.game-editor-label{color:#a9cbbc;font-size:9px;font-weight:900;letter-spacing:.08em;text-transform:uppercase}.game-editor-warning{color:#d8b77a;font-size:9px}.game-editor-presets{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}.game-editor-presets button{min-width:0;display:grid;grid-template-columns:30px 1fr;grid-template-rows:auto auto;align-items:center;column-gap:6px;padding:8px;border:2px solid #38554c;border-radius:9px;background:#203a33;color:#fff;text-align:left}.game-editor-presets button:hover{border-color:#79cc9d;background:#2a4a40}.game-editor-presets button>span{grid-row:1/3;font-size:21px}.game-editor-presets strong{align-self:end;font-size:10px}.game-editor-presets small{align-self:start;color:#9cbcae;font-size:8px}.game-editor-room-title{display:flex;align-items:center;justify-content:space-between;gap:8px}.game-editor-room-title span{color:#9cb9ad;font-size:9px}.game-editor-room-title strong{max-width:190px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:11px}.game-door-choices{display:grid;grid-template-columns:repeat(4,1fr);gap:6px}.game-door-choices button{height:34px;padding:0;border:2px solid #3b584e;border-radius:8px;background:#203a33;color:#c9ded5;font-size:17px}.game-door-choices button.active{border-color:#79dda3;background:#326748;color:#fff;box-shadow:0 0 0 2px #55c98633}.game-object-palette{display:grid;grid-template-columns:repeat(5,1fr);gap:6px}.game-object-palette button{min-width:0;display:grid;place-items:center;gap:1px;padding:4px 1px;border:1px solid #3a584e;border-radius:7px;background:#203a33;color:#bfd6cc}.game-object-palette button:hover{border-color:#78d29e;background:#2b4b40}.game-object-palette .game-pixel-sprite{transform:scale(.72);margin:-7px}.game-object-palette small{max-width:100%;overflow:hidden;text-overflow:ellipsis;font-size:7px}.game-editor-clear{padding:8px;border:1px solid #80505a;border-radius:8px;background:#3b272d;color:#f0bcc4;font-size:9px}.game-editor-actions{position:sticky;bottom:0;z-index:2;display:grid;grid-template-columns:1fr 1.3fr;gap:8px;padding:11px 13px;background:#172b27}.game-editor-actions button{margin:0}
.game-admin-room-tools{display:grid;gap:9px}.game-build-toggle{display:grid;grid-template-columns:18px minmax(0,1fr);align-items:start;gap:9px;padding:10px;border:1px solid #41695a;border-radius:9px;background:#203d34}.game-build-toggle input{width:17px;height:17px;margin:1px 0 0;accent-color:#58d38b}.game-build-toggle>span{display:grid;gap:3px}.game-build-toggle strong{font-size:10px}.game-build-toggle small{color:#9fc1b2;font-size:8px;line-height:1.35}.game-world.personal-editing .game-room{cursor:default}.game-world.personal-editing .game-room.selected{outline-color:#78dca4}
.game-world.personal-editing .game-room.build-locked{opacity:.55;filter:saturate(.45)}.game-world.personal-editing .game-room.build-locked.selected{outline-color:#b98758}.game-object-palette button:disabled,.game-editor-clear:disabled{cursor:not-allowed;opacity:.42}
.game-zoom-controls{position:fixed;z-index:8045;left:16px;bottom:18px;display:flex;align-items:center;gap:4px;padding:5px;border:2px solid #496f60;border-radius:10px;background:rgba(15,31,28,.92);box-shadow:0 5px 0 #0a1815}.game-zoom-controls button{height:28px;min-width:30px;padding:0 8px;border:0;border-radius:6px;background:#294b40;color:#fff;font-weight:900}.game-zoom-controls button:hover{background:#39705a}.game-zoom-controls button:disabled{opacity:.4}.game-zoom-controls output{min-width:46px;color:#b8dbc9;text-align:center;font:800 9px/1 ui-monospace,monospace}.game-stage.map-fits{display:grid;place-items:center}.game-stage.map-fits .game-world{margin:auto}.game-view.editing .game-zoom-controls{display:none}
.game-room-visibility{display:flex;align-items:center;justify-content:center;gap:8px;padding:9px;border:1px solid #5a756c;border-radius:8px;background:#253e37;color:#d8ede4;font-size:10px;font-weight:800}.game-room-visibility:hover{border-color:#84c6a5;background:#2d4d42}.game-room-visibility.room-is-hidden{border-color:#c29654;background:#4b3b27;color:#ffe4ae}.game-world.editing .game-room.map-hidden{opacity:.42;filter:grayscale(.65)}.game-world.editing .game-room.map-hidden.selected{opacity:.72;filter:grayscale(.3)}.game-world.editing .game-room.map-hidden .game-room-title small{background:#765327;color:#ffe0a2}
.game-view.editing .game-help,.game-view.editing .game-touch-controls{display:none!important}.game-world.editing{user-select:none}.game-world.editing .game-actor{opacity:.38}.game-world.editing .game-room{cursor:grab;touch-action:none}.game-world.editing .game-room:hover{filter:brightness(1.06)}.game-world.editing .game-room.selected{z-index:12;outline:4px solid #66e39b;outline-offset:5px;box-shadow:0 0 0 9px rgba(64,218,125,.2),0 12px 28px rgba(0,0,0,.34)}.game-world.editing .game-room.dragging{cursor:grabbing}.game-world.editing .game-room.resizing{filter:brightness(1.1)}
@media(min-width:901px){.game-view.editing .game-stage{margin-right:378px}.game-view.editing .game-world{margin-left:0;margin-right:0}}
.game-resize-handle{position:absolute;z-index:30;width:16px;height:16px;padding:0;border:3px solid #eafff1;border-radius:50%;background:#43c979;box-shadow:0 2px 4px #0008}.game-resize-handle.resize-n{left:50%;top:-16px;transform:translateX(-50%);cursor:n-resize}.game-resize-handle.resize-ne{right:-16px;top:-16px;cursor:ne-resize}.game-resize-handle.resize-e{right:-16px;top:50%;transform:translateY(-50%);cursor:e-resize}.game-resize-handle.resize-se{right:-16px;bottom:-16px;cursor:se-resize}.game-resize-handle.resize-s{left:50%;bottom:-16px;transform:translateX(-50%);cursor:s-resize}.game-resize-handle.resize-sw{left:-16px;bottom:-16px;cursor:sw-resize}.game-resize-handle.resize-w{left:-16px;top:50%;transform:translateY(-50%);cursor:w-resize}.game-resize-handle.resize-nw{left:-16px;top:-16px;cursor:nw-resize}.game-room-door-control{position:absolute;z-index:31;width:28px;height:28px;display:grid;place-items:center;padding:0;border:2px solid #fff;border-radius:7px;background:#253c36;color:#fff;box-shadow:0 3px 6px #0008;font-size:15px}.game-room-door-control.active{background:#dc9d4f;border-color:#fff2c7}.game-room-door-control.side-top{left:50%;top:5px;transform:translateX(-50%)}.game-room-door-control.side-right{right:5px;top:50%;transform:translateY(-50%)}.game-room-door-control.side-bottom{left:50%;bottom:5px;transform:translateX(-50%)}.game-room-door-control.side-left{left:5px;top:50%;transform:translateY(-50%)}
@media(pointer:coarse),(max-width:680px){.game-editor-button{font-size:0}.game-editor-button span{font-size:18px}.game-view.editing .game-server-hud{opacity:0}.game-editor-panel{left:8px;right:8px;top:72px;width:auto;max-height:43vh;border-radius:11px}.game-editor-panel-head{padding:9px 11px}.game-editor-section{padding:9px 11px}.game-editor-presets{grid-template-columns:repeat(4,minmax(92px,1fr));overflow-x:auto;padding-bottom:3px}.game-editor-presets button{grid-template-columns:24px 1fr}.game-object-palette{grid-template-columns:repeat(5,minmax(48px,1fr));overflow-x:auto}.game-editor-actions{padding:9px 11px}.game-resize-handle{width:22px;height:22px}.game-object-remove{width:23px;height:23px}}

/* Editable map themes and physical door placement. */
.game-world.theme-office{background-color:#59636d;background-image:linear-gradient(90deg,transparent 46%,rgba(184,192,194,.94) 46%,rgba(184,192,194,.94) 54%,transparent 54%),linear-gradient(0deg,transparent 45%,rgba(184,192,194,.94) 45%,rgba(184,192,194,.94) 55%,transparent 55%),linear-gradient(rgba(255,255,255,.065) 1px,transparent 1px),linear-gradient(90deg,rgba(255,255,255,.065) 1px,transparent 1px);background-size:100% 100%,100% 100%,32px 32px,32px 32px;box-shadow:inset 0 0 120px rgba(19,27,35,.48)}
.game-world.theme-office::before{content:"MONKEY OFFICE";border-color:#3f4b59;background:#8fa1ae;color:#1d2930;box-shadow:0 5px 0 rgba(25,33,40,.4),inset 0 0 0 2px #cbd5da}.game-world.theme-office::after{border-color:rgba(70,78,86,.25)}
.theme-office .game-room{border-color:#c7cdd1;border-top-color:#edf1f2;border-bottom-color:#7c878e;background:#aeb7bc;box-shadow:0 10px 0 rgba(34,43,50,.3),0 14px 24px rgba(23,30,35,.25),inset 0 0 0 3px #59636a}.theme-office .game-room-title{border-bottom-color:#556068;background:#34444c}.theme-office .game-room-floor{background-color:#c9cdd0;background-image:linear-gradient(rgba(83,94,101,.13) 2px,transparent 2px),linear-gradient(90deg,rgba(83,94,101,.13) 2px,transparent 2px)}
.game-room.door-top::after{top:-13px;bottom:auto;border-top:4px solid #6f583e;border-bottom:0}.game-room.door-left::after,.game-room.door-right::after{top:50%;bottom:auto;width:18px;height:54px;transform:translateY(-50%);border:4px solid #6f583e;background:repeating-linear-gradient(0deg,#c99854 0 8px,#b98248 8px 10px)}.game-room.door-left::after{left:-13px;border-right:0}.game-room.door-right::after{left:auto;right:-13px;border-left:0}.theme-office .game-room::after{border-color:#59636a;background:repeating-linear-gradient(90deg,#a8b6bd 0 8px,#85969f 8px 10px)}.theme-office .game-room.door-left::after,.theme-office .game-room.door-right::after{background:repeating-linear-gradient(0deg,#a8b6bd 0 8px,#85969f 8px 10px)}

.game-layout-themes{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.game-layout-themes button{display:grid;grid-template-columns:42px 1fr;grid-template-rows:auto auto;align-items:center;column-gap:9px;padding:11px;border:2px solid var(--border);border-radius:11px;background:#20242c;color:#fff;text-align:left}.game-layout-themes button>span{grid-row:1/3;display:grid;place-items:center;width:42px;height:42px;border-radius:9px;background:#151920;font-size:22px}.game-layout-themes button strong{align-self:end;font-size:13px}.game-layout-themes button small{align-self:start;color:var(--muted);font-size:10px}.game-layout-themes button:hover{border-color:#596172}.game-layout-themes button.active{border-color:#63c98d;background:rgba(49,149,93,.13);box-shadow:0 0 0 3px rgba(50,180,105,.1)}
.game-layout-size-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.game-layout-size-grid label{padding:10px 12px;border:1px solid var(--border);border-radius:9px;background:#20242c}.game-layout-size-grid output{justify-self:end;margin-top:-21px;color:#9fdbba;font-size:11px;font-weight:800}.game-layout-size-grid input{padding:0;border:0;box-shadow:none;background:transparent;accent-color:#55c783}.game-layout-help{margin:0;color:var(--muted);font-size:11px}
.game-layout-preview{position:relative;width:100%;min-height:250px;overflow:hidden;border:3px solid #34483d;border-radius:10px;background-color:#4b8b58;background-image:linear-gradient(90deg,transparent 47%,rgba(215,194,145,.96) 47%,rgba(215,194,145,.96) 53%,transparent 53%),linear-gradient(0deg,transparent 45%,rgba(215,194,145,.96) 45%,rgba(215,194,145,.96) 55%,transparent 55%),radial-gradient(circle at 15% 20%,rgba(255,255,255,.08) 0 1px,transparent 2px);background-size:100% 100%,100% 100%,18px 18px;touch-action:none}.game-layout-preview.theme-office{border-color:#5c6870;background-color:#59636d;background-image:linear-gradient(90deg,transparent 46%,#b8c0c2 46%,#b8c0c2 54%,transparent 54%),linear-gradient(0deg,transparent 45%,#b8c0c2 45%,#b8c0c2 55%,transparent 55%),linear-gradient(rgba(255,255,255,.07) 1px,transparent 1px),linear-gradient(90deg,rgba(255,255,255,.07) 1px,transparent 1px);background-size:100% 100%,100% 100%,20px 20px,20px 20px}
.game-layout-preview-room{position:absolute;min-width:48px;min-height:34px;display:grid;place-items:center;align-content:center;gap:2px;border:4px solid #e1d2af;background:rgba(66,84,78,.92);color:#fff;box-shadow:0 4px 0 rgba(24,48,31,.28);cursor:grab;user-select:none}.game-layout-preview-room.dragging{cursor:grabbing;filter:brightness(1.18);z-index:4}.game-layout-preview-room strong{max-width:90%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:10px}.game-layout-preview-room small{color:#c5d9cf;font-size:8px}.game-layout-preview.theme-office .game-layout-preview-room{border-color:#d5dadd;background:rgba(51,68,77,.94)}.game-layout-preview-room::after{content:"";position:absolute;width:22px;height:7px;background:#d09a54}.game-layout-preview-room.door-bottom::after{left:50%;bottom:-8px;transform:translateX(-50%)}.game-layout-preview-room.door-top::after{left:50%;top:-8px;transform:translateX(-50%)}.game-layout-preview-room.door-left::after,.game-layout-preview-room.door-right::after{top:50%;width:7px;height:22px;transform:translateY(-50%)}.game-layout-preview-room.door-left::after{left:-8px}.game-layout-preview-room.door-right::after{right:-8px}
.game-layout-rooms{display:grid;gap:9px}.game-layout-room-card{padding:11px;border:1px solid var(--border);border-radius:10px;background:#20242c}.game-layout-room-head{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:9px}.game-layout-room-head strong{font-size:12px}.game-layout-room-head small{color:var(--muted);font-size:10px}.game-layout-room-fields{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:7px}.game-layout-room-fields label{font-size:10px}.game-layout-room-fields input,.game-layout-room-fields select{padding:8px;font-size:11px}.game-layout-actions{position:sticky;bottom:0;padding-top:10px;background:linear-gradient(transparent,#181b22 28%)}
@media(max-width:680px){.game-layout-themes,.game-layout-size-grid{grid-template-columns:1fr}.game-layout-preview{min-height:210px}.game-layout-room-fields{grid-template-columns:repeat(2,minmax(0,1fr))}.game-layout-room-fields label:last-child{grid-column:1/-1}.game-layout-actions{flex-wrap:wrap}.game-layout-actions button{flex:1}}

/* Stage 1C: camera presentation, split walls and editor-only physics diagnostics. */
.game-world{min-width:0;min-height:0;margin:0}
.game-actor{--visual-anchor-y:-80%;width:50px;height:64px;transition:none}
.game-actor.self{--actor-scale:1.12;transition:none}
.game-wall-back{position:absolute;z-index:1;display:block;pointer-events:none}
.game-wall-back.side-top,.game-wall-back.side-bottom{left:0;right:0;height:8px}
.game-wall-back.side-top{top:-8px;background:linear-gradient(#f5e8c7,#c8b58e)}
.game-wall-back.side-bottom{bottom:-8px;background:linear-gradient(#b29a72,#816a4e)}
.game-wall-back.side-left,.game-wall-back.side-right{top:0;bottom:0;width:8px;background:linear-gradient(90deg,#bba880,#e0d1ae)}
.game-wall-back.side-left{left:-8px}.game-wall-back.side-right{right:-8px}
.game-wall-foreground{position:absolute;display:block;border:1px solid rgba(78,58,38,.48);background:linear-gradient(#ead9b5 0 24%,#c4ad83 25% 70%,#8d7555 71%);box-shadow:0 8px 6px rgba(30,42,31,.28),inset 0 2px rgba(255,255,255,.34);pointer-events:none}
.game-wall-foreground.side-left,.game-wall-foreground.side-right{background:linear-gradient(90deg,#d7c49e,#9f8763);box-shadow:5px 3px 5px rgba(30,42,31,.24)}
.theme-office .game-wall-foreground{border-color:#48545b;background:linear-gradient(#e1e6e8 0 24%,#aeb9be 25% 70%,#69767d 71%)}
.theme-office .game-wall-foreground.side-left,.theme-office .game-wall-foreground.side-right{background:linear-gradient(90deg,#c8d0d4,#77858c)}
.game-wall-foreground.blocked-passage{animation:game-wall-blocked .22s ease-out}
@keyframes game-wall-blocked{50%{background:#da725d;box-shadow:0 0 12px #ff8b72}}
.game-room::after{width:72px}
.game-room.door-left::after,.game-room.door-right::after{height:72px}

/* Etapa 2A: entidades de porta e estados interativos persistentes. */
.game-door{position:absolute;z-index:1;pointer-events:none;isolation:isolate;filter:drop-shadow(0 3px 2px #18251f88)}
.game-door-panel{position:absolute;display:block;border:2px solid #4e3828;background:repeating-linear-gradient(90deg,#bd7c3e 0 8px,#94592e 8px 11px);box-shadow:inset 0 2px #dfaa69;transition:transform 180ms ease-out,filter 140ms ease,opacity 140ms ease;transform-origin:center}
.game-door.side-top .game-door-panel,.game-door.side-bottom .game-door-panel{top:0;width:50%;height:100%}.game-door.side-top .panel-a,.game-door.side-bottom .panel-a{left:0;border-radius:4px 0 0 4px}.game-door.side-top .panel-b,.game-door.side-bottom .panel-b{right:0;border-radius:0 4px 4px 0}
.game-door.side-left .game-door-panel,.game-door.side-right .game-door-panel{left:0;width:100%;height:50%;background:repeating-linear-gradient(0deg,#bd7c3e 0 8px,#94592e 8px 11px)}.game-door.side-left .panel-a,.game-door.side-right .panel-a{top:0;border-radius:4px 4px 0 0}.game-door.side-left .panel-b,.game-door.side-right .panel-b{bottom:0;border-radius:0 0 4px 4px}
.game-door.state-open.side-top .panel-a,.game-door.state-open.side-bottom .panel-a,.game-door.state-opening.side-top .panel-a,.game-door.state-opening.side-bottom .panel-a{transform:translateX(-102%)}.game-door.state-open.side-top .panel-b,.game-door.state-open.side-bottom .panel-b,.game-door.state-opening.side-top .panel-b,.game-door.state-opening.side-bottom .panel-b{transform:translateX(102%)}
.game-door.state-open.side-left .panel-a,.game-door.state-open.side-right .panel-a,.game-door.state-opening.side-left .panel-a,.game-door.state-opening.side-right .panel-a{transform:translateY(-102%)}.game-door.state-open.side-left .panel-b,.game-door.state-open.side-right .panel-b,.game-door.state-opening.side-left .panel-b,.game-door.state-opening.side-right .panel-b{transform:translateY(102%)}
.game-door.state-locked .game-door-panel,.game-door.state-denied .game-door-panel{filter:saturate(.35) brightness(.72)}.game-door.state-denied{animation:game-door-denied .18s ease 2}.game-door-status{position:absolute;z-index:2;left:50%;top:50%;min-width:20px;padding:2px 4px;border-radius:7px;background:#17231fe6;color:#ffe9ae;text-align:center;font:800 9px/1 sans-serif;transform:translate(-50%,-50%)}.game-door-status:empty{display:none}@keyframes game-door-denied{50%{transform:translateX(3px);filter:drop-shadow(0 0 6px #ef596c)}}
.theme-office .game-door-panel{border-color:#4e5a61;background:repeating-linear-gradient(90deg,#9eabb2 0 8px,#71838d 8px 11px);box-shadow:inset 0 2px #d8e0e4}.theme-office .game-door.side-left .game-door-panel,.theme-office .game-door.side-right .game-door-panel{background:repeating-linear-gradient(0deg,#9eabb2 0 8px,#71838d 8px 11px)}

.game-room-object.interaction-target,.game-door.interaction-target{filter:drop-shadow(0 0 6px #72f0a8) drop-shadow(0 4px 1px rgba(32,44,37,.28))}.game-room-object.state-disabled{filter:grayscale(.75) brightness(.72)}.game-room-object.state-live{filter:drop-shadow(0 0 7px #52e99b) drop-shadow(0 4px 1px rgba(32,44,37,.28))}.game-object-state-badge{position:absolute;z-index:12;left:50%;top:-13px;padding:3px 5px;border:1px solid #ff7b89;border-radius:5px;background:#6d1f2ae8;color:#fff;font:900 7px/1 ui-monospace,monospace;white-space:nowrap;transform:translateX(-50%);animation:game-live-badge 1.15s steps(2) infinite}.game-interaction-bubble{position:absolute;z-index:20;left:50%;bottom:calc(100% + 8px);padding:5px 7px;border:1px solid #99eabb;border-radius:7px;background:#17342beF;color:#effff5;font:800 8px/1 sans-serif;white-space:nowrap;transform:translateX(-50%);pointer-events:none}.interaction-feedback.feedback-success{animation:game-interaction-success .36s ease}.interaction-feedback.feedback-denied{animation:game-interaction-denied .2s ease 2}@keyframes game-live-badge{50%{opacity:.68}}@keyframes game-interaction-success{50%{filter:drop-shadow(0 0 10px #76efab) brightness(1.2)}}@keyframes game-interaction-denied{50%{filter:drop-shadow(0 0 9px #f05b70);transform:translate(var(--visual-anchor-x,-50%),var(--visual-anchor-y,-50%)) translateX(3px)}}

.game-door-settings,.game-object-interaction-settings{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px;padding:8px;border:1px solid #385c4e;border-radius:8px;background:#1b342c}.game-door-settings>label,.game-object-interaction-settings>label{display:grid;gap:4px;color:#afd0c1;font-size:8px;font-weight:800}.game-door-settings input[type=number],.game-object-interaction-settings input,.game-object-interaction-settings select{min-width:0;width:100%;padding:6px;border:1px solid #45675b;border-radius:6px;background:#112720;color:#effbf5;font-size:9px}.game-inline-check{grid-template-columns:15px minmax(0,1fr)!important;align-items:center}.game-inline-check input{width:14px!important;height:14px;padding:0!important;accent-color:#58d38b}.game-object-interaction-settings>.game-editor-label{grid-column:1/-1}
.game-view.editing .game-actor{opacity:.55;pointer-events:auto;cursor:crosshair}
.game-debug-tools{background:#142824}
.game-debug-inspector{max-height:180px;margin:0;overflow:auto;padding:9px;border:1px solid #52776a;border-radius:7px;background:#0d1d1a;color:#b9e6d1;font:700 9px/1.5 ui-monospace,monospace;white-space:pre-wrap}
.game-debug-bound{position:absolute;box-sizing:border-box;background:transparent;pointer-events:none}
.game-debug-bound::after{content:attr(data-debug-label);position:absolute;left:1px;top:1px;padding:1px 3px;background:#111c;color:#fff;font:700 7px/1 ui-monospace,monospace;white-space:nowrap}
.game-debug-bound.debug-visual{border:1px dashed #54b8ff;background:#54b8ff12}
.game-debug-bound.debug-collision{border:2px solid #ff5574;background:#ff557421}
.game-debug-bound.debug-interaction{border:1px dashed #ffd34f;background:#ffd34f12;border-radius:50%}
.game-debug-bound.debug-room{border:2px solid #b871ff;background:#b871ff0d}
.game-debug-bound.debug-door{border:2px solid #63ff9a;background:#63ff9a45}
.game-debug-foot{position:absolute;width:8px;height:8px;border:2px solid #fff;border-radius:50%;background:#ff3dc8;box-shadow:0 0 0 2px #111;transform:translate(-50%,-50%);pointer-events:none}
.game-world-layer-editorOverlay>*{pointer-events:none!important}

/* Etapa 2B: pacote visual 2.5D. A física continua livre; 48px é apenas a unidade visual. */
.game-stage{background:#101b1b}
.game-world{
  --world-tile-size:48px;
  --theme-world:#4c8058;--theme-world-deep:#315a42;--theme-path:#d9c79d;
  --theme-wall-top:#f0dfbd;--theme-wall-face:#c7ad80;--theme-wall-base:#806747;
  --theme-wall-side:#a78e65;--theme-trim:#6f583e;--theme-sign:#31584e;--theme-sign-text:#f4fff9;
  overflow:hidden;background-color:var(--theme-world);background-image:
    linear-gradient(90deg,transparent 44%,color-mix(in srgb,var(--theme-path) 82%,transparent) 44% 56%,transparent 56%),
    linear-gradient(0deg,transparent 43%,color-mix(in srgb,var(--theme-path) 82%,transparent) 43% 57%,transparent 57%),
    radial-gradient(ellipse at 50% 50%,rgba(255,255,255,.07),transparent 62%);
  background-size:100% 100%;box-shadow:inset 0 0 140px color-mix(in srgb,var(--theme-world-deep) 74%,transparent)
}
.game-world::before{content:"MONKEY CALLS";left:50%;bottom:22px;z-index:1;padding:6px 14px;border:2px solid color-mix(in srgb,var(--theme-trim) 70%,#fff);border-radius:5px;background:var(--theme-sign);color:var(--theme-sign-text);box-shadow:0 4px 0 color-mix(in srgb,var(--theme-world-deep) 75%,transparent);font:900 9px/1 ui-monospace,monospace;letter-spacing:.16em;opacity:.78}
.game-world::after{content:"";position:absolute;inset:0;z-index:0;border:0;background:radial-gradient(circle at 14% 18%,rgba(255,255,255,.06) 0 2px,transparent 3px);background-size:72px 72px;pointer-events:none;opacity:.45}
.game-world.editing{background-image:
  linear-gradient(rgba(255,255,255,.075) 1px,transparent 1px),linear-gradient(90deg,rgba(255,255,255,.075) 1px,transparent 1px),
  linear-gradient(90deg,transparent 44%,color-mix(in srgb,var(--theme-path) 78%,transparent) 44% 56%,transparent 56%),
  linear-gradient(0deg,transparent 43%,color-mix(in srgb,var(--theme-path) 78%,transparent) 43% 57%,transparent 57%);
  background-size:var(--world-tile-size) var(--world-tile-size),var(--world-tile-size) var(--world-tile-size),100% 100%,100% 100%
}
.game-world.editing::before{content:"EDITOR DO MUNDO";opacity:1}
.game-world-layer-ground,.game-world-layer-roomBack,.game-world-layer-floorDecor,.game-world-layer-depthEntities,.game-world-layer-foreground,.game-world-layer-effects,.game-world-layer-editorOverlay{isolation:isolate}
.game-world-layer-floorDecor>.game-room-object{position:absolute}

/* Salas são ambientes: piso recuado, parede alta, rodapé e oclusão ambiente. */
.game-room{display:block;overflow:visible;border:0;border-radius:0;background:transparent;box-shadow:none}
.game-room::before,.game-room::after{display:none}
.game-room-floor{position:absolute;inset:36px 14px 14px;min-height:0;margin:0;overflow:hidden;border:1px solid color-mix(in srgb,var(--theme-trim) 38%,transparent);border-radius:1px;background-color:#d8d7d1;background-image:none;box-shadow:inset 0 13px 14px -11px rgba(24,31,31,.52),inset 10px 0 12px -12px rgba(24,31,31,.45),inset -10px 0 12px -12px rgba(24,31,31,.45),inset 0 -7px 8px -8px rgba(255,255,255,.72)}
.game-room-floor::before,.game-room-floor::after{display:none}
.game-room.floor-light .game-room-floor{background-color:#d9d8d2;background-image:linear-gradient(rgba(83,94,96,.075) 1px,transparent 1px),linear-gradient(90deg,rgba(83,94,96,.075) 1px,transparent 1px);background-size:48px 48px}
.game-room.floor-wood .game-room-floor{background-color:#bd8959;background-image:linear-gradient(90deg,rgba(72,43,26,.18) 1px,transparent 1px),linear-gradient(0deg,rgba(255,255,255,.08) 1px,transparent 1px),linear-gradient(90deg,transparent 0 48%,rgba(255,255,255,.045) 49% 51%,transparent 52%);background-size:48px 24px,100% 24px,96px 48px}
.game-room.floor-carpet .game-room-floor{background-color:#647f7c;background-image:radial-gradient(circle,rgba(255,255,255,.075) 0 1px,transparent 1.5px),linear-gradient(135deg,rgba(18,42,41,.055),transparent 48%);background-size:8px 8px,48px 48px}
.game-room.floor-dark .game-room-floor{background-color:#43504f;background-image:linear-gradient(135deg,rgba(255,255,255,.045) 25%,transparent 25% 75%,rgba(0,0,0,.05) 75%),linear-gradient(45deg,rgba(255,255,255,.025) 25%,transparent 25% 75%,rgba(0,0,0,.045) 75%);background-size:48px 48px}
.game-room.floor-garden .game-room-floor{background-color:#6d9365;background-image:radial-gradient(circle at 20% 30%,rgba(240,226,163,.17) 0 1px,transparent 2px),radial-gradient(circle at 74% 66%,rgba(29,76,45,.16) 0 1px,transparent 2px);background-size:32px 32px,43px 43px}
.game-room-light-pool{position:absolute;inset:0;display:block;background:radial-gradient(ellipse at 50% 12%,rgba(255,248,218,.2),transparent 55%);pointer-events:none}
.game-room.room-kind-vip .game-room-floor{box-shadow:inset 0 0 0 2px rgba(219,181,85,.34),inset 0 13px 14px -11px rgba(24,31,31,.52)}
.game-room.room-kind-lounge .game-room-light-pool{background:radial-gradient(ellipse at 42% 28%,rgba(255,223,165,.23),transparent 58%)}
.game-room.room-kind-call .game-room-light-pool{background:radial-gradient(ellipse at 60% 20%,rgba(171,239,226,.14),transparent 56%)}
.game-room.connected .game-room-floor{box-shadow:inset 0 0 0 2px rgba(76,224,143,.32),inset 0 13px 14px -11px rgba(24,31,31,.52),0 0 18px rgba(65,218,133,.13)}

.game-room-title{position:absolute;left:50%;top:8px;z-index:6;width:max-content;max-width:calc(100% - 112px);height:20px;display:flex;align-items:center;justify-content:center;gap:6px;padding:0 9px;border:1px solid color-mix(in srgb,var(--theme-trim) 70%,#fff);border-radius:3px;background:var(--theme-sign);color:var(--theme-sign-text);box-shadow:0 3px 0 color-mix(in srgb,var(--theme-trim) 85%,transparent);transform:translateX(-50%);font:850 9px/1 ui-monospace,monospace;text-shadow:0 1px rgba(0,0,0,.45);white-space:nowrap}
.game-room-title span{max-width:190px;overflow:hidden;text-overflow:ellipsis}.game-room-title span::before{display:none}
.game-room-title small{min-width:0;padding:2px 4px;border:0;border-radius:6px;background:rgba(255,255,255,.16);color:inherit;font:800 7px/1 ui-monospace,monospace}.game-room-title small:empty{display:none}
.game-room-wall-accent{position:absolute;left:18px;top:10px;z-index:3;width:46px;height:16px;border:2px solid var(--theme-trim);border-radius:2px;background:linear-gradient(135deg,rgba(174,229,219,.8),rgba(71,111,111,.7));box-shadow:inset 0 0 0 2px rgba(255,255,255,.2),0 2px 0 rgba(0,0,0,.23);pointer-events:none}
.room-kind-lounge .game-room-wall-accent{background:linear-gradient(135deg,#e4bd82,#986f58)}.room-kind-vip .game-room-wall-accent{border-color:#8a6a31;background:linear-gradient(135deg,#f2d78e,#9c7650)}

.game-wall-back{border:0;pointer-events:none}
.game-wall-back.side-top{left:0;right:0;top:0;height:36px;background:linear-gradient(to bottom,var(--theme-wall-top) 0 8px,var(--theme-wall-face) 8px 30px,var(--theme-wall-base) 30px 36px);box-shadow:inset 0 2px rgba(255,255,255,.48),0 5px 7px rgba(26,37,35,.2)}
.game-wall-back.side-bottom{left:0;right:0;bottom:0;height:14px;background:linear-gradient(var(--theme-wall-top) 0 4px,var(--theme-wall-face) 4px 10px,var(--theme-wall-base) 10px);box-shadow:0 5px 6px rgba(25,35,34,.25)}
.game-wall-back.side-left,.game-wall-back.side-right{top:0;bottom:0;width:14px;background:linear-gradient(90deg,var(--theme-wall-top),var(--theme-wall-side) 40%,var(--theme-wall-base));box-shadow:4px 0 6px rgba(25,35,34,.18)}
.game-wall-back.side-left{left:0}.game-wall-back.side-right{right:0;transform:scaleX(-1)}
.game-wall-foreground{border:0;border-radius:1px;background:linear-gradient(var(--theme-wall-top) 0 7px,var(--theme-wall-face) 7px 22px,var(--theme-wall-base) 22px 27px);box-shadow:0 7px 6px rgba(21,31,30,.28),inset 0 2px rgba(255,255,255,.38);pointer-events:none}
.game-wall-foreground.side-top,.game-wall-foreground.side-bottom{height:27px!important;transform:translateY(-9px)}
.game-wall-foreground.side-left,.game-wall-foreground.side-right{width:22px!important;background:linear-gradient(90deg,var(--theme-wall-top),var(--theme-wall-side) 44%,var(--theme-wall-base));box-shadow:5px 4px 6px rgba(21,31,30,.25);transform:translateX(-2px)}
.game-wall-foreground.side-right{transform:translateX(-2px) scaleX(-1)}
.game-wall-foreground.blocked-passage{animation:game-wall-blocked .22s ease-out}

/* Portas direcionais têm soleira, moldura, estado de acesso e painéis persistentes. */
.game-door{z-index:3;border-radius:3px;background:var(--theme-trim);box-shadow:0 3px 0 color-mix(in srgb,var(--theme-world-deep) 70%,transparent),inset 0 0 0 2px color-mix(in srgb,var(--theme-wall-top) 55%,transparent);filter:none}
.game-door::before{content:"";position:absolute;z-index:-1;border-radius:3px;background:var(--theme-wall-top);box-shadow:inset 0 0 0 2px var(--theme-trim)}
.game-door.side-top::before,.game-door.side-bottom::before{inset:-5px -6px}.game-door.side-left::before,.game-door.side-right::before{inset:-6px -5px}
.game-door::after{content:"";position:absolute;z-index:4;width:6px;height:6px;border:1px solid #10211d;border-radius:50%;background:#e2c25e;box-shadow:0 0 5px rgba(226,194,94,.46)}
.game-door.side-top::after,.game-door.side-bottom::after{right:5px;top:50%;transform:translateY(-50%)}.game-door.side-left::after,.game-door.side-right::after{left:50%;bottom:5px;transform:translateX(-50%)}
.game-door-panel{border:1px solid color-mix(in srgb,var(--theme-trim) 86%,#151b1a);background:repeating-linear-gradient(90deg,color-mix(in srgb,var(--theme-sign) 72%,#b9844c) 0 8px,color-mix(in srgb,var(--theme-sign) 55%,#75512f) 8px 11px);box-shadow:inset 0 2px rgba(255,255,255,.25);transition:transform 180ms cubic-bezier(.2,.75,.25,1),filter 140ms ease,opacity 140ms ease}
.game-door.side-left .game-door-panel,.game-door.side-right .game-door-panel{background:repeating-linear-gradient(0deg,color-mix(in srgb,var(--theme-sign) 72%,#b9844c) 0 8px,color-mix(in srgb,var(--theme-sign) 55%,#75512f) 8px 11px)}
.game-door.state-open .game-door-panel{opacity:.58}.game-door.state-opening::after,.game-door.state-open::after{background:#5de797;box-shadow:0 0 7px #5de797}
.game-door.state-locked::after,.game-door.state-denied::after{background:#ef6573;box-shadow:0 0 7px #ef6573}.game-door.state-locked .game-door-panel,.game-door.state-denied .game-door-panel{filter:saturate(.32) brightness(.63)}
.game-door-status{top:-13px;background:#202c2a;color:#ffe7aa;box-shadow:0 2px 0 rgba(0,0,0,.25)}

/* Objetos: atlas predominante, sombras curtas e decorações sem colisão. */
.game-room-object{filter:drop-shadow(0 5px 1px rgba(23,35,32,.34))}
.game-room-object.visual-sprite:not(.object-television):not(.object-table){image-rendering:pixelated}
.game-room-object.object-rug{width:104px;height:66px;border:3px solid color-mix(in srgb,var(--theme-sign) 62%,#b88b55);border-radius:5px;background:repeating-linear-gradient(135deg,color-mix(in srgb,var(--theme-sign) 76%,#6e6960) 0 8px,color-mix(in srgb,var(--theme-sign) 62%,#b7865b) 8px 16px);box-shadow:inset 0 0 0 4px rgba(255,255,255,.12),0 2px 0 rgba(36,45,42,.16);filter:none}
.room-kind-vip~.game-room-object.object-rug,.object-rug.state-active{border-color:#d1ad5d}
.game-room-object.object-wallArt{width:54px;height:38px;border:5px solid #725238;border-radius:2px;background:linear-gradient(150deg,#e6bf78 0 35%,#749583 36% 65%,#3e6862 66%);box-shadow:inset 0 0 0 2px #f0d299,0 5px 1px rgba(24,34,31,.28);filter:none}
.game-room-object.object-wallArt::after{content:"";position:absolute;left:25px;bottom:4px;width:16px;height:19px;background:#2f6351;clip-path:polygon(50% 0,100% 100%,0 100%)}
.game-pixel-sprite.visual-placeholder{background-image:none}.game-object-palette .game-pixel-sprite.object-rug{width:42px;height:28px;margin:3px;border:2px solid #b88b55;border-radius:3px;background:repeating-linear-gradient(135deg,#34645b 0 5px,#9a6e4d 5px 10px)}.game-object-palette .game-pixel-sprite.object-wallArt{width:34px;height:27px;margin:3px;border:4px solid #725238;background:linear-gradient(150deg,#e6bf78 0 35%,#749583 36% 65%,#3e6862 66%)}
.game-room-object.object-tallPlant{filter:drop-shadow(0 6px 1px rgba(23,35,32,.38)) saturate(1.08)}
.game-room-object.object-plant,.game-room-object.object-tallPlant{animation:game-plant-life 4.8s ease-in-out infinite}@keyframes game-plant-life{50%{filter:drop-shadow(0 5px 1px rgba(23,35,32,.34)) brightness(1.035)}}
.object-table{border-radius:7px;filter:drop-shadow(0 6px 1px rgba(23,35,32,.38))}.object-table::before{border-color:#513722;background:repeating-linear-gradient(90deg,rgba(255,255,255,.06) 0 2px,transparent 2px 20px),linear-gradient(#b98358,#825536);box-shadow:inset 0 3px #d4a578,inset 0 -4px #64422c,0 5px 0 #3e2d23}
.object-chair,.object-sofa,.object-cabinet,.object-shelf,.object-computer{filter:drop-shadow(0 5px 1px rgba(23,35,32,.38))}
.object-computer.state-active,.object-arcade.state-active{animation:game-device-life 1.8s ease-in-out infinite}@keyframes game-device-life{50%{filter:drop-shadow(0 0 5px rgba(94,233,190,.7)) drop-shadow(0 5px 1px rgba(23,35,32,.34))}}
.object-television{filter:drop-shadow(0 7px 2px rgba(20,29,28,.42))}.object-television::before{border-color:#202929;background:#091110;box-shadow:inset 0 0 0 2px #697d78,0 4px 0 #111817,0 7px 0 var(--theme-trim)}.object-television::after{background:linear-gradient(90deg,var(--theme-trim),color-mix(in srgb,var(--theme-trim) 55%,#b38b63) 12% 88%,var(--theme-trim))}
.object-television.broadcasting .game-tv-screen{animation:game-screen-glow 2.1s ease-in-out infinite}@keyframes game-screen-glow{50%{box-shadow:0 0 11px rgba(83,235,164,.72)}}

/* Avatares integrados ao chão, animação ligada à velocidade e HUD discreto. */
.game-actor{--walk-duration:.34s;width:50px;height:64px;filter:none}
.game-actor-shadow{position:absolute;left:50%;bottom:9px;z-index:-1;width:28px;height:10px;border-radius:50%;background:rgba(14,24,22,.34);transform:translateX(-50%);transition:transform 120ms ease,opacity 120ms ease;pointer-events:none}
.game-actor.walking .game-actor-shadow{opacity:.72;transform:translateX(-50%) scaleX(.88)}
.game-character{z-index:1;filter:drop-shadow(0 3px 0 rgba(20,31,28,.22))}.game-character.moving{animation-duration:var(--walk-duration)}
.game-actor.speaking .game-character{filter:drop-shadow(0 0 5px #35ed80) drop-shadow(0 3px 0 rgba(20,31,28,.22))}
.game-actor-name{bottom:-13px;max-width:126px;padding:3px 6px;border:1px solid rgba(255,255,255,.18);border-radius:7px;background:rgba(15,29,28,.82);box-shadow:0 2px 0 rgba(0,0,0,.22);font:750 8px/1 ui-monospace,monospace;text-shadow:0 1px #000;backdrop-filter:none}
.game-actor.self .game-actor-name{border-color:rgba(163,200,255,.55);background:rgba(39,55,82,.88)}
.game-actor-states{position:absolute;right:-8px;top:4px;z-index:4;display:flex;gap:2px}.game-actor-states:empty{display:none}.game-actor-states i{min-width:14px;height:14px;display:grid;place-items:center;border:1px solid rgba(255,255,255,.28);border-radius:50%;background:#273532;color:#fff;font:normal 8px/1 sans-serif;box-shadow:0 2px 0 rgba(0,0,0,.28)}.game-actor-states .actor-state-live{background:#9d2838;color:#fff;font-size:9px}.game-actor-states .actor-state-muted{background:#5e3b42}.game-actor-states .actor-state-deafened{background:#384d5e}
.game-ghost{filter:drop-shadow(0 3px 0 rgba(20,31,28,.22))}

/* Discord e Mundo são duas apresentações do mesmo estado de comunicação. */
.app-shell.view-transitioning .main-panel{animation:monkey-view-swap 140ms ease-out}@keyframes monkey-view-swap{from{opacity:.72}to{opacity:1}}
.voice-card.view-focus{animation:voice-card-focus 1.05s ease-out}@keyframes voice-card-focus{0%,45%{box-shadow:0 0 0 3px rgba(88,190,133,.8),0 0 22px rgba(88,190,133,.4)}100%{box-shadow:none}}
.game-actor:not(.self){pointer-events:auto;cursor:pointer}.game-actor:not(.self):hover .game-actor-name{border-color:#84e0ad;background:rgba(23,54,43,.94)}
.game-actor.away .game-character,.game-actor.away .game-ghost{opacity:.68;filter:saturate(.55)}.game-actor-states .actor-state-away{background:#665b42;color:#ffe4a2}
.game-actor.speaking .game-actor-name{border-color:#55df91;color:#effff5;box-shadow:0 0 0 1px rgba(53,237,128,.2),0 2px 0 rgba(0,0,0,.22)}
.game-context-panel{position:fixed;right:20px;top:82px;z-index:8040;width:min(310px,calc(100vw - 40px));display:grid;gap:10px;padding:12px;border:1px solid rgba(151,220,181,.42);border-radius:12px;background:rgba(13,29,27,.96);color:#f3faf6;box-shadow:0 10px 0 rgba(7,17,16,.22),0 20px 42px rgba(4,12,11,.46)}
.game-context-panel.hidden{display:none}.game-context-panel header{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}.game-context-panel header>div{min-width:0;display:grid;gap:3px}.game-context-panel header strong{overflow:hidden;text-overflow:ellipsis;font-size:14px}.game-context-panel header small{color:#a7c2b6;font-size:10px}.game-context-panel header>button{width:28px;height:28px;border:0;border-radius:8px;background:#263e38;color:#dcebe4;font-size:18px}.game-context-panel header>button:hover{background:#395c50}
.game-context-states{display:flex;flex-wrap:wrap;gap:5px;min-height:18px}.game-context-states:empty{display:none}.game-context-state{padding:4px 7px;border:1px solid rgba(255,255,255,.13);border-radius:999px;background:#293d38;color:#d9e9e2;font-size:9px;font-weight:800}.game-context-state.state-speaking,.game-context-state.state-current,.game-context-state.state-available{border-color:#55b980;background:#214b39;color:#caffdf}.game-context-state.state-live{border-color:#dd6672;background:#642e37;color:#fff}.game-context-state.state-muted,.game-context-state.state-deafened,.game-context-state.state-locked{border-color:#b27676;background:#4e3437;color:#ffd7d9}
.game-context-actions{display:flex;flex-wrap:wrap;gap:6px}.game-context-actions button{min-height:32px;padding:0 10px;border-radius:8px;font-size:10px;font-weight:800}
@media(max-width:680px){.game-context-panel{right:12px;top:72px;width:min(300px,calc(100vw - 24px))}}

.game-editor-presets{grid-template-columns:repeat(3,minmax(0,1fr))}
.game-layout-themes{grid-template-columns:repeat(3,minmax(0,1fr))}
.game-layout-preview.theme-modern-office{background:linear-gradient(145deg,#263c3b,#172827)}
.game-layout-preview.theme-modern-office .game-layout-preview-room{border-color:#c7c0b2;background:#405250}.game-layout-preview.theme-modern-office .game-layout-preview-room::after{background:#718985}
@media(prefers-reduced-motion:reduce){.game-room-object.object-plant,.game-room-object.object-tallPlant,.object-computer.state-active,.object-arcade.state-active,.object-television.broadcasting .game-tv-screen{animation:none}}
.context-floating-submenu{position:fixed;z-index:96;width:220px;margin:0;max-height:min(360px,calc(100vh - 20px));box-shadow:0 12px 32px rgba(0,0,0,.48)}
.context-role-action{display:grid!important;grid-template-columns:14px minmax(0,1fr) auto;gap:8px}.context-role-dot{width:9px;height:9px;border-radius:50%}.context-role-check{color:var(--success);font-weight:900}
.dm-header-actions{display:flex;gap:7px}.dm-header-actions .ghost-button{color:#d9dde5}.dm-header-actions .ghost-button:hover{border-color:#6673ff;color:#fff}.dm-composer{grid-template-columns:minmax(0,1fr)}.dm-composer .composer-toolbar{justify-content:flex-end}
.upload-tray{position:fixed;right:18px;bottom:18px;z-index:110;display:grid;gap:7px;width:min(360px,calc(100vw - 36px));padding:10px;border:1px solid var(--border);border-radius:12px;background:#171a21;box-shadow:0 15px 45px rgba(0,0,0,.5)}.upload-item{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:5px 9px;align-items:center}.upload-item strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:11px}.upload-item small{color:var(--muted);font-size:9px}.upload-progress{grid-column:1/-1;height:5px;overflow:hidden;border-radius:999px;background:#2b303a}.upload-progress>i{display:block;height:100%;background:linear-gradient(90deg,#5865f2,#7c8cff);transition:width .1s}.upload-item.complete .upload-progress>i{background:var(--success)}.upload-item.failed .upload-progress>i{background:var(--danger)}
.drop-overlay{position:fixed;inset:0;z-index:109;display:grid;place-items:center;padding:25px;background:rgba(8,10,14,.78);pointer-events:none}.drop-overlay>div{display:grid;gap:7px;width:min(520px,90vw);padding:44px;border:2px dashed #7c8cff;border-radius:18px;background:#171a21;text-align:center}.drop-overlay strong{font-size:24px}.drop-overlay span{color:var(--muted)}
.invite-preview-card{text-align:center;max-width:460px}.invite-preview-icon{width:82px;height:82px;margin:2px auto 12px;border-radius:24px;object-fit:cover;background:#252a35;display:grid;place-items:center;font-size:42px}.invite-preview-card>small{color:#9ba4b3;font-weight:800}.invite-preview-card p{color:#c9ced7;white-space:pre-wrap}.invite-member-count{display:block;margin:8px 0 18px;color:var(--muted)}.invite-preview-card .modal-actions,.compact-card .modal-actions{display:flex;justify-content:center;gap:8px}.compact-card{text-align:center;max-width:420px}

/* The rendered border box and pivot share the physics coordinate system. */
.game-room-object{transform-origin:calc(-1 * var(--visual-anchor-x)) calc(-1 * var(--visual-anchor-y));box-sizing:border-box}

/* Viewing controls remain reachable even on short screens. */
.game-screen-viewer{max-height:calc(100dvh - 32px);display:flex;flex-direction:column;transform:translate(-50%,-50%)}
.game-screen-viewer>header{flex:none;gap:12px;min-height:52px;height:auto;padding:10px 14px}
.game-screen-viewer>header button{width:auto;min-width:44px;height:auto;min-height:36px;padding:8px 12px;font-size:12px;white-space:nowrap;background:#8e3547}
.game-screen-viewer>header button kbd{margin-left:8px;opacity:.75;font-size:10px}
.game-screen-viewer-media{min-height:0;overflow:hidden}
.game-screen-viewer-media video{min-height:0;max-height:calc(100dvh - 108px)}

/* Shared office: legible labels, calm surfaces and explicit destinations. */
.game-room-title{font-family:system-ui,sans-serif;font-size:12px;letter-spacing:0;text-shadow:none}
.game-room-title>span{font-size:12px;line-height:1.3;padding:4px 10px;border-radius:6px;background:#263e43;color:#f7fffb;box-shadow:0 2px 3px #152b3326}
.game-actor-name{font-family:system-ui,sans-serif;font-size:11px;line-height:1.3;padding:3px 7px;border-radius:6px;max-width:150px;text-shadow:none;background:#20353ee8}
.game-actor.self .game-actor-name{background:#4355a9;color:#fff;border-color:#b9c9ff}
.game-room.connected .game-room-title>span{background:#3f568e;box-shadow:0 0 0 2px #c3d6ff}
.game-world .game-wall-back.side-top{height:18px;background:linear-gradient(var(--theme-wall-top) 0 4px,var(--theme-wall-face) 4px 14px,var(--theme-wall-base) 14px);box-shadow:0 3px 0 #1c30301f}
.game-world .game-wall-back.side-bottom,.game-world .game-wall-back.side-left,.game-world .game-wall-back.side-right{box-shadow:none}
.game-room-object.interaction-target{filter:drop-shadow(0 0 3px #e0efff) drop-shadow(0 0 5px #758bff)}
.game-interaction-bubble{font:600 11px/1.3 system-ui,sans-serif;background:#28375a;color:#fff;border:1px solid #aabfff;padding:6px 9px;border-radius:7px;box-shadow:0 3px 8px #17254240}
.game-action-prompt{border:1px solid #7285b3;background:#1e2b43f5;box-shadow:0 8px 30px #17233f55}
.game-action-prompt button{background:#5266b3;border-color:#a6b9ff;font-size:12px}.game-action-prompt span{font-size:12px}
.game-action-prompt button::before{content:'E / X  ';color:#dce5ff}
.game-zoom-controls button{font-family:system-ui,sans-serif;min-height:32px}
.game-walk-target{position:absolute;width:20px;height:12px;border:2px solid #d4e4ff;border-radius:50%;transform:translate(-50%,-50%);background:#6981d74d;box-shadow:0 0 0 4px #6782cb33;pointer-events:none}
.game-room-object[aria-label]{outline-offset:3px}
.game-help{border:1px solid #7285a080;border-radius:10px;background:#1d2d3fe8;box-shadow:0 4px 16px #13203926}
@media(max-width:680px){.game-screen-viewer>header{flex-wrap:wrap}.game-screen-viewer>header button{margin-left:auto}.game-zoom-controls{max-width:calc(100vw - 170px);flex-wrap:wrap}.game-action-prompt button::before{content:''}}

/* Original shared-office art. All decoration stays inside catalog dimensions. */
.game-room-object.world-furniture{background:none!important;border:0;border-radius:0;box-shadow:none;filter:drop-shadow(0 3px 0 #263c4520)}
.game-room-object.world-furniture::before,.game-room-object.world-furniture::after,.world-furniture>.game-table-legs{display:none}
.world-furniture-art{position:absolute;inset:0;pointer-events:none;display:block}
.world-furniture-art>svg{display:block;width:100%;height:100%;overflow:visible}
.game-character.world-avatar{background:none!important;width:48px;height:56px;image-rendering:auto;filter:none}
.world-avatar .avatar-frame{position:absolute;inset:0;display:none;pointer-events:none}
.world-avatar svg{width:100%;height:100%;display:block}
.world-avatar[data-direction="up"] .facing-up,.world-avatar[data-direction="down"] .facing-down,.world-avatar[data-direction="left"] .facing-left,.world-avatar[data-direction="right"] .facing-right{display:block}
.game-actor .world-avatar{position:absolute;left:1px;bottom:5px}
.game-actor.walking .world-avatar{animation:world-avatar-step .3s steps(2,end) infinite}
@keyframes world-avatar-step{50%{translate:0 -2px}}
.game-world{background-color:#b5c9ba;background-image:radial-gradient(#8fac9835 1px,transparent 1px);background-size:12px 12px}
.game-world.theme-modern-office,.game-world.theme-office{background-color:#bac6ce;background-image:linear-gradient(#ffffff18 1px,transparent 1px),linear-gradient(90deg,#ffffff18 1px,transparent 1px);background-size:48px 48px}
.game-world::before,.game-world::after{opacity:.24}
.game-room-floor{box-shadow:none!important}
.game-header{background:#243345;border-bottom:1px solid #8394aa55}
.game-view{background:#d4ded7}
.game-stage{background:#d4ded7}
.game-room-title>span{background:#f6f1e7;color:#394b58;box-shadow:0 2px 0 #34445120;border:1px solid #acb7ad}
.game-actor-name{background:#f6f2e9f5;color:#344451;border:1px solid #a3b3b3}
.game-audio-button.active{background:#426e66;border-color:#b8dac6}
@media(prefers-reduced-motion:reduce){.game-actor.walking .world-avatar{animation:none}}

.game-people-panel{position:fixed;z-index:8048;right:18px;top:86px;width:280px;max-height:65vh;padding:14px;border:1px solid #a8b8be;border-radius:14px;background:#f6f3eb;color:#334451;box-shadow:0 10px 35px #263c4533;overflow:auto}
.game-people-panel header{display:flex;justify-content:space-between;align-items:center;margin-bottom:12px}.game-people-panel header button{border:0;background:none;font-size:22px;color:inherit}
.game-people-panel input{width:100%;padding:10px;border:1px solid #b6c1c3;border-radius:8px;background:#fff;color:#334451}
#gamePeopleList{display:grid;gap:6px;margin-top:10px}#gamePeopleList button{display:grid;gap:4px;text-align:left;padding:10px;border:1px solid #ccd4cd;border-radius:8px;background:#eaf0e9;color:#334451}#gamePeopleList small{color:#627979}
.game-stage{box-shadow:none}.game-world{box-shadow:0 2px 18px #34515c18}
@media(max-width:760px){.game-header-actions{gap:4px}.game-people-panel{right:10px;top:124px;width:min(280px,calc(100vw - 20px))}.game-server-hud{display:none}.game-header{min-height:100px}.game-header-actions{left:12px;right:12px;top:52px;justify-content:flex-end}.game-header-actions .game-audio-button{width:auto;padding:0 8px}.game-header-actions #gameProximityButton small{display:block;font-size:9px}}

.world-activity{width:min(860px,calc(100vw - 24px));max-height:calc(100dvh - 32px);overflow:auto;padding:18px;border:1px solid #b6c3c5;border-radius:16px;background:#f6f3eb;color:#344451;box-shadow:0 24px 90px #14283a55}
.world-activity::backdrop{background:#14263a99;backdrop-filter:blur(3px)}.world-activity header{display:flex;justify-content:space-between;align-items:center;gap:16px;margin-bottom:14px}.world-activity button{padding:9px 12px;border:1px solid #a4b6be;border-radius:8px;background:#e8eeea;color:#344451;cursor:pointer}.world-activity button:focus-visible{outline:3px solid #5266b3;outline-offset:2px}.world-activity nav{display:flex;flex-wrap:wrap;gap:6px;margin-bottom:12px}.world-activity button[aria-pressed=true]{background:#cbd8eb;box-shadow:0 0 0 2px #5266b3}.world-activity canvas{display:block;width:100%;height:auto;aspect-ratio:5/3;border:1px solid #bec6be;border-radius:8px;touch-action:none}.activity-status{font-size:13px;color:#617579}.memory-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;margin:16px auto;max-width:480px}.memory-grid button{aspect-ratio:1;font-size:30px;background:#5979a8;color:#fff}.memory-grid button.matched{background:#82ac91;color:#263f37}.memory-grid button:disabled{cursor:default;opacity:1}

.game-call-strip{position:fixed;z-index:8040;left:18px;top:140px;display:flex;flex-wrap:wrap;gap:8px;max-width:min(600px,calc(100vw - 36px));pointer-events:none}
.game-call-tile{min-width:100px;max-width:150px;border:2px solid #ccd5d9;border-radius:10px;overflow:hidden;background:#f6f2e9;box-shadow:0 3px 12px #293e4d22}.game-call-tile span{display:block;padding:5px 8px;color:#344451;font-size:11px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.game-call-tile video{display:block;width:146px;height:84px;object-fit:cover}.game-call-tile.speaking{border-color:#4eac85}
@media(max-width:760px){.game-call-strip{top:180px;max-width:calc(100vw - 36px)}.game-call-tile{max-width:106px;min-width:76px}.game-call-tile video{width:102px;height:62px}.game-header-actions #gameProximityButton small{max-width:64px;white-space:normal;line-height:1.1}.game-header-actions>.game-editor-button{padding:0 6px}}

@media(max-width:760px){.game-header{min-height:132px}.game-header-actions{flex-wrap:wrap;row-gap:6px}.game-help{top:142px;max-width:calc(100vw - 24px)}.game-call-strip{top:198px}.game-people-panel{top:140px}.game-header-actions .game-editor-button{font-size:10px}.game-voice-controls{gap:4px}}

/* Keep the world title in the space remaining between navigation and actions. */
@media(min-width:761px){
  .game-header{justify-content:flex-start;gap:16px}
  .game-header>.game-exit-button,.game-header>.game-header-actions{position:static;flex-shrink:0}
  .game-header>.game-server-hud{flex:1;overflow:hidden;text-align:left;max-width:none}
  .game-server-hud strong,.game-server-hud small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
}
@media(max-width:760px){.game-header>.game-server-hud{display:none!important}}

.capture-error{padding:12px;border:1px solid #cf7f7f;border-radius:8px;background:#572b32;color:#fff;white-space:pre-wrap;overflow-wrap:anywhere;user-select:text;font-size:13px;line-height:1.5}

.message-file-card{display:flex;align-items:center;gap:14px;width:min(430px,100%);min-width:0;padding:14px 16px;border:1px solid #3b4254;border-radius:12px;background:#202633;box-sizing:border-box}
.message-file-icon{position:relative;flex:0 0 40px;width:40px;height:48px;color:#a2b7ff}.message-file-icon svg{display:block;width:40px;height:48px}.message-file-icon b{position:absolute;bottom:7px;left:0;right:0;text-align:center;font-size:9px;letter-spacing:.4px}.file-kind-archive .message-file-icon{color:#e9bb6c}.file-kind-pdf .message-file-icon{color:#ef929b}.file-kind-sheet .message-file-icon{color:#83d7ab}.file-kind-audio .message-file-icon{color:#c6a4ef}.file-zipper{position:absolute;top:6px;left:15px;width:7px;height:19px;background:repeating-linear-gradient(0deg,currentColor 0 2px,transparent 2px 4px)}
.message-file-details{flex:1;min-width:0}.message-file-details strong{display:block;color:#eff2fa;font-size:14px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.message-file-details small{display:block;margin-top:5px;color:#a9b4c7;font-size:12px}.message-file-download{display:inline-flex;align-items:center;justify-content:center;gap:6px;flex-shrink:0;padding:9px 11px;border:1px solid #5364a1;border-radius:8px;background:#303d6a;color:#e5eaff!important;text-decoration:none!important;font-size:12px;font-weight:700}.message-file-download svg{width:16px;height:16px}.message-file-download:hover{background:#40528d;border-color:#8899dc}.message-file-download:focus-visible{outline:2px solid #a2b7ff;outline-offset:3px}
@media(max-width:480px){.message-file-card{gap:10px;padding:12px}.message-file-download{padding:9px}.message-file-details small{font-size:11px}}
