/* Your fonts, delivered with the chat from Pages: copy your res/font files into public/fonts/
   (regular, medium, semibold, bold, space_grotesk — .ttf or .otf). Missing → system font. */
@font-face { font-family: A; font-weight: 400; src: url(fonts/regular.ttf), url(fonts/regular.otf); font-display: swap; }
@font-face { font-family: A; font-weight: 500; src: url(fonts/medium.ttf), url(fonts/medium.otf); font-display: swap; }
@font-face { font-family: A; font-weight: 600; src: url(fonts/semibold.ttf), url(fonts/semibold.otf); font-display: swap; }
@font-face { font-family: A; font-weight: 700; src: url(fonts/bold.ttf), url(fonts/bold.otf); font-display: swap; }
@font-face { font-family: G; src: url(fonts/space_grotesk.ttf), url(fonts/space_grotesk.otf); font-display: swap; }

/* colors: your colors.xml (light/dark) from the app, then public/overrides.json on top — these are fallbacks */
:root {
  --c-background: #fff; --c-text: #111; --c-text1: #222; --c-text2: #777; --c-n_text_mid: #888; --c-hint: #aaa;
  --c-n_box_solid: #f3f3f5; --c-n_box_stroke: #e5e5ea; --c-n_secondary: #7a5cff; --c-n_secondary_10: #7a5cff1a;
  --c-n_secondary_20: #7a5cff33; --c-n_secondary_80: #7a5cffcc; --c-n_accent: #ff4d8d; --c-n_accent_10: #ff4d8d1a;
  --c-n_accent_20: #ff4d8d33; --c-n_primary: #7a5cff; --c-right_message: #7a5cff; --c-left_message: #eceef1;
  --c-search: #eceef1; --c-live_follow: #ff2d55; --c-green: #34c759; --c-red: #ff3b30; --c-separator: #f2f2f2;
  --c-navigation_background_70: #ffffffb3; --c-dark_gray: #555; --c-orange: #ff9500; --c-blue: #0a84ff; --c-white: #fff;
  --c-right_text: #fff;
  --ease: cubic-bezier(.2, .8, .2, 1);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body, #root { margin: 0; height: 100%; overflow: hidden; background: var(--c-background); }
body {
  font-family: A, system-ui, sans-serif; color: var(--c-text); font-size: 14px;
  -webkit-user-select: none; user-select: none; overscroll-behavior: none; -webkit-font-smoothing: antialiased;
}
input, textarea, button { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; }
img { -webkit-user-drag: none; -webkit-touch-callout: none; }
.selectable { -webkit-user-select: text; user-select: text; }

/* ── screens / navigation ── */
.screen { position: absolute; inset: 0; display: flex; flex-direction: column; background: var(--c-background); contain: strict; will-change: transform; }
.screen.viewer { background: transparent; will-change: opacity; }
.scroll { flex: 1; overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }

/* ── icons: PNGs tinted with currentColor through a mask ── */
.ic { display: inline-block; width: 20px; height: 20px; flex: none; background: currentColor;
  -webkit-mask: var(--ic) center / contain no-repeat; mask: var(--ic) center / contain no-repeat; }
.btn { width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center; flex: none; border-radius: 18px; }
.btn:active, .press:active { opacity: .6; }
.box { background: var(--c-n_box_solid); border: 1px solid var(--c-n_box_stroke); }
.box-sec { border-radius: 10px; background: var(--c-n_secondary_10); border: 1px solid var(--c-n_secondary_20); color: var(--c-n_secondary); }
.box-acc { border-radius: 10px; background: var(--c-n_accent_10); border: 1px solid var(--c-n_accent_20); color: var(--c-n_accent); }

.avatar { border-radius: 50%; object-fit: cover; background: var(--c-n_box_stroke); flex: none; display: block; }
.ring { padding: 2px; border-radius: 50%; background: conic-gradient(var(--c-n_story1, var(--c-n_accent)), var(--c-n_secondary), var(--c-n_story1, var(--c-n_accent))); flex: none; }
.ring.seen { background: var(--c-n_box_stroke); }
.ring > .avatar { border: 2px solid var(--c-background); }
.badge { min-width: 17px; height: 17px; padding: 0 5px; border-radius: 9px; background: var(--c-n_secondary); color: #fff;
  font: 700 10px A, system-ui, sans-serif; display: inline-flex; align-items: center; justify-content: center; }
.empty { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; color: var(--c-n_text_mid); padding: 40px; text-align: center; }
.empty .ic { width: 90px; height: 90px; opacity: .35; color: var(--c-text); }
.spin { width: 22px; height: 22px; border-radius: 50%; border: 2.5px solid var(--c-n_box_stroke); border-top-color: var(--c-n_secondary); animation: spin .8s linear infinite; margin: 14px auto; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── chats ── */
.header { display: flex; align-items: center; gap: 10px; padding: 10px; flex: none; }
.me { font: 16px G, A, system-ui, sans-serif; max-width: 160px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.grow { flex: 1; min-width: 0; }
.search { height: 40px; margin: 0 10px; padding: 0 6px 0 12px; border-radius: 20px; display: flex; align-items: center; gap: 10px; flex: none; color: var(--c-n_text_mid); }
.search input { flex: 1; border: 0; outline: 0; background: none; font-weight: 500; color: var(--c-text); min-width: 0; }
.search input::placeholder { color: var(--c-n_text_mid); }
.strip { display: flex; gap: 10px; overflow-x: auto; padding: 15px 10px 0; flex: none; scrollbar-width: none; }
.strip::-webkit-scrollbar, .tabs::-webkit-scrollbar { display: none; }
.strip-item { width: 70px; flex: none; text-align: center; }
.strip-av { position: relative; width: 70px; height: 70px; display: flex; align-items: center; justify-content: center; }
.strip-av::after { content: ''; position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--c-n_secondary); opacity: .5; }
.strip-badges { position: absolute; right: 2px; bottom: 0; display: flex; align-items: center; }
.group-badge { width: 17px; height: 17px; border-radius: 9px; background: var(--c-n_accent); border: 1px solid var(--c-background); color: var(--c-text); display: flex; align-items: center; justify-content: center; margin-right: -5px; z-index: 1; }
.group-badge .ic { width: 9px; height: 9px; }
.strip-title { font: 500 10px/13px A, system-ui, sans-serif; margin-top: 3px; min-height: 26px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; word-break: break-word; }
.tabs { display: flex; gap: 10px; overflow-x: auto; padding: 10px 10px 0; flex: none; scrollbar-width: none; }
.tab { height: 40px; padding: 0 15px; border-radius: 20px; display: flex; align-items: center; gap: 10px; white-space: nowrap; font: 600 13px A, system-ui, sans-serif; color: var(--c-n_text_mid); flex: none; }
.tab.on { background: var(--c-n_secondary_20); border: 1px solid var(--c-n_secondary_80); color: var(--c-n_secondary); }
.tab .badge { background: var(--c-n_secondary_80); color: var(--c-text); }
.chat-list { padding: 10px 0 80px; }
.row-wrap { position: relative; height: 70px; overflow: hidden; content-visibility: auto; contain-intrinsic-size: auto 70px; }
.row-actions { position: absolute; top: 0; bottom: 0; right: 0; display: flex; visibility: hidden; }
.row-wrap.swiping .row-actions { visibility: visible; }
.row-actions button { width: 45px; height: 70px; display: flex; align-items: center; justify-content: center; color: #fff; }
.row { position: absolute; inset: 0; display: flex; align-items: center; gap: 10px; padding: 0 10px; background: var(--c-background); touch-action: pan-y; }
.row.anim { transition: transform .22s var(--ease); }
.row:active { background: var(--c-n_box_solid); }
.av-wrap { position: relative; flex: none; }
.dot { position: absolute; right: 3px; bottom: 3px; width: 14px; height: 14px; border-radius: 50%; background: var(--c-green); border: 2px solid var(--c-background); }
.row-name { display: flex; align-items: center; gap: 5px; font-size: 14px; }
.row-name b { font-weight: 400; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-name b.unread { font-weight: 600; }
.row-name .ic { width: 14px; height: 14px; color: var(--c-n_text_mid); }
.row-sub { font-size: 13px; color: var(--c-n_text_mid); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
.row-sub.hot { color: var(--c-n_primary); }
.row-end { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex: none; }
.time { font-size: 10px; color: var(--c-n_text_mid); }
.fab { position: absolute; right: 10px; bottom: 12px; height: 40px; padding: 0 12px; border-radius: 16px; background: var(--c-n_primary); color: #fff; display: flex; align-items: center; gap: 10px; font: 16px G, A, system-ui, sans-serif; box-shadow: 0 4px 14px #0003; }
.fab .ic { width: 20px; height: 20px; }
.go { position: absolute; width: 32px; height: 32px; border-radius: 16px; background: var(--c-text); color: var(--c-background); opacity: .75; display: flex; align-items: center; justify-content: center; }
.search-title { font: 600 16px A, system-ui, sans-serif; margin: 14px 10px 5px; }
.search-row { display: flex; align-items: center; gap: 10px; padding: 6px 10px; font: 500 13px A, system-ui, sans-serif; }

/* ── conversation ── */
.c-header { display: flex; align-items: center; gap: 6px; padding: 6px 7px 6px 5px; background: var(--c-navigation_background_70); flex: none; position: relative; z-index: 2; }
.c-title { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1; margin-left: 4px; }
.c-name { font: 600 16px A, system-ui, sans-serif; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: flex; align-items: center; gap: 4px; }
.c-sub { font-size: 13px; color: var(--c-live_follow); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: flex; align-items: center; gap: 5px; }
.c-sub i { width: 9px; height: 9px; border-radius: 50%; background: var(--c-green); flex: none; }
.c-body { position: relative; flex: 1; min-height: 0; display: flex; flex-direction: column; }
.c-bg { position: absolute; inset: 0; background-size: cover; background-position: center; opacity: .5; pointer-events: none; }
.msgs { flex: 1; overflow-y: auto; overflow-x: hidden; display: flex; flex-direction: column-reverse; padding: 8px 0 10px; overscroll-behavior: contain; position: relative; }
.c-top { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 24px 0 16px; }
.c-top b { font: 600 16px A, system-ui, sans-serif; margin-top: 6px; }
.c-top .sub { font-size: 12px; }
.pill-btn { height: 35px; padding: 0 15px; border-radius: 10px; background: var(--c-n_box_stroke); display: inline-flex; align-items: center; font-size: 13px; margin-top: 4px; }

.m { padding: 0 7px; margin-top: 7px; content-visibility: auto; contain-intrinsic-size: auto 52px; touch-action: pan-y; }
.m.grp { margin-top: 2px; }
.date { align-self: center; margin: 4px auto 10px; width: fit-content; background: var(--c-search); border-radius: 10px; padding: 1px 8px; font-size: 10px; }
.sys { width: fit-content; max-width: 85%; margin: 0 auto; background: var(--c-search); border-radius: 14px; padding: 5px 10px; font-size: 12px; text-align: center; }
.m-row { display: flex; align-items: flex-end; gap: 6px; position: relative; }
.m-row.mine { justify-content: flex-end; }
.m-col { display: flex; flex-direction: column; min-width: 0; }
.mine .m-col { align-items: flex-end; }
.m-av { width: 28px; flex: none; align-self: flex-end; margin-bottom: 2px; }
.m-av.ghost { visibility: hidden; }
.sender { font: 500 11px A, system-ui, sans-serif; color: var(--c-n_secondary); margin: 0 0 3px 12px; }
.slide { display: flex; align-items: flex-end; gap: 5px; max-width: calc(100% - 44px); min-width: 0; }
.mine .slide { max-width: 86%; }
.slide.back { transition: transform .2s var(--ease); }
.meta { display: flex; align-items: center; gap: 3px; font: 500 9px A, system-ui, sans-serif; color: var(--c-text2); white-space: nowrap; padding-bottom: 4px; flex: none; }
.meta .ic { width: 18px; height: 18px; }
.meta .read { color: var(--c-n_secondary); }
.bubble { border-radius: 20px; min-height: 38px; padding: 9px 12px; background: var(--c-left_message); color: var(--c-text); word-break: break-word; white-space: pre-wrap; font-size: 14px; line-height: 1.38; position: relative; }
.mine .bubble { background: var(--c-right_message); color: var(--c-right_text); }
.bubble a { color: inherit; text-decoration: underline; }
.bubble.emoji { background: none !important; font-size: 40px; line-height: 1.15; padding: 0 2px; }
.bubble.media { padding: 0; overflow: hidden; background: var(--c-n_box_stroke); width: 160px; height: 240px; }
.bubble.media img, .bubble.media video { width: 100%; height: 100%; object-fit: cover; display: block; }
.play { position: absolute; left: 50%; top: 50%; width: 42px; height: 42px; margin: -21px 0 0 -21px; border-radius: 50%; background: #0007; color: #fff; display: flex; align-items: center; justify-content: center; }
.play .ic { width: 16px; height: 16px; }
.uploading { position: absolute; inset: 0; background: #0008; color: #fff; display: flex; flex-direction: column; gap: 6px; align-items: center; justify-content: center; font: 500 12px A, system-ui, sans-serif; }
.uploading .spin { margin: 0; border-color: #fff4; border-top-color: #fff; }
.one-time { display: flex; align-items: center; gap: 8px; color: #fff !important; background: var(--c-n_secondary) !important; font: 500 15px A, system-ui, sans-serif; }
.one-time.opened { opacity: .55; }
.voice { width: 210px; display: flex; align-items: center; gap: 8px; padding: 6px 12px 6px 6px; position: relative; overflow: hidden; }
.voice .pbtn { width: 30px; height: 30px; border-radius: 50%; background: #ffffff33; display: flex; align-items: center; justify-content: center; flex: none; z-index: 1; }
.voice .bar { flex: 1; height: 4px; border-radius: 2px; background: currentColor; opacity: .25; position: relative; z-index: 1; }
.voice .bar i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 2px; background: currentColor; }
.voice .vt { font-size: 12px; z-index: 1; min-width: 34px; text-align: right; }
.card { width: 160px; border-radius: 20px; overflow: hidden; background: var(--c-n_box_stroke); position: relative; padding: 0 !important; }
.card .img { width: 100%; height: 240px; object-fit: cover; display: block; background: #0002; }
.card .head { position: absolute; left: 0; right: 0; top: 0; display: flex; align-items: center; gap: 6px; padding: 7px; background: linear-gradient(#0008, #0000); color: #fff; font: 600 11px A, system-ui, sans-serif; }
.card .badge-type { position: absolute; right: 8px; top: 8px; width: 18px; height: 18px; color: #fff; }
.card .cap { padding: 7px 10px; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.map { width: 170px; height: 150px; padding: 0 !important; overflow: hidden; display: flex; align-items: flex-end; background-size: cover; background-position: center; }
.map span { width: 100%; text-align: center; color: #fff; background: #0008; padding: 6px; font: 500 12px A, system-ui, sans-serif; }
.contact { display: flex; align-items: center; gap: 10px; padding: 10px 22px 10px 10px; }
.contact .cicon { width: 40px; height: 40px; border-radius: 20px; background: #fff; color: #333; display: flex; align-items: center; justify-content: center; flex: none; }
.callb { display: flex; align-items: center; gap: 10px; padding: 6px 14px 6px 6px; }
.callb .cicon { width: 36px; height: 36px; border-radius: 18px; background: #ffffff1f; display: flex; align-items: center; justify-content: center; }
.callb small { display: block; opacity: .7; font-size: 11px; }
.reply-in { display: flex; gap: 8px; margin-bottom: 7px; font-size: 12px; opacity: .85; max-width: 240px; }
.reply-in::before { content: ''; width: 3px; border-radius: 2px; background: currentColor; opacity: .35; flex: none; }
.reply-in img { width: 42px; height: 42px; border-radius: 8px; object-fit: cover; flex: none; }
.reply-in .rt { overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; white-space: normal; }
.reply-in b { display: block; font-weight: 600; }
.reacts { display: flex; gap: 1px; margin: -6px 10px 0; padding: 2px 6px; border-radius: 12px; background: var(--c-left_message); border: 2px solid var(--c-background); font-size: 13px; position: relative; z-index: 1; width: fit-content; }
.reacts small { font-size: 10px; margin-left: 3px; color: var(--c-text); align-self: center; }
.tr { font-size: 12px; opacity: .8; margin-top: 6px; padding-top: 6px; border-top: 1px solid #ffffff2e; }
.tr-btn { width: 26px; height: 26px; border-radius: 13px; display: flex; align-items: center; justify-content: center; color: var(--c-text2); flex: none; align-self: center; }
.failed { color: var(--c-red); font: 500 11px A, system-ui, sans-serif; margin-top: 3px; }
.reply-hint { position: absolute; left: 4px; top: 50%; margin-top: -14px; width: 28px; height: 28px; border-radius: 14px; background: var(--c-n_box_solid); color: var(--c-text); display: flex; align-items: center; justify-content: center; opacity: 0; }
.sel { width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid var(--c-text2); flex: none; align-self: center; margin-right: 4px; }
.sel.on { background: var(--c-n_secondary); border-color: var(--c-n_secondary); }

/* live cards (your 2 designs) */
.live { width: 170px; height: 230px; border-radius: 20px; overflow: hidden; position: relative; padding: 0 !important; background: #2b2e2c; color: #fff; }
.live .poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.live .shade { position: absolute; inset: 0; background: linear-gradient(#0000 55%, #0009); }
.live .now { position: absolute; left: 10px; top: 10px; background: #ff2d55; color: #fff; font: 500 13px A, system-ui, sans-serif; padding: 4px 9px; border-radius: 8px; }
.live .who { position: absolute; left: 10px; right: 10px; bottom: 10px; display: flex; align-items: center; gap: 7px; font: 500 13px A, system-ui, sans-serif; text-shadow: 0 1px 3px #0008; }
.live .who span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.live.ended { background: linear-gradient(160deg, #6d6f6c 0%, #3b403d 55%, #2f3a35 100%); display: flex; flex-direction: column; align-items: center; }
.live.ended .t { margin-top: 26px; font: 600 15px A, system-ui, sans-serif; color: #ffffff8c; }
.live.ended .av { margin-top: auto; border: 2px solid #fff; border-radius: 50%; }
.live.ended .n { font: 600 13px A, system-ui, sans-serif; margin-top: 8px; max-width: 90%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.live.ended .follow { margin: 12px 0 16px; height: 36px; width: 130px; border-radius: 18px; background: #ff2d55; color: #fff; font: 600 15px A, system-ui, sans-serif; }
.live.ended .follow.done { background: #ffffff26; }

/* typing + footer */
.typing { display: flex; align-items: center; gap: 7px; margin: 5px 7px 0; color: var(--c-live_follow); font-size: 14px; }
.dots { display: inline-flex; gap: 3px; }
.dots i { width: 5px; height: 5px; border-radius: 50%; background: currentColor; animation: blink 1.2s infinite; }
.dots i:nth-child(2) { animation-delay: .2s; } .dots i:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }
.footer { background: var(--c-navigation_background_70); padding: 8px 10px 10px; flex: none; position: relative; z-index: 2; }
.composer { display: flex; align-items: flex-end; gap: 6px; }
.input-box { flex: 1; min-width: 0; border-radius: 20px; display: flex; align-items: flex-end; padding: 0 4px 0 6px; }
.input-box textarea { flex: 1; min-width: 0; border: 0; outline: 0; background: none; resize: none; font-size: 15px; line-height: 20px; padding: 8px 4px; max-height: 128px; color: var(--c-text); -webkit-user-select: text; user-select: text; }
.input-box textarea::placeholder { color: var(--c-n_text_mid); }
.send { width: 38px; height: 38px; border-radius: 19px; background: var(--c-n_secondary); color: #fff; display: flex; align-items: center; justify-content: center; flex: none; }
.send.mic { background: var(--c-live_follow); }
.attach { color: var(--c-n_text_mid); }
.reply-box { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; font: 500 12px A, system-ui, sans-serif; }
.reply-box .rt { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; opacity: .7; }
.rec { height: 38px; border-radius: 19px; background: var(--c-right_message); color: #fff; display: flex; align-items: center; gap: 10px; padding: 0 4px; flex: 1; }
.rec .rbtn { width: 30px; height: 30px; border-radius: 15px; background: #fff; color: var(--c-right_message); display: flex; align-items: center; justify-content: center; }
.rec .red { width: 10px; height: 10px; border-radius: 50%; background: #ff3b30; animation: blink 1s infinite; }
.decision { background: var(--c-separator); padding: 8px 15px 4px; text-align: center; flex: none; }
.decision b { font: 700 12px A, system-ui, sans-serif; display: block; }
.decision p { font-size: 10px; margin: 2px 0 0; letter-spacing: .3px; }
.decision .btns { display: flex; height: 34px; margin-top: 4px; }
.decision .btns button { flex: 1; font: 500 13px A, system-ui, sans-serif; }
.join { width: 100%; height: 42px; border-radius: 21px; background: var(--c-live_follow); color: #fff; font: 600 14px A, system-ui, sans-serif; }
.join.on { background: none; border: 1px solid var(--c-live_follow); color: var(--c-live_follow); }
.selbar { height: 44px; display: flex; align-items: center; gap: 10px; }
.danger-btn { height: 35px; padding: 0 12px; border-radius: 18px; background: var(--c-red); color: #fff; font: 500 13px A, system-ui, sans-serif; }
.busy { position: absolute; inset: 0; background: #0005; display: flex; align-items: center; justify-content: center; z-index: 50; }
.busy .spin { border-color: #fff4; border-top-color: #fff; }

/* ── sheets / menus / dialogs ── */
.dim { position: absolute; inset: 0; background: #0006; z-index: 100; animation: fade .18s ease; }
.sheet { position: absolute; left: 0; right: 0; bottom: 0; z-index: 101; background: var(--c-background); border-radius: 20px 20px 0 0; padding: 8px 0 14px; animation: up .24s var(--ease); max-height: 80%; overflow-y: auto; }
.sheet .grab { width: 40px; height: 4px; border-radius: 2px; background: var(--c-n_box_stroke); margin: 2px auto 8px; }
.sheet button.item { width: 100%; text-align: left; padding: 14px 20px; font: 500 15px A, system-ui, sans-serif; display: flex; align-items: center; gap: 14px; }
.sheet button.item:active { background: var(--c-n_box_solid); }
.sheet button.item.danger { color: var(--c-red); }
.emojis { display: flex; justify-content: space-around; padding: 6px 10px 10px; border-bottom: 1px solid var(--c-n_box_stroke); }
.emojis button { font-size: 26px; width: 42px; height: 42px; border-radius: 21px; }
.emojis button.on { background: var(--c-n_secondary_20); }
.dialog { position: absolute; left: 24px; right: 24px; top: 50%; transform: translateY(-50%); z-index: 101; background: var(--c-background); border-radius: 20px; padding: 20px; animation: pop .2s var(--ease); }
.dialog h3 { margin: 0 0 6px; font: 600 16px A, system-ui, sans-serif; }
.dialog p { margin: 0 0 16px; color: var(--c-n_text_mid); font-size: 13px; }
.dialog .acts { display: flex; flex-direction: column; gap: 8px; }
.dialog .acts button { height: 42px; border-radius: 12px; background: var(--c-n_box_solid); font: 500 14px A, system-ui, sans-serif; }
.dialog .acts button.danger { color: var(--c-red); }
.bgs { display: flex; gap: 10px; overflow-x: auto; padding: 4px 14px 10px; }
.bg-item { width: 70px; height: 110px; border-radius: 12px; flex: none; background: var(--c-n_box_solid) center / cover; border: 2px solid transparent; display: flex; align-items: center; justify-content: center; }
.bg-item.on { border-color: var(--c-n_secondary); }
@keyframes fade { from { opacity: 0; } }
@keyframes up { from { transform: translateY(100%); } }
@keyframes pop { from { opacity: 0; transform: translateY(-46%) scale(.96); } }

/* ── chat info ── */
.info-top { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 10px 0 18px; }
.info-top b { font: 600 18px A, system-ui, sans-serif; }
.info-btns { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; padding: 0 10px 10px; }
.info-btns button { min-width: 74px; padding: 10px 8px; border-radius: 14px; display: flex; flex-direction: column; align-items: center; gap: 6px; font: 500 11px A, system-ui, sans-serif; }
.section-t { font: 600 15px A, system-ui, sans-serif; margin: 14px 12px 8px; }
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; padding: 0 2px 30px; }
.grid div { aspect-ratio: 1; background: var(--c-n_box_stroke) center / cover; position: relative; }
.member { display: flex; align-items: center; gap: 10px; padding: 8px 12px; font: 500 14px A, system-ui, sans-serif; }
.member small { color: var(--c-n_text_mid); font-size: 11px; margin-left: auto; }

/* ── media viewer ── */
.viewer-bg { position: absolute; inset: 0; background: #000; }
.viewer-stage { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; touch-action: none; overflow: hidden; }
.viewer-stage img, .viewer-stage video { max-width: 100%; max-height: 100%; will-change: transform; -webkit-touch-callout: none; pointer-events: auto; }
.viewer-top { position: absolute; left: 0; right: 0; top: 0; display: flex; justify-content: space-between; padding: 12px; z-index: 2; }
.viewer-top .btn { background: #0007; color: #fff; }
