#arcChatButton[hidden],#arcChatPanel[hidden]{display:none!important}
#arcChatButton{position:fixed;z-index:21002;top:10px;left:160px;width:42px;height:36px;display:grid;place-items:center;border:1px solid #d8b36699;border-radius:13px;background:linear-gradient(140deg,#273447,#161026);color:#f4d696;box-shadow:0 0 16px #88d9ec22;cursor:pointer}
#arcChatPanel{position:fixed;z-index:22000;right:12px;top:12px;bottom:12px;width:min(380px,calc(100vw - 24px));box-sizing:border-box;display:flex;flex-direction:column;gap:8px;min-height:0;padding:16px;border:1px solid #d8b36688;border-radius:18px;color:#e9eef5;background:radial-gradient(ellipse at top left,#173642,#0c0b19 70%);box-shadow:0 18px 65px #000b;font:13px/1.4 system-ui,sans-serif;overflow:auto;touch-action:pan-y}
#arcChatPanel *{box-sizing:border-box;min-width:0}#arcChatPanel header{display:flex;justify-content:space-between;align-items:center;flex:none}#arcChatPanel h2{font:26px Georgia,serif;margin:2px 0;color:#f0d594}#arcChatPanel small{font-size:9px;letter-spacing:.17em;color:#90dfe8}#arcChatPanel button{border:1px solid #bfa56c66;border-radius:9px;background:#1c2638;color:#f1d596;padding:8px 11px;cursor:pointer;min-height:36px}#arcChatPanel button:disabled{opacity:.5;cursor:wait}#arcChatPanel [data-close]{font-size:24px;padding:0 10px}#arcChatPanel .arc-chat-note{font-size:11px;color:#a5b6c8;margin:0}#arcChatPanel .arc-chat-messages{flex:1 1 100px;min-height:70px;overflow:auto;overscroll-behavior:contain;touch-action:pan-y}#arcChatPanel article{padding:9px 11px;border:1px solid #80c8de22;background:#03091766;border-radius:10px;margin:0 0 8px;overflow-wrap:anywhere}#arcChatPanel article b{color:#8dd6e5;font-size:11px;display:block}#arcChatPanel article p{margin:4px 0;white-space:pre-wrap}#arcChatPanel audio{display:block;width:100%;height:36px;margin:6px 0}#arcChatPanel form{flex:none}#arcChatPanel textarea{width:100%;resize:none;font:16px/1.3 system-ui,sans-serif;background:#050c17;color:#fff;border:1px solid #83b9c755;border-radius:9px;padding:9px}#arcChatPanel .arc-chat-actions{display:flex;justify-content:space-between;gap:8px;margin-top:5px}#arcChatPanel [type=submit]{background:linear-gradient(#eac875,#ac7c30);color:#20170a;font-weight:800}#arcChatPanel .arc-chat-status{font-size:11px;color:#efd09a;margin:0}#arcChatPanel .arc-chat-voice[hidden]{display:none}#arcChatPanel :focus-visible,#arcChatButton:focus-visible{outline:2px solid #95e7f7;outline-offset:2px}@media(max-height:500px){#arcChatPanel{padding:10px;gap:5px;width:min(360px,70vw)}#arcChatPanel h2{font-size:20px}#arcChatPanel textarea{height:40px}#arcChatPanel .arc-chat-note{font-size:10px}}

/* ARCANIS_CHAT_POSITION_BUILD:1214 — same right edge as Q, 8px below. */
#arcChatButton {
  top:auto;left:auto;right:max(12px,env(safe-area-inset-right,0px));
  bottom:calc(max(70px,calc(env(safe-area-inset-bottom,0px) + 58px)) - 64px);
  width:56px;height:56px;border-radius:50%;
  background:radial-gradient(circle at 40% 30%,#476671,#18152e 65%,#0d1320);
  box-shadow:0 0 18px #cfb46c38,inset 0 0 16px #c8e2e52a;
}
@media(max-width:1099px) {
  #arcChatButton {right:max(9px,env(safe-area-inset-right,0px));
    bottom:calc(max(62px,calc(env(safe-area-inset-bottom,0px) + 54px)) - 52px);
    width:44px;height:44px;}
}

/* ARCANIS_CHAT_FULLSCREEN_BUILD:1215 — controls belong to #game. */
#game #arcChatButton {position:absolute;bottom:max(70px,calc(env(safe-area-inset-bottom,0px) + 58px));z-index:21002}
#game #arcQuestHud {bottom:calc(max(70px,calc(env(safe-area-inset-bottom,0px) + 58px)) + 64px)!important}
#game #arcChatPanel {position:absolute}
#arcChatPanel form[hidden] {display:none!important}
@media(max-width:1099px){
 /* Compact controls stay above the card action bar. */
 #game #arcChatButton {bottom:max(62px,calc(env(safe-area-inset-bottom,0px) + 54px));width:44px;height:44px;padding:0}
 #game #arcQuestHud {bottom:calc(max(62px,calc(env(safe-area-inset-bottom,0px) + 54px)) + 52px)!important}
 #game #arcChatPanel {top:8px;bottom:8px;right:max(9px,env(safe-area-inset-right,0px));width:min(340px,calc(100% - 18px));max-height:calc(100% - 16px);padding:10px;gap:5px}
}

/* ARCANIS_CHAT_MAGIC_BUILD:1218 — decorative layers never move the controls. */
#game #arcChatButton[data-unread]{border-color:#ffe3a2;color:#e1fcff;box-shadow:0 0 12px #96edff,0 0 27px #a678ed88,inset 0 0 15px #f7d89166;animation:arcChatAwaken 1.5s ease-in-out 3}
#game #arcChatButton[data-unread]::before{content:'';position:absolute;inset:-5px;border:1px dashed #b3f3ff;border-top:2px solid #ffe7a8;border-radius:50%;pointer-events:none;animation:arcChatOrbit 6s linear infinite}
#game #arcChatButton[data-unread]::after{content:attr(data-unread);position:absolute;right:-3px;top:-5px;min-width:17px;height:17px;padding:0 3px;box-sizing:border-box;display:grid;place-items:center;border:1px solid #fff0c6;border-radius:20px;background:#e7c27b;color:#201226;font:800 10px/1 system-ui;pointer-events:none}
@keyframes arcChatAwaken{50%{box-shadow:0 0 20px #aff5ff,0 0 36px #caa1fcaa,inset 0 0 20px #f7d89188}}
@keyframes arcChatOrbit{to{transform:rotate(360deg)}}
@media(prefers-reduced-motion:reduce){#game #arcChatButton[data-unread],#game #arcChatButton[data-unread]::before{animation:none}}

/* V12.59: personal mute and reports; the composer and voice controls stay intact. */
#arcChatPanel .arc-chat-message-tools{display:flex;gap:8px;justify-content:flex-end;flex-wrap:wrap;margin:3px 0 6px}
#arcChatPanel .arc-chat-message-tools button{padding:4px 8px;border:1px solid #ffd38738;border-radius:6px;background:#131019;color:#cdbb9f;font:700 10px/1.3 system-ui;cursor:pointer}
#arcChatPanel .arc-chat-message-tools button[aria-pressed=true]{color:#ffe3ad;border-color:#ffd38780}
#arcChatPanel .arc-chat-muted-note{font-size:11px;color:#ad9da7}
#arcChatPanel .arc-chat-report-box{padding:12px;margin-top:8px;border:1px solid #ffd38755;border-radius:10px;background:#100c19}
#arcChatPanel .arc-chat-report-box label{display:block;margin:7px 0;color:#e6cfaa;font-size:11px}
#arcChatPanel .arc-chat-report-box select,#arcChatPanel .arc-chat-report-box input{display:block;width:100%;min-width:0;margin-top:5px;padding:8px;color:#f3e3cd;background:#08090e;border:1px solid #ffd38740;border-radius:6px;font:14px system-ui}
#arcChatPanel .arc-chat-report-box p{font-size:11px;line-height:1.5;color:#b8a7b5}
#arcChatPanel .arc-chat-report-box button{margin:4px;padding:8px;border:1px solid #ffd38760;background:#2a1a23;color:#ffe1a5;border-radius:6px;font:700 10px system-ui;cursor:pointer}
