/* Private communications: clear identities, quiet chrome and readable dispatches. */
.allianceChat{--chat-gold:#e8cc92;--chat-ink:#10272e;--chat-line:#809e972e;gap:12px;height:min(690px,calc(100dvh - 190px));min-height:340px}
.allianceChat [hidden]{display:none!important}
.allianceChat .chatRoomPicker label{font-size:10px;letter-spacing:.08em;color:#a9c1b9}.allianceChat .chatRoomPicker select{background:#132c35;border-color:var(--chat-line);border-radius:12px;font-size:13px}
.allianceChat .chatHeading{display:flex;flex-direction:row;align-items:center;gap:13px;padding:14px 13px;border:1px solid #a7b6a32e;border-radius:16px;background:linear-gradient(120deg,#32463f80,#19333d);position:relative;flex-shrink:0;overflow:hidden}
.chatPeerIdentity{display:flex;flex-direction:column;gap:5px;min-width:0;flex:1}.chatPeerIdentity .chatChannelLabel{font-size:8px;letter-spacing:1.3px;font-weight:800;color:#c7b389}.chatPeerIdentity>b{font:750 17px/1.2 Manrope,system-ui;color:#f4f0e3;overflow-wrap:anywhere}.chatPeerIdentity>small:last-child{font-size:10px;color:#b5c9c4;line-height:1.4}.chatChannelSeal{display:grid;place-items:center;width:28px;height:32px;border:1px solid #9ab3a328;border-radius:9px;color:#c4cfae;flex-shrink:0}.chatChannelSeal svg{width:15px;height:15px;stroke:currentColor;stroke-width:1.4}.allianceChat .chatPrivacy{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
.allianceChat .chatRank{position:relative;display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;isolation:isolate;overflow:visible}
.allianceChat .chatRank .rank-insignia{box-sizing:border-box;width:34px;min-width:34px;height:47px;min-height:47px;border-radius:6px;padding:2px;border:1px solid #bfa56caa;background:linear-gradient(145deg,#465444,#172e2b);box-shadow:inset 0 0 0 2px #b4b18310,0 3px 7px #08191d3d;color:#ecd39b}
.allianceChat .chatRank .rank-insignia.service-air{background:linear-gradient(145deg,#3c5969,#122c3b);border-color:#a2c6d4a8;color:#d2e7ef}.allianceChat .chatRank .rank-insignia.service-navy{background:linear-gradient(145deg,#31465d,#0b1c2d);border-color:#c5af7caa}
.allianceChat .chatRank .rank-general{border-color:#f3d496;box-shadow:inset 0 0 0 2px #efd18c19,0 3px 8px #071b2540}.allianceChat .chatRank .shoulderSeam{stroke-opacity:.18}.allianceChat .chatRank .rankDevice{filter:drop-shadow(0 1px .5px #03151b)}
.allianceChat .chatRank:after{content:attr(data-flag);position:absolute;right:-5px;bottom:-3px;font-size:12px;line-height:15px;padding:0 2px;background:#173039;border:1px solid #8ca09377;border-radius:4px;box-shadow:0 2px 4px #03131755}.allianceChat .chatRank[data-flag=""]:after{display:none}
.allianceChat .chatPeerRank .rank-insignia{width:42px;min-width:42px;height:57px;min-height:57px;border-radius:7px;padding:3px}.allianceChat .chatPeerRank:after{font-size:14px;line-height:18px;right:-5px;bottom:-2px}
.allianceChat .chatThread{gap:13px;padding:6px 4px 8px 0;scroll-padding:10px;min-height:110px;border-top:1px solid var(--chat-line);scrollbar-color:#718e7c66 transparent}
.allianceChat .chatBubble{max-width:92%;min-width:155px;border:1px solid #839c9e38;border-radius:16px 16px 16px 5px;padding:12px 13px;background:linear-gradient(150deg,#29434c,#213b43);box-shadow:0 3px 10px #071d2317}
.allianceChat .chatBubble.mine{background:linear-gradient(135deg,#3e5145,#2e473d);border-color:#b5c79b3d;border-radius:16px 16px 5px 16px}
.allianceChat .chatBubble header{gap:12px;align-items:center;padding-bottom:10px;border-bottom:1px solid #b9d0bf16}.allianceChat .chatBubble header>b{display:flex;align-items:center;gap:11px;font-size:12px;font-weight:750;line-height:1.35;color:#e6eee7;min-width:0}.allianceChat .chatBubble.mine header>b{color:#f1e8cf}.allianceChat .chatAuthorName{min-width:0;overflow-wrap:anywhere;line-height:1.4}.allianceChat .chatBubble time{font-size:10px;color:#b1c3bd;font-variant-numeric:tabular-nums;letter-spacing:.02em}.allianceChat .chatBubble p{font-size:14px;line-height:1.65;letter-spacing:.005em;margin:10px 0 0;color:#f1f5ed}
.allianceChat .chatEmpty{border:1px dashed #9ab19c40;border-radius:14px;background:#a6be9e05;max-width:270px;font-size:13px;line-height:1.7;padding:22px}
.allianceChat .chatPlanning{max-height:220px;flex-shrink:0}.allianceChat .chatPlanning details{border-color:#96aaa337;border-radius:12px;background:#18343d;margin-bottom:7px;padding:7px 11px}.allianceChat .chatPlanning summary{font-size:11px;min-height:32px;color:#dce9dd}.allianceChat .rallyCard{background:linear-gradient(110deg,#42503b80,#1b373f);border-color:#c5b98150}.allianceChat .chatPlanning summary small{font-size:10px;color:#d8c797}.allianceChat .chatPlanning button{border-radius:10px;background:#335548;font-size:11px}.allianceChat .rallyReady .ready{color:#c8e5b7}
.allianceChat form{border-top:1px solid #91a89b38;padding-top:12px;flex-shrink:0}.allianceChat form>label{font-size:10px;letter-spacing:.03em;color:#c2d3c7;font-weight:650;margin-bottom:7px}.allianceChat textarea{background:#102a33;border:1px solid #91afa459;border-radius:13px;padding:11px 13px;color:#f1f3e9;box-shadow:inset 0 2px 6px #071e2528;min-height:64px;max-height:100px;line-height:1.5}.allianceChat textarea::placeholder{color:#8ca69e}.allianceChat textarea:focus{border-color:#cfbf88;outline:2px solid #c8bc8240;outline-offset:2px}.allianceChat .chatComposeFooter{margin-top:9px;gap:10px}.allianceChat .chatComposeFooter small{font-size:10px;color:#a8c1b3}.allianceChat .chatComposeFooter button{min-width:88px;padding:11px 19px;min-height:44px;border:1px solid #f3dda677;border-radius:12px;background:linear-gradient(135deg,#efd59b,#c6a86d);color:#22362e;font-size:12px;font-weight:800;box-shadow:inset 0 1px #fff5,0 3px 9px #071b2329}.allianceChat .chatComposeFooter button:disabled{opacity:.45;box-shadow:none}.allianceChat #chatSendStatus{font-size:9px;margin-top:6px;color:#a8bdb2}.allianceChat .chatRetention{text-align:center;font-size:9px;color:#a1b7ad}.allianceChat .chatNewMessages{align-self:center;min-width:150px;border-radius:24px;font-size:11px;background:#dec48d;color:#243c33;box-shadow:0 3px 12px #06191e33}
@media(max-width:350px){.allianceChat{gap:10px}.allianceChat .chatHeading{padding:11px;gap:11px}.chatPeerIdentity>b{font-size:15px}.chatChannelSeal{display:none}.allianceChat .chatBubble{max-width:94%;padding:11px 12px}.allianceChat .chatBubble header>b{font-size:11px;gap:9px}.allianceChat .chatBubble p{font-size:13px}.allianceChat .chatRank .rank-insignia{width:31px;min-width:31px;height:43px;min-height:43px}.allianceChat .chatPeerRank .rank-insignia{width:38px;min-width:38px;height:52px;min-height:52px}.chatPeerIdentity .chatChannelLabel{font-size:7px;letter-spacing:1px}}
@media(max-height:650px){.allianceChat{height:auto;min-height:0}.allianceChat .chatThread{height:190px;flex:none}.allianceChat .chatHeading{display:flex;padding:9px 11px}.allianceChat .chatPeerRank .rank-insignia{width:31px;min-width:31px;height:43px;min-height:43px}.chatPeerIdentity>b{font-size:14px}.chatPeerIdentity .chatChannelLabel{font-size:7px}.allianceChat .chatPlanning{max-height:150px}.allianceChat .chatRetention{display:none}.allianceChat textarea{min-height:52px}.allianceChat #chatSendStatus{min-height:13px}}

/* Conversation-first layout: compact chrome, one folded planning drawer. */
html #panel[open]:has(.allianceChat){display:flex;flex-direction:column;width:min(560px,calc(100vw - 16px));height:min(940px,calc(100dvh - 16px));max-height:calc(100dvh - 16px);padding:10px 12px;margin:auto;overflow:hidden}
html #panel:has(.allianceChat) .panelhead{flex-shrink:0;gap:10px;padding:0 0 8px;margin:0 0 6px;min-height:52px}
html #panel:has(.allianceChat) #panelTitle{font-size:19px;line-height:1.2;margin:0}
html #panel:has(.allianceChat) #panelContent{flex:1;min-height:0;padding:0;overflow:hidden}
html #panel:has(.allianceChat) .allianceChat{height:100%;min-height:0;padding:0;gap:7px;position:relative}
.allianceChat .chatHeading{gap:9px;padding:5px 7px;min-height:44px;background:#19333d66;border:0;border-radius:9px}
.chatPeerIdentity{gap:2px}.chatPeerIdentity>b{font-size:14px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.chatPeerIdentity>small:last-child{font-size:10px;line-height:1.2}
.allianceChat .chatChannelLabel,.allianceChat .chatChannelSeal,.allianceChat .chatRetention{display:none}
.allianceChat .chatPeerRank .rank-insignia{width:25px;min-width:25px;height:34px;min-height:34px;padding:1px;border-radius:5px}.allianceChat .chatPeerRank .allianceCrest{width:27px;height:34px;border-radius:6px 6px 10px 10px}.allianceChat .chatPeerRank .allianceCrest svg{width:23px;height:23px}.allianceChat .chatPeerRank .allianceCrest.decorated:after{width:13px;height:13px;line-height:12px;font-size:9px;bottom:-3px;right:-3px}.allianceChat .chatPeerRank:after{font-size:9px;line-height:12px;right:-4px;bottom:-2px}
.allianceChat .chatRoomPicker{flex-shrink:0}.allianceChat .chatRoomPicker label,.allianceChat form>label{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
.allianceChat .chatRoomPicker select{min-height:40px;padding:8px 10px;margin:0;font-size:13px}.allianceChat:has(.chatRoomPicker:not([hidden])) .chatHeading{display:none}
.allianceChat .chatPlanning{max-height:min(260px,35dvh);overflow:auto;flex-shrink:0}.allianceChat .chatPlanning .chatPlanDrawer{margin:0;padding:0;border:1px solid #96aaa32b;border-radius:9px;background:#1a343a}
.allianceChat .chatPlanDrawer>summary{display:flex;align-items:center;justify-content:space-between;gap:10px;min-height:36px;padding:7px 10px;list-style:none;font-size:11px}.allianceChat .chatPlanDrawer>summary::-webkit-details-marker{display:none}.allianceChat .chatPlanDrawer>summary:after{content:'⌄';color:#c5d6c7}.allianceChat .chatPlanDrawer[open]>summary:after{content:'⌃'}.allianceChat .chatPlanDrawer>summary small{margin-left:auto;display:inline;font-size:10px;color:#d7c391}.allianceChat .chatPlanContents{padding:0 8px 2px}.allianceChat .chatPlanContents details{margin:0 0 7px}.allianceChat .chatPlanContents .rallyCard{padding:8px 10px}.allianceChat .chatPlanContents .rallyCard>summary{min-height:30px;padding:0}
html #panel:has(.allianceChat) .chatThread,.allianceChat .chatThread{flex:1;min-height:72px;height:auto;gap:8px;padding:5px 2px 6px 0}
.allianceChat .chatBubble{padding:8px 10px;min-width:140px;max-width:94%;box-shadow:none;border-radius:12px 12px 12px 4px}.allianceChat .chatBubble.mine{border-radius:12px 12px 4px 12px}
.allianceChat .chatBubble header{gap:9px;padding-bottom:5px}.allianceChat .chatBubble header>b{gap:8px;font-size:11px}.allianceChat .chatBubble p{font-size:14px;line-height:1.5;margin:6px 0 0}.allianceChat .chatRank .rank-insignia{width:23px;min-width:23px;height:32px;min-height:32px;padding:1px;border-radius:5px}.allianceChat .chatRank:after{font-size:9px;line-height:12px;right:-4px;bottom:-2px}
.allianceChat .chatBubble.continued{margin-top:-4px;padding-top:7px;padding-bottom:7px}.allianceChat .chatBubble.continued header{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}.allianceChat .chatBubble.continued p{margin:0}
.allianceChat form{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:4px 8px;padding-top:8px;margin:0}.allianceChat textarea{grid-column:1;grid-row:1;min-height:44px;max-height:88px;height:44px;resize:none;padding:10px 11px;border-radius:11px;font-size:16px;line-height:1.35;align-self:end;overflow:auto}
.allianceChat .chatComposeFooter{display:contents}.allianceChat .chatComposeFooter button{grid-column:2;grid-row:1;align-self:end;min-width:62px;min-height:44px;padding:10px 13px;border-radius:10px;box-shadow:none}.allianceChat .chatComposeFooter small{grid-column:2;grid-row:2;text-align:right;align-self:center;font-size:10px}.allianceChat #chatSendStatus{grid-column:1;grid-row:2;min-height:0;margin:0;font-size:10px}.allianceChat #chatRetry{grid-column:1/-1;grid-row:3;margin:0}
@media(max-width:350px){html #panel[open]:has(.allianceChat){padding:8px 10px}.chatPeerIdentity>b{font-size:13px}.allianceChat .chatBubble{padding:8px 9px}.allianceChat .chatBubble p{font-size:14px}.allianceChat .chatComposeFooter button{min-width:57px;padding:10px}}

/* Keep visually hidden author/label content inside its own scrolling surface. */
.allianceChat .chatBubble,.allianceChat form,.allianceChat .chatRoomPicker{position:relative}
html #panel:has(.allianceChat) #panelContent{overflow:clip}

.chatPins{flex:0 0 auto;border-bottom:1px solid #37515a;padding:6px 14px;max-height:140px;overflow:auto;font-size:.85rem}.chatPins summary{cursor:pointer;min-height:30px;display:list-item;color:#d9d4a9}.chatPins p{white-space:pre-wrap;overflow-wrap:anywhere}.chatPins[hidden]{display:none!important}
