/* Registered-friend panel and group conversation. */
.friend-chat-windows{position:fixed;right:12px;bottom:12px;z-index:45;display:flex;align-items:flex-end;gap:12px;max-width:calc(100vw - 24px);overflow-x:auto;pointer-events:none;padding:4px}.friend-chat-window{pointer-events:auto;flex:0 0 min(420px,calc(100vw - 40px));width:min(420px,calc(100vw - 40px));max-height:calc(100dvh - 110px);border:2px solid #91a97b;border-radius:12px;background:#fffef8;color:#293f31;box-shadow:0 12px 36px #152d2940;overflow:hidden}.friend-chat-window.is-minimized{flex-basis:220px;width:220px}.friend-chat-window-bar{display:flex;align-items:center;gap:6px;background:#2d4e40;color:#fffde9;padding:8px 12px}.friend-chat-window-bar strong{flex:1;min-width:0;overflow-wrap:anywhere;font-size:15px}.friend-chat-window-bar button{min-width:36px;min-height:36px;font-size:24px;color:inherit}.friend-chat-window-body{max-height:calc(100dvh - 170px);overflow:auto;padding:14px}.friend-chat-window .friends-chat-heading{gap:8px;padding:0}.friend-chat-window .friends-chat-heading h2{font-size:21px;overflow-wrap:anywhere}.friend-chat-window .chat-message-log{height:180px;min-height:100px}.friend-chat-window .chat-leave{align-items:flex-start;flex-direction:column}.chat-group-name{display:flex;align-items:end;gap:8px;margin:12px 0}.chat-group-name .field{flex:1;min-width:0;margin:0}.chat-group-name input{width:100%;min-width:0}.chat-group-name button{font-size:12px;padding:8px;min-height:40px}.chat-deck-choice{margin:8px 0}.chat-deck-choice select{min-height:40px}.friend-chat-window .friends-chat-heading>.primary{padding:8px;font-size:13px}@media(max-height:700px){.friend-chat-window .chat-message-log{height:120px}.friend-chat-window-body{max-height:calc(100dvh - 130px)}}
.friends-block{padding:18px 0;border-top:1px solid #dce3cd;border-bottom:1px solid #dce3cd;margin:4px 0}
.friends-heading{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:12px}.friends-heading h3{margin:0;font-size:clamp(16px,calc(16px * var(--font-scale,1)),22px)}.friends-count{border-radius:20px;min-width:27px;padding:3px 8px;text-align:center;background:#e8edde;color:#3b5741;font-size:13px}
.friend-find-form .field{margin:0 0 8px}.friend-find-form input{min-width:0;width:100%;font-size:14px;padding:10px}.friend-find-form .secondary,.friends-block>.primary,.friends-block>.secondary{font-size:14px;min-height:42px;padding:8px 12px}
.friends-block .fine{font-size:12px;line-height:1.45;margin:9px 0}.friends-service-note{font-size:12px;line-height:1.45;border-left:3px solid #b49853;padding:8px 10px;background:#f6f1e4;color:#626c56;margin:10px 0}
.friends-scroll{max-height:250px;overflow:auto;margin:12px 0}.friend-list-row{display:flex;align-items:center;gap:8px;padding:10px 0;border-bottom:1px solid #e4e8db}.friend-select{display:flex;align-items:center;gap:9px;flex:1;min-width:0;cursor:pointer}.friend-select input{width:18px;height:18px;accent-color:#315c43;flex:none}.friend-select strong{display:block;font-size:14px;overflow-wrap:anywhere}.friend-select small{display:flex;align-items:center;gap:5px;font-size:12px;margin-top:3px}.friend-select i,.chat-member i{display:inline-block;flex:none;width:7px;height:7px;background:#9b9f93;border-radius:50%}.is-active .friend-select small,.chat-member.is-active{color:#326342}.is-active .friend-select i,.chat-member.is-active i{background:#3d8551}.is-inactive .friend-select small{color:#7e8377}.friend-remove{font-size:24px;min-width:36px;min-height:36px;border-radius:6px;color:#965741}.friend-remove:hover{background:#f7eae4}.friends-empty,.chat-empty{font-size:13px;text-align:center;padding:18px 6px;color:#7a8672}
.friend-selection-count{font-size:13px;font-weight:700;margin:12px 0 4px}.friend-lookup-matches{background:#f0f3e7;padding:10px;border-radius:8px}.friend-lookup-matches>p{font-size:12px;margin:0 0 6px}.friend-match{display:flex;justify-content:space-between;align-items:center;gap:8px;width:100%;padding:9px 3px;border-bottom:1px solid #d7dfc9;text-align:left;font-size:13px;overflow-wrap:anywhere}.friend-match strong{font-size:11px;flex:none}
.modal:has(.friends-chat){width:min(820px,calc(100vw - 28px));max-width:820px;max-height:calc(100dvh - 24px);padding:20px 24px;overflow:auto}.friends-chat{min-height:0}.friends-chat-heading{display:flex;align-items:center;justify-content:space-between;gap:14px}.friends-chat-heading h2{font-size:24px;margin:0}.friends-chat-heading .eyebrow{font-size:10px;margin:0 0 7px}.friends-chat-heading>.primary{flex:none;min-height:42px;padding:9px 16px;font-size:14px}.chat-participants{display:flex;flex-wrap:wrap;gap:6px;padding:12px 0}.chat-member{display:flex;align-items:center;gap:5px;font-size:11px;border:1px solid #dce4cf;border-radius:16px;padding:5px 8px;background:#f4f6ed;overflow-wrap:anywhere}.chat-member.is-inactive{color:#777e6c}.chat-message-log{height:clamp(140px,30dvh,300px);overflow:auto;overscroll-behavior:contain;border:1px solid #dce3ce;border-radius:10px;background:#f1f4e9;padding:12px;display:flex;flex-direction:column;gap:10px}.chat-message{align-self:flex-start;max-width:86%;border:1px solid #dce3d2;border-radius:10px;background:#fffefa;padding:9px 12px;min-width:120px}.chat-message.own-message{align-self:flex-end;background:#dfebd6;border-color:#b9ccac}.chat-message>div{display:flex;align-items:center;gap:12px;justify-content:space-between}.chat-message strong{font-size:12px;overflow-wrap:anywhere}.chat-message time{font-size:10px;color:#7d8774;white-space:nowrap}.chat-message p{white-space:pre-wrap;overflow-wrap:anywhere;margin:5px 0 0;font-size:14px;line-height:1.5}.chat-composer{margin-top:12px}.chat-composer textarea{resize:vertical;min-height:68px;max-height:140px;width:100%;border:1px solid #aab89a;border-radius:8px;padding:10px 12px;background:#fffefa;font:inherit;font-size:14px;color:#293f31}.chat-composer-actions{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:8px}.chat-composer-actions button{min-height:40px;font-size:14px;padding:7px 14px}.chat-emoji-picker{display:flex;flex-wrap:wrap;gap:4px;padding:8px;background:#f4f0e0;border:1px solid #ded8c2;border-radius:8px;margin-top:8px}.chat-emoji-picker button{min-height:36px;min-width:36px;font-size:23px;border-radius:5px}.chat-emoji-picker button:hover{background:#e2e8d4}
@media(max-width:600px){.modal:has(.friends-chat){padding:16px}.friends-chat-heading{align-items:flex-start}.friends-chat-heading h2{font-size:21px}.friends-chat-heading>.primary{padding:8px 10px;font-size:12px}.chat-message{max-width:94%}.chat-participants{max-height:100px;overflow:auto}.chat-message-log{height:26dvh}}
.friend-demo-controls{display:flex;flex-wrap:wrap;justify-content:space-between;gap:8px;margin-top:10px}.friend-demo-controls button{font-size:12px;font-weight:700;min-height:36px}.friend-recent{margin:14px 0}.friend-recent h4{font-size:13px;margin:0 0 7px}.friend-recent button{font-size:12px;margin:6px 0;text-align:left;overflow-wrap:anywhere}.friend-activity-list{max-height:50dvh;overflow:auto}.friend-activity-list label{padding:9px 0;border-bottom:1px solid #dce3ce}.friend-activity-list small{display:block;font-size:12px;color:#6e7b64;margin-top:4px}.modal:has(.friends-chat)>.back{margin-bottom:10px}.modal:has(.friends-block){width:min(600px,calc(100vw - 28px));max-height:calc(100dvh - 24px);overflow:auto}.friends-block .friends-service-note{font-size:12px}.friends-chat .form-error{margin:7px 0}.friends-chat-heading{padding-right:15px}

.chat-leave{display:flex;align-items:center;justify-content:space-between;gap:12px;border-top:1px solid #dce3ce;margin-top:12px;padding-top:10px}.chat-leave .fine{font-size:12px;line-height:1.45;margin:0}.chat-leave-button{color:#945039;min-height:42px;white-space:nowrap;font-size:14px;padding:8px 14px}.chat-departures{font-size:12px;color:#786a4b;max-height:70px;overflow:auto;margin-bottom:8px}.chat-departures p{margin:4px 0}.modal:has(.friends-chat) .chat-message-log{height:clamp(110px,24dvh,240px)}@media(max-width:600px){.chat-leave{align-items:flex-start;flex-direction:column}.chat-leave-button{width:100%}}

.friend-request-section{margin:12px 0;max-height:300px;overflow:auto}.friend-request-section h4{font-size:13px;margin:0 0 8px}.friend-request-card{border:1px solid #d6d9be;background:#f8f5e8;border-radius:8px;padding:10px;margin:8px 0;overflow-wrap:anywhere}.friend-request-card>strong{display:block;font-size:14px}.request-status{display:inline-block;font-size:11px;color:#715811;background:#ede2b7;border-radius:12px;padding:3px 7px;margin-top:5px;font-weight:700}.request-status.declined{background:#ede5df;color:#885447}.friend-request-card p{font-size:12px;line-height:1.45;margin:7px 0}.friend-request-actions{display:flex;flex-wrap:wrap;gap:5px}.friend-request-actions button{font-size:11px;min-height:32px;padding:5px 8px}.friend-request-actions .inline-link{margin:0}.friend-message-preview{border:1px solid #d9dfca;border-radius:8px;background:#f3f5eb;padding:18px;font-size:15px;line-height:1.6}

.friend-request-card>strong{font-size:clamp(14px,calc(14px * var(--font-scale,1)),20px)}.friend-request-card p,.friend-request-actions button{font-size:clamp(12px,calc(12px * var(--font-scale,1)),17px)}.friend-request-actions button{min-height:36px}

.chat-composer-actions{flex-wrap:wrap}.friends-chat .game-voice-preview{margin-top:10px;border:1px solid #d5ddc9;border-radius:8px;padding:12px;font-size:13px}.friends-chat .game-voice-preview button{font-size:13px;min-height:40px;padding:8px 12px}

.chat-invite-actions{display:flex;flex-wrap:wrap;gap:12px}.chat-invite-actions button{min-height:48px;font-weight:700}.chat-invitation-status{padding:10px 12px;border:1px solid #dce3ce;border-radius:8px;margin:8px 0;font-size:12px;max-height:130px;overflow:auto}.chat-invitation-status p{margin:5px 0}.chat-invitations{margin:14px 0}.chat-invitations button{margin:6px 0}

.friend-list-row.is-pending{border:1px solid #ddd5b4;border-radius:8px;background:#f8f5e8;padding:12px;margin-bottom:8px}.friend-pending-detail{min-width:0;width:100%}.friend-pending-detail>strong{display:block;font-size:14px;overflow-wrap:anywhere}.friend-pending-detail p{font-size:12px;line-height:1.5;margin:7px 0}.friend-list-summary{font-weight:700;color:#735c23}
