/* Nest WhatsApp. Neutral workspace, brand indigo/violet for actions, WhatsApp-familiar chat. */
:root {
  --bg: #F4F5F8; --card: #FFFFFF; --ink: #171A2E; --ink-2: #4B5068; --ink-3: #80859C; --line: #E3E5EC; --line-2: #EEF0F4;
  --brand: #4F46E5; --brand-2: #7C3AED; --brand-ink: #3730A3; --brand-bg: #EEF0FF;
  --ok: #0F8A4F; --ok-bg: #E3F6EC; --warn: #A15C00; --warn-bg: #FFF2DB; --bad: #C0262D; --bad-bg: #FDE8E8; --idle-bg: #EEF0F4;
  --chat-bg: #EFEAE2; --bubble-in: #FFFFFF; --bubble-out: #D9FDD3; --bubble-bot: #E7ECFF; --note: #FFF6CC;
  --hover: var(--hover); --sel: #F1F0FF; --composer: #F0F2F5; --avatar: #E0E3F5; --input: #FFFFFF; --link: #0B6BCB; --meta: #667085; --tag-bg: #F0EEFF; --tag-ink: #4C3FB8;
  --radius: 10px; --shadow: 0 1px 2px rgba(20, 22, 40, .06), 0 2px 8px rgba(20, 22, 40, .04);
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Noto Sans Tamil", sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--ink); font: 14px/1.45 var(--font); -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--brand-ink); }
h1, h2, h3, h4 { margin: 0; line-height: 1.25; }
h1 { font-size: 22px; } h2 { font-size: 18px; } h3 { font-size: 15px; } h4 { font-size: 13px; }
.mono { font-family: var(--mono); font-size: 12.5px; }
.muted { color: var(--ink-3); } .small { font-size: 12.5px; } .err { color: var(--bad); } .ok-t { color: var(--ok); }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

/* ---------- shell */
.shell { display: grid; grid-template-columns: 76px minmax(0, 1fr); height: 100vh; }
.rail { background: #12142A; color: #C9CCE4; display: flex; flex-direction: column; align-items: center; padding: 12px 0; gap: 4px; overflow-y: auto; }
.logo { width: 40px; height: 40px; border-radius: 11px; background: linear-gradient(135deg, var(--brand), var(--brand-2)); display: grid; place-items: center; color: #fff; font-weight: 800; margin-bottom: 10px; }
.rail a { width: 64px; padding: 8px 0 6px; border-radius: 10px; color: inherit; text-decoration: none; display: grid; justify-items: center; gap: 3px; font-size: 10.5px; font-weight: 600; position: relative; }
.rail a svg { width: 21px; height: 21px; }
.rail a:hover { background: rgba(255,255,255,.07); color: #fff; }
.rail a[aria-current="page"] { background: rgba(124, 58, 237, .28); color: #fff; }
.rail .badge { position: absolute; top: 3px; right: 8px; background: #22C55E; color: #062; min-width: 17px; height: 17px; border-radius: 9px; font-size: 10px; display: grid; place-items: center; padding: 0 4px; color: #fff; }
.rail .grow { flex: 1; }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--avatar); color: var(--brand-ink); display: inline-grid; place-items: center; font-weight: 700; font-size: 12.5px; flex: none; text-transform: uppercase; }
.avatar.lg { width: 56px; height: 56px; font-size: 19px; }
.main { min-width: 0; overflow: auto; }
.page { padding: 24px 28px 60px; max-width: 1280px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.page-head p { margin: 4px 0 0; color: var(--ink-2); }
.banner { padding: 10px 16px; font-weight: 500; display: flex; gap: 10px; align-items: center; }
.banner.bad { background: var(--bad); color: #fff; } .banner.warn { background: var(--warn-bg); color: var(--warn); }

/* ---------- controls */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid var(--line); background: var(--card); border-radius: 8px; padding: 7px 13px; font-weight: 600; cursor: pointer; white-space: nowrap; text-decoration: none; color: var(--ink); min-height: 34px; }
.btn:hover { border-color: var(--ink-3); background: var(--hover); }
.btn.p { background: linear-gradient(135deg, var(--brand), var(--brand-2)); border-color: transparent; color: #fff; }
.btn.p:hover { filter: brightness(1.06); }
.btn.d { color: var(--bad); } .btn.d:hover { background: var(--bad-bg); border-color: #F3C2C4; }
.btn.q { border-color: transparent; background: transparent; } .btn.q:hover { background: var(--line-2); }
.btn.sm { padding: 4px 9px; min-height: 28px; font-size: 12.5px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn svg { width: 16px; height: 16px; }
.iconbtn { border: 0; background: transparent; width: 34px; height: 34px; border-radius: 8px; display: inline-grid; place-items: center; cursor: pointer; color: var(--ink-2); }
.iconbtn:hover { background: var(--line-2); color: var(--ink); } .iconbtn svg { width: 19px; height: 19px; }
label.f { display: grid; gap: 5px; font-weight: 600; font-size: 13px; color: var(--ink-2); }
label.f .hint { font-weight: 400; color: var(--ink-3); font-size: 12px; }
.input, select.input, textarea.input { width: 100%; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; background: var(--input); font-weight: 400; color: var(--ink); }
textarea.input { resize: vertical; min-height: 84px; }
.input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(79, 70, 229, .14); }
.check { display: inline-flex; align-items: center; gap: 8px; font-weight: 500; color: var(--ink); cursor: pointer; }
.check input { width: 16px; height: 16px; accent-color: var(--brand); }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row.end { justify-content: flex-end; } .row.between { justify-content: space-between; }
.stack { display: grid; gap: 14px; } .stack.s { gap: 8px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; } .grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.seg { display: inline-flex; background: var(--line-2); border-radius: 9px; padding: 3px; gap: 2px; }
.seg button { border: 0; background: transparent; padding: 5px 11px; border-radius: 7px; font-weight: 600; cursor: pointer; color: var(--ink-2); font-size: 13px; }
.seg button[aria-pressed="true"] { background: var(--card); color: var(--ink); box-shadow: var(--shadow); }
.seg .n { color: var(--ink-3); font-weight: 600; margin-left: 3px; }

/* ---------- surfaces */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card.pad { padding: 18px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--line-2); }
.card-body { padding: 18px; }
.pill { display: inline-flex; align-items: center; gap: 5px; border-radius: 99px; padding: 2px 9px; font-size: 12px; font-weight: 600; white-space: nowrap; background: var(--idle-bg); color: var(--ink-2); }
.pill.ok { background: var(--ok-bg); color: var(--ok); } .pill.warn { background: var(--warn-bg); color: var(--warn); } .pill.bad { background: var(--bad-bg); color: var(--bad); }
.pill.act { background: var(--brand-bg); color: var(--brand-ink); }
.tag { display: inline-flex; align-items: center; gap: 4px; background: var(--tag-bg); color: var(--tag-ink); border-radius: 6px; padding: 1px 7px; font-size: 12px; font-weight: 600; }
.tag button { border: 0; background: none; cursor: pointer; padding: 0; color: inherit; font-size: 14px; line-height: 1; }
.tags { display: flex; flex-wrap: wrap; gap: 5px; }
table.t { width: 100%; border-collapse: collapse; }
.t th { text-align: left; font-size: 12px; font-weight: 600; color: var(--ink-3); padding: 9px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; background: var(--hover); }
.t td { padding: 10px 14px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.t tr:last-child td { border-bottom: 0; }
.t tr.click { cursor: pointer; } .t tr.click:hover td { background: var(--hover); }
.scroll { overflow-x: auto; }
.empty { padding: 40px 20px; text-align: center; color: var(--ink-3); }
.empty h3 { color: var(--ink); margin-bottom: 6px; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 18px; }
.kpi { padding: 14px 16px; }
.kpi .v { font-size: 24px; font-weight: 700; margin-top: 4px; font-variant-numeric: tabular-nums; }
.kpi .l { color: var(--ink-3); font-size: 12.5px; font-weight: 600; }
.kpi .s { color: var(--ink-3); font-size: 12px; margin-top: 2px; }
.bar { height: 8px; border-radius: 4px; background: var(--line-2); overflow: hidden; display: flex; }
.bar i { display: block; height: 100%; }
.callout { border-radius: 8px; padding: 10px 12px; background: var(--brand-bg); color: var(--brand-ink); font-size: 13px; }
.callout.warn { background: var(--warn-bg); color: var(--warn); } .callout.bad { background: var(--bad-bg); color: var(--bad); }
.copy { display: flex; gap: 6px; align-items: center; background: var(--hover); border: 1px solid var(--line); border-radius: 8px; padding: 6px 6px 6px 10px; }
.copy code { flex: 1; overflow-x: auto; white-space: nowrap; font-family: var(--mono); font-size: 12.5px; }

/* ---------- drawer / modal / toast */
.scrim { position: fixed; inset: 0; background: rgba(15, 17, 35, .38); z-index: 50; display: flex; justify-content: flex-end; animation: fade .12s; }
.scrim.center { justify-content: center; align-items: flex-start; padding: 6vh 16px; overflow-y: auto; }
.drawer { width: min(560px, 100vw); height: 100%; background: var(--card); overflow-y: auto; padding: 22px; display: grid; gap: 16px; align-content: start; box-shadow: -8px 0 30px rgba(0,0,0,.12); }
.drawer.wide { width: min(860px, 100vw); }
.drawer.xwide { width: min(1180px, 100vw); }
.modal { width: min(520px, 100%); background: var(--card); border-radius: 14px; padding: 22px; display: grid; gap: 16px; box-shadow: 0 20px 60px rgba(0,0,0,.2); }
.dhead { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
@keyframes fade { from { opacity: 0; } }
.toasts { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); display: grid; gap: 8px; z-index: 90; }
.toast { background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 9px; font-weight: 500; box-shadow: 0 8px 24px rgba(0,0,0,.2); max-width: 90vw; }
.toast.err { background: var(--bad); }

/* ---------- inbox */
.inbox { display: grid; grid-template-columns: 340px minmax(0, 1fr) 320px; height: 100vh; }
.inbox.noside { grid-template-columns: 340px minmax(0, 1fr); }
.clist { border-right: 1px solid var(--line); background: var(--card); display: flex; flex-direction: column; min-height: 0; }
.clist-head { padding: 14px 14px 10px; display: grid; gap: 10px; border-bottom: 1px solid var(--line-2); }
.clist-items { overflow-y: auto; flex: 1; }
.citem { display: grid; grid-template-columns: 38px minmax(0, 1fr) auto; gap: 10px; padding: 11px 14px; border: 0; border-bottom: 1px solid var(--line-2); background: var(--card); width: 100%; text-align: left; cursor: pointer; align-items: center; }
.citem:hover { background: var(--hover); } .citem[aria-current="true"] { background: var(--sel); }
.citem .nm { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.citem .pv { color: var(--ink-3); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.citem .meta { display: grid; justify-items: end; gap: 4px; font-size: 11.5px; color: var(--ink-3); }
.unread { background: #22C55E; color: #fff; border-radius: 10px; min-width: 19px; height: 19px; font-size: 11px; font-weight: 700; display: grid; place-items: center; padding: 0 5px; }
.thread { display: flex; flex-direction: column; min-width: 0; min-height: 0; background: var(--chat-bg); }
.thead { background: var(--card); border-bottom: 1px solid var(--line); padding: 10px 16px; display: flex; align-items: center; gap: 12px; }
.thead .who { flex: 1; min-width: 0; } .thead .who b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.msgs { flex: 1; overflow-y: auto; padding: 18px 6%; display: flex; flex-direction: column; gap: 4px; }
.day { align-self: center; background: rgba(255,255,255,.85); border-radius: 7px; padding: 3px 10px; font-size: 12px; color: var(--ink-2); margin: 10px 0; box-shadow: 0 1px 1px rgba(0,0,0,.06); }
.bub { max-width: min(560px, 78%); padding: 7px 10px 5px; border-radius: 9px; box-shadow: 0 1px 1px rgba(0,0,0,.08); background: var(--bubble-in); align-self: flex-start; white-space: pre-wrap; overflow-wrap: anywhere; position: relative; }
.bub.out { align-self: flex-end; background: var(--bubble-out); }
.bub.bot { background: var(--bubble-bot); }
.bub .ft { display: flex; justify-content: flex-end; gap: 5px; align-items: center; font-size: 11px; color: var(--meta); margin-top: 2px; white-space: nowrap; }
.bub .by { font-size: 11.5px; font-weight: 700; color: var(--brand-ink); margin-bottom: 2px; }
.bub img, .bub video { max-width: 100%; max-height: 320px; border-radius: 6px; display: block; margin-bottom: 4px; }
.bub audio { width: 260px; max-width: 100%; }
.bub .opts { display: grid; gap: 4px; margin-top: 6px; } .bub .opts span { border-top: 1px solid rgba(0,0,0,.08); padding-top: 5px; text-align: center; color: var(--link); font-weight: 600; }
.bub.failed { border: 1px solid #F3B4B6; }
.tick { width: 16px; height: 11px; } .tick.read { color: #2C8CE8; }
.recbar { display: flex; align-items: center; gap: 10px; background: var(--card); border-radius: 10px; padding: 8px 12px; }
.recbar .dot { width: 10px; height: 10px; border-radius: 50%; background: #E11D48; animation: pulse 1s infinite; }
@keyframes pulse { 50% { opacity: .3; } }
.bub .voice { display: flex; align-items: center; gap: 6px; } .bub .voice svg { width: 18px; height: 18px; color: var(--ok); flex: none; }
.notebub { align-self: center; background: var(--note); border-radius: 8px; padding: 6px 12px; font-size: 13px; max-width: 80%; box-shadow: 0 1px 1px rgba(0,0,0,.06); }
.composer { background: var(--composer); padding: 10px 14px; display: grid; gap: 8px; border-top: 1px solid var(--line); }
.composer .box { display: flex; gap: 8px; align-items: flex-end; }
.composer textarea { flex: 1; border: 0; border-radius: 10px; padding: 10px 12px; resize: none; min-height: 42px; max-height: 160px; background: var(--card); }
.composer textarea:focus { outline: 2px solid rgba(79,70,229,.25); }
.composer.note textarea { background: var(--note); }
.qr-pop { position: absolute; bottom: 100%; left: 14px; right: 14px; background: var(--card); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 10px 30px rgba(0,0,0,.14); max-height: 260px; overflow-y: auto; }
.qr-pop button { display: block; width: 100%; text-align: left; border: 0; background: var(--card); padding: 9px 12px; cursor: pointer; }
.qr-pop button:hover, .qr-pop button[aria-selected="true"] { background: var(--sel); }
.side { background: var(--card); border-left: 1px solid var(--line); overflow-y: auto; padding: 18px; display: grid; gap: 18px; align-content: start; }
.side h4 { color: var(--ink-3); text-transform: uppercase; letter-spacing: .04em; font-size: 11.5px; margin-bottom: 8px; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; margin: 0; font-size: 13px; }
.kv dt { color: var(--ink-3); } .kv dd { margin: 0; overflow-wrap: anywhere; }
.windowbar { background: #FFF8E1; color: #7A5200; padding: 8px 14px; font-size: 13px; display: flex; gap: 10px; align-items: center; justify-content: space-between; }
.mob { display: none !important; }
.side-close { display: none; justify-self: end; margin: -8px -8px -18px 0; }

/* ---------- dark mode and chat backgrounds (set by Settings → Appearance) */
:root[data-mode="dark"] {
  color-scheme: dark;
  --bg: #0F1220; --card: #171A2B; --ink: #E7E9F3; --ink-2: #B6BBD2; --ink-3: #8A90AA; --line: #2B2F47; --line-2: #22263A;
  --ok: #4ADE80; --ok-bg: #12362A; --warn: #FBBF24; --warn-bg: #3A2C12; --bad: #F87171; --bad-bg: #3D1B20; --idle-bg: #262A40;
  --chat-bg: #0B141A; --bubble-in: #202C33; --bubble-out: #005C4B; --bubble-bot: #2A2F5A; --note: #3A3416;
  --hover: #1D2133; --sel: #262A50; --composer: #1B1F30; --avatar: #2A2E50; --input: #12152A; --link: #53BDEB; --meta: #9AA4B2; --tag-bg: #2A2650; --tag-ink: #C4B5FD;
  --shadow: 0 1px 2px rgba(0,0,0,.4);
}
:root[data-mode="dark"] .auth { background: var(--bg); }
:root[data-mode="dark"] .day { background: rgba(32,44,51,.92); color: var(--ink-2); }
:root[data-mode="dark"] .windowbar { background: #3A2C12; color: #FCD34D; }
:root[data-mode="dark"] .toast { background: #2B2F47; }
:root[data-chat="plain"] { --chat-bg: var(--bg); }
:root[data-chat="mint"] { --chat-bg: #E4F3EC; } :root[data-chat="lavender"] { --chat-bg: #ECE9FA; } :root[data-chat="sand"] { --chat-bg: #F3EDE3; }
:root[data-mode="dark"][data-chat="mint"] { --chat-bg: #0D1F1A; } :root[data-mode="dark"][data-chat="lavender"] { --chat-bg: #15142A; } :root[data-mode="dark"][data-chat="sand"] { --chat-bg: #1C1914; }
:root[data-density="compact"] body { font-size: 13px; } :root[data-density="compact"] .citem { padding: 7px 12px; } :root[data-density="compact"] .t td { padding: 7px 12px; } :root[data-density="compact"] .page { padding: 16px 20px 40px; }
.rail .logo img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
.swatches { display: flex; flex-wrap: wrap; gap: 10px; }
.swatch { width: 92px; border: 2px solid var(--line); border-radius: 12px; padding: 6px; background: var(--card); cursor: pointer; display: grid; gap: 6px; font-size: 12px; font-weight: 600; color: var(--ink-2); text-align: center; }
.swatch i { display: block; height: 34px; border-radius: 8px; }
.swatch[aria-pressed="true"] { border-color: var(--brand); color: var(--ink); }

@media (max-width: 1180px) { .side-close { display: inline-grid; } }
.nochat { display: grid; place-items: center; height: 100%; color: var(--ink-3); text-align: center; background: var(--chat-bg); }

/* ---------- phone preview (templates / broadcasts) */
.phone { background: var(--chat-bg); border-radius: 16px; padding: 18px 14px; min-height: 260px; border: 8px solid #1F2133; display: flex; flex-direction: column; justify-content: flex-end; }
.phone .bub { max-width: 100%; }
.phone .hd { font-weight: 700; margin-bottom: 4px; } .phone .fo { color: var(--meta); font-size: 12px; margin-top: 4px; }

/* ---------- flow editor */
.libgrid { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 18px; align-items: start; }
.libgrid .subnav { max-height: 70vh; overflow-y: auto; }
.libcard { padding: 14px; display: grid; gap: 12px; } .libcard .phone { min-height: 0; border-width: 6px; padding: 12px; }
.ta, :lang(ta) { font-family: "Noto Sans Tamil", var(--font); }
@media (max-width: 760px) { .libgrid { grid-template-columns: 1fr; } .libgrid .subnav { max-height: none; } }
.nodes { display: grid; gap: 12px; }
.node { border: 1px solid var(--line); border-left: 4px solid var(--brand); border-radius: 10px; background: var(--card); padding: 12px 14px; display: grid; gap: 10px; }
.node.start { border-left-color: #22C55E; }
.node .nh { display: flex; align-items: center; gap: 8px; }
.node .nid { font-family: var(--mono); font-size: 12px; background: var(--line-2); border-radius: 5px; padding: 1px 6px; }
.opt { display: grid; grid-template-columns: 1fr 180px auto; gap: 8px; align-items: center; }
.sim { background: var(--chat-bg); border-radius: 12px; padding: 12px; display: flex; flex-direction: column; gap: 6px; height: 420px; overflow-y: auto; }

/* ---------- chart */
.chart { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 6px; align-items: end; height: 170px; padding-top: 10px; }
.chart .col { display: flex; flex-direction: column; height: 100%; min-width: 0; }
.chart .bars { flex: 1; display: flex; gap: 2px; align-items: flex-end; }
.chart .col i { display: block; border-radius: 3px 3px 0 0; min-height: 2px; }
.chart .lab { font-size: 11px; color: var(--ink-3); text-align: center; margin-top: 4px; }
.legend { display: flex; gap: 14px; font-size: 12.5px; color: var(--ink-2); } .legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }

/* ---------- auth */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 20px; background: radial-gradient(1200px 500px at 10% -10%, #E6E3FF, transparent), var(--bg); }
.auth .card { width: min(400px, 100%); padding: 28px; display: grid; gap: 16px; }
.auth .qr svg { width: 180px; height: 180px; display: block; margin: 0 auto; }
.code-input { font-size: 22px; letter-spacing: .35em; text-align: center; font-family: var(--mono); }

/* ---------- settings */
.settings { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 24px; }
.subnav { display: grid; gap: 2px; align-content: start; position: sticky; top: 0; }
.subnav button { text-align: left; border: 0; background: transparent; padding: 8px 12px; border-radius: 8px; font-weight: 600; color: var(--ink-2); cursor: pointer; }
.subnav button[aria-current="page"] { background: var(--card); color: var(--ink); box-shadow: var(--shadow); }
.chan { display: grid; grid-template-columns: 44px 1fr auto; gap: 14px; align-items: center; padding: 16px 18px; border-bottom: 1px solid var(--line-2); }
.chan .ic { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--ok-bg); color: var(--ok); }
.chan .ic.owa { background: var(--warn-bg); color: var(--warn); }
.qrbox { display: grid; justify-items: center; gap: 10px; padding: 10px; } .qrbox img { width: 240px; height: 240px; image-rendering: pixelated; }

@media (max-width: 1180px) { .inbox { grid-template-columns: 300px minmax(0, 1fr); } .inbox .side { display: none; } .inbox.showside .side { display: grid; position: fixed; right: 0; top: 0; bottom: 0; width: 320px; z-index: 40; box-shadow: -8px 0 30px rgba(0,0,0,.12); } }
@media (max-width: 760px) {
  .shell { grid-template-columns: 1fr; grid-template-rows: minmax(0, 1fr) 62px; }
  .rail { order: 2; flex-direction: row; padding: 4px 6px; justify-content: space-around; overflow-x: auto; }
  .rail .logo, .rail .grow { display: none; } .rail a { width: 58px; flex: none; }
  .inbox { grid-template-columns: 1fr; height: calc(100vh - 62px); }
  .inbox.chatopen .clist { display: none; } .inbox:not(.chatopen) .thread { display: none; }
  .page { padding: 18px 16px 40px; } .grid2, .grid3, .settings { grid-template-columns: 1fr; } .subnav { position: static; grid-auto-flow: column; overflow-x: auto; }
  .opt { grid-template-columns: 1fr; } .msgs { padding: 14px 10px; } .mob { display: inline-grid !important; }
  .thead { flex-wrap: wrap; } .thead .who { flex: 1 1 60%; } .hide-m { display: none; } .inbox .side { top: 0; bottom: 62px; width: 100%; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
