/* 房多网群聊 · 独立样式（移动端优先，App WebView 内可直接用） */
* { box-sizing: border-box; }
body {
    margin: 0;
    background: #f5f6f7;
    color: #333;
    font: 14px/1.6 -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
}
.g-wrap { max-width: 720px; margin: 0 auto; min-height: 100vh; background: #fff; }
.g-header {
    display: flex; align-items: center; gap: 12px;
    padding: 12px 16px; background: #fff; border-bottom: 1px solid #eee;
    position: sticky; top: 0; z-index: 20;
}
.g-back { color: #0a8f8f; text-decoration: none; font-size: 14px; white-space: nowrap; }
.g-header-title { flex: 1; min-width: 0; }
.g-header-title h1 { margin: 0; font-size: 17px; font-weight: 600; }
.g-header-title p { margin: 2px 0 0; font-size: 12px; color: #999; }
.g-main { padding: 16px; }
.g-nav { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.g-nav a, .g-nav span {
    padding: 6px 14px; border-radius: 16px; background: #f0fafa;
    color: #0a8f8f; text-decoration: none; font-size: 13px;
}
.g-nav a.active { background: #0a8f8f; color: #fff; }
.g-card {
    background: #fff; border: 1px solid #eee; border-radius: 8px;
    padding: 14px; margin-bottom: 12px;
}
.g-card h3 { margin: 0 0 6px; font-size: 16px; }
.g-card h3 a { color: #333; text-decoration: none; }
.g-card h3 a:hover { color: #0a8f8f; }
.g-card p { margin: 0 0 8px; color: #777; font-size: 13px; }
.g-meta { font-size: 12px; color: #aaa; display: flex; gap: 12px; flex-wrap: wrap; }
.g-badge {
    display: inline-block; padding: 1px 8px; border-radius: 10px;
    font-size: 11px; background: #f6ffed; color: #52c41a;
}
.g-badge.gray { background: #f5f5f5; color: #999; }
.g-badge.warn { background: #fff7e6; color: #fa8c16; }
.g-empty { text-align: center; color: #999; padding: 40px 20px; }
.g-form label { display: block; font-weight: 600; margin: 14px 0 6px; }
.g-form input[type=text], .g-form textarea, .g-form select {
    width: 100%; padding: 10px; border: 1px solid #ddd; border-radius: 6px;
    font-size: 14px; font-family: inherit; background: #fff;
}
.g-form textarea { min-height: 90px; resize: vertical; }
.g-tip { font-size: 12px; color: #999; margin-top: 6px; }
.g-btn {
    display: inline-block; padding: 9px 18px; border: 0; border-radius: 6px;
    background: #0a8f8f; color: #fff; font-size: 14px; cursor: pointer; text-decoration: none;
}
.g-btn:hover { opacity: .9; }
.g-btn:disabled { background: #bbb; cursor: not-allowed; }
.g-btn.ghost { background: #f0fafa; color: #0a8f8f; border: 1px solid #b7e4e4; }
.g-btn.danger { background: #ff4d4f; }
.g-btn.small { padding: 5px 12px; font-size: 12px; }
.g-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }

/* 群详情页 */
.g-info { padding: 16px; border-bottom: 1px solid #eee; }
.g-info h2 { margin: 0 0 6px; font-size: 19px; }
.g-info .g-desc { color: #666; margin-bottom: 10px; }
.g-msg-list { padding: 12px 16px; min-height: 220px; max-height: 55vh; overflow-y: auto; background: #f7f9fa; }
.g-msg { margin-bottom: 14px; }
.g-msg-head { font-size: 12px; color: #999; margin-bottom: 4px; }
.g-msg-head b { color: #0a8f8f; font-weight: 600; margin-right: 8px; }
.g-msg-body {
    display: inline-block; max-width: 100%; padding: 8px 12px; border-radius: 8px;
    background: #fff; border: 1px solid #e8e8e8; white-space: pre-wrap; word-break: break-word;
}
.g-msg.mine .g-msg-body { background: #d9f5f2; border-color: #b7e4e4; }
.g-compose { border-top: 1px solid #eee; padding: 12px 16px; background: #fff; }
.g-compose-row { display: flex; gap: 8px; align-items: flex-end; }
.g-compose textarea {
    flex: 1; min-height: 44px; max-height: 120px; padding: 9px;
    border: 1px solid #ddd; border-radius: 6px; resize: vertical; font-size: 14px; font-family: inherit;
}
.g-compose-note { font-size: 12px; color: #999; margin-top: 6px; }
.g-login-tip { text-align: center; padding: 16px; color: #888; }
.g-login-tip a { color: #0a8f8f; }
.g-status { font-size: 12px; color: #aaa; padding: 4px 16px; }

/* 弹窗 */
.g-mask {
    position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 50;
    display: none; align-items: center; justify-content: center; padding: 20px;
}
.g-mask.show { display: flex; }
.g-modal { background: #fff; border-radius: 10px; width: 100%; max-width: 360px; padding: 18px; }
.g-modal h3 { margin: 0 0 12px; font-size: 16px; }
.g-modal-close { float: right; cursor: pointer; color: #999; font-size: 20px; line-height: 1; }
.g-qrcode { display: flex; justify-content: center; padding: 10px 0; }
.g-qrcode img, .g-qrcode canvas { max-width: 100%; }
.g-link {
    word-break: break-all; background: #f7f9fa; padding: 8px; border-radius: 4px;
    font-size: 12px; color: #666; margin: 8px 0;
}
.g-member { display: flex; align-items: center; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid #f0f0f0; }
.g-member:last-child { border-bottom: 0; }
.g-member-name { flex: 1; min-width: 0; }
.g-toast {
    position: fixed; left: 50%; top: 20%; transform: translateX(-50%);
    background: rgba(0,0,0,.78); color: #fff; padding: 10px 18px; border-radius: 6px;
    font-size: 13px; z-index: 100; display: none; max-width: 85%;
}
.g-toast.show { display: block; }

/* 好友 / 私聊 */
.g-badge.info { background: #e6f7ff; color: #1890ff; }
.g-section-title { margin: 0 0 8px; font-size: 15px; }
.g-row {
    display: flex; align-items: center; justify-content: space-between; gap: 8px;
    padding: 9px 0; border-bottom: 1px solid #f0f0f0; color: #333; text-decoration: none;
}
.g-row:last-child { border-bottom: 0; }
.g-row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.g-row-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.g-row-side { display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.g-sub {
    font-size: 12px; color: #999; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    max-width: 220px;
}
.g-unread {
    display: inline-block; min-width: 18px; padding: 1px 6px; border-radius: 10px;
    background: #ff4d4f; color: #fff; font-size: 11px; text-align: center; line-height: 1.5;
}
.g-nav a .g-unread { margin-left: 4px; }

/* 私聊气泡：自己发的居右，仿微信聊天窗口（不影响群聊页） */
.g-pm-list .g-msg.mine { text-align: right; }
.g-pm-list .g-msg-body { max-width: 78%; text-align: left; }
