/* Compact inbox: shared dark HUD palette, with independently scrolling panes. */
body #aux-window[data-kind=mail]{position:fixed;right:12px;left:auto;bottom:auto;display:flex;flex-direction:column;width:min(640px,calc(100vw - 24px));min-width:0;height:auto;max-height:calc(100dvh - 24px);padding:0;margin:0;border:1px solid #b69a6440;border-image:none;border-radius:12px;background:#142128;box-shadow:0 12px 36px #0006;overflow:hidden;color:#edf0ee}
body #aux-window[data-kind=mail]>.panel-heading{display:none}
body #aux-window[data-kind=mail] #aux-body{display:flex;flex-direction:column;flex:1;min-height:0;padding:0;overflow:hidden}
.mail-native{display:flex;flex-direction:column;min-width:0;min-height:0;color:#edf0ee;font:13px/1.6 Tahoma,'Segoe UI',sans-serif;background:#142128}
.mail-native *{box-sizing:border-box}
.mail-native [hidden]{display:none!important}
.mail-native button{font:inherit;color:inherit;cursor:pointer}
.mail-native button:focus-visible{outline:2px solid #e0c58f;outline-offset:-3px}
.mail-heading{display:flex;align-items:center;flex:none;gap:10px;padding:12px 14px;border-bottom:1px solid #b69a642b;background:#19282f}
.mail-heading-icon{display:grid;place-items:center;flex:none;width:34px;height:34px;border:1px solid #b69a6433;border-radius:10px;color:#e0c58f;background:#b69a6410}
.mail-heading-icon svg{width:19px;height:19px}
.mail-heading-copy{min-width:0}
.mail-heading h2{display:flex;align-items:center;gap:8px;margin:0;color:#f2ead7;font:700 15px/1.5 Tahoma,sans-serif;letter-spacing:0;text-shadow:none}
.mail-count{display:block;font-size:11px;color:#a1afb4}
.mail-tools{display:flex;align-items:center;flex:none;gap:4px;margin-left:auto}
.mail-native .mail-tools button{display:grid;place-items:center;width:30px;height:30px;min-height:30px;min-width:30px;padding:0;border:1px solid transparent;border-radius:7px;background:transparent;box-shadow:none;color:#b7c3c6;font:22px/1 Tahoma,sans-serif}
.mail-native .mail-tools button:hover{border-color:#b69a6433;background:#ffffff09;color:#fff}
.mail-columns{display:grid;grid-template-columns:220px minmax(0,1fr);gap:0;min-height:0;height:340px;overflow:hidden}
.mail-list,.mail-detail{min-width:0;min-height:0;overflow:auto;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:#51615f transparent}
.mail-list{padding:6px;border-right:1px solid #b69a6426;background:#101c22}
body .mail-native .mail-row{display:block;width:100%;min-height:64px;padding:10px;border:1px solid transparent;border-radius:7px;background:transparent;box-shadow:none;text-align:left;font:12px/1.6 Tahoma,sans-serif}
body .mail-native .mail-row+.mail-row{margin-top:3px}
body .mail-native .mail-row:hover{background:#ffffff06}
body .mail-native .mail-row[aria-pressed=true]{border-color:#b69a6440;background:#b69a6414;box-shadow:inset 2px 0 #d5b77c}
.mail-row-title{display:flex;gap:7px;align-items:flex-start;color:#dce3e3}
.mail-row-title>span{overflow:hidden;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow-wrap:anywhere}
.mail-row.is-unread .mail-row-title{font-weight:700;color:#f1e4c6}
.mail-row-title i{flex:none;width:5px;height:5px;margin-top:7px;border-radius:50%;background:transparent}
.mail-row.is-unread .mail-row-title i{background:#e0c58f}
.mail-row-meta{display:flex;flex-wrap:wrap;justify-content:space-between;gap:3px 6px;margin-top:4px;font-size:10px;color:#97a7ad}
.mail-row-reward{display:inline-block;margin:5px 0 0 12px;padding:0 5px;border-radius:4px;background:#b69a6415;font-size:10px;color:#dec38f}
.mail-row-reward.is-claimed{color:#96b8a8;background:#92b7a60d}
.mail-detail{display:flex;flex-direction:column;padding:18px;overflow-wrap:anywhere}
.mail-detail h3{margin:0;color:#f1e4c6;font:700 15px/1.6 Tahoma,sans-serif}
.mail-meta{color:#97a7ad;font-size:11px;margin:6px 0 0}
.mail-detail hr{flex:none;width:100%;height:1px;margin:14px 0;border:0;background:#b69a6426}
.mail-letter{margin:0;white-space:pre-wrap;font-size:12px;line-height:1.85;color:#d3dddf;user-select:text}
.mail-attachments{margin-top:20px;padding:12px;border:1px solid #b69a6426;border-radius:8px;background:#101c2266}
.mail-attachments h4{margin:0 0 10px;font-size:11px;font-weight:400;color:#a1afb4}
.mail-loot{display:flex;gap:10px;flex-wrap:wrap}
.mail-loot-item{display:flex;align-items:center;gap:8px;min-width:108px;max-width:100%;font-size:11px}
.mail-loot-item small{display:block;font-size:10px;color:#97a7ad}
.mail-loot-icon{display:flex;align-items:center;justify-content:center;flex:none;width:34px;height:34px;border:1px solid #b69a6440;border-radius:6px;background:#0f191f}
.mail-loot-icon img,.mail-loot-icon .item-icon{display:block;flex-shrink:0;max-width:30px;max-height:30px}
.mail-footer{margin-top:auto;padding-top:18px;display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap}
.mail-footer>span{font-size:10px;color:#97a7ad}
body .mail-native .mail-claim{flex:none;min-height:34px;padding:6px 12px;border:1px solid #d5b77c66;border-radius:7px;background:#c5a66d;color:#172128;font-size:12px;font-weight:700;text-shadow:none;box-shadow:none}
body .mail-native .mail-claim:hover{background:#dfc38e}
body .mail-native .mail-claim:disabled{background:#21332f;border-color:#92b7a633;color:#a3c5b5;cursor:default}
.mail-status{flex:none;margin:0;padding:8px 14px;font-size:11px;color:#e0c58f;background:#19282f;border-top:1px solid #b69a6426;white-space:pre-wrap}
.mail-empty{display:flex;flex:1;flex-direction:column;justify-content:center;align-items:center;gap:7px;min-height:180px;height:100%;padding:24px 14px;text-align:center;color:#85979f;font-size:11px}
.mail-empty svg{width:32px;height:32px;margin-bottom:5px;color:#bca77e;opacity:.65}
.mail-empty strong{font-size:13px;font-weight:400;color:#c9d3d6}
.mail-inbox-empty .mail-columns{display:block;height:240px}
.mail-inbox-empty .mail-list{height:100%;border:0;background:transparent}
.mail-inbox-empty .mail-detail{display:none}
body .mail-native .mail-back{display:none;align-self:flex-start;flex:none;border:0;border-radius:6px;background:transparent;color:#e0c58f;padding:0 0 12px;font-size:12px;box-shadow:none}
#mail-button{position:relative}
body .hud-windows #mail-button .mail-unread-badge{position:absolute;top:-3px;right:-3px;min-width:18px;height:18px;padding:0 3px;display:grid;place-items:center;border-radius:10px;background:#a54031;color:#fff1da;font:11px/1 Tahoma,sans-serif;pointer-events:none;z-index:1}
/* Match the mobile window manager without adding a second header. */
:root body.mobile-hud #aux-window[data-kind=mail]{--window-max:640px;background:#142128;border-radius:12px}
:root body.mobile-hud #aux-window[data-kind=mail]>.mobile-window-heading{display:none}
:root body.mobile-hud #aux-window[data-kind=mail] #aux-body{padding:0;overflow:hidden}
:root body.mobile-hud #aux-window[data-kind=mail] .mail-tools [data-close]{display:grid}
:root body.mobile-hud #aux-window[data-kind=mail] .mail-tools button{min-width:44px;min-height:44px}
@media(max-width:580px){
 .mail-columns{display:block;height:360px;max-height:calc(100dvh - 150px)}
 .mail-list{height:100%;border:0}
 .mail-detail{height:100%;padding:14px;display:none}
 .mail-reading .mail-list{display:none}
 .mail-reading .mail-detail{display:flex}
 body .mail-native .mail-back{display:block;min-height:44px}
 .mail-native .mail-tools button{min-width:40px;min-height:40px}
 .mail-heading{gap:8px;padding:10px}
 .mail-heading-icon{display:none}
 .mail-footer{align-items:stretch;flex-direction:column}
 body .mail-native .mail-claim{width:100%;min-height:44px}
 .mail-inbox-empty .mail-list{display:block}
 .mail-inbox-empty .mail-detail{display:none}
}
@media(max-height:500px){.mail-columns{height:240px}.mail-inbox-empty .mail-columns{height:180px}.mail-empty{min-height:140px;padding:16px}}
/* Sender identity and the full-width composer share the compact inbox surface. */
.mail-gm{display:inline-block;padding:0 4px;border:1px solid #d5b77c55;border-radius:4px;color:#e0c58f;font:9px/1.5 Tahoma;vertical-align:middle}
.mail-composing .mail-columns{display:block}
.mail-composing .mail-list{display:none}
.mail-composing .mail-detail{display:flex;height:100%}
.mail-compose{display:grid;gap:10px;width:100%;margin:0}
.mail-compose label{display:grid;gap:4px;min-width:0;font-size:11px;color:#a1afb4}
.mail-compose input,.mail-compose textarea{width:100%;min-width:0;padding:7px 10px;border:1px solid #b69a6433;border-radius:6px;background:#101c22;color:#edf0ee;font:12px/1.6 Tahoma,sans-serif;user-select:text}
.mail-compose textarea{resize:vertical;min-height:84px}
.mail-compose :is(input,textarea):focus-visible{outline:1px solid #e0c58f;outline-offset:1px}
.mail-compose-actions{display:flex;justify-content:flex-end;gap:8px}
body .mail-native :is(.mail-compose-actions button,.mail-reply){min-height:34px;padding:6px 12px;border:1px solid #b69a6440;border-radius:7px;background:transparent;color:#dfcfad;font-size:12px;box-shadow:none}
body .mail-native .mail-send{background:#c5a66d;color:#172128;font-weight:700}
body .mail-native button:disabled{opacity:.5;cursor:default}
body #aux-window[data-kind=mail] .mail-heading h2{gap:0}
@media(max-width:580px){.mail-composing .mail-columns{height:410px;max-height:calc(100dvh - 150px)}body .mail-native .mail-compose-actions button{min-height:44px}.mail-compose input,.mail-compose textarea{font-size:16px}}
