/* Chat controls and the compact conversation panel. Loaded after legacy styles. */
.chat-page-actions { display:flex; align-items:center; gap:14px; flex-wrap:wrap }
.chat-rules { position:relative; margin:0; color:var(--text) }
.chat-rules summary { display:flex; align-items:center; gap:7px; cursor:pointer; list-style:none }
.chat-rules summary::-webkit-details-marker { display:none }
.chat-age-badge { padding:4px 7px; border:1px solid #92b263; border-radius:5px; color:var(--green); font-size:12px; font-weight:800 }
.chat-rules ul { position:absolute; z-index:50; right:0; top:calc(100% + 10px); width:min(360px,calc(100vw - 32px)); margin:0; padding:18px 20px 18px 34px; background:#111b13; border:1px solid #4d6549; border-radius:8px; box-shadow:0 18px 45px #000b; font-size:12px; line-height:1.6 }
.chat-rules li+li { margin-top:8px }
.chat-panel { min-width:0 }
.chat-form,.direct-form { display:grid!important; grid-template-columns:minmax(0,1fr) repeat(3,36px)!important; gap:6px!important; align-items:center; position:relative }
.chat-form { padding:12px }
.chat-form>.chat-compose-field,.direct-form>.chat-compose-field { grid-column:1; grid-row:1; min-height:54px; background:#131b18; border:1px solid #33403a; border-radius:6px }
.chat-form .chat-picker-wrap,.direct-form .chat-picker-wrap { grid-column:2; grid-row:1 }
.chat-form .chat-photo-button,.direct-form .chat-photo-button { grid-column:3; grid-row:1 }
.chat-form>button[type=submit],.direct-form>button[type=submit] { grid-column:4; grid-row:1; width:36px!important; min-height:36px!important; height:36px; padding:7px!important; font-size:0 }
.direct-form>button[type=submit]:after { content:none }
.direct-form>button[type=submit] svg,.chat-form>button[type=submit] svg { width:21px; height:21px }
.chat-picker-toggle,.chat-photo-button { display:flex; align-items:center; justify-content:center; width:36px; height:36px; padding:5px; color:var(--text); background:#142019; border:1px solid #3d593c; border-radius:6px; cursor:pointer }
.chat-picker-toggle img { width:26px; height:26px }
.chat-photo-button svg { width:21px; height:21px }
.chat-photo-button:hover,.chat-photo-button:focus-visible { border-color:var(--green); color:var(--green) }
.chat-compose-field .chat-composer-visual { font-size:12px; padding:9px }
.chat-form .chat-composer-source,.direct-form .chat-composer-source { display:none!important }
.chat-picker [aria-selected=true] { color:var(--green) }
.chat-picker-floating { max-height:calc(100dvh - 24px); overflow:auto }
.chat-attachment { grid-column:1/-1; display:flex; align-items:center; gap:10px; padding:7px 10px; background:#0d1711; border:1px solid #3d593c; border-radius:6px; min-width:0 }
.chat-attachment[hidden] { display:none }
.chat-attachment img { width:48px; height:48px; object-fit:contain; border-radius:3px }
.chat-attachment span { flex:1; font-size:11px; color:#a9bca3 }
.chat-attachment .icon-button { width:28px; height:28px }
.chat-compose-status { grid-column:1/-1; margin:0; color:#f4d58a; font-size:11px }
.chat-compose-status:empty { display:none }
.chat-inline-image { display:block; width:auto; max-width:min(360px,100%); height:auto; max-height:300px; object-fit:contain; margin:7px 0; border-radius:6px; background:#101a14 }
.chat-image-link { display:block; max-width:100%; width:fit-content }
.dm-item.own .chat-inline-image,.dm-item.own .chat-image-link,.dm-item.own .chat-inline-sticker { margin-left:auto }
.chat-record-link { display:block; margin-top:6px; color:var(--green); font-size:12px; font-weight:700 }
.chat-history-more { display:block; margin:0 auto 14px; padding:8px 12px; color:var(--green); background:#152017; border:1px solid #435b38; border-radius:6px; cursor:pointer; font-size:11px }
.chat-history-status { margin:4px; text-align:center; color:#94a88a; font-size:11px }
.chat-message>div { min-width:0; flex:1 }
.chat-body { overflow-wrap:anywhere }
.compact-member .member-profile-head { display:flex; align-items:flex-start; gap:12px; margin:12px 0 6px }
.compact-member .member-face { width:64px; height:64px; margin:0; flex:0 0 64px; font-size:24px }
.compact-member .member-identity { min-width:0; flex:1 }
.compact-member .member-identity h3 { margin:0; text-align:left; font-size:20px; overflow-wrap:anywhere }
.compact-member .member-game { text-align:left; margin:4px 0 7px; font-size:11px }
.compact-member .member-stats { display:flex; flex-wrap:wrap; gap:6px 12px; margin:0 }
.compact-member .member-stat { display:flex; flex-direction:column; gap:2px; color:#9fb49b; font-size:9px }
.compact-member .member-stat b { color:var(--text); font-size:13px }
.compact-member .member-profile-link { align-self:flex-start; margin:6px 0; font-size:10px }
.compact-member .member-actions { margin:5px 0 0; gap:6px }
.compact-member .member-actions .button { min-height:32px; padding:5px 8px; font-size:10px; white-space:normal }
.compact-member .member-relationship { margin:5px 0 0; font-size:10px; color:#b4d69c }
.compact-member .member-status { margin:4px 0; font-size:11px; flex:0 0 auto }
.compact-member .member-status:empty { display:none }
.compact-member [data-member-content] { display:flex; flex-direction:column; flex:1; min-height:0 }
.compact-member .direct-heading { font-size:12px; margin:12px 0 6px }
.compact-member .direct-chat { flex:1; min-height:230px; height:auto; max-height:none; margin:0 0 8px }
.compact-member .direct-form { flex:0 0 auto }
.chat-workspace>.member-sidebar.compact-member { overflow:visible; padding:12px; height:max(640px,min(760px,calc(100dvh - 220px)))!important }
.chat-workspace .chat-panel { display:flex; flex-direction:column; height:max(640px,min(760px,calc(100dvh - 220px))) }
.chat-workspace .messages { flex:1; min-height:0; height:auto!important }
.chat-workspace.profile-open { grid-template-columns:minmax(280px,1fr) 16px var(--chat-sidebar-width,360px)!important }
.direct-chat .chat-inline-sticker { width:min(85px,70%); max-height:85px }
.direct-form .chat-composer-sticker { width:30px; height:30px }
.chat-photo-dialog .photo-stage canvas { width:auto; height:auto; max-width:100%; max-height:360px; margin:auto; display:block; aspect-ratio:auto }
.chat-photo-dialog .photo-result img { max-width:140px; max-height:100px; width:auto; height:auto; object-fit:contain }
.chat-photo-dialog .photo-controls { gap:12px }
.result-share-button { display:inline-flex!important; width:34px!important; height:34px; min-height:34px!important; align-items:center; justify-content:center; padding:7px!important; margin:0 0 8px }
.result-share-button[hidden] { display:none!important }
.result-share-button svg { width:20px; height:20px }
.result-share-status { font-size:11px; color:var(--green) }
.result-share-status:empty { display:none }
@media(max-width:900px) {
  .chat-workspace.profile-open { grid-template-columns:1fr!important }
  .chat-workspace>.member-sidebar.compact-member,.profile-layout>.member-sidebar.compact-member { position:fixed; inset:16px; height:calc(100dvh - 32px)!important; z-index:40; overflow:auto }
  .compact-member .direct-chat { min-height:150px }
}
@media(max-width:620px) {
  .chat-form,.direct-form { grid-template-columns:minmax(0,1fr) repeat(3,32px)!important; gap:5px!important }
  .chat-picker-toggle,.chat-photo-button,.chat-form>button[type=submit],.direct-form>button[type=submit] { width:32px!important; height:32px; min-height:32px!important }
  .chat-page-actions { width:100%; justify-content:space-between }
  .chat-rules ul { right:auto; left:0 }
  .chat-workspace .chat-panel { height:660px }
  .direct-form .chat-composer-sticker { width:26px; height:26px }
}
.lcoin-balance{display:inline-flex;align-items:center;gap:4px;padding:6px 8px;border:1px solid #435b38;border-radius:5px;color:var(--green);font-size:11px;font-weight:800}.lcoin-balance b{color:#edf7df}
.lcoin-profile-balance{display:inline-flex;align-items:center;gap:6px;padding:8px 10px;border:1px solid #435b38;border-radius:6px;color:#a8d57b;font-size:11px}.lcoin-profile-balance b{color:#f1f8dd;font-size:16px}
