/* Single visual system. app.css owns structure; chat-upgrade.css owns media workflows. */
.chat-pending-messages { display: contents; }
.has-pending-messages .chat-message-items > .empty { display: none; }
.chat-pending-message .message-stack { position: relative; }
.chat-pending-message .message > :is(img, video) { display: block; width: 100%; max-height: 300px; object-fit: contain; border-radius: 4px; }
.chat-pending-message .message > audio { max-width: 100%; width: 220px; }
.chat-pending-state { display: flex; justify-content: flex-end; align-items: center; min-height: 18px; padding-top: 3px; }
.chat-pending-state button { width: 28px; height: 32px; padding: 4px; background: transparent; color: #d9363e; }
.chat-pending-state [hidden] { display: none !important; }
.chat-pending-spinner { width: 14px; height: 14px; border: 2px solid #ccc; border-top-color: #777; border-radius: 50%; animation: chat-pending-spin .8s linear infinite; }
@keyframes chat-pending-spin { to { transform: rotate(360deg); } }
/* Chat attachment review and hold-to-talk share the existing upload/receipt path. */
.chat-attachment-review { position: fixed; inset: 0; z-index: 2400; background: #101010; color: #fff; }
.chat-review-surface { width: 100%; max-width: 560px; height: 100%; margin: auto; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; }
.chat-review-surface header { display: grid; grid-template-columns: 48px 1fr 48px; align-items: center; min-height: 56px; padding: env(safe-area-inset-top, 0px) 8px 0; background: #181818; }
.chat-review-surface header strong { text-align: center; font-size: 16px; font-weight: 500; }
.chat-review-surface header button { display: grid; place-items: center; width: 48px; height: 48px; padding: 0; background: transparent; color: #fff; }
.chat-review-media { position: relative; min-height: 0; display: grid; place-items: center; overflow: hidden; }
.chat-review-media > :is(img, video) { width: 100%; height: 100%; min-height: 0; object-fit: contain; }
.chat-review-error { position: absolute; bottom: 12px; margin: 0 16px; padding: 10px; font-size: 13px; background: #222; color: #fff; }
.chat-review-surface footer { background: #1d1d1d; padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px)); }
.chat-review-thumbnails { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 12px; }
.chat-review-thumbnails button { position: relative; display: grid; place-items: center; flex: 0 0 56px; width: 56px; height: 56px; padding: 0; border: 2px solid transparent; border-radius: 2px; background: #383838; color: #fff; }
.chat-review-thumbnails button.selected { border-color: #07c160; }
.chat-review-thumbnails img { width: 100%; height: 100%; object-fit: cover; }
.chat-review-thumbnails span { position: absolute; right: 0; top: 0; min-width: 18px; height: 18px; line-height: 18px; font-size: 11px; background: #057d3d; color: #fff; }
.chat-review-actions { display: flex; justify-content: space-between; align-items: center; gap: 16px; min-height: 44px; }
.chat-review-actions > span { font-size: 13px; color: #d0d0d0; }
.chat-review-actions > button { min-height: 44px; min-width: 96px; padding: 0 16px; border-radius: 4px; background: #07c160; color: #073d25; font-weight: 500; }
.chat-attachment-item > [data-review-attachment] { position: relative; width: 88px; height: 64px; padding: 0; border-radius: 4px; overflow: hidden; background: #242424; }
.chat-attachment-item > [data-review-attachment] :is(img, video) { width: 100%; height: 100%; object-fit: cover; }
.attachment-play { position: absolute; inset: 0; display: grid; place-items: center; background: #0003; color: #fff; }
body.app-mode .chat-voice-hold { width: 100%; touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; font-weight: 500; }
body.app-mode .chat-voice-hold.recording { background: #d5d5d5; color: #191919; }
.chat-voice-recording { position: fixed; inset: 0; z-index: 2500; display: grid; place-items: center; pointer-events: none; background: #0004; }
.chat-voice-recording > div { display: flex; flex-direction: column; align-items: center; gap: 16px; min-width: 220px; max-width: calc(100% - 48px); padding: 28px 20px; border-radius: 8px; background: #252525; color: #fff; }
.chat-voice-recording svg { width: 56px; height: 56px; color: #95ec69; }
.chat-voice-recording strong { font-size: 15px; font-weight: 500; text-align: center; }
.chat-voice-recording time { font-size: 18px; font-variant-numeric: tabular-nums; }
.chat-voice-recording.is-cancelling > div { background: #a92730; }
.chat-voice-recording.is-cancelling svg { color: #fff; }
body.app-mode .chat-voice-message { min-height: 40px; min-width: 120px; justify-content: space-between; gap: 24px; background: transparent; color: #191919; }
body.app-mode .chat-voice-message.playing svg { animation: weix-voice-pulse 900ms ease-in-out infinite; }
@keyframes weix-voice-pulse { 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { body.app-mode .chat-voice-message.playing svg { animation: none; } }
@media (max-height: 450px) { .chat-review-surface footer { padding-block: 6px; } .chat-review-thumbnails { padding-bottom: 6px; } .chat-review-thumbnails button { width: 44px; height: 44px; flex-basis: 44px; } }
:root {
--bg: #ededed; --surface: #fff; --surface-soft: #f7f7f7; --surface-pressed: #e9e9e9;
--text: #191919; --text-strong: #111; --navy: #191919;
--muted: #707070; --faint: #888; --line: #e5e5e5; --line-strong: #d5d5d5;
--green: #07c160; --green-dark: #00843d; --green-soft: #e8f5eb; --bubble-own: #95ec69;
--sky: #2782d7; --coral: #fa5151; --danger: #d93838; --positive: #07a34f;
--gutter: 16px; --icon: 24px; --header: 52px; --tabbar: 58px;
}
html, body { background: #e5e5e5; color: var(--text); }
body, input, textarea, button, select { font-family: system-ui, -apple-system, "Roboto", "Noto Sans CJK SC", "Noto Sans SC", "Microsoft YaHei", "Segoe UI", sans-serif; letter-spacing: 0; }
body { font-weight: 400; -webkit-font-smoothing: antialiased; }
body.app-mode { --s-page: var(--bg); --s-surface: #fff; --s-aqua: var(--green); --s-aqua-pressed: var(--green-dark); --s-aqua-soft: var(--green-soft); --s-navy: var(--text); --s-muted: var(--muted); --s-faint: var(--faint); --s-line: var(--line); --s-control-line: var(--line-strong); --s-danger: var(--danger); }
button, a, summary, label[for] { -webkit-tap-highlight-color: transparent; }
button, summary, a { transition: color 150ms ease, background-color 150ms ease, opacity 150ms ease; }
button:active, summary:active, label[for]:active { opacity: .72; transform: none; }
button:disabled { opacity: .45; cursor: default; }
:where(button, a, summary, input, textarea, select, [tabindex]):focus-visible { outline: 2px solid var(--green-dark); outline-offset: 3px; }
button, input, textarea, select { font-size: 16px; }
.hidden { display: none !important; }
.weix-icon { width: var(--icon); height: var(--icon); stroke-width: 1.75; flex-shrink: 0; }
body.app-mode .app-shell { grid-template-rows: calc(var(--header) + env(safe-area-inset-top, 0px)) minmax(0, 1fr) calc(var(--tabbar) + var(--safe-bottom)); max-width: 560px; box-shadow: none; border: 0; }
body.app-mode .app-topbar { height: calc(var(--header) + env(safe-area-inset-top, 0px)); padding: env(safe-area-inset-top, 0px) 8px 0; grid-template-columns: 44px minmax(0, 1fr) auto; border-bottom: 1px solid #e5e5e5; background: #f7f7f7; box-shadow: none; }
body.app-mode .app-topbar h1 { font-size: 18px; font-weight: 600; color: var(--text); line-height: 1.4; }
body.app-mode .app-topbar.is-root { grid-template-columns: minmax(0, 1fr) auto; padding-left: var(--gutter); }
body.app-mode .app-topbar.is-root #topbarLeft { display: none; }
body.app-mode .app-topbar.is-root #appTitle { display: block; text-align: left; font-size: 18px; line-height: 26px; }
body.app-mode .topbar-side, body.app-mode .topbar-icon { width: 44px; height: 44px; min-width: 44px; display: flex; align-items: center; justify-content: center; padding: 0; color: var(--text); }
body.app-mode .topbar-icon svg { width: 24px; height: 24px; stroke-width: 1.75; }
body.app-mode .topbar-brand { width: 30px; height: 30px; border: 0; border-radius: 8px; margin: 0; box-shadow: none; }
body.app-mode .app-content { background: var(--bg); scrollbar-width: thin; scrollbar-color: #d2d7dc transparent; }
body.app-mode .tabs { height: calc(var(--tabbar) + var(--safe-bottom)); padding: 0 4px var(--safe-bottom); background: #f7f7f7; border-top: 1px solid var(--line); box-shadow: none; }
body.app-mode .tabs button { height: var(--tabbar); min-width: 0; padding: 5px 0 4px; gap: 3px; color: #292929; background: transparent; font-size: 11px; font-weight: 400; line-height: 16px; }
body.app-mode .tabs button.active { color: var(--green-dark); font-weight: 500; }
body.app-mode .tabs button::before, body.app-mode .tabs button::after { display: none; }
body.app-mode .tabs .tab-icon { position: relative; width: 27px; height: 27px; display: grid; place-items: center; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
body.app-mode .tab-icon svg { width: 25px; height: 25px; stroke-width: 1.7; }
body.app-mode .tabs button.active svg { stroke-width: 2; fill: none; }
body.app-mode .tabs .tab-unread-badge { top: -4px; right: -9px; min-width: 17px; height: 17px; padding: 0 4px; border: 2px solid #fff; background: var(--coral); font-size: 10px; line-height: 13px; box-shadow: none; }
body.app-mode .wechat-list, body.app-mode .wechat-section { margin: 8px 0; border: 0; border-radius: 0; background: #fff; box-shadow: none; }
body.app-mode .wechat-row { min-height: 64px; padding: 12px var(--gutter); gap: 14px; border: 0; border-radius: 0; color: var(--text); background: #fff; box-shadow: none; }
body.app-mode .wechat-row:active, body.app-mode .profile-row:active { background: var(--surface-pressed); }
body.app-mode .wechat-row::after { left: 82px; right: var(--gutter); background: var(--line); }
body.app-mode .wechat-row:last-child::after { display: none; }
body.app-mode .row-main { min-width: 0; gap: 5px; }
body.app-mode .row-main strong, body.app-mode .row-title { font-size: 17px; line-height: 1.45; font-weight: 400; color: var(--text); }
body.app-mode .row-main small, body.app-mode .row-sub { color: var(--muted); font-size: 13px; font-weight: 400; line-height: 1.5; }
body.app-mode .row-title-line { min-width: 0; gap: 12px; align-items: center; }
body.app-mode .row-title-line strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
body.app-mode .wechat-row time { flex-shrink: 0; color: var(--faint); font-size: 12px; font-weight: 400; }
body.app-mode .wechat-row > svg, body.app-mode .profile-row > svg { width: 18px; height: 18px; flex-shrink: 0; color: #939aa1; }
body.app-mode .avatar { width: 48px; height: 48px; flex: 0 0 48px; background: #e8eee9; color: #39734c; border: 0; border-radius: 4px; box-shadow: none; font-size: 18px; font-weight: 500; }
body.app-mode .avatar > img { border-radius: inherit; width: 100%; height: 100%; object-fit: cover; }
body.app-mode .group-avatar { background: #e2e7e3; color: #5b6f5d; }
body.app-mode .group-avatar svg { width: 26px; height: 26px; }
body.app-mode .primary-button, body.app-mode .small-green-button, body.app-mode .button-link, .welcome-shell .primary-button { border: 0; border-radius: 4px; background: var(--green); color: #073d25; min-height: 44px; box-shadow: none; font-size: 15px; font-weight: 500; }
body.app-mode .outline-button { min-height: 44px; border: 1px solid #d8ded9; border-radius: 4px; background: #fff; color: var(--green-dark); box-shadow: none; font-weight: 500; }
body.app-mode .primary-button:active, .welcome-shell .primary-button:active { background: var(--green-dark); color: #fff; }
body.app-mode .text-command, body.app-mode .link-button { color: var(--green-dark); font-weight: 500; }
body.app-mode .panel-title :is(h2,h3), body.app-mode .section-heading { font-size: 16px; font-weight: 600; }
body.app-mode .section-index { padding: 5px var(--gutter); color: var(--muted); background: var(--bg); font-size: 12px; font-weight: 400; }
body.app-mode .empty, body.app-mode .empty-state { padding: 52px var(--gutter); border: 0; border-radius: 0; box-shadow: none; background: transparent; color: var(--muted); font-size: 14px; font-style: normal; }
body.app-mode .empty-state > svg { width: 42px; height: 42px; margin-bottom: 16px; color: #a0acae; stroke-width: 1.4; }
body.app-mode .empty-state > div { color: #525c64; font-size: 15px; font-weight: 500; line-height: 1.5; }
body.app-mode .empty-state > span { color: var(--muted); font-size: 13px; line-height: 1.5; }
/* Bottle: compose first, quota second. */
body.app-mode .official-contact-notice { display: flex; align-items: center; gap: 8px; padding: 12px var(--gutter); margin: 0; border: 0; background: #fff; color: var(--muted); font-size: 12px; line-height: 1.7; }
body.app-mode .official-contact-icon { width: 18px; height: 20px; flex: 0 0 18px; background: transparent; border: 0; padding: 0; box-shadow: none; color: #848d95; }
body.app-mode .official-contact-icon svg { width: 18px; height: 18px; }
body.app-mode .official-contact-notice b { font-weight: 500; color: #626c75; white-space: nowrap; }
body.app-mode .official-contact-notice > span:last-child { display: block; flex: 1; }
body.app-mode .bottle-composer { margin: 0; padding: 24px var(--gutter) 0; background: #fff; }
.bottle-compose-heading { display: flex; justify-content: space-between; gap: 16px; align-items: center; }
.bottle-compose-heading strong { font-size: 16px; font-weight: 500; }
.bottle-compose-heading > span { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
body.app-mode .bottle-composer textarea { padding: 22px 0 12px; min-height: 180px; height: 180px; margin: 0; border: 0; border-radius: 0; box-shadow: none; background: #fff; font-size: 16px; line-height: 1.7; resize: none; }
body.app-mode .bottle-composer textarea::placeholder { color: var(--muted); }
body.app-mode .media-toolbar { padding: 6px 0; display: flex; gap: 12px; border: 0; min-height: 56px; align-items: center; }
body.app-mode .media-action { min-height: 48px; display: inline-flex; align-items: center; gap: 9px; min-width: 0; color: #68727c; font-size: 14px; font-weight: 400; }
body.app-mode .media-action svg { width: 22px; height: 22px; flex-shrink: 0; }
body.app-mode .media-action span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 190px; }
body.app-mode .compact-toggle { display: flex; align-items: center; min-height: 48px; gap: 10px; color: var(--muted); font-size: 13px; white-space: nowrap; }
body.app-mode .compact-toggle input, body.app-mode .toggle-list input[type="checkbox"] { appearance: none; -webkit-appearance: none; position: relative; flex: 0 0 36px; width: 36px; height: 22px; min-height: 22px; margin: 0; padding: 0; background: #cbd0d4; border: 0; border-radius: 20px; transition: background-color 150ms ease; }
body.app-mode .compact-toggle input::after, body.app-mode .toggle-list input[type="checkbox"]::after { content: ''; position: absolute; left: 3px; top: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform 150ms ease; }
body.app-mode .compact-toggle input:checked, body.app-mode .toggle-list input[type="checkbox"]:checked { background: var(--green); }
body.app-mode .compact-toggle input:checked::after, body.app-mode .toggle-list input[type="checkbox"]:checked::after { transform: translateX(14px); }
body.app-mode .page-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 18px var(--gutter) 12px; gap: 12px; background: #fff; }
body.app-mode .page-actions :is(.primary-button,.outline-button) { height: 48px; font-size: 15px; font-weight: 500; border-radius: 8px; box-shadow: none; }
body.app-mode .page-actions .outline-button { border-color: var(--green); color: var(--green-dark); }
.bottle-quota { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 12px; padding: 0 16px 24px; background: #fff; color: var(--muted); font-size: 12px; line-height: 20px; }
.bottle-quota b { font-weight: 400; }
.bottle-quota i { width: 3px; height: 3px; border-radius: 50%; background: #a4abb1; }
body.app-mode .picked-bottle-section { margin: 0; border-top: 1px solid var(--line); background: var(--bg); }
body.app-mode .bottle-empty { min-height: 220px; padding: 28px var(--gutter); gap: 7px; }
body.app-mode .bottle-empty > svg { width: 46px; height: 46px; margin-bottom: 13px; stroke-width: 1.25; color: #849798; transform: rotate(15deg); }
body.app-mode .bottle-empty strong { font-size: 15px; font-weight: 400; color: #58626a; }
body.app-mode .bottle-empty span { color: var(--muted); font-size: 13px; }
/* Conversation and contact lists share the same grid and search control. */
body.app-mode [data-view="chat:list"] { background: #fff; }
.conversation-search { padding: 6px 12px 9px; background: #f7f7f7; }
body.app-mode .search-line { display: flex; gap: 8px; align-items: center; min-height: 44px; border: 0; border-radius: 6px; padding: 0 12px; background: #f3f5f7; box-shadow: none; }
body.app-mode .search-line > svg { color: #8b959e; width: 18px; height: 18px; margin: 0; }
body.app-mode #mainContent .search-line input { flex: 1; min-width: 0; width: 100%; height: 44px; min-height: 44px; padding: 0; border: 0; border-radius: 0; background: transparent; font-size: 14px; box-shadow: none; }
body.app-mode .search-line input::placeholder { color: var(--muted); }
body.app-mode .search-line button { min-height: 44px; padding: 0 0 0 8px; color: var(--green-dark); font-size: 14px; font-weight: 500; }
body.app-mode .conversation-list { min-height: 240px; margin: 0; background: #fff; }
body.app-mode .conversation-row { min-height: 76px; padding-block: 12px; gap: 12px; }
body.app-mode .conversation-row .avatar { width: 48px; height: 48px; flex-basis: 48px; }
body.app-mode .conversation-row::after { left: 76px; right: 0; }
body.app-mode .conversation-row .unread-badge { position: absolute; top: 6px; left: 50px; right: auto; min-width: 19px; height: 19px; padding: 0 5px; border: 2px solid #fff; border-radius: 20px; font-size: 10px; line-height: 15px; background: var(--coral); }
body.app-mode .conversation-preview { gap: 5px; line-height: 20px; }
.conversation-presence { display: flex; align-items: center; flex-shrink: 0; }
.conversation-presence .presence-text { display: none; }
.conversation-presence .presence-dot { width: 6px; height: 6px; }
.chat-search-empty { padding: 30px var(--gutter); text-align: center; color: var(--muted); font-size: 14px; }
body.app-mode .contact-shortcuts { margin: 0 0 8px; }
body.app-mode .contact-search-area { margin: 0; padding: 6px 12px 9px; background: #f7f7f7; }
body.app-mode .shortcut-icon { width: 40px; height: 40px; flex: 0 0 40px; padding: 8px; border: 0; border-radius: 8px; box-shadow: none; }
body.app-mode .shortcut-icon.orange { background: #ff9b26; color: #fff; }
body.app-mode .shortcut-icon.green { background: #07c160; color: #fff; }
body.app-mode .shortcut-icon svg { width: 24px; height: 24px; }
body.app-mode .contact-shortcuts .wechat-row::after { left: 74px; }
body.app-mode .friend-list { margin: 0; }
body.app-mode .contact-count { min-height: 56px; padding: 18px var(--gutter); color: var(--muted); font-size: 13px; line-height: 20px; text-align: center; }
body.app-mode .contact-row .row-main small { font-size: 12px; color: var(--muted); }
body.app-mode .s3-segments, body.app-mode .subnav { margin: 0; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: #fff; padding: 0; box-shadow: none; }
body.app-mode .s3-segments > button, body.app-mode .subnav > button { min-height: 48px; color: var(--muted); font-size: 14px; font-weight: 400; background: transparent; border: 0; border-radius: 0; box-shadow: none; }
body.app-mode .s3-segments > button.active, body.app-mode .subnav > button.active { color: var(--green-dark); font-weight: 600; background: transparent; }
body.app-mode .s3-segments > button.active::after { width: 24px; height: 3px; left: calc(50% - 12px); bottom: 0; background: var(--green); border-radius: 3px; }
/* Profile shortcuts: semantic groups, one-line labels, quiet trailing values. */
body.app-mode .profile-section { margin: 0 0 8px; }
body.app-mode .profile-row { min-height: 132px; gap: 18px; padding: 24px 24px 30px; background: #fff; }
body.app-mode .profile-row .profile-avatar { width: 64px; height: 64px; flex-basis: 64px; font-size: 24px; }
body.app-mode .profile-row .row-main { gap: 8px; }
body.app-mode .profile-row .row-main strong { font-size: 22px; font-weight: 600; }
body.app-mode .profile-row .row-main small { font-size: 12px; overflow-wrap: anywhere; }
body.app-mode .settings-group { margin: 10px 0; padding: 0; }
body.app-mode .settings-row { min-height: 56px; gap: 16px; padding: 8px var(--gutter); }
body.app-mode .settings-row::after { left: 60px; }
body.app-mode .settings-icon { width: 24px; height: 24px; flex: 0 0 24px; padding: 0; border: 0; border-radius: 0; background: transparent; color: #424d57; box-shadow: none; }
body.app-mode .settings-icon svg { width: 24px; height: 24px; stroke-width: 1.65; }
.settings-meta { max-width: 35%; font-size: 12px; line-height: 1.5; color: var(--muted); white-space: nowrap; text-overflow: ellipsis; overflow: hidden; }
body.app-mode .logout-row { min-height: 56px; font-size: 15px; color: var(--danger); }
body.app-mode .profile-form-row { min-height: 56px; padding-inline: var(--gutter); }
body.app-mode #mainContent .profile-form-row input { height: 48px; padding: 0; border: 0; border-radius: 0; background: transparent; }
body.app-mode #mainContent .profile-form-row input[readonly] { color: var(--muted); }
body.app-mode .wechat-row select { min-height: 44px; max-width: 120px; padding: 0 10px; border: 1px solid var(--line-strong); border-radius: 6px; background: #fff; color: var(--text); font-size: 14px; }
/* Discover is media-first, with the same list rhythm as chat. */
body.app-mode .moments-cover { height: 220px; min-height: 220px; margin: 0; border: 0; background: #dce8ed; }
body.app-mode .moments-cover > img { width: 100%; height: 100%; object-fit: cover; }
body.app-mode .moments-cover::after { display: none; }
body.app-mode .moments-profile { right: var(--gutter); bottom: -16px; gap: 12px; z-index: 2; }
body.app-mode .moments-profile strong { color: #fff; font-size: 17px; font-weight: 500; line-height: 1.4; text-shadow: 0 1px 3px #0008; padding: 0; border: 0; background: transparent; box-shadow: none; max-width: 240px; }
body.app-mode .moments-profile .avatar { width: 64px; height: 64px; flex-basis: 64px; border: 2px solid #fff; }
body.app-mode .moments-cover-edit { width: 40px; height: 40px; top: 12px; right: 14px; border: 1px solid #fff8; background: #20262e38; color: #fff; box-shadow: none; border-radius: 50%; }
body.app-mode .moments-cover-edit svg { width: 20px; height: 20px; }
body.app-mode .discover-visibility-note { display: flex; align-items: center; gap: 7px; padding: 10px var(--gutter); min-height: 38px; margin: 0; background: #fff; border-bottom: 1px solid var(--line); color: var(--muted); }
body.app-mode .discover-visibility-note > span { width: 16px; height: 16px; padding: 0; border: 0; border-radius: 0; color: #79868c; background: transparent; box-shadow: none; }
body.app-mode .discover-visibility-note svg { width: 16px; height: 16px; }
body.app-mode .discover-visibility-note strong { font-size: 12px; font-weight: 400; color: var(--muted); }
body.app-mode .discover-visibility-note small { display: none; }
body.app-mode .voice-match-entry { min-height: 72px; padding: 12px var(--gutter); gap: 14px; background: #fff; border: 0; border-bottom: 1px solid var(--line); box-shadow: none; border-radius: 0; }
body.app-mode .voice-match-entry > svg { width: 24px; height: 24px; color: #596a73; stroke: currentColor; stroke-width: 1.75; }
body.app-mode .voice-match-entry > svg:last-child { width: 18px; height: 18px; color: #939aa1; }
body.app-mode .voice-match-entry strong { font-size: 16px; font-weight: 500; color: var(--text); }
body.app-mode .voice-match-entry small { font-size: 12px; color: var(--muted); margin-top: 5px; }
body.app-mode .moments-segmented { margin: 0; min-height: 48px; }
.moment-compose-sheet { margin: 8px 0 0; background: #fff; border: 0; }
.moment-compose-sheet > summary { display: flex; align-items: center; min-height: 56px; gap: 10px; padding: 10px var(--gutter); list-style: none; cursor: pointer; }
.moment-compose-sheet > summary::-webkit-details-marker { display: none; }
.moment-compose-sheet > summary > svg { width: 22px; height: 22px; color: #5a7378; }
.moment-compose-sheet > summary > svg:last-child { color: var(--green-dark); }
.moment-compose-sheet > summary > strong { font-size: 15px; font-weight: 500; }
.moment-compose-sheet > summary > span { flex: 1; font-size: 12px; color: var(--muted); }
.moment-compose-sheet[open] > summary { border-bottom: 1px solid var(--line); }
.moment-compose-sheet[open] > summary > svg:last-child { transform: rotate(45deg); }
body.app-mode .moment-composer { margin: 0; padding: 16px var(--gutter); border: 0; border-radius: 0; box-shadow: none; background: #fff; }
body.app-mode .moment-compose-heading { display: none; }
body.app-mode .moment-option-segments { overflow-x: auto; }
body.app-mode .moment-option-segments > button { white-space: nowrap; font-size: 12px; }
body.app-mode .moments-feed, body.app-mode .user-moments-feed { margin: 8px 0 0; border-radius: 0; background: #fff; }
body.app-mode .moment-item { margin: 0; padding: 18px var(--gutter); border: 0; border-bottom: 1px solid var(--line); border-radius: 0; box-shadow: none; background: #fff; }
body.app-mode .moment-item .avatar { width: 40px; height: 40px; flex-basis: 40px; }
body.app-mode .moment-author-line strong { color: #576b95; font-size: 16px; font-weight: 500; }
body.app-mode .moment-text { font-size: 16px; line-height: 1.55; }
body.app-mode .moment-media-grid.count-1 { max-width: 280px; }
body.app-mode .moment-media-grid.count-1 .moment-media { aspect-ratio: 4 / 3; object-fit: cover; background: #edf2f4; border-radius: 6px; }
body.app-mode .moment-meta { display: flex; flex-wrap: wrap; gap: 4px 12px; min-height: 44px; }
body.app-mode .moment-meta time { color: var(--muted); font-size: 12px; margin: 0 auto 0 0; }
body.app-mode .moment-actions { gap: 12px; }
body.app-mode .moment-actions button { min-width: 36px; min-height: 44px; font-size: 12px; color: var(--muted); }
body.app-mode .moment-actions svg { width: 18px; height: 18px; color: var(--muted); }
body.app-mode .moment-actions button span { font-size: 12px; color: var(--muted); }
body.app-mode .moment-likes { background: #f5f7f9; color: #50768c; border-radius: 4px; font-size: 13px; }
body.app-mode .moment-comment { padding-block: 6px; font-size: 13px; }
/* Conversation geometry is intentionally preserved; improve optical balance only. */
body.app-mode.chat-input-focused .app-shell { grid-template-rows: calc(var(--header) + env(safe-area-inset-top, 0px)) minmax(0, 1fr); }
body.app-mode #appTitle .chat-top-presence, body.app-mode #appTitle .chat-top-presence .presence-text { color: var(--muted); font-size: 11px; }
body.app-mode .chat-screen, body.app-mode .message-list { background: #ededed; }
body.app-mode .message-list { padding-inline: 16px; }
body.app-mode .chat-message-avatar { width: 40px; height: 40px; flex-basis: 40px; border-radius: 4px; box-shadow: none; }
body.app-mode .chat-image-thumb .chat-message-media, body.app-mode .chat-video-thumb .chat-message-media { object-fit: cover; background: #e9eff2; }
body.app-mode .chat-media-play svg { width: 44px; height: 44px; fill: #20262e30; stroke-width: 1.6; }
body.app-mode .message { max-width: 82%; border: 0; padding: 10px 12px; border-radius: 4px; color: var(--text); font-size: 17px; line-height: 1.5; font-weight: 400; }
body.app-mode .message-row.mine .message { background: var(--bubble-own); border-color: var(--bubble-own); border-bottom-right-radius: 4px; }
body.app-mode .message-row.mine .message.media-only { background: transparent; border: 0; }
body.app-mode .message-time, body.app-mode .message-receipt, body.app-mode .message-receipt.group { color: var(--muted); font-size: 11px; }
body.app-mode .chat-compose-shell { background: #f7f7f7; border-top-color: #dedede; }
body.app-mode .chat-composer { padding: 6px 4px; gap: 2px; min-height: 56px; background: #f7f7f7; align-items: center; }
body.app-mode .chat-composer .chat-tool { flex: 0 0 44px; width: 44px; min-width: 44px; height: 44px; min-height: 44px; color: #252525; box-shadow: none; }
body.app-mode .chat-tool svg { width: 25px; height: 25px; stroke-width: 1.7; }
body.app-mode .chat-input-slot, body.app-mode .chat-input-slot > input, body.app-mode .chat-voice-hold { height: 44px; min-height: 44px; }
body.app-mode .chat-input-slot > input, body.app-mode .chat-voice-hold { background: #fff; border: 0; border-radius: 4px; font-size: 16px; padding: 0 10px; box-shadow: none; }
body.app-mode .chat-composer .chat-send { width: 52px; min-width: 52px; height: 44px; min-height: 44px; padding: 0 8px; font-size: 14px; border: 0; box-shadow: none; }
body.app-mode .chat-plus-panel { background: #f7f7f7; border-top: 1px solid var(--line); padding: 20px 12px; gap: 18px 6px; }
body.app-mode .chat-plus-panel :is(button,label) { color: #58636d; font-size: 12px; font-weight: 400; }
body.app-mode .chat-plus-icon { background: #fff; border: 1px solid var(--line); box-shadow: none; color: #536570; border-radius: 8px; }
/* Authentication and supporting pages use the same typography and controls. */
.welcome-shell { min-height: 100dvh; max-width: 100%; background: #fff; color: var(--text); }
.welcome-main { width: min(100%, 432px); margin: 0 auto; padding: max(48px, env(safe-area-inset-top)) 28px 24px; box-sizing: border-box; }
.welcome-brand { text-align: center; margin-bottom: 32px; }
.welcome-brand img { width: 76px; height: 76px; border-radius: 8px; display: block; margin: 0 auto 18px; }
.welcome-brand h1 { font-size: 30px; font-weight: 600; margin: 0; line-height: 1.3; }
.welcome-brand p { color: var(--muted); font-size: 14px; margin: 10px 0 0; }
.welcome-access { background: #fff; padding: 0; border: 0; }
.welcome-access .segmented { display: grid; grid-template-columns: repeat(3,1fr); margin: 0 0 28px; padding: 0; background: transparent; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; }
.welcome-access .segmented button { position: relative; min-height: 48px; border: 0; border-radius: 0; box-shadow: none; background: transparent; color: var(--muted); font-size: 15px; font-weight: 400; padding: 8px; }
.welcome-access .segmented button.active { color: var(--green-dark); background: transparent; font-weight: 600; }
.welcome-access .segmented button.active::after { content: ''; position: absolute; width: 24px; height: 3px; background: var(--green); left: calc(50% - 12px); bottom: -1px; border-radius: 3px; }
.welcome-form .visitor-field { margin-bottom: 20px; }
.welcome-form label { display: block; color: #53606a; font-size: 13px; font-weight: 400; margin-bottom: 9px; }
.welcome-form .visitor-input-shell { display: flex; width: 100%; align-items: center; padding: 0; gap: 0; background: #f5f7f8; border: 1px solid #e9edf0; border-radius: 8px; box-shadow: none; }
.welcome-form .visitor-input-shell:focus-within { border-color: var(--green); }
.welcome-form .visitor-input-shell input { min-width: 0; width: 100%; flex: 1; background: transparent; border: 0; border-radius: 8px; padding: 14px 12px; min-height: 52px; font-size: 16px; outline: none; color: var(--text); box-shadow: none; }
.welcome-form input::placeholder { color: var(--muted); font-size: 14px; }
.welcome-form .input-icon-button { display: grid; place-items: center; width: 48px; height: 48px; flex: 0 0 48px; padding: 10px; color: #7c8790; background: transparent; border: 0; border-radius: 6px; box-shadow: none; }
.welcome-form .input-icon-button svg { width: 20px; height: 20px; }
.welcome-form .input-icon-button[aria-pressed=true] { color: var(--green-dark); }
.welcome-form .field-hint { display: block; font-size: 12px; color: var(--muted); min-height: 16px; margin-top: 7px; }
.welcome-form .field-hint:empty { display: none; }
.welcome-form .auth-error { font-size: 13px; color: var(--danger); min-height: 20px; margin: -4px 0 12px; }
.welcome-shell .primary-button { width: 100%; min-height: 50px; font-size: 16px; }
.registration-note { color: var(--muted); font-size: 12px; text-align: center; margin-top: 14px; }
.welcome-shell .auth-download-panel { display: flex; align-items: center; gap: 10px; padding: 20px 0; margin: 28px 0 0; border: 0; border-top: 1px solid var(--line); border-radius: 0; background: #fff; box-shadow: none; }
.welcome-shell .auth-download-icon { color: var(--sky); width: 28px; height: 40px; padding: 4px; background: transparent; border: 0; box-shadow: none; }
.welcome-shell .auth-download-icon svg { width: 22px; height: 22px; }
.welcome-shell .auth-download-copy { min-width: 0; flex: 1; }
.welcome-shell .auth-download-copy strong { font-size: 13px; font-weight: 500; }
.welcome-shell .auth-download-copy span { font-size: 12px; color: var(--muted); }
.welcome-shell .auth-download-button { background: #e9f6f0; color: var(--green-dark); min-height: 44px; border: 0; border-radius: 8px; box-shadow: none; padding: 10px 12px; font-size: 13px; white-space: nowrap; }
.welcome-footer { font-size: 12px; line-height: 1.6; text-align: center; color: var(--muted); margin-top: 12px; padding: 8px 0; }
.welcome-footer a { color: #576c77; text-decoration: none; margin-left: 6px; }
.welcome-reset h2 { font-size: 19px; font-weight: 500; }
.welcome-reset p { font-size: 14px; color: var(--muted); line-height: 1.6; }
.admin-contact { display: flex; justify-content: center; align-items: center; gap: 12px; padding: 24px; color: var(--green-dark); text-decoration: none; font-size: 19px; }
.admin-contact svg { width: 22px; height: 22px; }
.page-retry-state { padding: 64px 24px; text-align: center; display: grid; justify-items: center; gap: 12px; }
.page-retry-state > svg { width: 36px; height: 36px; color: var(--muted); }
.page-retry-state strong { font-size: 16px; font-weight: 500; }
.page-retry-state p { font-size: 13px; color: var(--muted); margin: 0 0 8px; }
.page-retry-state button { min-height: 48px; padding: 8px 24px; }
.refined-update { border-block: 1px solid var(--line); padding: 24px 0; margin-bottom: 20px; }
.refined-update h2 { font-size: 20px; font-weight: 600; margin: 0 0 20px; }
.refined-version-row { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; font-size: 14px; }
.refined-version-row span { color: var(--muted); }
.refined-version-row strong { font-weight: 500; }
.refined-update-message { color: var(--muted); font-size: 14px; line-height: 1.7; padding-block: 12px; }
.refined-update a { display: flex; align-items: center; justify-content: center; gap: 10px; text-decoration: none; }
.refined-update a svg { width: 20px; height: 20px; }
.refined-update .outline-button { width: 100%; min-height: 48px; color: var(--muted); border: 1px solid var(--line); background: #fff; border-radius: 8px; margin-top: 12px; box-shadow: none; }
body.app-mode :is(.notice-item,.admin-panel,.favorite-item,.qr-profile-card) { border-radius: 8px; box-shadow: none; }
body.app-mode .toast { background: #303b43; color: #fff; font-size: 14px; border-radius: 8px; }
@media (max-height: 730px) {
  body.app-mode .bottle-composer textarea { height: 126px; min-height: 126px; }
  body.app-mode .bottle-empty { min-height: 160px; padding-block: 20px; }
  .welcome-main { padding-top: 24px; }
  .welcome-brand { margin-bottom: 20px; }
  .welcome-brand img { width: 60px; height: 60px; margin-bottom: 12px; }
}
@media (min-width: 720px) {
  :root { --gutter: 20px; }
  body.app-mode .app-shell { border-inline: 1px solid #e0e4e8; }
  .welcome-main { padding-top: 64px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
/* Root tabs remain usable while their data refreshes. */
.tab-sync-notice { display: block; width: 100%; border: 0; padding: 12px 16px; background: #fff4e5; color: #765319; font: inherit; font-size: 13px; text-align: center; }
.tab-list-placeholder { padding: 12px 20px; }

/* App distribution stays separate from personal friend QR codes. */
.software-share-page { width: 100%; max-width: 440px; margin: 0 auto; padding: 24px 20px; box-sizing: border-box; text-align: center; }
.software-share-brand { display: flex; align-items: center; justify-content: center; gap: 12px; text-align: left; margin-bottom: 20px; }
.software-share-brand img { width: 48px; height: 48px; border-radius: 8px; }
.software-share-brand h2 { margin: 0; font-size: 22px; font-weight: 600; line-height: 1.4; }
.software-share-brand p { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.software-share-qr { width: min(248px, 100%); aspect-ratio: 1; box-sizing: border-box; padding: 8px; margin: 0 auto; background: #fff; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.software-share-qr img { display: block; width: 100%; height: 100%; object-fit: contain; border-radius: 0; }
.software-share-qr-pending { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; color: var(--muted); font-size: 13px; }
.software-share-qr-pending svg { width: 64px; height: 64px; color: #c0cacd; }
.software-share-caption { margin: 12px 0 0; color: var(--muted); font-size: 12px; }
.software-share-url { margin: 14px 0 20px; color: #496272; font-size: 13px; overflow-wrap: anywhere; line-height: 1.6; }
.software-share-actions { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
.software-share-page .app-share-command, .app-download-page .app-share-command { display: flex; align-items: center; justify-content: center; gap: 8px; min-width: 0; min-height: 52px; box-sizing: border-box; padding: 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: #394852; font-size: 14px; font-weight: 500; line-height: 1.4; box-shadow: none; text-decoration: none; }
.software-share-page .app-share-command svg, .app-download-page .app-share-command svg { width: 20px; height: 20px; flex: 0 0 20px; }
.software-share-page .app-share-command span { min-width: 0; overflow-wrap: anywhere; }
.software-share-page .app-share-command.primary-button, .app-download-page .app-share-command.primary-button { background: var(--green); color: #fff; border-color: var(--green); }
.software-share-page .app-share-command:disabled { opacity: .45; cursor: default; }
.software-share-page .app-share-command:not(:disabled):active { filter: brightness(.95); }
.software-share-secondary { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px; margin-top: 16px; padding-top: 8px; border-top: 1px solid var(--line); }
.software-share-secondary .app-share-command { border: 0; background: transparent; color: var(--muted); font-size: 12px; padding: 6px 0; min-height: 44px; }
.software-share-secondary .app-share-command svg { width: 16px; height: 16px; flex-basis: 16px; }
.app-download-page .welcome-main { padding-top: max(72px, env(safe-area-inset-top)); }
.app-download-release { display: flex; justify-content: space-between; gap: 12px; padding: 16px 0; margin-bottom: 16px; border-block: 1px solid var(--line); font-size: 14px; color: var(--muted); }
.app-download-release strong { color: var(--text); font-weight: 500; }
.app-download-note { color: var(--muted); font-size: 12px; line-height: 1.7; text-align: center; margin: 16px 0; }
.app-download-web { display: flex; align-items: center; justify-content: center; gap: 4px; min-height: 48px; color: #496272; font-size: 14px; text-decoration: none; }
.app-download-web svg { width: 16px; height: 16px; }
.tab-list-placeholder i { display: block; height: 56px; border-bottom: 1px solid #edf0f2; background: linear-gradient(#f0f2f4, #f0f2f4) left 12px / 40px 32px no-repeat, linear-gradient(#f0f2f4, #f0f2f4) 56px 16px / 45% 8px no-repeat, linear-gradient(#f5f6f7, #f5f6f7) 56px 32px / 65% 6px no-repeat; }
/* Chat workflows and paged collections share the existing compact settings UI. */
body.app-mode .app-shell:has(> .offline-readonly-banner) { grid-template-rows: calc(var(--header) + env(safe-area-inset-top, 0px)) auto minmax(0, 1fr) calc(var(--tabbar) + var(--safe-bottom)); }
body.app-mode .chat-screen:has(> .chat-reply-draft) { grid-template-rows: minmax(0, 1fr) auto auto; }
body.app-mode .chat-screen:has(> .chat-selection-toolbar) { grid-template-rows: minmax(0, 1fr) auto; }
.chat-workflow-backdrop [hidden] { display: none !important; }
.offline-readonly-banner { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; padding: 8px 12px; color: #6b4c14; background: #fff4d5; font-size: 12px; line-height: 1.5; }
.offline-readonly-banner span { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.offline-readonly-banner button { flex: 0 0 auto; padding: 6px 8px; min-height: 34px; color: #74510c; background: transparent; font-size: 12px; }
.chat-workflow-backdrop { position: fixed; inset: 0; z-index: 120; display: flex; align-items: center; justify-content: center; padding: max(12px, env(safe-area-inset-top)) 12px max(12px, env(safe-area-inset-bottom)); background: #0006; }
.chat-workflow { display: flex; flex-direction: column; width: min(100%, 520px); max-height: 85dvh; color: #253330; background: #f5f6f5; border-radius: 8px; overflow: hidden; }
.chat-workflow > header { display: flex; align-items: center; justify-content: space-between; padding: 8px 12px; min-height: 52px; background: #fff; border-bottom: 1px solid #e5e8e6; }
.chat-workflow > header strong { font-size: 16px; min-width: 0; overflow-wrap: anywhere; }
.chat-workflow > header button { display: grid; place-items: center; width: 40px; height: 40px; padding: 8px; color: inherit; background: transparent; flex: 0 0 40px; }
.chat-workflow-body { overflow: auto; overscroll-behavior: contain; min-height: 0; padding-bottom: 12px; }
.chat-workflow .wechat-list { margin: 0; border-radius: 0; box-shadow: none; }
.chat-workflow .wechat-row { min-width: 0; width: 100%; gap: 10px; }
.chat-workflow .wechat-row > .weix-icon { flex: 0 0 20px; width: 20px; }
.workflow-status, .favorite-page-status, .discover-page-status { padding: 12px; color: #68756f; font-size: 13px; text-align: center; overflow-wrap: anywhere; }
.workflow-search { display: flex; align-items: center; gap: 8px; padding: 12px; }
.workflow-search input { flex: 1; min-width: 0; }
.workflow-search button { flex: 0 0 40px; width: 40px; height: 40px; display: grid; place-items: center; padding: 8px; }
.workflow-results { margin: 0; padding: 0; list-style: none; }
.workflow-result { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 60px; padding: 12px 16px; color: #253330; text-align: left; background: #fff; border-bottom: 1px solid #edf0ed; border-radius: 0; }
.workflow-result > span { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.workflow-result strong, .workflow-result small { display: block; }
.workflow-result small { color: #738178; font-size: 12px; margin-top: 4px; }
.conversation-row.is-pinned { background: #edf4ef !important; }
.conversation-muted { display: inline-flex; color: #909c95; }
.conversation-muted .weix-icon { width: 15px; height: 15px; }
.group-settings-list { margin: 12px 0; border-radius: 0 !important; box-shadow: none !important; }
.group-settings-list .profile-form-row { gap: 10px; flex-wrap: wrap; }
.group-settings-list .profile-form-row > span { width: auto; flex: 0 0 auto; white-space: nowrap; }
.group-settings-list input, .group-settings-list select { min-width: 0; max-width: 100%; flex: 1 1 140px; }
.group-announcement-field { display: grid; gap: 8px; padding: 14px 16px; font-size: 14px; }
.group-announcement-field textarea { min-height: 88px; width: 100%; resize: vertical; }
.group-settings-list > button { min-height: 44px; margin-block: 4px; }
.favorite-detail-media audio, .favorite-detail-media video, .favorite-detail-media img { max-width: 100%; width: 100%; }
.favorite-detail-media audio { min-width: 0; height: 54px; }
.favorite-detail-media video { max-height: 65dvh; background: #111; object-fit: contain; }
.favorite-detail-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.favorites-page .favorite-batch { position: sticky; inset: auto; bottom: 0; display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; width: 100%; padding: 10px; background: #fff; border-top: 1px solid #e5e8e6; font-size: 12px; z-index: 2; }
.favorite-batch label { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.favorite-batch input { width: 18px; height: 18px; }
.favorite-batch button { min-height: 36px; padding: 6px 12px; }
.favorite-item { min-width: 0; }
.favorite-item .favorite-body { min-width: 0; overflow-wrap: anywhere; }
.favorite-select { min-width: 30px; min-height: 44px; display: grid; place-items: center; }
.favorite-search input { min-width: 0; }
.favorite-filters { overflow-x: auto; flex-wrap: nowrap; }
.favorite-filters button { flex: 0 0 auto; min-height: 40px; }
.chat-reply-draft { display: flex; align-items: center; gap: 8px; padding: 8px 12px; color: #536158; background: #f2f5f2; border-top: 1px solid #dfe6df; font-size: 12px; }
.chat-reply-draft > span { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-reply-draft button { width: 32px; height: 32px; padding: 6px; background: transparent; color: inherit; }
.message-quote { border-left: 3px solid #96ac9e; padding: 5px 8px; margin-bottom: 7px; font-size: 12px; color: #5e6d63; overflow-wrap: anywhere; background: #ffffff60; }
.message-recalled { text-align: center; color: #8b958f; font-size: 12px; padding: 8px; }
.message-row.is-selected { background: #d9eee1; }
.message-select-check { align-self: center; width: 20px; height: 20px; flex: 0 0 20px; accent-color: #07a261; }
.chat-selection-toolbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; padding: 8px 12px; background: #fff; border-top: 1px solid #e1e8e3; font-size: 13px; }
.chat-selection-toolbar button { min-height: 38px; padding: 8px 12px; }
@media (max-width: 360px) {
  .chat-workflow-backdrop { padding-inline: 6px; }
  .favorite-filters button { padding-inline: 9px; font-size: 12px; }
  .favorite-detail-actions button { flex: 1 1 90px; font-size: 13px; padding-inline: 8px; }
}
.favorite-record { padding: 12px 0; border-bottom: 1px solid #e8e8e8; min-width: 0; }
.favorite-record > small { color: #777; }
.favorite-record .favorite-detail-text { margin: 8px 0; white-space: pre-wrap; overflow-wrap: anywhere; }

/* Five root destinations share chrome; every child view owns its Back path. */
body.app-mode .topbar-right { width: auto; min-width: 44px; }
.topbar-actions { display: flex; align-items: center; gap: 0; }
body.app-mode .app-shell.is-detail { grid-template-rows: calc(var(--header) + env(safe-area-inset-top, 0px)) minmax(0, 1fr); }
body.app-mode .app-shell.is-detail > .tabs { display: none !important; }
body.app-mode .app-shell.is-detail:has(> .offline-readonly-banner) { grid-template-rows: calc(var(--header) + env(safe-area-inset-top, 0px)) auto minmax(0, 1fr); }
body.app-mode .app-topbar.mine-root { background: #fff; border-bottom: 0; }
body.app-mode .app-topbar.mine-root #appTitle { visibility: hidden; }
body.app-mode .tabs .tab-unread-badge { border-color: #f7f7f7; }
body.app-mode .tabs button.active .tab-icon { color: #07b657; }
body.app-mode .tabs button[data-tab="Chat"].active svg { fill: currentColor; }
body.app-mode .tabs button[data-tab="Mine"].active svg circle { fill: currentColor; }
body.app-mode .tabs button[data-tab="Contacts"].active svg circle { fill: currentColor; }
body.app-mode .search-line { min-height: 36px; background: #ededed; padding: 0 10px; }
body.app-mode #mainContent .search-line input { height: 36px; min-height: 36px; font-size: 15px; }
body.app-mode .search-line input:not(:focus)::placeholder { text-align: center; }
body.app-mode .conversation-row .row-main { gap: 4px; }
body.app-mode .conversation-row .row-main small { font-size: 14px; color: #888; }
body.app-mode .conversation-row .row-title-line strong { font-weight: 400; }
body.app-mode .conversation-row time { font-size: 11px; color: #888; }
body.app-mode .contact-row { min-height: 64px; padding-block: 10px; }
body.app-mode .contact-row .avatar { width: 42px; height: 42px; flex-basis: 42px; }
body.app-mode .shortcut-icon { border-radius: 4px; }
body.app-mode .contact-row::after, body.app-mode .contact-shortcuts .wechat-row::after { left: 72px; right: 0; }
body.app-mode .contact-shortcuts .wechat-row { min-height: 64px; padding-block: 10px; }

/* Profile and discovery use full-width grouped rows, not dashboard tiles. */
body.app-mode .mine-profile-block { position: relative; margin: 0 0 12px; }
body.app-mode .mine-profile-block .profile-row { width: 100%; text-align: left; padding-right: 88px; }
body.app-mode .mine-profile-block .profile-row > svg { position: absolute; right: 16px; top: 61px; width: 16px; height: 16px; }
body.app-mode .mine-profile-block .row-main strong { font-size: 22px; font-weight: 600; }
body.app-mode .mine-profile-block .row-main small { font-size: 13px; line-height: 1.6; }
.profile-qr-button { position: absolute; right: 34px; top: 47px; display: grid; place-items: center; width: 44px; height: 44px; padding: 10px; background: transparent; color: #8a8a8a; border: 0; }
.profile-qr-button svg { width: 20px; height: 20px; }
body.app-mode .settings-row .row-main strong { font-weight: 400; font-size: 17px; }
body.app-mode .settings-row::after { left: 56px; right: 0; }
body.app-mode .settings-row[data-mine-view="favorites"] .settings-icon { color: #ed9b18; }
body.app-mode .settings-row[data-mine-view="moments"] .settings-icon { color: #3b8edb; }
body.app-mode .settings-row[data-mine-view="app-share"] .settings-icon { color: #338edb; }
body.app-mode .mine-settings .settings-icon { display: none; }
body.app-mode .mine-settings .settings-row::after { left: var(--gutter); }
body.app-mode .mine-settings .logout-row { display: flex; justify-content: center; margin-top: 20px; color: var(--text); }
body.app-mode .discover-root { background: var(--bg); padding-top: 2px; }
body.app-mode .discover-group { margin: 10px 0; }
body.app-mode .discover-row { min-height: 60px; gap: 16px; }
body.app-mode .discover-entry-icon { width: 24px; height: 24px; flex-basis: 24px; }
body.app-mode .discover-entry-feed { color: #07a854; }
body.app-mode .discover-entry-scan { color: #2782d7; }
body.app-mode .discover-entry-voice-match, body.app-mode .discover-entry-invite { color: #e7981d; }
body.app-mode .discover-content .moments-cover { overflow: visible; }
body.app-mode .discover-content .discover-visibility-note { padding-top: 22px; min-height: 52px; }
body.app-mode .moment-likes { background: #f3f3f3; color: #576b95; }
body.app-mode .moment-item .moment-media { border-radius: 2px; }
body.app-mode .moment-compose-sheet { margin: 0; }

/* Preserve the avatar/media grid while restoring the familiar bubble silhouette. */
body.app-mode .message:not(.media-only)::before { display: block; top: 14px; left: -6px; border-top: 5px solid transparent; border-bottom: 5px solid transparent; border-right: 7px solid #fff; border-left: 0; }
body.app-mode .message-row.mine .message:not(.media-only)::before { display: block; left: auto; right: -6px; border-left: 7px solid var(--bubble-own); border-right: 0; }
body.app-mode .message.media-only { max-width: 82%; }
body.app-mode .chat-media-open, body.app-mode .chat-message-media { border-radius: 4px; }
body.app-mode .message-row { column-gap: 10px; }
body.app-mode .message-sender { padding: 0; color: #888; font-size: 12px; line-height: 18px; }
body.app-mode .message-time { color: #888; font-size: 12px; }
body.app-mode .chat-plus-panel :is(button, label) { color: #666; }
body.app-mode .chat-plus-icon { border: 0; color: #333; }
body.app-mode .chat-composer .chat-send, body.app-mode .page-actions .primary-button { color: #073d25; }
body.app-mode .chat-composer .chat-send { border-radius: 4px; }
body.app-mode .chat-tool svg { width: 27px; height: 27px; }

body.app-mode .official-contact-notice { padding-block: 9px; font-size: 12px; }
body.app-mode .bottle-composer { padding-top: 20px; }
body.app-mode .bottle-composer textarea { height: 132px; min-height: 132px; padding-top: 18px; }
body.app-mode .page-actions { padding-top: 12px; gap: 12px; }
body.app-mode .page-actions :is(.primary-button, .outline-button) { border-radius: 4px; height: 44px; }
body.app-mode .page-actions .outline-button { background: #f2f2f2; border-color: #f2f2f2; }
body.app-mode .bottle-quota { padding-bottom: 16px; }
body.app-mode .picked-bottle-section { border-top: 8px solid var(--bg); background: #fff; }
body.app-mode .bottle-empty { padding: 0 0 20px; min-height: 0; background: #fff; }
body.app-mode .bottle-empty > .bottle-sea-image { display: block; width: 100%; max-width: none; height: 160px; object-fit: cover; border: 0; border-radius: 0; margin: 0 0 16px; }
body.app-mode .bottle-empty strong { color: #444; font-size: 15px; }
body.app-mode .bottle-empty span { font-size: 12px; }

body.app-mode .group-detail-screen { padding: 0; background: var(--bg); }
body.app-mode .group-detail-screen #groupDetail { padding: 0; margin: 0; background: var(--bg); border: 0; border-radius: 0; }
body.app-mode .group-detail-screen .group-member-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); margin: 0; padding: 18px 12px; background: #fff; gap: 16px 8px; }
body.app-mode .group-detail-screen .group-settings-list { margin: 10px 0; }
body.app-mode .group-detail-screen .group-settings-list > .text-command { width: 100%; margin: 0; padding: 10px 16px; border-top: 1px solid #f0f0f0; font-size: 14px; }
body.app-mode .group-detail-screen .group-settings-list > .danger { width: 100%; margin: 10px 0 0; min-height: 56px; color: var(--danger); background: #fff; border: 0; border-top: 10px solid var(--bg); border-radius: 0; }
body.app-mode .group-detail-screen .group-media-entry { margin: 0; gap: 12px; font-size: 16px; }
body.app-mode .group-detail-screen .group-media-entry > span { flex: 1; text-align: left; }
body.app-mode .group-detail-screen .group-media-entry > svg { width: 20px; height: 20px; }
body.app-mode .group-announcement-field textarea { background: #fafafa; border: 1px solid var(--line); border-radius: 4px; padding: 10px; font-size: 15px; line-height: 1.5; }
body.app-mode .group-manage-section { padding: 0; margin: 0; background: transparent; border: 0; border-radius: 0; }
body.app-mode .group-manage-section > .panel-title { padding: 16px 16px 0; background: #fff; margin: 0; }
body.app-mode .group-manage-section > .panel-title h3 { font-size: 15px; font-weight: 500; line-height: 1.5; overflow-wrap: anywhere; }
body.app-mode .group-member-grid .member { min-width: 0; }
body.app-mode .group-member-grid .member-name { margin-top: 6px; font-size: 12px; color: #666; }
body.app-mode .group-member-grid .member-role { font-size: 11px; color: #888; }
body.app-mode .group-member-grid .member-remove { display: none; }
body.app-mode #groupDetail.is-removing-members .member-remove { display: grid; place-items: center; top: -6px; right: 0; width: 26px; height: 26px; min-height: 26px; background: #fa5151; color: #fff; border: 2px solid #fff; border-radius: 50%; }
body.app-mode .group-member-grid .member-add { width: 48px; height: 48px; min-height: 48px; justify-self: center; align-self: start; padding: 0; font-size: 27px; border: 1px dashed #ccc; border-radius: 4px; color: #888; background: #fff; }
body.app-mode .member-remove-toggle { min-width: 0; width: 100%; min-height: 70px; align-self: start; display: flex; flex-direction: column; align-items: center; padding: 0; gap: 6px; color: #888; background: #fff; border: 0; border-radius: 0; }
body.app-mode .member-remove-toggle svg { width: 48px; height: 48px; padding: 12px; border: 1px dashed #ccc; border-radius: 4px; }
body.app-mode .member-remove-toggle span { font-size: 11px; line-height: 16px; }
body.app-mode .member-remove-toggle[aria-pressed="true"] { color: var(--danger); }
body.app-mode .group-settings-list select { appearance: none; border: 0; background: transparent; padding: 10px 0; font: inherit; color: #777; text-align: right; }
@media (max-width: 360px) {
  body.app-mode .group-detail-screen .group-member-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  body.app-mode .profile-row { padding-left: 16px; gap: 12px; }
  body.app-mode .mine-profile-block .profile-row { padding-right: 76px; }
  body.app-mode .mine-profile-block .row-main strong { font-size: 20px; }
  .profile-qr-button { right: 28px; }
  body.app-mode .bottle-compose-heading strong { font-size: 15px; }
  body.app-mode .message { max-width: 88%; }
}
