/* Us — a quiet, familiar messenger. Pamban blue on calm neutrals, system font,
   light and dark follow the phone. Layout: one screen at a time with bottom tabs (chats, calls, members). */
:root {
  --bg: #F5F7FA;
  --surface: #FFFFFF;
  --surface-2: #EDF1F6;
  --chat-bg: #EAEFF5;
  --ink: #111827;
  --muted: #5F6B7D;
  --line: #DFE5ED;
  --accent: #2563B8;
  --accent-press: #1E529A;
  --accent-ink: #FFFFFF;
  --accent-soft: #E1EBF8;
  --mine: #D7E6F8;
  --mine-ink: #0E2340;
  --theirs: #FFFFFF;
  --danger: #C2412F;
  --online: #1FA36B;
  --shadow: 0 1px 1px rgba(16, 32, 28, .08);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans", "Noto Sans Tamil", Helvetica, Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0E1218; --surface: #161B23; --surface-2: #1E2530; --chat-bg: #0A0D12;
    --ink: #E6EBF2; --muted: #8D98A8; --line: #252D39;
    --accent: #5B9BEF; --accent-press: #4C8BDD; --accent-ink: #061528; --accent-soft: #18283F;
    --mine: #1D3A63; --mine-ink: #E3EDFB; --theirs: #1B222C;
    --danger: #EF7461; --online: #3CCB8C; --shadow: 0 1px 1px rgba(0, 0, 0, .35);
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html, body { height: 100%; }
/* each screen paints behind the notch and home bar itself */
.view { padding-top: env(safe-area-inset-top, 0px); }
#vChat, #vLock { padding-top: 0; }
.chathead { padding-top: env(safe-area-inset-top, 0px); }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font); font-size: 16px; line-height: 1.4; overflow: hidden; -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; }
button { font: inherit; color: inherit; cursor: pointer; }
input, textarea { font: inherit; }
img { max-width: 100%; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.app { position: fixed; inset: 0; display: flex; flex-direction: column; }
.view { flex: 1; min-height: 0; display: flex; flex-direction: column; background: var(--bg); }
.gutter { padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.wrap { width: 100%; max-width: 680px; margin: 0 auto; }
.spacer { flex: 1; }
.label { font-size: 13px; font-weight: 600; color: var(--muted); }
.small { margin: 0; font-size: 14px; color: var(--muted); max-width: 46ch; }
.err { color: var(--danger); font-size: 14px; }
.err:empty { display: none; }

/* ---------- join / unlock ---------- */
.lock { overflow-y: auto; }
.lock .stage { flex: 1; display: flex; align-items: center; padding-top: calc(32px + env(safe-area-inset-top, 0px)); padding-bottom: calc(32px + env(safe-area-inset-bottom, 0px)); }
.lockcard { max-width: 420px; display: flex; flex-direction: column; gap: 18px; }
.brand { display: flex; align-items: center; gap: 12px; }
.appicon { width: 52px; height: 52px; border-radius: 14px; box-shadow: var(--shadow); }
.word { margin: 0; font-size: 30px; font-weight: 700; letter-spacing: -.02em; }
.tag { margin: 0; font-size: 20px; font-weight: 600; line-height: 1.3; letter-spacing: -.01em; text-wrap: balance; }
.tag em { font-style: normal; color: var(--accent); }
.lockform { display: flex; flex-direction: column; gap: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 18px; }
.pass { width: 100%; background: var(--surface-2); border: 1px solid transparent; border-radius: 12px; color: var(--ink); font-size: 17px; padding: 12px 14px; }
.pass:focus { outline: none; border-color: var(--accent); background: var(--surface); }
.pass::placeholder { color: var(--muted); }
.fire-btn { align-self: stretch; border: 0; border-radius: 12px; background: var(--accent); color: var(--accent-ink); font-weight: 600; font-size: 17px; padding: 13px 18px; display: inline-flex; justify-content: center; align-items: center; gap: 8px; }
.fire-btn:active { background: var(--accent-press); }
.fire-btn:disabled { opacity: .5; cursor: default; }
.face-btn svg { width: 22px; height: 22px; }
.link-btn { background: none; border: 0; padding: 4px 0; color: var(--accent); font-size: 15px; align-self: flex-start; }
.steps { display: flex; gap: 6px; }
.steps i { flex: 1; height: 3px; border-radius: 3px; background: var(--line); }
.steps i.on { background: var(--accent); }
.row-inline { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.letters { display: grid; grid-template-columns: repeat(auto-fill, minmax(44px, 1fr)); gap: 8px; }
.lt { aspect-ratio: 1; border-radius: 50%; border: 1px solid var(--line); background: var(--surface-2); font-size: 18px; font-weight: 600; padding: 0; }
.lt.on, .lt.on:hover:not(:disabled) { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.lt:disabled { opacity: .3; cursor: not-allowed; text-decoration: line-through; }
.qtext { font-size: 18px; font-weight: 600; color: var(--ink); }

/* ---------- top bars ---------- */
.bar { display: flex; align-items: center; gap: 8px; padding-block: 10px; min-height: 56px; }
.title { margin: 0; font-size: 28px; font-weight: 700; letter-spacing: -.02em; }
.ghost { background: var(--surface-2); border: 0; border-radius: 999px; padding: 8px 14px; font-size: 15px; font-weight: 600; color: var(--accent); }
.round { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: transparent; border: 0; color: var(--ink); flex: none; padding: 0; }
.round:active { background: var(--surface-2); }
@media (hover: hover) { .round:hover { background: var(--surface-2); } }
.round svg { width: 22px; height: 22px; }

/* ---------- chat list ---------- */
.scroll { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding-block: 0 24px; }
.hello { margin: -4px 0 8px; font-size: 14px; color: var(--muted); }
.people { display: flex; flex-direction: column; }
.person { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; background: transparent; border: 0; border-radius: 12px; padding: 10px 6px; position: relative; }
.person:active { background: var(--surface-2); }
@media (hover: hover) { .person:hover { background: var(--surface-2); } }
.person + .person::before { content: ""; position: absolute; left: 70px; right: 6px; top: 0; border-top: 1px solid var(--line); }
.orb { position: relative; width: 52px; height: 52px; flex: none; border-radius: 50%; }
.orb .letter { width: 100%; height: 100%; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); font-size: 21px; font-weight: 700; }
.orb.hot .letter { background: var(--accent); color: var(--accent-ink); }
.orb .on { position: absolute; right: 0; bottom: 1px; width: 14px; height: 14px; border-radius: 50%; background: var(--online); border: 2.5px solid var(--bg); }
.pmain { flex: 1; min-width: 0; }
.pname { font-weight: 600; font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.psub { font-size: 14px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.psub.hot { color: var(--accent); font-weight: 600; }
.count { font-weight: 700; font-size: 12px; min-width: 22px; height: 22px; border-radius: 999px; display: grid; place-items: center; padding: 0 7px; background: var(--accent); color: var(--accent-ink); font-variant-numeric: tabular-nums; }
.blank { margin-top: 24px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 20px; color: var(--muted); font-size: 15px; }
.blank strong { display: block; color: var(--ink); font-size: 17px; margin-bottom: 4px; }

/* ---------- chat ---------- */
#vChat { background: var(--chat-bg); }
.chathead { background: var(--surface); border-bottom: 1px solid var(--line); }
.chathead .bar { gap: 6px; }
.chathead .who { min-width: 0; flex: 1; display: flex; align-items: center; gap: 10px; }
.chathead .orb { width: 40px; height: 40px; }
.chathead .orb .letter { font-size: 17px; }
.chathead .orb .on { width: 12px; height: 12px; border-color: var(--surface); }
.chathead .pname { font-size: 16px; }
.chathead .psub { font-size: 13px; }
.callbtns { display: flex; gap: 2px; color: var(--accent); }
.callbtns .round { color: var(--accent); }
.rule { align-self: center; margin: 10px 16px 2px; font-size: 12px; color: var(--muted); background: var(--surface); border-radius: 8px; padding: 5px 10px; text-align: center; box-shadow: var(--shadow); }
.rule b { color: var(--accent); font-weight: 600; }
.thread { display: flex; flex-direction: column; gap: 3px; padding-block: 10px 14px; }
.msg { display: flex; flex-direction: column; max-width: min(80%, 460px); min-width: 0; margin-top: 3px; }
.msg.out { align-self: flex-end; align-items: flex-end; }
.msg.in { align-self: flex-start; align-items: flex-start; }
.bub { border-radius: 16px; padding: 7px 12px; overflow-wrap: anywhere; white-space: pre-wrap; font-size: 16px; box-shadow: var(--shadow); }
.out .bub { background: var(--mine); color: var(--mine-ink); border-bottom-right-radius: 4px; }
.in .bub { background: var(--theirs); border-bottom-left-radius: 4px; }
.bub img { display: block; max-width: 100%; width: 260px; border-radius: 11px; margin: 2px -6px 4px; background: var(--surface-2); }
.bub.photo-only { padding: 4px; }
.bub.photo-only img { margin: 0; }
.bub .bad { font-style: italic; opacity: .75; }
.stamp { font-size: 11px; color: var(--muted); margin: 2px 4px 0; font-variant-numeric: tabular-nums; }
.stamp.seen { color: var(--accent); font-weight: 600; }
@media (prefers-reduced-motion: no-preference) {
  .msg { animation: pop .18s ease-out; }
  @keyframes pop { from { transform: translateY(4px); opacity: 0; } }
  .msg.vanish .bub { animation: fadeaway .9s ease-in forwards; }
  .msg.vanish .stamp { animation: fadeaway .5s forwards; }
  @keyframes fadeaway { to { opacity: 0; transform: scale(.96); filter: blur(4px); } }
}
@media (prefers-reduced-motion: reduce) { .msg.vanish { opacity: 0; transition: opacity .3s; } }
.typing { font-size: 13px; color: var(--accent); min-height: 18px; padding-bottom: 2px; }
.empty-chat { margin: 14vh auto 0; text-align: center; max-width: 30ch; color: var(--muted); font-size: 15px; background: var(--surface); border-radius: 14px; padding: 18px; box-shadow: var(--shadow); }
.empty-chat .big { font-size: 17px; font-weight: 600; color: var(--ink); margin-bottom: 4px; }

.composer { padding-top: 8px; padding-bottom: calc(8px + env(safe-area-inset-bottom, 0px)); background: var(--surface); border-top: 1px solid var(--line); }
.composer form { display: flex; gap: 6px; align-items: flex-end; }
.composer .round { color: var(--muted); }
#msg, #gMsg { flex: 1; min-width: 0; resize: none; max-height: 130px; border-radius: 20px; border: 1px solid var(--line); background: var(--surface-2); color: var(--ink); font-size: 16px; padding: 9px 14px; line-height: 1.35; }
#msg:focus, #gMsg:focus { outline: none; border-color: var(--accent); }
.send { width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; flex: none; padding: 0; }
.send:disabled { background: var(--surface-2); color: var(--muted); cursor: default; }
.send svg { width: 20px; height: 20px; }

/* ---------- members ---------- */
#vAdmin .bar { gap: 6px; }

/* ---------- bottom tabs ---------- */
.tabbar { display: flex; justify-content: space-around; background: var(--surface); border-top: 1px solid var(--line); padding-top: 6px; padding-bottom: calc(8px + env(safe-area-inset-bottom, 0px)); flex: none; }
.tab { position: relative; flex: 1; max-width: 140px; display: flex; flex-direction: column; align-items: center; gap: 2px; background: none; border: 0; color: var(--muted); font-size: 12px; font-weight: 500; padding: 4px 0; }
.tab svg { width: 24px; height: 24px; }
.tab.on { color: var(--accent); font-weight: 600; }
.tabcount { position: absolute; top: 0; left: calc(50% + 6px); min-width: 18px; height: 18px; border-radius: 9px; background: var(--accent); color: var(--accent-ink); font-size: 11px; font-weight: 700; display: grid; place-items: center; padding: 0 5px; }
.callrow .callgo { color: var(--accent); }
.section { display: flex; flex-direction: column; gap: 10px; margin-bottom: 26px; }
.section h2 { font-size: 13px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); margin: 8px 4px 0; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 16px; display: flex; flex-direction: column; gap: 8px; }
.panel .label { margin-top: 4px; }
.addform .fire-btn { margin-top: 4px; }
#memList { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
#memList .blank { margin: 0; border: 0; }
.adm { display: flex; align-items: center; gap: 12px; padding: 12px 14px; }
.adm + .adm { border-top: 1px solid var(--line); }
.adm .orb { width: 40px; height: 40px; }
.adm .orb .letter { font-size: 16px; }
.adm .orb .on { border-color: var(--surface); }
.adm .pmain .pname { font-size: 16px; }
.qline { white-space: normal; margin-top: 2px; font-size: 13px; }
.mini-btn { border-radius: 999px; padding: 7px 12px; font-weight: 600; font-size: 14px; border: 0; background: var(--surface-2); color: var(--ink); flex: none; }
.mini-btn.no { color: var(--danger); }
.tagpill { font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: var(--surface-2); color: var(--muted); }
.tagpill.ok { background: var(--accent-soft); color: var(--accent); }
.tagpill.warn { color: var(--danger); }

/* ---------- call (always dark, like a phone call screen) ---------- */
.call { position: fixed; inset: 0; z-index: 40; background: #0D1312; color: #F1F5F4; display: flex; flex-direction: column; align-items: center; justify-content: space-between;
  padding-top: calc(28px + env(safe-area-inset-top, 0px)); padding-bottom: calc(32px + env(safe-area-inset-bottom, 0px));
  padding-left: max(18px, env(safe-area-inset-left, 0px)); padding-right: max(18px, env(safe-area-inset-right, 0px)); }
.call video.remote { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; background: #000; }
.call video.local { position: absolute; z-index: 2; right: max(16px, env(safe-area-inset-right, 0px)); top: calc(16px + env(safe-area-inset-top, 0px)); width: 28vw; max-width: 150px; aspect-ratio: 3/4; object-fit: cover; border-radius: 14px; background: #000; transform: scaleX(-1); }
.call .who { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: 12px; margin-top: 10vh; text-align: center; }
.call .big-orb { width: 120px; height: 120px; border-radius: 50%; background: #1B2534; display: grid; place-items: center; }
.call .big-orb span { font-size: 52px; font-weight: 700; color: #9CC2F5; }
.call .state { font-size: 15px; color: #A9B7B3; }
.call.video-on .who { margin-top: 0; text-shadow: 0 1px 6px rgba(0,0,0,.6); }
.call.video-on .big-orb { display: none; }
.call .controls { position: relative; z-index: 1; display: flex; gap: 22px; align-items: center; justify-content: center; flex-wrap: wrap; }
.cbtn { width: 64px; height: 64px; border-radius: 50%; border: 0; background: rgba(255,255,255,.14); color: #fff; display: grid; place-items: center; padding: 0; }
.cbtn svg { width: 26px; height: 26px; }
.cbtn.off { background: #F1F5F4; color: #0D1312; }
.cbtn.hang { background: #E0483B; }
.cbtn.hang svg { transform: rotate(135deg); }
.cbtn.pick { background: #1FA36B; }
@media (prefers-reduced-motion: no-preference) {
  .call.ringing .big-orb { animation: ring 1.6s ease-in-out infinite; }
  @keyframes ring { 0%,100% { box-shadow: 0 0 0 0 rgba(91,155,239,.45); } 70% { box-shadow: 0 0 0 26px rgba(91,155,239,0); } }
}

.toast { position: fixed; z-index: 50; left: 50%; transform: translateX(-50%); bottom: calc(84px + env(safe-area-inset-bottom, 0px)); background: var(--ink); color: var(--bg); font-size: 14px; padding: 10px 16px; border-radius: 12px; max-width: calc(100% - 32px); box-shadow: 0 6px 20px rgba(0,0,0,.2); }


/* ---------- opening and join screens: the night look (kolam, glowing "us") ---------- */
#vLock {
  min-height: 100%;
  --n-night: #0D0920; --n-ink: #F6F0FF; --n-muted: #A99BC8; --n-edge: rgba(255,255,255,.12); --n-glass: rgba(255,255,255,.06); --n-glass-2: rgba(255,255,255,.1);
  --n-flame: #FF8A3D; --n-rose: #FF4F8B; --n-sea: #3BE3D2; --n-on-flame: #22060F; --n-fire: linear-gradient(120deg, var(--n-flame), var(--n-rose));
  position: relative; overflow-x: hidden; background: var(--n-night); color: var(--n-ink); color-scheme: dark;
  font-family: "Figtree", var(--font);
}
#vLock .sky { position: absolute; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
#vLock .blob { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .55; }
#vLock .blob.a { width: 60vmax; height: 60vmax; left: -20vmax; top: -25vmax; background: radial-gradient(circle, rgba(255,79,139,.55), transparent 65%); }
#vLock .blob.b { width: 55vmax; height: 55vmax; right: -22vmax; bottom: -25vmax; background: radial-gradient(circle, rgba(59,227,210,.35), transparent 65%); }
#vLock .grain { position: absolute; inset: 0; opacity: .12; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>"); }
#kolam { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; }
#vLock .stage { position: relative; z-index: 1; }
#vLock .lockcard { gap: 24px; }
#vLock .word { font-family: "Bagel Fat One", "Arial Rounded MT Bold", var(--font); font-weight: 400; font-size: clamp(120px, 42vw, 230px); line-height: 1; letter-spacing: -.04em;
  padding: .06em .08em .16em 0; margin: 0 0 -.22em; width: fit-content;
  background: var(--n-fire); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 10px 40px rgba(255,79,139,.35)); }
#vLock .tag { font-size: clamp(22px, 6vw, 28px); font-weight: 800; line-height: 1.15; letter-spacing: -.01em; max-width: 18ch; color: var(--n-ink); }
#vLock .tag em { color: var(--n-sea); }
#vLock .lockform { background: transparent; border: 0; padding: 0; gap: 14px; }
#vLock .small { color: var(--n-muted); }
#vLock .err { color: #FF8C8C; }
#vLock .pass { background: transparent; border: 0; border-bottom: 2px solid var(--n-edge); border-radius: 0; color: var(--n-ink); font-family: "JetBrains Mono", var(--mono); font-size: 20px; letter-spacing: .06em; padding: 10px 2px; }
#vLock .pass:focus { background: transparent; border-bottom-color: var(--n-flame); }
#vLock .pass::placeholder { color: var(--n-muted); letter-spacing: .02em; font-size: 16px; }
#vLock .fire-btn { align-self: stretch; border-radius: 999px; background: var(--n-fire); color: var(--n-on-flame); font-weight: 800; padding: 15px 22px; box-shadow: 0 10px 30px rgba(255,79,139,.35); }
#vLock .fire-btn:disabled { opacity: .5; }
#vLock .link-btn { color: var(--n-muted); text-decoration: underline; }
#vLock .steps i { background: var(--n-edge); }
#vLock .steps i.on { background: var(--n-fire); }
#vLock .lt { background: var(--n-glass); border: 1px solid var(--n-edge); color: var(--n-ink); font-family: "Bagel Fat One", var(--font); font-weight: 400; font-size: 22px; border-radius: 16px; }
#vLock .lt.on, #vLock .lt.on:hover:not(:disabled) { background: var(--n-fire); color: var(--n-on-flame); border-color: transparent; }
#vLock .qtext { color: var(--n-sea); font-size: 20px; }
@media (prefers-reduced-motion: no-preference) {
  #vLock .blob.a { animation: drift 22s ease-in-out infinite alternate; }
  #vLock .blob.b { animation: drift 28s ease-in-out infinite alternate-reverse; }
  @keyframes drift { to { transform: translate(8vmax, 10vmax) scale(1.15); } }
  #vLock .word { animation: breathe 5s ease-in-out infinite; transform-origin: 20% 80%; }
  @keyframes breathe { 50% { transform: rotate(-3deg) scale(1.03); } }
}

/* notifications prompt */
.notify { background: var(--accent-soft); border-radius: 14px; padding: 14px; margin: 4px 0 10px; display: flex; flex-direction: column; gap: 6px; }
.notify strong { font-size: 15px; }
.notify .small { color: var(--muted); }
.mini-btn.go { background: var(--accent); color: var(--accent-ink); }

/* group calls */
.groupbtn { margin: 4px 0 12px; }
.groupbtn svg { width: 20px; height: 20px; }
.grouppick { margin-bottom: 12px; }
.picklist { display: flex; flex-wrap: wrap; gap: 8px; }
.pick { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px 6px 6px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface-2); font-weight: 600; }
.pick .orb { width: 28px; height: 28px; }
.pick .orb .letter { font-size: 13px; }
.pick.on { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.gcall { justify-content: flex-start; gap: 14px; }
.gcall .gtop { position: relative; z-index: 1; text-align: center; }
.gcall .grid { position: relative; z-index: 1; flex: 1; width: 100%; max-width: 760px; display: grid; gap: 8px; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: minmax(0, 1fr); min-height: 0; }
.gcall .grid.one { grid-template-columns: 1fr; }
.tile { position: relative; border-radius: 16px; overflow: hidden; background: #1B2534; display: grid; place-items: center; min-height: 120px; }
.tile video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.tile.me video { transform: scaleX(-1); }
.tile .tl { font-size: 40px; font-weight: 700; color: #9CC2F5; }
.tile .tn { position: absolute; left: 8px; bottom: 8px; font-size: 12px; font-weight: 600; background: rgba(0,0,0,.45); color: #fff; padding: 2px 8px; border-radius: 8px; }
.tile.waiting .tl { opacity: .45; }
.gcall .controls { flex: none; }
.pick .psub { font-size: 13px; font-weight: 500; }
.pick.on .psub { color: var(--accent); }

/* group chat */
#vGroup { background: var(--chat-bg); padding-top: 0; position: relative; }
.round.accent { color: var(--accent); }
.orb.group .letter { background: var(--accent-soft); color: var(--accent); border-radius: 30%; }
.orb.group.hot .letter { background: var(--accent); color: var(--accent-ink); }
.headbtn { background: none; border: 0; padding: 0; text-align: left; color: inherit; }
.prow { display: flex; align-items: baseline; gap: 8px; }
.prow .pname { flex: 1; min-width: 0; }
.ptime { font-size: 12px; color: var(--muted); flex: none; font-variant-numeric: tabular-nums; }
.ptime.hot { color: var(--accent); font-weight: 600; }
.psub .tick { vertical-align: -3px; }
.rule.day { margin-top: 12px; }
.bub .from { font-size: 13px; font-weight: 700; color: var(--accent); margin-bottom: 1px; }
.bub .meta { float: right; margin: 6px 0 -4px 10px; font-size: 11px; color: var(--muted); display: inline-flex; align-items: center; gap: 3px; font-variant-numeric: tabular-nums; }
.out .bub .meta { color: color-mix(in srgb, var(--mine-ink) 60%, transparent); }
.bub.tap { cursor: pointer; }
.tick { display: inline-flex; width: 16px; height: 16px; color: var(--muted); }
.tick svg { width: 16px; height: 16px; }
.tick.seen { color: #3B8BEB; }
.stamp .tick { vertical-align: -4px; }
.sheet { position: absolute; inset: 0; z-index: 20; background: rgba(0,0,0,.35); display: flex; align-items: flex-end; }
.sheetbody { width: 100%; max-height: 85%; overflow-y: auto; background: var(--surface); border-radius: 18px 18px 0 0; padding: 6px 16px calc(20px + env(safe-area-inset-bottom, 0px)); display: flex; flex-direction: column; gap: 8px; }
.small-title { font-size: 20px; }
.infolist { display: flex; flex-direction: column; background: var(--surface-2); border-radius: 14px; overflow: hidden; }
.infolist .adm .psub { display: flex; align-items: center; gap: 4px; }

.msg.stubbed .bub { opacity: .7; }

/* members */
#vAdmin { position: relative; }
#vAdmin .person:disabled { cursor: default; background: none; color: inherit; }
.psub.warn { color: var(--danger); }
.sheetbtn { width: 100%; text-align: left; background: var(--surface-2); border: 0; border-radius: 12px; padding: 14px 16px; font-size: 16px; font-weight: 600; color: var(--ink); }
.sheetbtn.no { color: var(--danger); }
#addSheet .fire-btn { margin-top: 4px; }

.ghost.newgroup { display: inline-flex; align-items: center; gap: 6px; margin-right: 4px; }
.ghost.newgroup svg { width: 16px; height: 16px; }

.invite { display: flex; align-items: center; gap: 8px; background: var(--accent-soft); border-radius: 14px; padding: 12px 14px; margin: 2px 0 14px; }
.invite .label { margin: 0 0 2px; }
.invlink { font-weight: 700; font-size: 17px; color: var(--accent); user-select: all; -webkit-user-select: all; overflow-wrap: anywhere; }

/* safety code */
#vChat, #vPeople { position: relative; }
.safecode { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; background: var(--surface-2); border-radius: 14px; padding: 16px; font-family: var(--mono); font-size: 22px; font-weight: 600; text-align: center; letter-spacing: .06em; font-variant-numeric: tabular-nums; }
/* voice notes */
.round.mic.rec { background: var(--danger); color: #fff; }
.voice { display: flex; align-items: center; gap: 10px; min-width: 190px; padding: 2px 0; }
.vplay { width: 36px; height: 36px; border-radius: 50%; border: 0; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; padding: 0; flex: none; }
.vplay svg { width: 18px; height: 18px; }
.vbar { flex: 1; height: 4px; border-radius: 4px; background: color-mix(in srgb, currentColor 22%, transparent); overflow: hidden; }
.vbar i { display: block; height: 100%; width: 0; background: var(--accent); }
.vlen { font-size: 12px; opacity: .75; font-variant-numeric: tabular-nums; }
/* replies and reactions */
.quote { border-left: 3px solid var(--accent); background: color-mix(in srgb, var(--accent) 10%, transparent); border-radius: 0 8px 8px 0; padding: 4px 8px; margin: 2px 0 4px; cursor: pointer; }
.qwho { font-size: 12px; font-weight: 700; color: var(--accent); }
.qtxt { font-size: 13px; opacity: .85; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 240px; }
.replybar { display: flex; align-items: center; gap: 8px; border-left: 3px solid var(--accent); background: var(--surface-2); border-radius: 0 10px 10px 0; padding: 6px 4px 6px 10px; margin-bottom: 8px; }
.reacts { display: flex; gap: 4px; margin-top: -4px; padding: 0 6px; }
.out .reacts { justify-content: flex-end; }
.rchip { background: var(--surface); border: 1px solid var(--line); border-radius: 999px; font-size: 13px; padding: 1px 7px; box-shadow: var(--shadow); }
.emojirow { display: flex; justify-content: space-between; gap: 6px; padding: 4px 2px 6px; }
.emo { font-size: 28px; width: 48px; height: 48px; border-radius: 50%; border: 0; background: var(--surface-2); padding: 0; }
.emo.on { background: var(--accent-soft); outline: 2px solid var(--accent); }
.msg.flash .bub { outline: 2px solid var(--accent); }
