html[data-mobile-client=true] body #screen #chat-toggle.mobile-chat-toggle{top:max(80px,calc(var(--presence-bottom,48px) + 8px));left:8px;right:auto;bottom:auto;min-width:48px;min-height:32px;padding:6px 10px;border:1px solid #9cccb957;border-radius:20px;background:#082b29d9;color:#edf9eb;font:600 11px/1 system-ui;box-shadow:0 3px 10px #00181440;z-index:46;touch-action:manipulation;}
html[data-mobile-client=true] body #screen .mobile-chat{position:fixed;inset:auto max(8px,env(safe-area-inset-right)) auto auto;top:calc(var(--chat-viewport-top,0px) + max(8px,env(safe-area-inset-top)));width:min(380px,calc(100vw - 16px));height:min(510px,calc(var(--chat-viewport-height,100dvh) - 16px - env(safe-area-inset-top) - env(safe-area-inset-bottom)));max-width:none;max-height:none;box-sizing:border-box;margin:0;padding:0;display:flex;flex-direction:column;gap:0;overflow:hidden;z-index:1900;border:1px solid #8fbaa95c;border-radius:18px;background:linear-gradient(145deg,#0d302df5,#061b20fa);box-shadow:0 12px 45px #0008;backdrop-filter:blur(16px);color:#f1f9ef;transform:none;font:13px/1.4 system-ui;text-shadow:none;}
html[data-mobile-client=true] body #screen .mobile-chat[hidden]{display:none!important;}
html[data-mobile-client=true] body #screen .mobile-chat{pointer-events:auto;opacity:1;background:linear-gradient(145deg,#0d302df5,#061b20fa)!important;border:1px solid #8fbaa95c!important;box-shadow:0 12px 45px #0008!important;}
html[data-mobile-client=true] body #screen #mobile-chat{border-radius:18px!important;}
html[data-mobile-client=true] body #screen #mobile-chat,html[data-mobile-client=true] body #screen #mobile-chat *{font-family:Arial,sans-serif!important;text-shadow:none;}
html[data-mobile-client=true] body #screen #mobile-chat :is(input,select){background:#12332f!important;color:#f5ffed!important;border:1px solid #729c895e!important;border-radius:10px!important;box-shadow:none!important;}
html[data-mobile-client=true] body #screen #mobile-chat button{border-radius:10px!important;}
html[data-mobile-client=true] body #screen .mobile-chat header{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:8px 12px;border-bottom:1px solid #d9eaca18;flex:none;}
html[data-mobile-client=true] body #screen .mobile-chat header strong{font:700 15px system-ui;letter-spacing:.2px;}
html[data-mobile-client=true] body #screen .mobile-chat button{min-height:38px;min-width:40px;padding:7px 11px;border:1px solid #b0d1b747;border-radius:11px;background:#295a47;color:#f5ffe6;box-shadow:none;font:600 13px/1.1 system-ui;touch-action:manipulation;}
html[data-mobile-client=true] body #screen .mobile-chat header button{background:#ffffff0c;}
html[data-mobile-client=true] body #screen .mobile-chat #chat-log{display:block;flex:1;min-height:0;height:auto;max-height:none;overflow:auto;overscroll-behavior:contain;padding:8px 12px;margin:0;font:13px/1.45 system-ui;scrollbar-width:thin;}
html[data-mobile-client=true] body #screen .mobile-chat #chat-log p{margin:0;padding:7px 0;border-bottom:1px solid #ffffff08;overflow-wrap:anywhere;white-space:normal;color:#e0efdf;}
html[data-mobile-client=true] body #screen .mobile-chat #chat-log p>span{color:#f0d18b;font-weight:650;}
html[data-mobile-client=true] body #screen .mobile-chat .mobile-chat-empty{position:absolute;top:40%;left:16px;right:16px;color:#afc8bb;text-align:center;pointer-events:none;margin:0;}
html[data-mobile-client=true] body #screen .mobile-chat form{display:grid!important;grid-template-columns:1fr;gap:7px;position:static;flex:none;margin:0;padding:10px 12px;border-top:1px solid #d9eaca18;background:#071c20;}
html[data-mobile-client=true] body #screen .mobile-chat :is(input,select){box-sizing:border-box;width:100%;min-width:0;min-height:38px;padding:8px 10px;border:1px solid #729c895e;border-radius:10px;background:#12332f;color:#f5ffed;font:400 16px/1.2 system-ui;}
html[data-mobile-client=true] body #screen .mobile-chat select{max-width:160px;font-size:13px;}
html[data-mobile-client=true] body #screen .mobile-chat input::placeholder{color:#9db7a9;}
html[data-mobile-client=true] body #screen .mobile-chat [hidden]{display:none!important;}
html[data-mobile-client=true] body #screen #mobile-chat #chat-form :is(input,select){width:100%;min-width:0;height:auto;margin:0;font:400 16px/1.2 system-ui;}
html[data-mobile-client=true] body #screen #mobile-chat #chat-form select{max-width:160px;font-size:13px;}
html[data-mobile-client=true] body #screen #mobile-chat #chat-form button{width:auto;min-width:54px;font:600 13px/1.1 system-ui;margin:0;}
html[data-mobile-client=true] body #screen .mobile-chat .mobile-chat-compose{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:7px;}
html[data-mobile-client=true] body #screen .mobile-chat .chat-feedback{margin:0;padding:0 12px 8px;color:#ffd7ab;font:12px system-ui;background:#071c20;}
html[data-mobile-client=true] body #screen .mobile-chat .chat-feedback:empty{display:none;}
html[data-mobile-client=true] body.mobile-chat-open #touch-controls{visibility:hidden;pointer-events:none;}
html[data-mobile-client=true] body #screen:has(:is(#dialog,#cinematic,#campaign-scene,#companion-chat):not([hidden])) #chat-toggle{visibility:hidden;}
@media(orientation:landscape){html[data-mobile-client=true] body #screen .mobile-chat{width:min(430px,54vw);height:calc(var(--chat-viewport-height,100dvh) - 16px - env(safe-area-inset-top) - env(safe-area-inset-bottom));border-radius:14px;}html[data-mobile-client=true] body #screen .mobile-chat header{padding:5px 10px;}html[data-mobile-client=true] body #screen .mobile-chat form{padding:7px 10px;grid-template-columns:minmax(0,1fr) minmax(0,1fr);}html[data-mobile-client=true] body #screen .mobile-chat .mobile-chat-compose{grid-column:1/-1;}}
