#modal:has(#chat-panel){width:min(980px,calc(100vw - 28px));max-width:980px;padding:22px;background:linear-gradient(140deg,#173842,#102a35);border:1px solid #a5bea34d}#chat-panel{color:#e9ebd9;--chat-linen:#e9e4cf;--chat-muted:#bdcfc3;--chat-line:#c3d2b92b}#chat-panel *{box-sizing:border-box}#chat-panel button,#chat-panel input,#chat-panel textarea,#chat-panel select{font:inherit}#chat-panel button{min-height:42px;border:1px solid #adbea34d;border-radius:9px;background:#24454a;color:#edf1df;padding:10px 14px;font-size:13px;cursor:pointer}#chat-panel button:hover{background:#315752;border-color:#d2d6ab}#chat-panel button:active{transform:translateY(1px)}#chat-panel button:disabled{opacity:.5;cursor:default;transform:none}#chat-panel button:focus-visible,#chat-panel textarea:focus-visible,#chat-panel input:focus-visible,#chat-panel select:focus-visible{outline:2px solid #e6d49d;outline-offset:3px}#chat-panel .chat-primary{background:#d9e6bb;color:#263e37;border-color:#e5edce;box-shadow:0 3px 0 #0b2026;font-weight:750}#chat-panel .chat-primary:hover{background:#edf2d4}#chat-panel h2{font-size:28px;margin:5px 0 6px;line-height:1.1}#chat-panel h3{font-size:20px;margin:0 0 10px}#chat-panel p{font-size:13px;line-height:1.6;color:var(--chat-muted)}.chat-top{display:flex;justify-content:space-between;align-items:center;gap:12px;padding-right:30px}.chat-top span{font-size:10px;letter-spacing:1.2px;color:#d0c495}.chat-top button{background:none!important;border:0!important;padding:4px 0!important;font-size:12px!important}.chat-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:18px}.chat-heading p{margin:5px 0 0}.chat-status{font-size:11px;color:#bfd2bf;text-align:right;max-width:180px}.chat-status.is-error{color:#f0c4a3}.chat-tabs{display:flex;gap:7px;padding-bottom:14px;border-bottom:1px solid var(--chat-line);margin-bottom:15px}.chat-tabs button{flex:1;display:flex;justify-content:center;align-items:center;gap:8px}.chat-tabs button[aria-selected=true]{background:#e2dec6!important;color:#223e3d!important;border-color:#eee7cc!important}.chat-icon{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0}.chat-icon svg{width:20px;height:20px}.chat-count{display:inline-grid;place-items:center;min-width:20px;height:20px;padding:0 5px;background:#274b48;color:#f5eccb;border-radius:12px;font-size:11px}.chat-tabs [aria-selected=true] .chat-count{background:#476d5b}.chat-toolbar{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:12px}.chat-toolbar p{margin:0;max-width:590px}.chat-toolbar button{flex-shrink:0}.chat-log{height:min(45vh,390px);min-height:240px;overflow:auto;overscroll-behavior:contain;scrollbar-color:#809d8b #102a34;padding:12px;border:1px solid var(--chat-line);border-radius:13px;background:linear-gradient(180deg,#0a2530,#102e36)}.chat-messages{display:flex;flex-direction:column;gap:12px}.chat-message{max-width:85%;align-self:flex-start;padding:12px 14px;background:#e6e0ca;color:#213c3d;border:1px solid #f4ebd1;border-radius:4px 14px 14px;box-shadow:0 3px 0 #071b2222}.chat-message.own{align-self:flex-end;background:#c8dbc2;border-color:#d7e5c9;border-radius:14px 4px 14px 14px}.chat-message-head{display:flex;align-items:center;gap:8px;margin-bottom:7px}.chat-message-head button{display:flex;gap:7px;align-items:center;background:none!important;border:0!important;color:#35564b!important;padding:0!important;min-height:25px!important;font-weight:750;font-size:12px!important;text-align:left}.chat-message-head time{font-size:10px;color:#5c7065;margin-left:auto;white-space:nowrap}.chat-message .chat-message-text{font-size:14px;line-height:1.55;color:#233e3e;white-space:pre-wrap;overflow-wrap:anywhere;word-break:break-word;margin:0}.chat-message-foot{display:flex;justify-content:flex-end;margin-top:6px}.chat-message-foot button{padding:2px 5px!important;min-height:25px!important;background:none!important;border:0!important;color:#60736a!important;font-size:10px!important}.chat-avatar{display:inline-grid;place-items:center;width:28px;height:28px;border-radius:50%;background:#c8d2b6;color:#34564b;flex-shrink:0}.chat-avatar svg{width:18px;height:18px}.chat-avatar.large{width:64px;height:64px;background:#dce3c5;border:1px solid #f1ead0}.chat-avatar.large svg{width:34px;height:34px}.chat-empty{min-height:210px;display:flex;flex-direction:column;justify-content:center;align-items:center;text-align:center;padding:25px}.chat-empty>.chat-icon svg{width:48px;height:48px;color:#c9c89d}.chat-empty h3{margin:14px 0 0}.chat-empty p{max-width:460px;margin:9px 0}.chat-load-more{width:100%;margin-bottom:12px}.chat-compose{margin-top:14px;padding:14px;border-radius:13px;border:1px solid #b5caa044;background:#1d3c40}.chat-compose label{display:block;font-size:12px;font-weight:700;color:#e8e3ca;margin-bottom:8px}.chat-compose textarea{width:100%;resize:vertical;min-height:76px;max-height:180px;background:#0b2832;border:1px solid #a5bfa34d;border-radius:8px;padding:12px;color:#edf0de;font-size:15px;line-height:1.5}.chat-compose-bottom{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-top:9px}.chat-compose-bottom small{font-size:10px;color:#b9cbbd;line-height:1.5}.chat-compose-bottom button{min-width:130px}.chat-pending{padding:12px 14px;margin:12px 0;border:1px solid #dac48966;background:#bf9c5320;border-radius:10px}.chat-pending p{margin:0 0 9px!important;color:#eedbb2!important}.chat-pending button{margin:0 7px 0 0}.chat-alert{padding:12px 14px;border-radius:9px;border:1px solid #ca9d7355;background:#91542a22;color:#f0d3b1;font-size:13px;line-height:1.5;margin:12px 0}.chat-notice{background:#9abf7d16;border-color:#b6ce9a55;color:#dce9c5}.chat-fine{font-size:11px!important;margin:14px 0 0!important;color:#a8bfb2!important}.chat-inbox{display:grid;gap:8px}.chat-conversation{display:flex!important;width:100%;align-items:center;text-align:left;gap:12px;padding:15px!important;background:#17343d!important}.chat-conversation:hover{background:#244a49!important}.chat-conversation-main{display:grid;gap:5px;min-width:0;flex:1}.chat-conversation-main b{font-size:14px;color:#f0e8d2}.chat-conversation-main span{font-size:12px;color:#bdcdc0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:580px}.chat-conversation-side{display:grid;gap:7px;justify-items:end}.chat-conversation-side time{font-size:10px;color:#afc3b7}.chat-profile{padding:25px;background:radial-gradient(ellipse at top,#a7c28c22,transparent 70%),#13313a;border:1px solid var(--chat-line);border-radius:15px;text-align:center}.chat-profile h3{margin:14px 0 7px}.chat-profile p{max-width:520px;margin:10px auto}.chat-profile-actions{display:flex;gap:10px;justify-content:center;flex-wrap:wrap;margin-top:18px}.chat-settings{border:1px solid var(--chat-line);border-radius:14px;padding:20px;background:#12313a}.chat-settings label{font-size:13px;font-weight:700;display:block;margin:12px 0 9px}.chat-settings select{width:100%;max-width:420px;min-height:44px;border:1px solid #b2c6a55c;border-radius:8px;background:#08242d;color:#eef0db;padding:10px 12px}.chat-settings .chat-primary{display:block;margin-top:14px}.chat-blocks{margin-top:24px;border-top:1px solid var(--chat-line);padding-top:18px}.chat-block-row{display:flex;gap:12px;justify-content:space-between;align-items:center;padding:12px 0;border-bottom:1px solid var(--chat-line)}.chat-block-row span{font-size:13px;overflow-wrap:anywhere}.chat-report{background:#2b403c;border:1px solid #cfb78688;border-radius:14px;padding:22px}.chat-report blockquote{white-space:pre-wrap;overflow-wrap:anywhere;margin:16px 0;padding:12px;border-left:3px solid #dcc28b;background:#0d2931;color:#dbe5d3;font-size:13px;max-height:180px;overflow:auto}.chat-report label{display:block;font-size:13px;margin-bottom:9px}.chat-report select{width:100%;padding:12px;background:#0d2931;color:#e9e7d4;border:1px solid #b9bc9666;border-radius:8px}.chat-report-actions{display:flex;gap:10px;margin-top:17px}.chat-report-actions button{flex:1}.chat-privacy-note{border-left:2px solid #c5bd8c;padding:9px 13px;background:#c4c38b0a;font-size:12px!important}.chat-guest-actions{display:flex;justify-content:center;gap:10px;margin-top:15px}@media(max-width:600px){#modal:has(#chat-panel){width:calc(100vw - 16px);max-width:calc(100vw - 16px);padding:16px 12px}#chat-panel h2{font-size:24px}.chat-heading{align-items:flex-start;margin-bottom:12px}.chat-status{font-size:10px;max-width:100px}.chat-top{padding-right:30px}.chat-top span{font-size:8px;letter-spacing:.8px}.chat-tabs{gap:5px;padding-bottom:10px;margin-bottom:10px}.chat-tabs button{padding:10px 7px!important;font-size:11px!important;gap:5px}.chat-tabs .chat-icon svg{width:16px;height:16px}.chat-log{height:39vh;min-height:230px;padding:9px}.chat-message{max-width:94%;padding:10px 11px}.chat-message .chat-message-text{font-size:13px}.chat-message-head time{font-size:9px}.chat-toolbar{align-items:flex-start}.chat-toolbar p{font-size:11px!important}.chat-toolbar button{padding:8px!important;font-size:11px!important}.chat-compose{padding:11px;margin-top:10px}.chat-compose textarea{font-size:16px;min-height:70px}.chat-compose-bottom{align-items:flex-end}.chat-compose-bottom button{min-width:110px;font-size:12px!important}.chat-compose-bottom small{font-size:9px}.chat-conversation{padding:12px!important;gap:9px}.chat-conversation-main span{max-width:200px}.chat-profile{padding:20px 14px}.chat-profile-actions{flex-direction:column}.chat-settings,.chat-report{padding:16px}.chat-fine{font-size:10px!important}.chat-report-actions{flex-direction:column}}
@media(prefers-reduced-motion:reduce){#chat-panel button:active{transform:none}}

/* Scoped against global modal paragraph colors; compact viewport keeps send visible. */
#chat-panel .chat-message p.chat-message-text{color:#233e3e;font-size:14px;line-height:1.55}#chat-panel button{min-height:44px}#chat-panel .chat-message-head button,#chat-panel .chat-message-foot button{min-height:44px!important}#chat-panel .chat-message-foot button{font-size:11px!important;color:#3c584e!important}.chat-log{height:clamp(160px,calc(100dvh - 490px),330px);min-height:160px}.chat-heading{margin-bottom:10px}.chat-tabs{padding-bottom:10px;margin-bottom:10px}.chat-compose{padding:10px;margin-top:10px}.chat-compose textarea{min-height:60px}.chat-fine{margin-top:8px!important}@media(max-width:600px){.chat-log{height:clamp(155px,calc(100dvh - 510px),300px);min-height:155px}#chat-panel .chat-message p.chat-message-text{font-size:13px}.chat-compose textarea{min-height:60px}}
@media(min-width:601px){.chat-log{height:clamp(150px,calc(100dvh - 555px),330px);min-height:150px}#chat-panel h2{font-size:26px}.chat-heading{margin-bottom:6px}}
@media(max-width:600px){#chat-panel .chat-heading{display:block;margin:8px 0 10px}#chat-panel .chat-heading h2{font-size:22px;line-height:1.15;letter-spacing:-.5px;margin:0 0 5px}#chat-panel .chat-heading p{font-size:12px;margin:0}#chat-panel .chat-status{display:block;max-width:none;text-align:left;font-size:10px;margin-top:4px}#chat-panel .chat-top{min-height:44px;padding-right:55px}#chat-panel .chat-top span{max-width:130px;text-align:right}#chat-panel .chat-log{height:clamp(145px,calc(100dvh - 575px),250px);min-height:145px}#chat-panel .chat-compose-bottom small{font-size:10px}#chat-panel .chat-compose label{margin-bottom:5px}#chat-panel .chat-compose textarea{min-height:55px;padding:8px 10px}#chat-panel .chat-compose-bottom{margin-top:5px}#chat-panel .chat-fine{font-size:10px!important}}
