/* ============================================================
   chatkin.css  —  © 2020–present ChatKin.org
   Sections:  1-Reset/Shared  2-Landing  3-App  4-Admin  5-Mobile
   ============================================================ */

/* ── 1. Reset / Shared ──────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; color: #0f172a; }
a { color: #0ea5e9; text-decoration: none; }

/* CSS variables used throughout the app */
:root {
  --s:  #0ea5e9;   /* sky blue — primary */
  --sd: #0284c7;   /* darker blue */
  --bg: #ffffff;
  --sf: #f8fafc;   /* surface/card background */
  --t:  #0f172a;   /* text */
  --m:  #64748b;   /* muted text */
  --bd: #e2e8f0;   /* border */
  --g:  #16a34a;   /* green */
}

/* ── 2. Landing ─────────────────────────────────────────────── */

/* Nav bar */
.nav { display:flex; align-items:center; justify-content:space-between; padding:11px 22px;
  border-bottom:1px solid #e2e8f0; position:sticky; top:0; background:#fff; z-index:200;
  box-shadow:0 1px 4px rgba(0,0,0,.06); gap:10px; }
.logo { display:flex; align-items:center; gap:7px; flex-shrink:0; text-decoration:none; }
.lw { font-size:clamp(17px,3.5vw,21px); font-weight:900; color:#0f172a; }
.lk { color:#d97706; }

/* Buttons */
.btn { display:inline-flex; align-items:center; justify-content:center; padding:10px 20px;
  font-size:14px; font-weight:700; border-radius:9999px; border:none; cursor:pointer;
  transition:.18s; line-height:1; white-space:nowrap; min-height:44px; min-width:76px; }
.bp  { background:linear-gradient(90deg,#0ea5e9,#3b82f6); color:#fff; }
.bp:hover  { opacity:.88; transform:translateY(-1px); box-shadow:0 6px 18px rgba(14,165,233,.35); }
.btn-ghost { background:none; border:none; color:#64748b; cursor:pointer; font-size:13px;
  padding:10px 16px; min-height:44px; font-family:inherit; font-weight:600; }
.btn-ghost:hover { color:#0f172a; }

/* Hero */
.hero { background:linear-gradient(150deg,#0284c7,#1e40af); color:#fff; padding:68px 24px 60px; text-align:center; }
.hero-inner { max-width:620px; margin:0 auto; }
.h1  { font-size:clamp(28px,6vw,52px); font-weight:900; line-height:1.1; margin-bottom:14px; }
.sub { font-size:clamp(13px,2vw,16px); opacity:.93; line-height:1.7; margin-bottom:26px; }

/* Feature cards — .feat is the flex CONTAINER, .fc is each CARD */
.feat { display:flex; justify-content:center; gap:clamp(14px,3vw,40px); flex-wrap:wrap;
  padding:44px 28px; background:#f8fafc; border-bottom:1px solid #e2e8f0; }
.fc   { text-align:center; max-width:190px; }
.fi   { font-size:42px; margin-bottom:10px; }
.fc h3 { font-size:15px; font-weight:800; color:#0f172a; margin-bottom:6px; }
.fc p  { font-size:12px; color:#475569; line-height:1.6; }

/* Footer */
.ft { text-align:center; padding:22px 16px; color:#94a3b8; font-size:12px; border-top:1px solid #e2e8f0; }
.ft a { color:#94a3b8; } .ft a:hover { color:#0ea5e9; }

/* Toast notification (shared between landing & app) */
#toast { display:none; position:fixed; bottom:22px; left:50%; transform:translateX(-50%);
  background:#1e293b; color:#fff; padding:9px 18px; border-radius:9999px; font-size:13px;
  font-weight:600; z-index:9998; white-space:nowrap; max-width:calc(100vw - 32px);
  box-shadow:0 4px 20px rgba(0,0,0,.25); }

/* Modals: overlay + card */
.modal { display:none; position:fixed; inset:0; background:rgba(0,0,0,.55); z-index:999;
  align-items:center; justify-content:center; padding:16px; }
.modal.open { display:flex; }
.mc2 { background:#fff; border-radius:18px; padding:26px; width:100%; max-width:380px;
  box-shadow:0 20px 56px rgba(0,0,0,.22); position:relative; }
.cls { position:absolute; top:12px; right:14px; background:none; border:none; font-size:22px;
  cursor:pointer; color:#94a3b8; line-height:1; font-family:inherit; }
.cls:hover { color:#334155; }
.lf { width:100%; padding:10px 12px; font-size:14px; border:2px solid #e2e8f0;
  border-radius:9px; outline:none; transition:.15s; font-family:inherit; display:block; }
.lf:focus { border-color:#0ea5e9; box-shadow:0 0 0 3px rgba(14,165,233,.1); }
.lf + .lf { margin-top:7px; }
.nt { padding:9px 12px; border-radius:8px; font-size:13px; font-weight:600;
  margin-bottom:12px; display:none; }
.nt.ok  { background:#f0fdf4; color:#166534; display:block; }
.nt.err { background:#fef2f2; color:#dc2626; display:block; }

/* ── 3. App ─────────────────────────────────────────────────── */
body.app { display:flex; flex-direction:column; height:100vh; overflow:hidden;
  background:var(--bg); }

/* Tab bar */
#bar { display:flex; align-items:center; background:var(--sf); border-bottom:2px solid var(--bd);
  height:50px; padding:0 8px; gap:2px; overflow-x:auto; scrollbar-width:none; flex-shrink:0; }
#bar::-webkit-scrollbar { display:none; }
.app-logo { display:flex; align-items:center; gap:5px; text-decoration:none; flex-shrink:0;
  padding:0 8px 0 2px; margin-right:4px; }
/* Tab buttons */
.nb { background:none; border:none; cursor:pointer; padding:0 11px; height:42px;
  border-radius:8px; font-size:12px; font-weight:600; color:var(--m); white-space:nowrap;
  display:flex; align-items:center; transition:.12s; font-family:inherit; flex-shrink:0; }
.nb:hover { background:var(--bd); color:var(--t); }
.nb.on  { background:#e0f2fe; color:var(--sd); }
.kn     { color:var(--sd); }
.st     { margin-left:auto; }
.dn     { color:#d97706; }
.tab-sep { width:1px; background:var(--bd); height:28px; align-self:center; margin:0 4px; flex-shrink:0; }

/* Main content area */
#content { flex:1; overflow:hidden; display:flex; flex-direction:column; }

/* ── Chat view ───────────────────────────────────────────────── */
#cv { display:grid; grid-template-columns:260px 1fr; height:100%; }

/* Sidebar */
#sb { border-right:2px solid var(--bd); overflow-y:auto; background:var(--sf); }
.esb { padding:24px 14px; text-align:center; color:var(--m); font-size:12px; line-height:1.7; }
.kl  { padding:6px 12px 2px; font-size:10px; font-weight:800; color:var(--m);
  text-transform:uppercase; letter-spacing:.06em; border-bottom:1px solid var(--bd); }
.ct  { display:flex; align-items:center; gap:10px; padding:9px 12px; cursor:pointer;
  border-bottom:1px solid var(--bd); transition:.12s; }
.ct:hover { background:#f0f9ff; }
.ct.on  { background:#e0f2fe; }
.av { width:36px; height:36px; border-radius:50%; background:linear-gradient(135deg,#0ea5e9,#3b82f6);
  display:flex; align-items:center; justify-content:center; color:#fff; font-weight:700;
  font-size:13px; flex-shrink:0; overflow:hidden; }
.av img { width:100%; height:100%; object-fit:cover; border-radius:50%; display:block; }
.ci { flex:1; min-width:0; }
.cn { display:flex; align-items:center; gap:4px; font-size:13px; font-weight:700;
  color:var(--t); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.cl { font-size:11px; color:var(--m); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }

/* Unread badge */
.unread-badge { display:inline-flex; align-items:center; justify-content:center;
  background:#8b5cf6; color:#fff; border-radius:50%; min-width:20px; height:20px;
  font-size:10px; font-weight:900; margin-left:auto; flex-shrink:0; padding:0 4px; }

/* Chat panel */
#cp { display:flex; flex-direction:column; overflow:hidden; position:relative; }
.ecp { flex:1; display:flex; flex-direction:column; align-items:center; justify-content:center;
  gap:10px; color:var(--m); padding:24px; }

/* Chat header */
#chdr { display:flex; align-items:center; gap:10px; padding:10px 14px;
  border-bottom:2px solid var(--bd); background:var(--sf); flex-shrink:0; }
.bk { display:none; background:none; border:none; cursor:pointer; font-size:20px;
  color:var(--m); padding:0 4px; font-family:inherit; }
.chat-partner-name { font-weight:700; font-size:14px; }

/* Messages area */
#msgs { flex:1; overflow-y:auto; padding:10px 14px; display:flex; flex-direction:column; gap:4px; overscroll-behavior:contain; -webkit-overflow-scrolling:touch; }
.lob { text-align:center; padding:6px 0; }
.lob button { background:var(--sf); border:1px solid var(--bd); padding:4px 14px;
  border-radius:9999px; font-size:11px; cursor:pointer; color:var(--m); font-family:inherit; }
.lob button:hover { background:var(--bd); }
.sys-msg { text-align:center; color:var(--m); font-size:11px; padding:16px; }

/* Message bubbles */
.mr { display:flex; flex-direction:column; max-width:74%; }
.mr.out { align-self:flex-end; align-items:flex-end; }
.mr.in  { align-self:flex-start; align-items:flex-start; }
.bub { padding:8px 12px; border-radius:16px; font-size:14px; line-height:1.5; word-break:break-word; cursor:default; }
.mr.out .bub { background:linear-gradient(135deg,#0ea5e9,#3b82f6); color:#fff; border-bottom-right-radius:4px; }
.mr.in  .bub { background:var(--sf); color:var(--t); border:1px solid var(--bd); border-bottom-left-radius:4px; cursor:pointer; }
.mr.in  .bub:hover { background:#f0f9ff; }
.mt { font-size:10px; color:var(--m); margin-top:2px; padding:0 4px; }

/* Typing dots indicator */
.typing-row { display:flex; align-items:center; padding:3px 14px 1px; min-height:20px; flex-shrink:0; }
.typing-dots { display:flex; gap:3px; align-items:center; }
.typing-dots span { width:5px; height:5px; background:var(--m); border-radius:50%;
  animation:td 1.2s ease-in-out infinite; }
.typing-dots span:nth-child(2) { animation-delay:.2s; }
.typing-dots span:nth-child(3) { animation-delay:.4s; }
/* Left-pane typing dots (between name and unread badge) */
.sb-typing { display:inline-flex; gap:2px; align-items:center; margin:0 4px; vertical-align:middle; }
.sb-typing span { width:4px; height:4px; background:var(--s); border-radius:50%;
  animation:td .9s ease-in-out infinite; }
.sb-typing span:nth-child(2) { animation-delay:.2s; }
.sb-typing span:nth-child(3) { animation-delay:.4s; }
@keyframes td { 0%,60%,100%{transform:translateY(0)} 30%{transform:translateY(-5px)} }

/* Emoji picker (grid, above input row) */
.emoji-picker { position:absolute; bottom:62px; left:8px; display:grid;
  grid-template-columns:repeat(15,1fr); width:585px; height:300px;
  gap:2px; overflow-y:auto; background:var(--sf); border:1.5px solid var(--bd); border-radius:14px;
  padding:8px; box-shadow:0 4px 24px rgba(0,0,0,.22); z-index:100; }
.ep-btn { background:none; border:none; cursor:pointer; font-size:20px; padding:2px;
  border-radius:5px; line-height:1; display:flex; align-items:center; justify-content:center; }
.ep-btn:hover { background:var(--bd); transform:scale(1.15); }

/* Input row */
#ir { display:flex; align-items:flex-end; gap:6px; padding:8px 10px;
  border-top:2px solid var(--bd); background:var(--sf); flex-shrink:0; }
.emoji-btn { background:none; border:none; cursor:pointer; font-size:18px; padding:0 2px;
  color:var(--m); display:flex; align-items:center; min-height:34px; flex-shrink:0; }
.emoji-btn:hover { color:var(--s); }
#mi { flex:1; resize:none; border:2px solid var(--bd); border-radius:12px;
  padding:7px 11px; font-size:14px; font-family:inherit; outline:none; transition:.15s;
  background:var(--bg); color:var(--t); min-height:36px; max-height:96px; }
#mi:focus { border-color:var(--s); box-shadow:0 0 0 3px rgba(14,165,233,.08); }
#snd { background:linear-gradient(135deg,#0ea5e9,#3b82f6); border:none; color:#fff;
  width:36px; height:36px; border-radius:50%; cursor:pointer; font-size:16px;
  display:flex; align-items:center; justify-content:center; flex-shrink:0; transition:.15s; }
#snd:hover { opacity:.85; }
.ir-div  { display:none; }  /* removed - was causing visual artifact */
.photo-btn { background:none; border:none; cursor:pointer; font-size:18px; padding:0 2px;
  color:var(--m); display:flex; align-items:center; min-height:34px; flex-shrink:0; }
.photo-btn:hover { color:var(--s); }

/* Reaction popup */
#rx-popup { position:absolute; background:var(--sf); border:1.5px solid var(--bd);
  border-radius:10px; padding:8px; box-shadow:0 4px 16px rgba(0,0,0,.18);
  z-index:200; display:flex; gap:4px; flex-wrap:wrap;; flex-wrap:nowrap; width:max-content; }
.rx-opt { background:none; border:none; cursor:pointer; font-size:20px; padding:3px;
  border-radius:6px; transition:background .1s; }
.rx-opt:hover { background:var(--bd); transform:scale(1.2); }

/* Reaction chips above messages */
.rx-bar { display:flex; flex-wrap:wrap; gap:2px; margin-bottom:-9px;
  position:relative; z-index:2; } /* z-index:2 puts chips above bubble even though bubble is later in DOM */
/* Received msgs (left of screen): hang reaction off left side */
.mr.in  .rx-bar { justify-content:flex-start; align-self:flex-start; margin-left:-10px; }
/* Sent msgs (right of screen): hang reaction off right side */
.mr.out .rx-bar { justify-content:flex-end;   align-self:flex-end;   margin-right:-10px; }
.rx-chip { background:#f1f5f9; border:1px solid #cbd5e1; border-radius:9999px;
  padding:1px 5px 1px 6px; font-size:13px; cursor:pointer; line-height:1.5; user-select:none;
  display:inline-flex; align-items:center; letter-spacing:0; }
.mr.out .rx-chip { cursor:default; pointer-events:none; }
.rx-chip.rx-mine { background:#dbeafe; border-color:#93c5fd; }
.rx-remove { background:#fee2e2; border:1px solid #fca5a5; border-radius:50%;
  width:19px; height:19px; display:inline-flex; align-items:center; justify-content:center;
  font-size:11px; cursor:pointer; padding:0; color:#dc2626; flex-shrink:0; line-height:1; }

/* Chat photos */
.msg-photo-wrap { display:flex; flex-direction:column; gap:2px; margin-bottom:4px; max-width:74%; }
.msg-photo-wrap.out { align-self:flex-end; align-items:flex-end; }
.msg-photo-wrap.in  { align-self:flex-start; align-items:flex-start; }
.chat-photo { max-width:220px; max-height:220px; border-radius:10px; cursor:pointer;
  display:block; box-shadow:0 1px 4px rgba(0,0,0,.15); }

/* Global fixed tooltip (avoids overflow:hidden clipping) */
.global-tt { position:fixed; background:#1e293b; color:#f8fafc; font-size:11px;
  line-height:1.6; padding:9px 12px; border-radius:8px; max-width:230px;
  box-shadow:0 4px 16px rgba(0,0,0,.3); pointer-events:none; z-index:9997; }

/* ── 4. Admin ────────────────────────────────────────────────── */
.ka { display:grid; grid-template-columns:320px 1fr; height:100%; overflow:hidden; }
.kl2 { overflow-y:auto; padding:10px; border-right:2px solid var(--bd); background:var(--sf); }
.kr  { display:flex; flex-direction:column; overflow-y:auto; padding:12px; background:var(--bg); }
.kr-inner   { display:flex; flex-direction:column; min-height:100%; }
.kr-chatlog { flex:1 1 150px; display:flex; flex-direction:column; min-height:100px; }
.kr-matrix  { flex:0 0 auto; }

/* Kin header */
.kin-hdr { display:flex; align-items:center; gap:4px; margin-bottom:9px; }
.kin-name-inp { font-size:14px; font-weight:800; background:none; border:none;
  border-bottom:1.5px solid transparent; color:var(--t); padding:1px 2px;
  font-family:inherit; cursor:pointer; outline:none; transition:.12s;
  min-width:60px; max-width:200px; }
.kin-name-inp:hover { border-bottom-color:var(--bd); cursor:text; }
.kin-name-inp:focus { border-bottom-color:var(--s); background:var(--bg); border-radius:3px; }

/* Invite box */
.invite-box { background:var(--sf); border:1.5px solid #94a3b8 !important; border-radius:9px; padding:8px; margin-bottom:9px; }
.sh { font-size:10px; font-weight:800; color:var(--m); text-transform:uppercase;
  letter-spacing:.05em; margin-bottom:5px; display:block; }
.afield { width:100%; padding:7px 10px; font-size:12px; border:1.5px solid var(--bd);
  border-radius:7px; outline:none; transition:.15s; font-family:inherit; display:block; }
.afield:focus { border-color:var(--s); }

/* Toggle switch */
.tg  { display:flex; align-items:center; gap:6px; cursor:pointer; }
.sw  { position:relative; display:inline-block; width:32px; height:18px; flex-shrink:0; }
.sw input { opacity:0; width:0; height:0; position:absolute; }
.sl  { position:absolute; inset:0; background:#cbd5e1; border-radius:9999px; transition:.2s; }
.sl::before { content:''; position:absolute; width:12px; height:12px; border-radius:50%;
  background:#fff; top:3px; left:3px; transition:.2s; box-shadow:0 1px 3px rgba(0,0,0,.2); }
.sw input:checked + .sl { background:var(--s); }
.sw input:checked + .sl::before { transform:translateX(14px); }

/* Member cards — 2-row compact layout */
.mc { background:var(--sf); border:1.5px solid #94a3b8; border-radius:8px; padding:6px 8px; margin-bottom:6px; }
.mc.mc-paused { opacity:0.5; background:#f8fafc; }

.mc-r1 { display:flex; align-items:center; gap:3px; flex-wrap:wrap; min-height:28px; }
.mc-r2 { display:flex; align-items:center; gap:4px; margin-top:5px; flex-wrap:nowrap; }
.mc-av { width:26px !important; height:26px !important; font-size:10px !important; flex-shrink:0; }

/* Nick input — flex:1 fills from avatar to pencil */
.nick-inp { font-size:12px; font-weight:700; flex:2; min-width:120px;
  background:none; border:none; border-bottom:1.5px solid transparent;
  color:var(--t); padding:1px 2px; font-family:inherit; cursor:pointer; outline:none; transition:.12s; }
.nick-inp:hover { border-bottom-color:var(--bd); cursor:text; }
.nick-inp:focus { border-bottom-color:var(--s); background:var(--bg); border-radius:3px; }

/* Pencil edit indicator */
.pencil-btn { cursor:pointer; color:#3b82f6; font-size:19px; flex-shrink:0; line-height:1;
  padding:0 3px; user-select:none; transition:.12s; }
.pencil-btn:hover { color:#1d4ed8; transform:scale(1.15); }

/* Yellow key admin icon — hover scales only, never changes color */
.admin-key { background:none; border:none; cursor:pointer; font-size:13px; flex-shrink:0;
  padding:1px 2px; line-height:1; transition:transform .12s; filter:grayscale(1) opacity(.35); }
.admin-key:hover     { transform:scale(1.25); /* NO filter change — stays greyed */ }
.admin-key-on        { filter:none; }          /* active admin: yellow key */
.admin-key-on:hover  { filter:none; transform:scale(1.25); }  /* stays yellow */
.admin-key-owner     { cursor:default; filter:none; }
.admin-key-owner:hover { transform:none; }

/* Protected padlock */
.prot-wrap { display:flex; align-items:center; gap:4px; cursor:help; }
.prot-icon { font-size:13px; flex-shrink:0; transition:opacity .2s; }
.prot-lbl  { font-size:10px; color:var(--m); white-space:nowrap; }

/* Remove (×) button */
.rm-btn { background:none; border:none; cursor:pointer; color:#d1d5db; font-size:19px;
  line-height:1; padding:2px 4px; border-radius:4px; flex-shrink:0; transition:.15s; }
.rm-btn:hover { color:#dc2626; }

/* Member-level pause button */
.mem-pause-btn { font-size:13px; padding:2px 6px; flex-shrink:0; line-height:1; }

/* Code / invite link box — tighter padding */
.code-box { display:flex; align-items:center; gap:0; margin-left:auto; flex-shrink:0;
  background:#f0f9ff; border:1px solid #bae6fd; border-radius:4px; padding:0; overflow:hidden; height:22px; }
.tok { font-family:monospace; font-size:10px; color:var(--s); white-space:nowrap;
  padding:1px 3px; letter-spacing:.5px; min-width:60px; }
.tok-click { cursor:pointer; transition:color .15s; }
.tok-click:hover { color:var(--sd); }
.ico { background:none; border:none; cursor:pointer; font-size:12px; color:#334155;
  padding:1px 2px; transition:opacity .1s; }
.ico:hover { opacity:.6; }
.ico-lg { font-size:14px !important; min-width:20px; min-height:20px; }  /* restored */
.ico-sm { font-size:16px !important; min-width:20px; min-height:20px; }  /* copy-link 2-squares */
.ico-xl { font-size:24px !important; min-width:32px; min-height:26px; }
.ei { width:100%; padding:5px 8px; font-size:12px; border:1.5px solid var(--bd);
  border-radius:6px; outline:none; font-family:inherit; }
.ei:focus { border-color:var(--s); }

/* Admin action buttons */
.abtn { display:inline-flex; align-items:center; justify-content:center; padding:5px 12px;
  border-radius:7px; border:1.5px solid; cursor:pointer; font-size:12px; font-weight:700;
  font-family:inherit; transition:.12s; line-height:1; }
.a-bp { background:var(--s); border-color:var(--s); color:#fff; }
.a-bp:hover { opacity:.85; }
.a-bg { background:var(--sf); border-color:var(--bd); color:var(--m); }
.a-bg:hover { background:var(--bd); color:var(--t); }
.bsm { font-size:10px; padding:3px 7px; }

/* Badge */
.bdg { display:inline-flex; align-items:center; padding:1px 6px; border-radius:9999px;
  font-size:9px; font-weight:800; letter-spacing:.04em; }
.brd { background:#fef2f2; color:#dc2626; border:1px solid #fca5a5; }

/* Admin chat log */
.kin-mon { flex:1 1 0; overflow-y:auto; background:var(--sf); border:1.5px solid var(--bd);
  border-radius:8px; padding:6px 9px; font-size:11px; min-height:80px; word-break:break-word; }
.log-row { padding:3px 0; border-bottom:1px solid var(--bd); font-size:11px; line-height:1.5;
  word-break:break-word; white-space:normal; }
.log-pair-link { color:inherit; text-decoration:none; }
.log-pair-link:hover { text-decoration:underline; color:var(--s); }
/* Small photo in admin log */
.log-photo { max-width:80px; max-height:60px; border-radius:5px; vertical-align:middle;
  margin-left:4px; cursor:pointer; display:inline-block; }

/* Matrix */
.mxw { overflow-x:auto; }
.mtx { border-collapse:collapse; font-size:11px; }
.mtx th, .mtx td { padding:3px 4px; text-align:center; border:1px solid var(--bd); }
.mtx .mtx-lbl { background:var(--bg); }
.mtx .rl { text-align:left; font-weight:600; white-space:nowrap; background:var(--bg); padding:3px 6px; }
.mtx .ch { background:var(--bg); font-size:10px; word-break:break-word; white-space:normal;
  max-width:64px; min-width:36px; }
.mtx .dg           { background:#f0f9ff; }     /* diagonal: same as checked */
.mtx .mtx-checked  { background:#f0f9ff; }     /* checked: light blue-white */
.mtx .mtx-unchecked { background:#dde3ea; }    /* unchecked: noticeably darker */
.mtx input[type=checkbox] { width:14px; height:14px; cursor:pointer; accent-color:var(--s); }

/* Settings panel */
.sp { padding:20px 16px; max-width:460px; }
.pr { width:68px; height:68px; border-radius:50%; background:linear-gradient(135deg,#0ea5e9,#3b82f6);
  display:flex; align-items:center; justify-content:center; cursor:pointer; overflow:hidden;
  flex-shrink:0; border:3px solid var(--bd); }
.pr img  { width:100%; height:100%; object-fit:cover; border-radius:50%; display:block; }
.pr span { font-size:24px; font-weight:700; color:#fff; }

/* Donate wrapper */
.dw { padding:32px 20px; text-align:center; display:flex; justify-content:center; }
@keyframes heartbeat { 0%,100%{transform:scale(1)} 50%{transform:scale(1.28)} }
@keyframes kinplus { 0%,100%{transform:scale(1);color:#f59e0b} 33%{transform:scale(1.4);color:#ef4444} 66%{transform:scale(1.2);color:#8b5cf6} }
@keyframes arrowwiggle { 0%,100%{transform:translateX(0)} 25%{transform:translateX(-4px)} 75%{transform:translateX(3px)} }
.ck-online .heart-pulse { display:inline-block; animation:heartbeat 1.4s ease-in-out infinite; }

/* ── 5. Mobile ──────────────────────────────────────────────── */
@media (max-width:660px) {
  body.app { height:100svh; }
  #cv { grid-template-columns:1fr; height:calc(100svh - 50px); }
  #cp { display:none; }
  #cv.open #sb { display:none; }
  #cv.open #cp { display:flex; }
  .bk { display:flex; }
  #msgs { padding:6px 8px; }
  #ir   { padding:5px 6px; gap:4px; }
  #mi   { font-size:16px; }  /* prevents iOS auto-zoom */
  .ka   { display:flex; flex-direction:column; }
  .kl2  { border-right:none; border-bottom:2px solid var(--bd); flex:1 1 auto; overflow-y:auto; padding:8px 8px 56px; }
  .kr   { padding:8px; overflow-y:auto; }
  .sp   { padding:14px 10px; }
  .nb   { padding:0 8px; font-size:11px; }
  .emoji-picker { left:2px; right:2px; width:auto; max-width:100vw; height:420px; bottom:58px; grid-template-columns:repeat(10,1fr); overflow-y:auto; padding:6px; box-sizing:border-box; }
  #rx-popup { position:fixed; left:8px !important; top:auto !important; bottom:80px; }
  /* Mobile admin nav buttons at bottom */
  .admin-mob-nav { position:fixed; bottom:0; left:0; right:0; display:flex; gap:8px; padding:8px 12px; border-top:2px solid var(--bd); background:var(--sf); justify-content:center; align-items:center; z-index:50; }
  /* Mobile slide-in panel */
  .ka-mob-panel { display:none; flex-direction:column; position:fixed; top:0; left:0; right:0; bottom:0; background:var(--bg); z-index:200; overflow:hidden; }
  .ka-mob-back  { padding:8px 10px; border-bottom:2px solid var(--bd); background:var(--sf); flex-shrink:0; }
  .ka-mob-inner { flex:1; overflow-y:auto; padding:10px; }
  .ka-mob-inner .kin-mon { overflow:visible; height:auto; max-height:none; flex:none; border:none; background:none; padding:0; }
}
/* Desktop: hide mobile-only elements */
@media (min-width:701px) {
  .admin-mob-nav { display:none !important; }
  .ka-mob-panel  { display:none !important; }
}
/* Mobile: make .ka position:relative so overlay works */
@media (max-width:700px) {
  .kr { visibility:hidden; overflow:hidden; height:0; padding:0; } /* Hidden on mobile via slide-in overlay */
}

/* ── 6. Landing page sections (restored) ───────────────────── */
body.land { background:#fff; }

/* Old-style header (for any legacy references) */
header { display:flex; align-items:center; justify-content:space-between; padding:11px 26px;
  border-bottom:1px solid #e2e8f0; position:sticky; top:0; background:#fff; z-index:200;
  box-shadow:0 1px 4px rgba(0,0,0,.06); gap:10px; }
.logo-t { font-size:clamp(17px,3.5vw,21px); font-weight:900;
  background:linear-gradient(90deg,#0ea5e9,#3b82f6); -webkit-background-clip:text; -webkit-text-fill-color:transparent; }
.logo-k { font-family:"Brush Script MT",cursive; font-size:clamp(19px,4vw,25px); color:#d97706; -webkit-text-fill-color:#d97706; }
.hb { display:flex; gap:7px; flex-shrink:0; }
.btn-lg { font-size:18px; padding:16px 42px; min-height:54px; }

/* Feature cards on hero */
.feats { display:flex; justify-content:center; gap:clamp(14px,3vw,44px); flex-wrap:wrap; margin-bottom:32px; }
.feat-i { font-size:38px; margin-bottom:6px; }

/* Content sections below hero */
.sec { padding:56px 24px; max-width:940px; margin:0 auto; }
.sec h2 { font-size:clamp(20px,3.5vw,28px); font-weight:900; text-align:center; margin-bottom:36px; color:#0f172a; }
.cards { display:grid; grid-template-columns:repeat(auto-fit,minmax(230px,1fr)); gap:14px; }
.card { background:#f8fafc; border:1px solid #e2e8f0; border-radius:12px; padding:22px 20px; }
.card-i { font-size:32px; margin-bottom:10px; }
.card h3 { font-size:14px; font-weight:700; margin-bottom:6px; color:#0f172a; }
.card p { font-size:13px; color:#475569; line-height:1.6; margin:0; }

/* Steps */
.steps { display:flex; justify-content:center; gap:clamp(14px,3vw,44px); flex-wrap:wrap;
  position:relative; padding:0 10px; }
.steps::before { content:''; position:absolute; top:28px; left:50%; transform:translateX(-50%);
  width:calc(100% - 120px); height:2px; background:#e2e8f0; z-index:0;
  display:none; } /* hidden on mobile */
@media (min-width:600px) { .steps::before { display:block; } }
.step { text-align:center; max-width:160px; position:relative; z-index:1; }
.step-n { width:56px; height:56px; border-radius:50%;
  background:linear-gradient(135deg,#0ea5e9,#3b82f6); color:#fff; font-size:22px; font-weight:900;
  display:flex; align-items:center; justify-content:center; margin:0 auto 10px;
  box-shadow:0 3px 10px rgba(14,165,233,.3); }
.step h3 { font-size:13px; font-weight:700; margin-bottom:4px; }
.step p  { font-size:11px; color:#64748b; line-height:1.5; }

/* CTA band */
.cta-band { background:linear-gradient(135deg,#0284c7,#1e40af); color:#fff; text-align:center; padding:60px 24px; }
.cta-band h2 { font-size:clamp(20px,4vw,32px); font-weight:900; margin-bottom:10px; }
.cta-band p  { font-size:clamp(13px,2vw,16px); opacity:.9; margin-bottom:26px; }
.cta-band .btn-lg { background:#fff; color:#0ea5e9; box-shadow:0 6px 24px rgba(0,0,0,.18); }
.cta-band .btn-lg:hover { transform:translateY(-2px); }

/* Landing page footer */
footer { text-align:center; padding:20px 16px; color:#94a3b8; font-size:12px;
  border-top:1px solid #e2e8f0; }
footer a { color:#94a3b8; }
footer a:hover { color:#0ea5e9; }

/* Donate tab button — yellow border */
.dn { border:1.5px solid #d97706 !important; color:#d97706 !important; border-radius:8px; }

/* Fix typing-row: let JS control display completely, no CSS display override */
.typing-row { align-items:center; padding:3px 14px 2px; flex-shrink:0; gap:4px; min-height:0; }

/* Photo in admin log */
.log-photo { max-height:80px; max-width:120px; border-radius:5px; vertical-align:middle;
  margin-left:4px; cursor:pointer; display:inline-block; }
/* Segmented control (3-position selector) */
.srch-hidden { display:none !important; }
.seg-opt  { background:none; border:none; padding:5px 10px; font-size:11px; font-weight:600;
  cursor:pointer; color:var(--m); font-family:inherit; transition:.15s; white-space:nowrap; }
.seg-opt + .seg-opt { border-left:1px solid var(--bd); }
.seg-opt.seg-on  { background:var(--s); color:#fff; }
.seg-opt:not(.seg-on):hover { background:var(--bd); }
