/* Lokkidg — Liquid Glass.
   Layout: a sea-at-dusk wallpaper; floating glass panes (tab rail, chat list, info) and floating glass controls over the
   conversation (title capsule, composer), so messages scroll underneath and show through, blurred.
   Glass = translucent fill + backdrop blur/saturation + rim light on the top edge + a soft specular sheen. No yellow. */
:root {
  /* wallpaper */
  --wall-base: #E8EEF8;
  --wall-a: #9CC7FF;   /* morning sky */
  --wall-b: #8FE0EA;   /* shallow water */
  --wall-c: #C9B8FF;   /* lavender haze */
  --wall-d: #FFB8CB;   /* coral dusk */
  /* glass */
  --glass: rgba(255, 255, 255, .46);
  --glass-strong: rgba(255, 255, 255, .72);
  --glass-thin: rgba(255, 255, 255, .30);
  --glass-rim: rgba(255, 255, 255, .62);
  --glass-edge: rgba(255, 255, 255, .95);
  --glass-shade: rgba(22, 38, 80, .14);
  --sheen: rgba(255, 255, 255, .55);
  --fill: rgba(118, 118, 128, .12);        /* iOS tertiary fill for fields */
  --fill-2: rgba(118, 118, 128, .20);
  --hover: rgba(255, 255, 255, .42);
  --scrim: rgba(20, 28, 48, .22);
  /* text */
  --ink: #0B0F19;
  --ink-2: #384152;
  --ink-3: #4D5666;
  /* system colours */
  --accent: #007AFF;
  --accent-ink: #0050B8;
  --accent-soft: rgba(0, 122, 255, .14);
  --on-accent: #FFFFFF;
  --red: #A8180F; --red-fill: #E0241B; --accent-fill: #0A6CFF; --panel-ring: #FFFFFF;
  --red-soft: rgba(255, 59, 48, .14);
  --orange: #9A3412;
  --orange-soft: rgba(255, 106, 0, .14);
  --green: #157A36;
  --online: #34C759;
  --indigo: #4340B8;
  --indigo-soft: rgba(88, 86, 214, .14);
  --indigo-fill: #5856D6;
  --pink: #D61F69;
  --pink-soft: rgba(255, 45, 85, .12);
  /* bubbles */
  --bubble-in: rgba(255, 255, 255, .84);
  --bubble-in-ink: #0B0F19;
  --bubble-out-top: #0E6EF5;
  --bubble-out: #005FDB;
  --bubble-out-ink: #FFFFFF;
  --bubble-out-meta: rgba(255, 255, 255, .9);
  /* charts (validated with the dataviz palette checker) */
  --you: #1F6FEB;
  --them: #C2387A;
  --chart-grid: rgba(60, 60, 67, .14);
  --switch-on: #34C759;
  --knob: #FFFFFF;
  --seg-on: #FFFFFF;
  --name-k: 100%;
  --name-base: #000000;
  --scroll: rgba(60, 60, 67, .22);
  --scroll-hover: rgba(60, 60, 67, .4);
  --sheen-soft: rgba(255, 255, 255, .3);   /* the pane sheen at the strength its ::after drew it (.55 x .55) */
  --card-line: rgba(22, 38, 80, .12);      /* edge of glass cards: a white rim alone vanishes on light glass */
  --field-line: rgba(11, 15, 25, .22);     /* outline of text fields */
  --ctl-line: rgba(60, 60, 67, .6);        /* outline of a switch that is off (3:1 against the card) */
  --shadow-float: 0 18px 50px rgba(22, 38, 80, .22), 0 3px 10px rgba(22, 38, 80, .10);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Segoe UI Variable Text", "Segoe UI", system-ui, sans-serif;
  --display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter", "Segoe UI Variable Display", "Segoe UI", system-ui, sans-serif;
  --fs: 15px;
  --blur: 26px;
  --rail: 86px;
  --side: 352px;
  --drawer: 372px;
  --gap: 12px;
  --r-pane: 28px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --wall-base: #05070F; --wall-a: #123A86; --wall-b: #0B5566; --wall-c: #34237E; --wall-d: #6A1F55;
    --glass: rgba(30, 34, 48, .46); --glass-strong: rgba(32, 36, 50, .80); --glass-thin: rgba(40, 46, 62, .34);
    --glass-rim: rgba(255, 255, 255, .14); --glass-edge: rgba(255, 255, 255, .26); --glass-shade: rgba(0, 0, 0, .40); --sheen: rgba(255, 255, 255, .14);
    --fill: rgba(118, 118, 128, .24); --fill-2: rgba(118, 118, 128, .34); --hover: rgba(255, 255, 255, .08); --scrim: rgba(0, 0, 0, .45);
    --ink: #F5F7FB; --ink-2: #C6CDD9; --ink-3: #B8C0CC;
    --accent: #0A84FF; --accent-ink: #80C4FF; --accent-soft: rgba(10, 132, 255, .22); --on-accent: #FFFFFF;
    --red: #FF8A84; --red-soft: rgba(255, 69, 58, .20); --orange: #FF9F5A; --orange-soft: rgba(255, 140, 50, .18); --panel-ring: #1A1E28;
    --green: #4CD97B; --online: #30D158; --indigo: #ADABFF; --indigo-soft: rgba(94, 92, 230, .26); --indigo-fill: #5E5CE6; --pink: #FF6B9A; --pink-soft: rgba(255, 55, 95, .20);
    --bubble-in: rgba(44, 50, 66, .82); --bubble-in-ink: #F5F7FB; --bubble-out-top: #0E6EF5; --bubble-out: #005FDB; --bubble-out-ink: #FFFFFF; --bubble-out-meta: rgba(255, 255, 255, .9);
    --you: #4F8EF7; --them: #D9579A; --chart-grid: rgba(235, 235, 245, .14);
    --switch-on: #30D158; --knob: #FFFFFF; --seg-on: #636366; --name-k: 55%; --name-base: #FFFFFF; --scroll: rgba(235, 235, 245, .2); --scroll-hover: rgba(235, 235, 245, .38);
    --shadow-float: 0 18px 50px rgba(0, 0, 0, .55), 0 3px 10px rgba(0, 0, 0, .3); --sheen-soft: rgba(255, 255, 255, .077); --card-line: rgba(255, 255, 255, .14); --field-line: rgba(245, 247, 251, .22); --ctl-line: rgba(235, 235, 245, .5);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --wall-base: #05070F; --wall-a: #123A86; --wall-b: #0B5566; --wall-c: #34237E; --wall-d: #6A1F55;
  --glass: rgba(30, 34, 48, .46); --glass-strong: rgba(32, 36, 50, .80); --glass-thin: rgba(40, 46, 62, .34);
  --glass-rim: rgba(255, 255, 255, .14); --glass-edge: rgba(255, 255, 255, .26); --glass-shade: rgba(0, 0, 0, .40); --sheen: rgba(255, 255, 255, .14);
  --fill: rgba(118, 118, 128, .24); --fill-2: rgba(118, 118, 128, .34); --hover: rgba(255, 255, 255, .08); --scrim: rgba(0, 0, 0, .45);
  --ink: #F5F7FB; --ink-2: #C6CDD9; --ink-3: #B8C0CC;
  --accent: #0A84FF; --accent-ink: #80C4FF; --accent-soft: rgba(10, 132, 255, .22); --on-accent: #FFFFFF;
  --red: #FF8A84; --red-soft: rgba(255, 69, 58, .20); --orange: #FF9F5A; --orange-soft: rgba(255, 140, 50, .18); --panel-ring: #1A1E28;
  --green: #4CD97B; --online: #30D158; --indigo: #ADABFF; --indigo-soft: rgba(94, 92, 230, .26); --indigo-fill: #5E5CE6; --pink: #FF6B9A; --pink-soft: rgba(255, 55, 95, .20);
  --bubble-in: rgba(44, 50, 66, .82); --bubble-in-ink: #F5F7FB; --bubble-out-top: #0E6EF5; --bubble-out: #005FDB; --bubble-out-ink: #FFFFFF; --bubble-out-meta: rgba(255, 255, 255, .9);
  --you: #4F8EF7; --them: #D9579A; --chart-grid: rgba(235, 235, 245, .14);
  --switch-on: #30D158; --knob: #FFFFFF; --seg-on: #636366; --name-k: 55%; --name-base: #FFFFFF; --scroll: rgba(235, 235, 245, .2); --scroll-hover: rgba(235, 235, 245, .38);
  --shadow-float: 0 18px 50px rgba(0, 0, 0, .55), 0 3px 10px rgba(0, 0, 0, .3); --sheen-soft: rgba(255, 255, 255, .077); --card-line: rgba(255, 255, 255, .14); --field-line: rgba(245, 247, 251, .22); --ctl-line: rgba(235, 235, 245, .5);
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; }
html { background-color: var(--wall-base); } /* the edges of the screen (under the island, by the home bar) show the wallpaper, not black */
body {
  margin: 0; color: var(--ink);
  font: 400 var(--fs)/1.42 var(--font); letter-spacing: -.005em;
  -webkit-font-smoothing: antialiased; overflow: hidden;
  background-color: var(--wall-base);
}
/* the wallpaper lives on its own layer so it can drift slowly behind the glass */
body::before {
  content: ""; position: fixed; inset: -8%; z-index: -1; pointer-events: none;
  background-image:
    radial-gradient(60% 55% at 12% 8%, var(--wall-a) 0%, transparent 70%),
    radial-gradient(55% 60% at 92% 18%, var(--wall-c) 0%, transparent 72%),
    radial-gradient(60% 60% at 78% 96%, var(--wall-d) 0%, transparent 70%),
    radial-gradient(65% 55% at 20% 88%, var(--wall-b) 0%, transparent 72%);
}
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; letter-spacing: inherit; }
button:disabled { cursor: default; opacity: .45; }
input, textarea, select { font: inherit; color: inherit; letter-spacing: inherit; }
a { color: var(--accent-ink); }
:focus-visible { outline: 2.5px solid var(--accent); outline-offset: 2px; }
::selection { background: var(--accent-soft); }
.ic { width: 22px; height: 22px; fill: currentColor; flex: none; display: block; }
.ic.sm { width: 18px; height: 18px; }
.ic.xs { width: 14px; height: 14px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--ink-3); }
.num { font-variant-numeric: tabular-nums; }

/* ---------- scrollbars: thin capsules that appear while you scroll or hover ---------- */
::-webkit-scrollbar { width: 8px; height: 8px; background: transparent; }
::-webkit-scrollbar-track, ::-webkit-scrollbar-corner { background: transparent; }
::-webkit-scrollbar-button { display: none; width: 0; height: 0; }
::-webkit-scrollbar-thumb { background-color: transparent; border-radius: 999px; border: 2.5px solid transparent; background-clip: padding-box; min-height: 40px; }
:hover::-webkit-scrollbar-thumb, .is-scrolling::-webkit-scrollbar-thumb { background-color: var(--scroll); }
::-webkit-scrollbar-thumb:hover { background-color: var(--scroll-hover); }
@supports not selector(::-webkit-scrollbar) { * { scrollbar-width: thin; scrollbar-color: transparent transparent; } :hover, .is-scrolling { scrollbar-color: var(--scroll) transparent; } }

.msgs::-webkit-scrollbar-track { margin-top: calc(var(--top-h, 64px) + 8px); margin-bottom: calc(var(--bot-h, 72px) + 8px); }

/* ---------- the glass material ---------- */
.rail, .side, .drawer, .chead .who, .chead .acts, .chead .back, .cnote, .pinbar, .cfield, .cbar, .attach-chip,
.menu, .dlg, .toast, .day, .sys, .more-btn, .unread-sep, .empty-card, .lb-top .iconbtn {
  background: var(--glass);
  -webkit-backdrop-filter: blur(var(--blur)) saturate(180%);
  backdrop-filter: blur(var(--blur)) saturate(180%);
  box-shadow: inset 0 1px 0 var(--glass-edge), inset 0 0 0 1px var(--glass-rim), 0 10px 30px var(--glass-shade);
}
.rail, .side, .drawer, .chead .who, .chead .acts, .cfield, .menu, .dlg, .empty-card { position: relative; isolation: isolate; }
.rail::after, .side::after, .drawer::after, .chead .who::after, .chead .acts::after, .cfield::after, .menu::after, .dlg::after, .empty-card::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: -1;
  background: linear-gradient(160deg, var(--sheen) 0%, transparent 34%, transparent 72%, var(--sheen) 130%);
  opacity: .55;
}
.menu, .dlg, .toast { background: var(--glass-strong); }
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .rail, .side, .drawer, .chead .who, .chead .acts, .cnote, .pinbar, .cfield, .cbar, .attach-chip, .menu, .dlg, .toast, .day, .sys, .more-btn, .unread-sep, .empty-card, .chead .back { background: var(--glass-strong); }
  .lb-top .iconbtn { background: rgba(32, 36, 50, .8); }
}

/* ---------- shell ---------- */
.app { height: 100%; display: grid; grid-template-columns: var(--rail) var(--side) minmax(0, 1fr) auto; gap: var(--gap); padding: var(--gap) max(var(--gap), env(safe-area-inset-right, 0px)) var(--gap) max(var(--gap), env(safe-area-inset-left, 0px)); overflow: hidden; }
/* while the info pane is closed there is no empty fourth column (and no extra gap) */
@media (min-width: 1181px) { .app:has(> .drawer[hidden]) { grid-template-columns: var(--rail) var(--side) minmax(0, 1fr); } }
.rail { border-radius: var(--r-pane); display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 0; min-height: 0; }
.side { border-radius: var(--r-pane); display: flex; flex-direction: column; min-width: 0; min-height: 0; overflow: hidden; }
.main { display: flex; flex-direction: column; min-width: 0; min-height: 0; overflow: visible; position: relative; border-radius: var(--r-pane); }
.drawer { width: var(--drawer); border-radius: var(--r-pane); overflow-y: auto; min-height: 0; scrollbar-gutter: stable; }

.logo { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; margin-bottom: 10px; color: #fff;
  background: linear-gradient(160deg, #5AC8FA 0%, #007AFF 55%, #3A3AD8 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.6), inset 0 -2px 6px rgba(0,0,40,.25), 0 6px 16px rgba(0, 80, 200, .35); }
.logo .ic { width: 30px; height: 30px; }
.rbtn { width: 70px; min-height: 54px; border-radius: 18px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: var(--ink-2); position: relative; padding: 6px 0; transition: background .18s, color .18s, transform .12s; }
@media (hover: hover) { .rbtn:hover { background: var(--hover); color: var(--ink); } }
.rbtn:active { transform: scale(.94); }
.rbtn[aria-current="true"] { color: var(--accent-ink); background: var(--glass-strong); box-shadow: inset 0 1px 0 var(--glass-edge), 0 4px 14px var(--glass-shade); }
.rbtn .lbl { font-size: 10.5px; line-height: 1.1; font-weight: 500; letter-spacing: 0; white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; padding: 0 2px; }
.rbtn .pip { position: absolute; top: 3px; right: 5px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--red-fill); color: #fff; font-size: 11px; font-weight: 600; display: grid; place-items: center; font-variant-numeric: tabular-nums; box-shadow: 0 0 0 2px var(--glass-strong); }
.rbtn.focus-on { color: #fff; background: var(--indigo-fill); box-shadow: 0 6px 16px rgba(88, 86, 214, .4); }
.rail .grow { flex: 1; }
.rail .me-av { margin-top: 4px; }

/* ---------- side ---------- */
.side-head { padding: 18px 16px 10px; display: flex; flex-direction: column; gap: 12px; }
.side-foot { padding: 10px 16px 16px; display: flex; flex-direction: column; gap: 6px; flex: none; }
.side-title { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 40px; }
.side-title h1, .side-title h2 { font: 700 28px/1.1 var(--display); letter-spacing: -.025em; margin: 0; }
.iconbtn { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; color: var(--ink-2); flex: none; transition: background .15s, transform .12s; }
@media (hover: hover) { .iconbtn:hover { background: var(--hover); color: var(--ink); } }
.iconbtn:active { transform: scale(.92); }
.iconbtn[aria-pressed="true"] { background: var(--accent-fill); color: var(--on-accent); }
.iconbtn.accent { background: var(--accent-fill); color: var(--on-accent); box-shadow: inset 0 1px 0 rgba(255,255,255,.35), 0 6px 14px rgba(0, 110, 255, .35); }
.search { display: flex; align-items: center; gap: 8px; background: var(--fill); border-radius: 14px; padding: 0 12px; height: 40px; color: var(--ink-3); }
.search:focus-within { outline: 2.5px solid var(--accent); }
.search input { border: 0; background: transparent; outline: 0; flex: 1; min-width: 0; color: var(--ink); font-size: 15px; }
.search input::placeholder, .addrow input::placeholder { color: var(--ink-3); }
.filters { display: flex; flex-wrap: nowrap; gap: 6px; padding: 4px 16px 10px; flex: none; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; overscroll-behavior-x: contain; scroll-padding-inline: 16px; }
.filters::-webkit-scrollbar { display: none; }
.filters.can-r { -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 40px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 40px), transparent); }
.filters.can-l { -webkit-mask-image: linear-gradient(90deg, transparent, #000 14px); mask-image: linear-gradient(90deg, transparent, #000 14px); }
.filters.can-l.can-r { -webkit-mask-image: linear-gradient(90deg, transparent, #000 14px, #000 calc(100% - 40px), transparent); mask-image: linear-gradient(90deg, transparent, #000 14px, #000 calc(100% - 40px), transparent); }
.fchip { flex: none; white-space: nowrap; border-radius: 999px; padding: 6px 11px; background: var(--fill); font-size: 13px; font-weight: 500; color: var(--ink-2); display: inline-flex; align-items: center; gap: 6px; }
@media (hover: hover) { .fchip:hover { color: var(--ink); background: var(--fill-2); } }
.fchip[aria-pressed="true"] { background: var(--accent-fill); color: var(--on-accent); }
.fchip .n { font-variant-numeric: tabular-nums; opacity: .85; }
.list { flex: 1; overflow-y: auto; overflow-x: hidden; padding: 2px 8px 20px; min-height: 0; scrollbar-gutter: stable both-edges;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 12px, #000 calc(100% - 18px), transparent 100%); mask-image: linear-gradient(to bottom, transparent 0, #000 12px, #000 calc(100% - 18px), transparent 100%); }
.list-label { padding: 14px 10px 6px; font-size: 13px; font-weight: 600; color: var(--ink-3); }
.banner { margin: 0 16px 10px; padding: 10px 12px; border-radius: 16px; background: var(--indigo-soft); color: var(--ink); font-size: 13.5px; display: flex; gap: 10px; align-items: flex-start; }
.banner .ic { margin-top: 1px; color: var(--indigo); }
.banner b { font-weight: 600; }
.banner.blue { background: var(--accent-soft); }
.banner.blue .ic { color: var(--accent-ink); }
.banner .bact { margin-left: auto; font-weight: 600; color: var(--accent-ink); white-space: nowrap; }

.row { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px; align-items: center; padding: 9px 10px; border-radius: 18px; width: 100%; text-align: left; transition: background .15s; }
@media (hover: hover) { .row:hover { background: var(--hover); } }
.row[aria-current="true"] { background: var(--accent-soft); }
.row .l1, .row .l2 { display: flex; align-items: center; gap: 6px; min-width: 0; }
.row .name { font-weight: 600; font-size: 15.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.row .time { margin-left: auto; font-size: 12.5px; color: var(--ink-3); white-space: nowrap; font-variant-numeric: tabular-nums; }
.row .prev { color: var(--ink-2); font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 40px; flex: 1; }
.row .prev .who { color: var(--ink); }
.row .typing { color: var(--accent-ink); }
.row .ic.sm { color: var(--ink-3); width: 15px; height: 15px; }
.badge { min-width: 22px; height: 22px; border-radius: 999px; background: var(--accent-fill); color: var(--on-accent); font-size: 12.5px; font-weight: 600; display: inline-grid; place-items: center; padding: 0 7px; font-variant-numeric: tabular-nums; flex: none; }
.badge.quiet { background: var(--fill-2); color: var(--ink-2); }
.tag.only-icon { padding: 3px 5px; }
.tag { display: inline-flex; align-items: center; gap: 4px; border-radius: 999px; padding: 2px 8px; font-size: 12px; font-weight: 600; white-space: nowrap; background: var(--fill); color: var(--ink-2); flex: none; }
.tag.red { background: var(--red-soft); color: var(--red); }
.tag.amber { background: var(--orange-soft); color: var(--orange); }
.tag.blue { background: var(--accent-soft); color: var(--accent-ink); }
.tag.indigo { background: var(--indigo-soft); color: var(--indigo); }

/* avatars: monogram discs with a soft top light, like Contacts */
.av { width: 48px; height: 48px; border-radius: 50%; color: #fff; display: inline-grid; place-items: center; font-weight: 600; font-size: 17px; flex: none; position: relative; object-fit: cover; overflow: hidden; letter-spacing: 0;
  background-color: var(--av, #8E8E93); background-image: linear-gradient(180deg, color-mix(in oklab, var(--av, #8E8E93) 62%, white) 0%, var(--av, #8E8E93) 100%); }
.av.s24 { width: 24px; height: 24px; font-size: 10px; }
.av.s32 { width: 32px; height: 32px; font-size: 12.5px; }
.av.s36 { width: 36px; height: 36px; font-size: 13.5px; }
.av.s40 { width: 40px; height: 40px; font-size: 15px; }
.av.s88 { width: 88px; height: 88px; font-size: 32px; }
.av .ic { width: 52%; height: 52%; }
.avw { position: relative; display: inline-flex; flex: none; }
.avw .on { position: absolute; right: 0; bottom: 0; width: 28%; height: 28%; min-width: 10px; min-height: 10px; max-width: 18px; max-height: 18px; border-radius: 50%; background: var(--online); box-shadow: 0 0 0 2.5px var(--glass-strong); }
.av.lokki { background: linear-gradient(160deg, #A78BFA 0%, #6D5BF5 50%, #3B3AD6 100%); }
.av.saved { background: linear-gradient(160deg, #5AC8FA 0%, #007AFF 100%); }

/* ---------- conversation ---------- */
.ctop { position: absolute; top: 0; left: 0; right: 0; z-index: 6; display: flex; flex-direction: column; gap: 8px; padding: 2px 4px 0; pointer-events: none; }
.ctop > * { pointer-events: auto; }
.chead { display: flex; align-items: center; gap: 8px; min-height: 52px; }
.chead .back { display: none; width: 44px; height: 44px; }
.chead .who { min-width: 0; display: flex; align-items: center; gap: 10px; text-align: left; border-radius: 999px; padding: 6px 18px 6px 6px; max-width: min(520px, 100%); transition: transform .12s; }
.chead .who:active { transform: scale(.98); }
.chead .who .wt { min-width: 0; display: flex; flex-direction: column; }
.chead .t { font-weight: 600; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: flex; align-items: center; gap: 6px; min-width: 0; }
.chead .t > .nm { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } /* the name in <span class="nm"> ellipsizes, the badges after it stay */
.chead .s { font-size: 12.5px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chead .s.live { color: var(--accent-ink); }
.chead .grow { flex: 1; }
.chead .acts { display: flex; gap: 2px; border-radius: 999px; padding: 4px; }
.chead .acts .iconbtn { width: 40px; height: 40px; }
.cnote { display: flex; align-items: center; gap: 10px; padding: 9px 14px; font-size: 13.5px; border-radius: 18px; background: var(--glass-strong); flex-wrap: wrap; row-gap: 2px; }
.cnote > .ic { flex: none; color: var(--indigo); }
.cnote.blue > .ic { color: var(--accent-ink); }
.cnote.warn > .ic { color: var(--orange); }
.cnote .grow { flex: 1 1 200px; min-width: 0; overflow-wrap: anywhere; }
.cnote button.link { font-weight: 600; color: var(--accent-ink); white-space: nowrap; padding: 4px 6px; border-radius: 8px; }
@media (hover: hover) { .cnote button.link:hover { background: var(--hover); } }
.pinbar { display: flex; align-items: center; gap: 10px; padding: 8px 14px; border-radius: 18px; width: 100%; text-align: left; background: var(--glass-strong); }
.pinbar > .ic { color: var(--accent-ink); }
.pinbar .pbody { min-width: 0; flex: 1; display: flex; flex-direction: column; }
.pinbar .pt { font-size: 12.5px; color: var(--accent-ink); font-weight: 600; }
.pinbar .pp { font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--ink-2); }

.msgs { flex: 1; overflow-y: auto; overflow-x: hidden; padding: calc(var(--top-h, 64px) + 14px) max(16px, 3vw) calc(var(--bot-h, 72px) + 14px); display: flex; flex-direction: column; min-height: 0;
  /* scroll-edge effect: content dims as it slides under the floating glass */
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, transparent calc(var(--top-h, 64px) - 4px), #000 calc(var(--top-h, 64px) + 14px), #000 calc(100% - var(--bot-h, 72px) - 12px), rgba(0,0,0,.25) calc(100% - var(--bot-h, 72px) + 20px), transparent 100%);
  mask-image: linear-gradient(to bottom, transparent 0, transparent calc(var(--top-h, 64px) - 4px), #000 calc(var(--top-h, 64px) + 14px), #000 calc(100% - var(--bot-h, 72px) - 12px), rgba(0,0,0,.25) calc(100% - var(--bot-h, 72px) + 20px), transparent 100%); }
.msgs-inner { display: flex; flex-direction: column; gap: 3px; margin-top: auto; }
/* an empty chat (or Lokki outside Claude) shows its note in the middle, not pressed to the composer */
.msgs-inner:has(> .hint:only-child) { flex: 1; justify-content: center; }
.more-btn { align-self: center; margin: 6px 0 10px; font-size: 13px; color: var(--accent-ink); font-weight: 600; padding: 7px 14px; border-radius: 999px; }
.day { align-self: center; color: var(--ink-2); font-size: 12.5px; font-weight: 600; padding: 4px 12px; border-radius: 999px; margin: 12px 0 8px; }
.unread-sep { align-self: center; font-size: 12.5px; font-weight: 600; color: var(--accent-ink); border-radius: 999px; padding: 4px 14px; margin: 8px 0; }
.sys { align-self: center; font-size: 13px; color: var(--ink-2); border-radius: 999px; padding: 5px 14px; margin: 6px 0; text-align: center; max-width: 90%; overflow-wrap: anywhere; }

.msg { display: flex; align-items: flex-end; gap: 8px; max-width: min(620px, 86%); position: relative; align-self: flex-start; }
.msg.out { align-self: flex-end; flex-direction: row-reverse; }
.msg.gap { margin-top: 8px; }
.msg .avw { visibility: hidden; }
.msg.tail .avw { visibility: visible; }
.bubble.media { padding: 4px; }
.bubble.media > :not(.att-img) { margin-left: 8px; margin-right: 8px; }
.bubble.media > .text:last-child, .bubble.media > :last-child:not(.att-img) { margin-bottom: 4px; }
.bubble.media > .att-img { margin: 0; border-radius: 16px; }
.meta.on-photo { position: absolute; right: 12px; bottom: 12px; float: none; top: auto; margin: 0; padding: 4px 8px; border-radius: 999px; background: rgba(0, 0, 0, .42); color: #fff; -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.msg.out .meta.on-photo .tick.read, .msg.in .meta.on-photo .tick.read { color: #fff; }
.bubble { background: var(--bubble-in); color: var(--bubble-in-ink); border-radius: 20px; padding: 7px 12px 7px; min-width: 0; position: relative; box-shadow: 0 1px 2px rgba(0, 0, 0, .06), 0 4px 14px rgba(22, 38, 80, .07); }
.msg.out .bubble { background: linear-gradient(180deg, var(--bubble-out-top) 0%, var(--bubble-out) 100%); color: var(--bubble-out-ink); box-shadow: inset 0 1px 0 rgba(255,255,255,.28), 0 4px 14px rgba(0, 100, 255, .22); }
.msg.in.tail .bubble { border-bottom-left-radius: 6px; }
.msg.out.tail .bubble { border-bottom-right-radius: 6px; }
.msg.flash .bubble { animation: flash 1.4s ease; }
@keyframes flash { 0%, 40% { box-shadow: 0 0 0 4px var(--accent-soft), 0 0 0 2px var(--accent); } 100% { box-shadow: 0 0 0 0 transparent; } }
.msg.in.urgent .bubble { box-shadow: inset 0 0 0 2px var(--red), 0 4px 14px rgba(255, 59, 48, .18); }
.msg.out.urgent .bubble { box-shadow: 0 0 0 2px var(--wall-base), 0 0 0 4px var(--red), 0 4px 14px rgba(255, 59, 48, .22); }
.bubble .from { font-size: 13.5px; font-weight: 600; margin-bottom: 1px; color: color-mix(in oklab, var(--nc, var(--accent)) var(--name-k), var(--name-base)); }
.bubble .fwd { font-size: 13px; color: var(--accent-ink); margin-bottom: 3px; font-weight: 500; }
.msg.out .bubble .fwd { color: var(--bubble-out-meta); }
.bubble .text { overflow-wrap: anywhere; word-break: normal; }
.bubble .text.big { font-size: 36px; line-height: 1.2; }
.bubble .text .mention { color: var(--accent-ink); font-weight: 600; }
.msg.out .bubble .text .mention, .msg.out .bubble a { color: #fff; text-decoration: underline; }
.bubble .tr { margin-top: 6px; padding: 6px 10px; border-radius: 12px; background: var(--fill); font-size: 14px; color: var(--ink-2); overflow-wrap: anywhere; }
.msg.out .bubble .tr { background: rgba(255,255,255,.18); color: #fff; }
.bubble .tr b { display: block; font-size: 12px; opacity: .8; font-weight: 600; }
.quote { display: block; text-align: left; width: 100%; border-radius: 12px; padding: 4px 10px; margin: 2px 0 5px; background: var(--accent-soft); font-size: 13.5px; min-width: 0; box-shadow: inset 3px 0 0 var(--accent); }
.msg.out .quote { background: rgba(255, 255, 255, .18); box-shadow: inset 3px 0 0 rgba(255,255,255,.85); }
.quote b { display: block; color: var(--accent-ink); font-weight: 600; font-size: 13px; }
.msg.out .quote b { color: #fff; }
.quote span { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--ink-2); }
.msg.out .quote span { color: rgba(255,255,255,.85); }
.meta { float: right; margin: 7px 0 -5px 12px; font-size: 11.5px; color: var(--ink-3); display: inline-flex; gap: 4px; align-items: center; font-variant-numeric: tabular-nums; white-space: nowrap; line-height: 1; position: relative; top: 2px; }
.msg.out .meta { color: var(--bubble-out-meta); }
.meta .edited { font-size: 11.5px; color: inherit; text-decoration: underline dotted; text-underline-offset: 2px; padding: 6px 2px; margin: -6px 0; }
@media (hover: hover) { .meta .edited:hover { color: var(--accent-ink); } .msg.out .meta .edited:hover { color: #fff; } }
.meta .tick { color: inherit; display: inline-flex; }
.msg.out .meta .tick.read { color: #fff; }
.meta .tick.fail { color: var(--red); }
.msg.out .meta .tick.fail { color: #fff; }
.mchips { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 0; padding-top: 9px; clear: both; }
.mchips .tag { font-size: 11.5px; }
.msg.out .mchips .tag { background: rgba(255, 255, 255, .2); color: #fff; }
.reacts { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 0; padding-top: 8px; clear: both; }
.react { background: var(--fill); border-radius: 999px; padding: 4px 10px 4px 8px; min-height: 28px; font-size: 13px; display: inline-flex; gap: 4px; align-items: center; font-variant-numeric: tabular-nums; }
.msg.out .react { background: rgba(255,255,255,.2); }
.react.mine { background: var(--accent-fill); color: #fff; }
.msg.out .react.mine { background: #fff; color: var(--bubble-out); }
.mbtn { align-self: center; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; color: var(--ink-2); opacity: 0; flex: none; transition: opacity .15s; }
.msg:hover .mbtn, .mbtn:focus-visible, .msg:focus-within .mbtn { opacity: 1; }
@media (hover: hover) { .mbtn:hover { background: var(--glass-strong); color: var(--ink); } }
.undo-inline { font-weight: 600; color: inherit; font-size: 12px; text-decoration: underline; padding: 6px 4px; margin: -6px 0; }
.locked-text { opacity: .8; font-style: italic; display: flex; gap: 6px; align-items: center; }

/* attachments */
.att-img { display: block; border-radius: 14px; overflow: hidden; margin: 2px 0 4px; background: var(--fill); max-width: 100%; position: relative; }
.att-img img { display: block; width: 100%; height: 100%; object-fit: cover; }
.att-img .blur { filter: blur(10px); transform: scale(1.1); }
.att-img .spin { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; }
.att-file { display: flex; gap: 10px; align-items: center; padding: 6px 4px; text-align: left; width: 220px; max-width: 100%; min-width: 0; }
.att-file .fic { width: 44px; height: 44px; border-radius: 12px; background: var(--accent); color: #fff; display: grid; place-items: center; flex: none; }
.msg.out .att-file .fic { background: rgba(255,255,255,.22); }
.att-file .fn { font-weight: 600; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.att-file .fs { font-size: 12.5px; opacity: .75; }
.att-file .fbody { min-width: 0; display: flex; flex-direction: column; }

/* composer: a floating glass capsule */
.composer { position: absolute; left: 0; right: 0; bottom: 0; z-index: 6; padding: 0 4px calc(6px + env(safe-area-inset-bottom, 0px)); display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.composer > * { pointer-events: auto; }
.cbar { display: flex; align-items: center; gap: 10px; border-radius: 18px; padding: 8px 8px 8px 14px; }
.cbar > .ic { color: var(--accent-ink); }
.cbar .cb { min-width: 0; flex: 1; display: flex; flex-direction: column; }
.cbar .cb b { color: var(--accent-ink); font-size: 13px; font-weight: 600; }
.cbar .cb span { font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--ink-2); }
.cbar.ai { flex-direction: column; align-items: stretch; gap: 8px; }
.cbar.ai .aihead { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--indigo); }
.cbar.ai .aibody { font-size: 14px; white-space: pre-wrap; overflow-wrap: anywhere; }
.cbar.ai .aiacts { display: flex; gap: 6px; flex-wrap: wrap; }
.suggest { display: flex; gap: 6px; flex-wrap: wrap; }
.sugg { background: var(--glass-strong); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); box-shadow: inset 0 0 0 1px var(--glass-rim), 0 6px 16px var(--glass-shade); border-radius: 999px; padding: 8px 14px; font-size: 14px; text-align: left; max-width: 100%; color: var(--accent-ink); font-weight: 500; }
@media (hover: hover) { .sugg:hover { background: var(--accent-fill); color: #fff; } }
.sugg.muted { color: var(--ink-3); }
.copts { display: flex; gap: 6px; flex-wrap: wrap; }
.copts:empty { display: none; }
.opt { border-radius: 999px; padding: 7px 12px; background: var(--glass-strong); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); box-shadow: inset 0 0 0 1px var(--glass-rim), 0 6px 16px var(--glass-shade); font-size: 13px; font-weight: 500; display: inline-flex; gap: 6px; align-items: center; color: var(--ink-2); }
@media (hover: hover) { .opt:hover { color: var(--ink); } }
.opt[aria-pressed="true"] { background: var(--accent-fill); color: #fff; }
.opt.red[aria-pressed="true"] { background: var(--red-fill); color: #fff; }
.crow { display: flex; align-items: flex-end; gap: 8px; }
.cfield { flex: 1; border-radius: 26px; display: flex; align-items: flex-end; padding: 4px; min-width: 0; box-shadow: inset 0 1px 0 var(--glass-edge), inset 0 0 0 1px var(--glass-rim), 0 4px 14px var(--glass-shade); }
.cfield:focus-within { box-shadow: inset 0 1px 0 var(--glass-edge), inset 0 0 0 1.5px var(--accent), 0 4px 14px var(--glass-shade); }
.cfield textarea { flex: 1; border: 0; outline: 0; background: transparent; resize: none; padding: 11px 6px; max-height: 200px; min-height: 44px; line-height: 1.4; min-width: 0; font-size: 15.5px; }
.cfield textarea::placeholder { color: var(--ink-3); }
.cfield .iconbtn { width: 44px; height: 44px; }
.send { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; flex: none; color: #fff; transition: transform .12s, filter .15s;
  background: linear-gradient(180deg, #2C8CFF 0%, #0A6CFF 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.45), inset 0 -2px 6px rgba(0, 30, 120, .25), 0 4px 12px rgba(0, 100, 255, .3); }
@media (hover: hover) { .send:hover { filter: brightness(1.06); } }
.send:active { transform: scale(.92); }
.send .ic { width: 24px; height: 24px; }
.attach-chip { display: flex; align-items: center; gap: 10px; border-radius: 18px; padding: 6px 8px; }
.attach-chip img { width: 44px; height: 44px; border-radius: 12px; object-fit: cover; }
.attach-chip .cb { flex: 1; min-width: 0; font-size: 13.5px; overflow-wrap: anywhere; }
.attach-chip .fic { width: 44px; height: 44px; border-radius: 12px; background: var(--accent); color: #fff; display: grid; place-items: center; }
.readonly { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 14px 16px; text-align: center; color: var(--ink-2); font-size: 14px; border-radius: 20px; background: var(--glass-strong); }

/* empty states */
.empty { flex: 1; display: flex; align-items: center; justify-content: center; padding: 28px max(16px, 3vw); overflow-y: auto; min-height: 0; }
.empty-card { max-width: 680px; width: 100%; border-radius: 34px; padding: 32px; display: flex; flex-direction: column; gap: 6px; }
.app-icon { width: 84px; height: 84px; border-radius: 22px; display: grid; place-items: center; color: #fff; margin-bottom: 14px;
  background: linear-gradient(160deg, #5AC8FA 0%, #007AFF 55%, #3A3AD8 100%);
  box-shadow: inset 0 1.5px 0 rgba(255,255,255,.6), inset 0 -4px 10px rgba(0,0,40,.25), 0 14px 30px rgba(0, 80, 200, .35); }
.app-icon .ic { width: 50px; height: 50px; }
.empty h2 { font: 700 clamp(32px, 4vw, 46px)/1.02 var(--display); letter-spacing: -.035em; margin: 0 0 6px; }
.empty .lede { font-size: 17px; color: var(--ink-2); margin: 0 0 6px; max-width: 46ch; }
.flagmean { font-size: 13.5px; color: var(--ink-3); margin: 0 0 18px; }
.featlist { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 20px; margin: 0; padding: 0; list-style: none; }
@media (max-width: 999.98px) { .featlist { grid-template-columns: 1fr; } } /* two columns overflow a narrow conversation pane */
.featlist li { display: grid; grid-template-columns: auto 1fr; gap: 10px; font-size: 13.5px; color: var(--ink-2); align-items: start; }
.featlist li .fi { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; color: #fff; background-color: var(--fc); background-image: linear-gradient(180deg, color-mix(in oklab, var(--fc) 70%, white), var(--fc)); }
.featlist li .fi .ic { width: 18px; height: 18px; }
.featlist li b { display: block; color: var(--ink); font-weight: 600; font-size: 14px; }
.empty .cta { margin-top: 22px; display: flex; gap: 10px; flex-wrap: wrap; }
.btn { border-radius: 999px; padding: 11px 20px; font-weight: 600; background: var(--accent-fill); color: var(--on-accent); display: inline-flex; gap: 8px; align-items: center; justify-content: center; transition: transform .12s, filter .15s; box-shadow: inset 0 1px 0 rgba(255,255,255,.3), 0 6px 16px rgba(0, 110, 255, .28); }
@media (hover: hover) { .btn:hover { filter: brightness(1.06); } }
.btn:active { transform: scale(.96); }
.btn.ghost { background: var(--glass-strong); color: var(--accent-ink); box-shadow: inset 0 1px 0 var(--glass-edge), inset 0 0 0 1px var(--glass-rim), 0 6px 16px var(--glass-shade); }
.btn.dark { background: var(--indigo-fill); color: #fff; box-shadow: inset 0 1px 0 rgba(255,255,255,.3), 0 6px 16px rgba(88, 86, 214, .3); }
.btn.danger { background: var(--red-soft); color: var(--red); box-shadow: none; }
.btn.sm { padding: 7px 14px; font-size: 13.5px; }
.btn.block { width: 100%; }
.btn:disabled:not(.ghost, .danger) { opacity: 1; background: var(--fill-2); color: var(--ink-3); box-shadow: none; filter: none; } /* readable grey instead of white text on a faded blue */
.hint { padding: 24px 18px; text-align: center; color: var(--ink-3); font-size: 14px; overflow-wrap: anywhere; }
.hint b { color: var(--ink); display: block; font-size: 16px; margin-bottom: 4px; }

/* items in tasks / bookmarks / reminders / people */
.item { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: start; padding: 10px; border-radius: 16px; }
@media (hover: hover) { .item:hover { background: var(--hover); } }
.item .ib { min-width: 0; display: flex; flex-direction: column; gap: 2px; text-align: left; }
.item .it { font-size: 15px; overflow-wrap: anywhere; }
.item > .iconbtn { width: 32px; height: 32px; margin: -4px -4px -4px 0; color: var(--ink-3); }
.item .is { font-size: 12.5px; color: var(--ink-3); display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.item.done .it { text-decoration: line-through; color: var(--ink-3); }
.check { width: 24px; height: 24px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--ink-3); display: grid; place-items: center; margin-top: 0; color: transparent; flex: none; }
.check[aria-checked="true"] { background: var(--accent); box-shadow: none; color: #fff; }
.check.ico { box-shadow: none; color: #fff; }
.addrow { display: flex; gap: 8px; padding: 0 16px 10px; }
.addrow input { flex: 1; min-width: 0; height: 42px; border-radius: 14px; border: 0; background: var(--fill); padding: 0 14px; outline: 0; box-shadow: inset 0 0 0 1px var(--field-line); }
.addrow input:focus-visible { outline: 2.5px solid var(--accent); }
.seg { display: inline-flex; background: var(--fill); border-radius: 10px; padding: 2px; gap: 2px; flex: none; align-self: flex-start; max-width: 100%; }
.seg button { border-radius: 8px; padding: 6px 11px; font-size: 13.5px; font-weight: 500; color: var(--ink-2); white-space: nowrap; }
.seg button[aria-pressed="true"] { background: var(--seg-on); color: var(--ink); font-weight: 600; box-shadow: 0 2px 6px rgba(0,0,0,.12), 0 0 0 .5px rgba(0,0,0,.04); }
.pick { display: grid; grid-template-columns: auto minmax(0,1fr) auto; gap: 12px; align-items: center; padding: 8px 10px; border-radius: 16px; width: 100%; text-align: left; }
@media (hover: hover) { .pick:hover { background: var(--hover); } }
.pick .pn { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pick .ps { font-size: 13px; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pick .pb { min-width: 0; display: flex; flex-direction: column; }

/* settings: inset grouped cards */
.set { padding: 6px 12px 24px; display: flex; flex-direction: column; gap: 16px; overflow-y: auto; overflow-x: hidden; flex: 1; min-height: 0; scrollbar-gutter: stable both-edges;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 12px, #000 calc(100% - 18px), transparent 100%); mask-image: linear-gradient(to bottom, transparent 0, #000 12px, #000 calc(100% - 18px), transparent 100%); }
.card { background: var(--glass-thin); border-radius: 20px; padding: 14px; display: flex; flex-direction: column; gap: 12px; box-shadow: inset 0 0 0 1px var(--card-line); }
.card h3 { margin: 0; font-size: 15px; font-weight: 600; display: flex; align-items: center; gap: 6px; }
.card p { margin: 0; font-size: 13.5px; color: var(--ink-2); }
.field { display: flex; flex-direction: column; gap: 5px; font-size: 13px; color: var(--ink-2); }
.field input, .field textarea, .field select { border: 0; background: var(--fill); border-radius: 12px; padding: 10px 12px; outline: 0; color: var(--ink); font-size: 15px; box-shadow: inset 0 0 0 1px var(--field-line); }
.field input:focus-visible, .field textarea:focus-visible, .field select:focus-visible { outline: 2.5px solid var(--accent); }
.field textarea { resize: none; min-height: 70px; max-height: 180px; field-sizing: content; }
.switch { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: 15px; width: 100%; text-align: left; }
.switch .sd { font-size: 12.5px; color: var(--ink-3); display: block; }
.tg { width: 51px; height: 31px; border-radius: 999px; background: var(--fill-2); box-shadow: inset 0 0 0 1.5px var(--ctl-line); position: relative; flex: none; transition: background .2s, box-shadow .2s; }
.tg::after { content: ""; position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 50%; background: var(--knob); box-shadow: 0 3px 8px rgba(0,0,0,.15), 0 1px 1px rgba(0,0,0,.16); transition: transform .22s cubic-bezier(.3, 1.4, .5, 1); }
.switch[aria-checked="true"] .tg { background: var(--switch-on); box-shadow: none; }
.switch[aria-checked="true"] .tg::after { transform: translateX(20px); }
.fp { font-variant-numeric: tabular-nums; letter-spacing: .04em; font-size: 15px; font-weight: 600; word-spacing: .3em; }

/* drawer */
.dhead { display: flex; align-items: center; justify-content: space-between; padding: 12px 12px 0 18px; }
.dhead h2 { font-size: 15px; font-weight: 600; margin: 0; }
.dprof { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 16px 16px; text-align: center; }
.dprof .dn { font: 700 22px/1.2 var(--display); letter-spacing: -.02em; margin-top: 8px; overflow-wrap: anywhere; }
.dprof .ds { font-size: 13.5px; color: var(--ink-3); }
.dprof .bio { font-size: 14px; color: var(--ink-2); max-width: 32ch; margin-top: 4px; overflow-wrap: anywhere; }
.dacts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; padding: 0 14px 12px; }
.dact { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 4px; border-radius: 16px; background: var(--glass-thin); box-shadow: inset 0 0 0 1px var(--card-line); font-size: 12px; color: var(--accent-ink); text-align: center; font-weight: 500; transition: transform .12s; }
@media (hover: hover) { .dact:hover { background: var(--hover); } }
.dact:active { transform: scale(.95); }
.dact[aria-pressed="true"] { background: var(--accent-fill); color: #fff; }
.dsec { padding: 6px 16px 16px; display: flex; flex-direction: column; gap: 10px; }
.dsec h3 { margin: 6px 0 0; font-size: 14px; font-weight: 600; color: var(--ink-2); display: flex; align-items: center; gap: 6px; }
.note-box { width: 100%; border: 0; border-radius: 16px; background: var(--glass-thin); box-shadow: inset 0 0 0 1px var(--glass-rim); padding: 10px 12px; min-height: 76px; max-height: 220px; resize: none; field-sizing: content; outline: 0; font-size: 14px; color: var(--ink); }
.note-box:focus-visible { outline: 2.5px solid var(--accent); }
.media-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
.media-grid button { aspect-ratio: 1; border-radius: 12px; overflow: hidden; background: var(--fill); max-width: 100%; }
.media-grid img { width: 100%; height: 100%; object-fit: cover; display: block; }
.safety { display: grid; grid-template-columns: repeat(4, auto); justify-content: start; gap: 4px 14px; font-variant-numeric: tabular-nums; font-size: 16px; font-weight: 600; letter-spacing: .05em; }

/* stats */
.kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.kpi { background: var(--glass-thin); box-shadow: inset 0 0 0 1px var(--card-line); border-radius: 16px; padding: 10px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.kpi .kv { font: 700 21px/1.1 var(--display); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.kpi .kl { font-size: 12px; color: var(--ink-3); }
.chart { background: var(--glass-thin); box-shadow: inset 0 0 0 1px var(--card-line); border-radius: 16px; padding: 10px 10px 6px; }
.chart .ct { font-size: 13px; font-weight: 600; margin-bottom: 6px; display: flex; justify-content: space-between; gap: 8px; }
.chart .ct span { font-weight: 400; color: var(--ink-3); }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart svg text { fill: var(--ink-3); font-size: 10px; font-family: var(--font); }
.chart .grid { stroke: var(--chart-grid); stroke-width: 1; }
.share { display: flex; height: 26px; border-radius: 9px; overflow: hidden; gap: 2px; }
.share div { height: 100%; }
.share-l { display: flex; justify-content: space-between; font-size: 13px; margin-top: 6px; gap: 8px; }
.share-l span { display: inline-flex; align-items: center; gap: 6px; }
.share-l i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.tip { position: fixed; z-index: 140; background: var(--glass-strong); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); box-shadow: inset 0 0 0 1px var(--glass-rim), 0 8px 20px var(--glass-shade); color: var(--ink); font-size: 12.5px; padding: 6px 10px; border-radius: 10px; pointer-events: none; white-space: nowrap; font-variant-numeric: tabular-nums; }

/* menus, dialogs, toasts */
.menu { position: fixed; z-index: 100; border-radius: 22px; padding: 6px; min-width: 240px; max-width: calc(100vw - 24px); max-height: calc(100vh - 24px); overflow-y: auto; animation: pop .2s cubic-bezier(.3, 1.3, .5, 1); transform-origin: top right; box-shadow: inset 0 1px 0 var(--glass-edge), inset 0 0 0 1px var(--glass-rim), var(--shadow-float); }
@keyframes pop { from { opacity: 0; transform: scale(.9); } to { opacity: 1; transform: none; } }
.mi { display: flex; gap: 12px; align-items: center; padding: 10px 12px; border-radius: 14px; width: 100%; text-align: left; font-size: 15px; min-height: 44px; }
@media (hover: hover) { .mi:hover { background: var(--hover); } }
.mi:focus-visible { background: var(--hover); outline: 2px solid var(--accent); outline-offset: -2px; }
.mi .ic { color: var(--ink-2); }
.mi.red, .mi.red .ic { color: var(--red); }
.mi .mi-x { margin-left: auto; font-size: 12.5px; color: var(--ink-3); }
.msep { height: 1px; margin: 4px 12px; background: var(--fill-2); }
.emo-row { display: flex; gap: 2px; padding: 4px 4px 8px; }
.emo { width: 40px; height: 40px; border-radius: 50%; font-size: 22px; display: grid; place-items: center; transition: transform .12s; }
@media (hover: hover) { .emo:hover { transform: scale(1.18); background: var(--accent-soft); } }
.emo[aria-pressed="true"] { background: var(--accent-soft); }
.dlg-back { position: fixed; inset: var(--vvt, 0px) 0 auto 0; height: var(--vvh, 100%); background: var(--scrim); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); display: grid; place-items: center; z-index: 90; padding: max(16px, env(safe-area-inset-top, 0px)) 16px max(16px, env(safe-area-inset-bottom, 0px)); animation: fade .15s; }
@keyframes fade { from { opacity: 0; } }
/* connection status next to the «Чаты» title */
.net-state { display: inline-flex; align-items: center; gap: 7px; margin-right: auto; padding: 4px 10px 4px 8px; border-radius: 999px; font-size: 13px; font-weight: 500; color: var(--ink-2); background: var(--glass-thin); white-space: nowrap; animation: fade .25s; }
.net-state::before { content: ""; width: 12px; height: 12px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: netspin .9s linear infinite; }
@keyframes netspin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .net-state::before { animation: none !important; border-right-color: currentColor; opacity: .6; } }
.dlg { border-radius: 32px; width: min(460px, 100%); max-height: min(680px, 100%); overflow: auto; padding: 22px; display: flex; flex-direction: column; gap: 14px; box-shadow: inset 0 1px 0 var(--glass-edge), inset 0 0 0 1px var(--glass-rim), var(--shadow-float); animation: pop .22s cubic-bezier(.3, 1.3, .5, 1); transform-origin: center; }
.dlg h2 { font: 700 21px/1.2 var(--display); letter-spacing: -.02em; margin: 0; }
.dlg p { margin: 0; color: var(--ink-2); font-size: 14px; overflow-wrap: anywhere; }
.dlg .acts { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.presets { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.presets button { background: var(--glass-thin); box-shadow: inset 0 0 0 1px var(--card-line); border-radius: 16px; padding: 10px 12px; text-align: left; font-size: 14.5px; font-weight: 500; transition: transform .12s; }
@media (hover: hover) { .presets button:hover { background: var(--hover); } }
.presets button:active { transform: scale(.97); }
.presets button span { display: block; font-size: 12px; color: var(--ink-3); font-weight: 400; }
.ver { background: var(--glass-thin); box-shadow: inset 0 0 0 1px var(--glass-rim); border-radius: 16px; padding: 10px 12px; }
.ver .vt { font-size: 12px; color: var(--ink-3); margin-bottom: 2px; }
.ver.cur { background: var(--accent-soft); }
.toasts { position: fixed; left: 50%; top: calc(84px + env(safe-area-inset-top, 0px)); transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; z-index: 120; width: min(440px, calc(100% - 32px)); pointer-events: none; }
.toast { color: var(--ink); border-radius: 24px; padding: 10px 10px 10px 14px; display: flex; gap: 10px; align-items: center; pointer-events: auto; position: relative; overflow: hidden; animation: drop .32s cubic-bezier(.3, 1.3, .5, 1); box-shadow: inset 0 1px 0 var(--glass-edge), inset 0 0 0 1px var(--glass-rim), var(--shadow-float); }
@keyframes drop { from { opacity: 0; transform: translateY(-14px) scale(.96); } }
.toast > .ic { color: var(--accent-ink); }
.toast .tb { flex: 1; min-width: 0; font-size: 14px; }
.toast .tb b { display: block; font-weight: 600; overflow-wrap: anywhere; }
.toast .tb span { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; color: var(--ink-2); }
.toast .ta { font-weight: 600; color: var(--accent-ink); padding: 7px 12px; border-radius: 999px; white-space: nowrap; background: var(--accent-soft); }
@media (hover: hover) { .toast .ta:hover { background: var(--accent-fill); color: #fff; } }
.toast .bar { position: absolute; left: 0; bottom: 0; height: 3px; background: var(--accent); transform-origin: left; }
.toast.urgent { box-shadow: inset 0 0 0 2px var(--red), var(--shadow-float); }
.toast.urgent > .ic { color: var(--red); }
.lightbox { position: fixed; inset: 0; background: rgba(4, 8, 14, .78); -webkit-backdrop-filter: blur(30px); backdrop-filter: blur(30px); z-index: 110; display: flex; flex-direction: column; padding: max(12px, env(safe-area-inset-top, 0px)) 12px max(12px, env(safe-area-inset-bottom, 0px)); }
.lightbox .lb-top { display: flex; justify-content: flex-end; gap: 8px; }
.lightbox .lb-top .iconbtn { color: #fff; width: 44px; height: 44px; }
.lightbox .lb-img { flex: 1; display: grid; place-items: center; min-height: 0; }
.lightbox img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 14px; }

/* Lokki AI chat */
.ai-msg { max-width: min(660px, 90%); align-self: flex-start; background: var(--bubble-in); color: var(--bubble-in-ink); border-radius: 20px; padding: 9px 14px; white-space: pre-wrap; overflow-wrap: anywhere; box-shadow: 0 4px 14px rgba(22, 38, 80, .07); margin-top: 4px; }
.ai-msg.me { align-self: flex-end; background: linear-gradient(180deg, #5F5BE6 0%, #4B49C8 100%); color: #fff; }
.ai-msg.think { color: var(--ink-3); }
.ai-tools { align-self: flex-start; font-size: 12.5px; color: var(--ink-2); display: flex; gap: 6px; align-items: center; padding: 4px 10px; border-radius: 999px; background: var(--glass-strong); }
.ai-tools .ic { color: var(--indigo); }
.ai-sugg { display: flex; flex-wrap: wrap; gap: 6px; }

/* ---------- responsive ---------- */
@media (max-width: 1180px) {
  .app { grid-template-columns: var(--rail) var(--side) minmax(0, 1fr); position: relative; }
  .drawer { position: absolute; right: var(--gap); top: var(--gap); bottom: var(--gap); z-index: 30; box-shadow: inset 0 1px 0 var(--glass-edge), inset 0 0 0 1px var(--glass-rim), var(--shadow-float); background: var(--glass-strong); }
}
@media (max-width: 900px) { :root { --side: 300px; } }
@media (max-width: 760px) {
  .app { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); padding: 0; gap: 0; }
  .side { grid-row: 1; grid-column: 1; border-radius: 0; background: transparent; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; padding-top: env(safe-area-inset-top, 0px); }
  .side::after { display: none; }
  /* the list sits on the bare wallpaper: the header, section labels and hints get a glass backing so grey text stays readable */
  .side-head { margin: 6px 8px 0; padding: 12px 8px 10px; border-radius: 24px; background: var(--glass-thin); -webkit-backdrop-filter: blur(18px) saturate(160%); backdrop-filter: blur(18px) saturate(160%); box-shadow: inset 0 0 0 1px var(--glass-rim); }
  .side .list-label { width: fit-content; max-width: 100%; margin: 10px 2px 6px; padding: 3px 10px; border-radius: 999px; background: var(--glass-thin); box-shadow: inset 0 0 0 1px var(--glass-rim); }
  .side .hint { background: var(--glass-thin); border-radius: 22px; box-shadow: inset 0 0 0 1px var(--glass-rim); }
  .side > .hint { margin-inline: 12px; }
  .side .list, .side .set { padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px)); }
  .side-foot { margin-bottom: calc(80px + env(safe-area-inset-bottom, 0px)); }
  .side .list:has(+ .side-foot) { padding-bottom: 12px; }
  .side .row { background: var(--glass-thin); margin-bottom: 6px; box-shadow: inset 0 0 0 1px var(--glass-rim); } /* no backdrop blur: inside the masked list it has nothing to blur */
  @media (hover: hover) { .side .row:hover { background: var(--glass); } }
  .side .row[aria-current="true"] { background: var(--accent-soft); }
  .rail { position: fixed; z-index: 25; left: 12px; right: 12px; bottom: calc(10px + env(safe-area-inset-bottom, 0px)); flex-direction: row; justify-content: space-around; padding: 6px; gap: 2px; border-radius: 999px; }
  .rail .logo, .rail .grow, .rail .me-av, .rail .wide-only { display: none; }
  .rbtn { width: auto; flex: 1 1 0; min-width: 0; max-width: 86px; border-radius: 999px; min-height: 54px; }
  .side { transition: transform .45s var(--soft), opacity .45s var(--soft); will-change: transform, opacity; }
  .app[data-view="chat"] .side { transform: translateX(-28%); opacity: .55; }
  .main { will-change: transform; }
  .main, .msgs, .msg { touch-action: pan-y; }
  .app[data-view="chat"] .main { transition: transform .5s var(--soft), visibility 0s; }
  .main { position: fixed; top: var(--vvt, 0px); left: 0; right: 0; height: var(--vvh, 100%); z-index: 30; border-radius: 0; padding: env(safe-area-inset-top, 0px) 8px 0; transform: translateX(104%); transition: transform .42s var(--soft), visibility 0s linear .42s; visibility: hidden; box-shadow: -12px 0 40px rgba(0, 0, 0, .18);
    background-color: var(--wall-base);
    background-image: radial-gradient(60% 55% at 12% 8%, var(--wall-a) 0%, transparent 70%), radial-gradient(55% 60% at 92% 18%, var(--wall-c) 0%, transparent 72%), radial-gradient(60% 60% at 78% 96%, var(--wall-d) 0%, transparent 70%), radial-gradient(65% 55% at 20% 88%, var(--wall-b) 0%, transparent 72%); }
  .app[data-view="chat"] .main { transform: none; visibility: visible; }
  .ctop { top: env(safe-area-inset-top, 0px); padding: 6px 8px 0; }
  .composer { padding: 0 8px calc(8px + env(safe-area-inset-bottom, 0px)); }
  .chead .back { display: grid; border-radius: 50%; flex: none; }
  .chead .who { flex: 1; max-width: none; }
  .chead .grow { display: none; }
  .app[data-view="chat"] .rail { display: none; }
  .drawer { position: fixed; inset: var(--vvt, 0px) 0 auto 0; height: var(--vvh, 100%); width: auto; z-index: 40; border-radius: 0; background: var(--glass-strong); padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px); }
  .msg { max-width: 90%; }
  .mbtn { width: 0; overflow: hidden; }
  .mbtn:focus-visible { width: 32px; }
  .iconbtn { width: 44px; height: 44px; }
  .empty-card { padding: 22px; border-radius: 28px; }
  .featlist { grid-template-columns: 1fr; }
  .presets { grid-template-columns: 1fr; }
}
/* short desktop windows: the tab rail scrolls instead of spilling out */
@media (min-width: 761px) and (max-height: 560px) {
  .rail { overflow-y: auto; gap: 2px; scrollbar-width: none; background-image: linear-gradient(160deg, var(--sheen-soft) 0%, transparent 34%, transparent 72%, var(--sheen-soft) 130%); background-repeat: no-repeat; }
  .rail::-webkit-scrollbar { display: none; }
  .rail::after { content: none; }
  .rail .logo { display: none; }
  .rbtn { min-height: 46px; }
}
/* ---------- Lokkidg Маяк, profile, gifts, numbers ---------- */
.pbadge { display: inline-flex; flex: none; margin-left: 4px; vertical-align: -2px; }
.lvl { display: inline-flex; gap: 4px; align-items: center; padding: 3px 7px; border-radius: 999px; background: var(--fill); font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--ink-2); }
.lvl .ic { width: 12px; height: 12px; }
.dlevel { display: flex; gap: 6px; align-items: center; font-size: 13px; color: var(--ink-2); margin-top: 4px; }
.rbtn .me-badge { position: absolute; right: 13px; bottom: 6px; width: 18px; height: 18px; border-radius: 50%; background: linear-gradient(150deg, #5AC8FA, #3D7BFF 55%, #8B5CF6); color: #fff; display: grid; place-items: center; box-shadow: 0 0 0 2px var(--glass-strong); }
.hero-card { align-items: center; text-align: center; gap: 6px; }
.hero-name { font: 700 22px/1.2 var(--display); letter-spacing: -.02em; display: flex; align-items: center; justify-content: center; gap: 2px; margin-top: 6px; overflow-wrap: anywhere; }
.level-box { width: 100%; margin-top: 8px; background: var(--fill); border-radius: 14px; padding: 10px 12px; text-align: left; }
.level-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font-size: 14px; }
.level-top span { color: var(--ink-3); font-size: 13px; }
@keyframes grow { from { transform: scaleX(0); } }
.level-foot { font-size: 12px; color: var(--ink-3); }
.plan-card { flex-direction: row; align-items: center; gap: 12px; text-align: left; width: 100%; }
.plan-card .plan-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.plan-card .plan-body b { display: flex; align-items: center; gap: 2px; font-size: 15px; }
.plan-card .plan-body span { font-size: 13px; color: var(--ink-2); }
.plan-ic { width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; color: #fff; flex: none; background: linear-gradient(160deg, #5AC8FA, #0A6CFF 55%, #3A3AD8); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .5), 0 6px 14px rgba(0, 80, 200, .3); }
.plan-ic .ic { width: 24px; height: 24px; }
.plan-card.admin .plan-ic { background: linear-gradient(160deg, #A78BFA, #5856D6); }
.plan-card.on { box-shadow: inset 0 0 0 1.5px var(--accent); }
.ic.flip { transform: rotate(180deg); color: var(--ink-3); }
.phone-line { font-size: 20px; font-weight: 700; letter-spacing: .02em; }
.premium-hero { align-items: center; text-align: center; background: linear-gradient(160deg, rgba(90, 200, 250, .22), rgba(10, 108, 255, .16) 50%, rgba(109, 91, 245, .2)); }
.premium-hero h3 { font: 700 24px/1.15 var(--display); letter-spacing: -.02em; }
.beacon { position: relative; width: 84px; height: 84px; border-radius: 24px; display: grid; place-items: center; color: #fff; overflow: hidden; isolation: isolate; background: linear-gradient(160deg, #5AC8FA, #0A6CFF 55%, #3A3AD8); box-shadow: inset 0 1.5px 0 rgba(255, 255, 255, .6), 0 14px 30px rgba(0, 80, 200, .35); }
.beacon .ic { width: 46px; height: 46px; position: relative; z-index: 1; filter: drop-shadow(0 2px 4px rgba(0, 0, 0, .25)); }
.beacon i { position: absolute; inset: -30%; background: conic-gradient(from 0deg, transparent 0 62%, rgba(255, 255, 255, .6) 74%, transparent 86%); animation: spin 4.5s linear infinite; filter: blur(4px); }
.beacon.small { width: 64px; height: 64px; border-radius: 18px; margin: 0 auto 6px; }
.beacon.small .ic { width: 34px; height: 34px; }
.perks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.perks li { display: grid; grid-template-columns: auto 1fr; gap: 12px; font-size: 13px; color: var(--ink-2); align-items: center; animation: riseIn .5s var(--spring) both; animation-delay: calc(var(--d, 0) * 40ms); }
.perks b { display: block; color: var(--ink); font-size: 14.5px; }
.pk-ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; color: #fff; background: linear-gradient(160deg, #6E9BFF, #4B49C8); }
.pk-ic .ic { width: 19px; height: 19px; }
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.plan { display: flex; flex-direction: column; gap: 2px; align-items: flex-start; text-align: left; padding: 12px 10px; border-radius: 18px; background: var(--glass-thin); box-shadow: inset 0 0 0 1px var(--card-line); transition: transform .3s var(--spring), box-shadow .2s, background .2s; min-width: 0; }
.plan b { font-size: 14px; }
.pp-price { font: 700 17px/1.2 var(--display); }
.pp-note { font-size: 11.5px; color: var(--ink-3); }
.plan.sel { box-shadow: inset 0 0 0 2px var(--accent), 0 6px 16px rgba(0, 110, 255, .2); background: var(--accent-soft); }
.plan:active { transform: scale(.96); }
.upsell { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.num-row { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 16px; }
@media (hover: hover) { .num-row:hover { background: var(--hover); } }
.num-row.pretty .nr-num { background: linear-gradient(90deg, #0A6CFF, #6D5BF5); -webkit-background-clip: text; background-clip: text; color: transparent; }
.nr-body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.nr-num { font-size: 17px; font-weight: 700; letter-spacing: .02em; }
.nr-sub { font-size: 12.5px; color: var(--ink-3); }
.nr-sub b { color: var(--ink); white-space: nowrap; }
.nr-sub s { white-space: nowrap; opacity: .7; }
.adm-row { display: flex; align-items: center; gap: 10px; }
.adm-row .pb { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.adm-row .pn { font-weight: 600; display: flex; align-items: center; }
.adm-row .pt { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.adm-row .btn.sm { flex: none; padding: 6px 12px; font-size: 13px; }
.adm-row .ps { font-size: 12.5px; color: var(--ink-3); }
.walls { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.wall { display: flex; flex-direction: column; gap: 4px; align-items: center; font-size: 11.5px; color: var(--ink-2); text-align: center; min-width: 0; }
.wall-sw { width: 100%; aspect-ratio: 3 / 4; border-radius: 12px; display: grid; place-items: center; color: #fff; box-shadow: inset 0 0 0 1px var(--glass-rim); transition: transform .3s var(--spring), box-shadow .2s; }
.wall-sw .ic { filter: drop-shadow(0 1px 3px rgba(0, 0, 0, .35)); }
.wall.sel .wall-sw { box-shadow: 0 0 0 2px var(--accent); }
.wall:active .wall-sw { transform: scale(.94); }
@media (max-width: 760px) { .plans { gap: 6px; } .plan { padding: 10px 8px; } }

/* ---------- ranks, experience, the creator's lighthouse ---------- */
.board { display: inline-block; flex: none; }
.board.mini { width: 7px; height: 14px; }
.board.big { width: 19px; height: 38px; filter: drop-shadow(0 2px 4px rgba(0, 0, 0, .2)); }
.rank-row { display: flex; gap: 10px; align-items: center; }
.rank-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.rank-body .level-top b { font-size: 15px; }
.rank-pick { display: flex; gap: 12px; align-items: center; }
.rank-pick select { width: 100%; }
.xp { width: 100%; display: flex; flex-direction: column; gap: 6px; margin-top: 10px; text-align: left; }
.xp-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font-size: 12.5px; font-weight: 600; color: var(--ink-3); }
.xp-top .num { color: var(--ink-2); font-variant-numeric: tabular-nums; }
.xp-top b { color: var(--ink); font-size: 14px; }
.xp-bar { position: relative; height: 10px; border-radius: 999px; background: color-mix(in oklab, var(--ink) 13%, transparent); box-shadow: inset 0 1px 2px rgba(0, 0, 0, .12); overflow: hidden; }
.xp-bar i { position: absolute; inset: 0 auto 0 0; border-radius: inherit; background: linear-gradient(90deg, #5AC8FA, #0A6CFF 55%, #6D5BF5); box-shadow: 0 0 10px rgba(10, 108, 255, .45); transform-origin: left; animation: grow 1.1s var(--soft) both .15s; overflow: hidden; }
.xp-bar i::after { content: ''; position: absolute; top: 0; bottom: 0; width: 40px; left: -40px; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .6), transparent); animation: xpShine 2.8s ease-in-out infinite 1.3s; }
@keyframes xpShine { 0% { left: -40px; } 60%, 100% { left: 100%; } }
.xp-foot { font-size: 12px; color: var(--ink-3); }
.xp.compact { margin-top: 6px; max-width: 240px; align-self: center; }
.xp.compact .xp-bar { height: 7px; }
.dprof .xp.compact { width: 220px; }

/* the Маяк mark: gradient lighthouse, lit lantern, rays, glint */
.mk { width: 17px; height: 17px; display: block; overflow: visible; filter: drop-shadow(0 1px 1.5px rgba(61, 123, 255, .35)); }
.mk .mk-body { fill: url(#lkMark); }
.mk.mk-c .mk-body { fill: url(#lkMarkC); }
.mk .mk-hi, .mk .mk-band { fill: #fff; opacity: .34; }
.mk .mk-lamp { fill: #fff; animation: mkLamp 2.4s ease-in-out infinite; }
.mk .mk-ray { transform-box: fill-box; transform-origin: 0% 50%; animation: mkRay 2.4s ease-in-out infinite; }
.mk .mk-ray.r { fill: url(#lkRayR); }
.mk .mk-ray.l { fill: url(#lkRayL); transform-origin: 100% 50%; animation-delay: -1.2s; }
.mk .mk-glint { fill: #fff; transform-box: fill-box; transform-origin: center; animation: mkGlint 2.4s ease-in-out infinite; }
.mk.mk-c .mk-ray { animation-duration: .9s; }
.mk.mk-c .mk-ray.l { animation-delay: -.45s; }
.mk.mk-c .mk-lamp { animation-duration: .9s; }
.mk.mk-c .mk-glint { animation-duration: 1.2s; }
.mk.on-tile { filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .25)); }
.mk.on-tile .mk-body { fill: #fff; }
.mk.on-tile .mk-hi, .mk.on-tile .mk-band { fill: #3D7BFF; opacity: .28; }
.mk.on-tile .mk-lamp { fill: #7FD0FF; }
.mk.on-tile .mk-ray.r, .mk.on-tile .mk-ray.l { fill: #CFEFFF; opacity: .8; }
@keyframes mkRay { 0%, 100% { opacity: .15; transform: scaleX(.55); } 50% { opacity: 1; transform: scaleX(1); } }
@keyframes mkLamp { 0%, 100% { opacity: .75; } 50% { opacity: 1; } }
@keyframes mkGlint { 0%, 60%, 100% { opacity: 0; transform: scale(.3) rotate(0); } 75% { opacity: 1; transform: scale(1) rotate(45deg); } }
.pbadge .mk { width: 17px; height: 17px; }
.hero-name .pbadge .mk { width: 22px; height: 22px; }
.creator-tag { display: inline-flex; align-items: center; gap: 5px; padding: 4px 11px 4px 7px; border-radius: 999px; background: var(--indigo-soft); color: var(--indigo); font-size: 12.5px; font-weight: 700; }
.creator-tag .mk { width: 18px; height: 18px; }
.rbtn .me-badge.creator { background: linear-gradient(150deg, #A78BFA, #6D5BF5 55%, #D946EF); }
.rbtn .me-badge .mk { width: 12px; height: 12px; }
.btn .mk { width: 18px; height: 18px; }
.plan-ic .mk { width: 26px; height: 26px; }
.beacon .mk { width: 50px; height: 50px; position: relative; z-index: 1; }
.pbadge.wear { margin-left: 2px; vertical-align: middle; margin-top: -3px; }
.pbadge.wear .gift-mini { width: 30px; height: 22px; }
.hero-name .pbadge.wear .gift-mini { width: 36px; height: 27px; }
.gift-mini { display: inline-block; flex: none; filter: drop-shadow(0 1px 1.5px rgba(0, 0, 0, .28)); }
.gift-mini svg { width: 100%; height: 100%; display: block; overflow: visible; }
.rbtn .me-badge.wear { background: none; box-shadow: none; width: auto; height: auto; right: 7px; bottom: 2px; }
.rbtn .me-badge.wear .gift-mini { width: 26px; height: 19px; }
@keyframes twinkle { 0%, 100% { opacity: .15; } 50% { opacity: 1; } }

/* ---------- gifts: three animated drones ---------- */
.gift-art { display: inline-grid; place-items: center; line-height: 1; flex: none; }
.gift-art svg { width: 100%; height: 100%; display: block; overflow: hidden; }
.gift-art.big { width: 172px; height: 172px; }
.gift-art.sm { width: 100%; height: 100%; }
.gbg { position: relative; isolation: isolate; overflow: hidden; background-color: var(--g2); background-image: radial-gradient(circle at 50% 42%, color-mix(in oklab, var(--g1) 88%, white) 0%, var(--g1) 30%, var(--g2) 82%); color: #fff; }
.gbg > .gpat { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; }
.gift-card::after, .gv-head::after, .gd-hero::after, .gift-tile::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 52%; z-index: -1; pointer-events: none; background: linear-gradient(180deg, rgba(6, 10, 24, 0), rgba(6, 10, 24, .5)); }
.gift-card .gift-sub, .gv-head .gv-model { opacity: 1; color: rgba(255, 255, 255, .92); }
.gift-art.xl { width: 136px; height: 136px; }
.gv-x { position: absolute; top: 12px; right: 12px; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: rgba(0, 0, 0, .2); transition: background .2s; }
@media (hover: hover) { .gv-x:hover { background: rgba(0, 0, 0, .32); } }
.gift-sub { font-size: 12.5px; opacity: .88; }
.gift-t .gift-n { background: none; padding: 0; opacity: .78; }
.gv-head { align-self: stretch; margin: -22px -22px 0; padding: 2px 16px 12px; border-radius: 32px 32px 0 0; display: flex; flex-direction: column; align-items: center; text-align: center; text-shadow: 0 1px 3px rgba(0, 0, 0, .3); }
.gv-head .gv-title { margin: 0; color: #fff; font: 700 19px/1.2 var(--display); letter-spacing: -.01em; }
.gv-head .gv-title .num { color: #fff; opacity: .72; font-weight: 600; }
.gv-model { margin: 2px 0 0; font-size: 13.5px; }
.gv-table { width: 100%; border-collapse: separate; border-spacing: 0; border-radius: 14px; overflow: hidden; box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--ink) 12%, transparent); font-size: 13.5px; text-align: left; }
.gv-table th { width: 36%; padding: 7px 10px; font-weight: 600; color: var(--ink-2); background: var(--fill); vertical-align: middle; }
.gv-table td { padding: 5px 10px; vertical-align: middle; }
.gv-table tr + tr th, .gv-table tr + tr td { border-top: 1px solid color-mix(in oklab, var(--ink) 10%, transparent); }
.gv-table td { border-left: 1px solid color-mix(in oklab, var(--ink) 10%, transparent); }
.rar { display: inline-block; margin-left: 6px; padding: 1px 7px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-ink); font-size: 12px; font-weight: 600; }
.gv-who { display: inline-flex; align-items: center; gap: 7px; font-weight: 600; color: var(--accent-ink); }
.gv-who .pbadge { margin-left: 0; }
#gv-check.ok { color: var(--green); font-weight: 600; }
.gv .gv-note { margin: 0; font-style: italic; color: var(--ink-2); text-align: center; overflow-wrap: anywhere; }
.sc-item.worn { box-shadow: 0 0 0 2px var(--panel-ring, #fff), 0 0 0 4px var(--accent); }
.sc-on { position: absolute; top: 4px; right: 4px; width: 16px; height: 16px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; }
.sc-on .ic { width: 10px; height: 10px; }
.gd .tw, .gd .blink, .gd .gd-model, .gd .gd-tilt { transform-box: fill-box; transform-origin: center; }
.gd .tw { animation: twinkle 2.4s ease-in-out infinite; }
.gd .blink { animation: gdBlink 1.2s steps(1) infinite; }
/* the drones: props spin, the airframe hovers and sways; antennas and carrot leaves wobble */
.gd .rb { transform-box: view-box; transform-origin: 0 0; animation: gdSpin .16s linear infinite; }
.gd .rb.ccw { animation-direction: reverse; }
.gd .gd-model { animation: gdHover 2.8s ease-in-out infinite; }
.gd .gd-tilt { animation: gdTilt 4.2s ease-in-out infinite; }
.gd-chi .ant { animation: antSway 1.6s ease-in-out infinite; }
.gd-car .carrot { transform-box: fill-box; transform-origin: 50% 0; animation: carrotSwing 2.6s ease-in-out infinite; }
.gd-car .leaves { transform-box: view-box; transform-origin: 0 0; animation: leafWiggle 1.3s ease-in-out infinite; }
@keyframes antSway { 0%, 100% { transform: rotate(-3deg); } 50% { transform: rotate(3deg); } }
@keyframes leafWiggle { 0%, 100% { transform: rotate(-8deg); } 50% { transform: rotate(8deg); } }
@keyframes carrotSwing { 0%, 100% { transform: rotate(-2.5deg); } 50% { transform: rotate(2.5deg); } }
@keyframes gdSpin { to { transform: rotate(360deg); } }
@keyframes gdBlink { 0% { opacity: 1; } 50% { opacity: .15; } }
@keyframes gdHover { 0%, 100% { transform: translateY(1px); } 50% { transform: translateY(-5px); } }
@keyframes gdTilt { 0%, 100% { transform: rotate(-2deg); } 50% { transform: rotate(2deg); } }

.gift-card { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 4px 14px 12px; border-radius: 16px; width: 220px; max-width: 100%; min-width: 0; text-align: center; text-shadow: 0 1px 2px rgba(0, 0, 0, .3); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35); }
.gift-open { border-radius: 14px; display: grid; place-items: center; transition: transform .3s var(--spring); }
@media (hover: hover) { .gift-open:hover { transform: scale(1.03); } }
.gift-open:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.gift-t { font-weight: 700; font-size: 14px; }
.gift-n { font-size: 12px; font-weight: 700; padding: 2px 9px; border-radius: 999px; background: rgba(255, 255, 255, .2); font-variant-numeric: tabular-nums; }
.gift-keep { margin-top: 4px; background: rgba(255, 255, 255, .24); color: #fff; border-radius: 999px; padding: 6px 12px; font-size: 12.5px; font-weight: 600; display: inline-flex; gap: 5px; align-items: center; text-shadow: none; }
@media (hover: hover) { .gift-keep:hover { background: rgba(255, 255, 255, .34); } }
.gift-s { margin-top: 4px; font-size: 12px; opacity: .92; display: inline-flex; gap: 4px; align-items: center; }
.msg.has-gift .bubble { padding: 4px; }
.msg.has-gift .bubble > :not(.gift-card) { margin-left: 8px; margin-right: 8px; }
.msg.has-gift .bubble > .text { padding: 6px 0 4px; }
.gift-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.gift-tile { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 2px 4px 8px; border-radius: 16px; font-size: 12px; text-shadow: 0 1px 2px rgba(0, 0, 0, .3); min-width: 0; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35); transition: transform .3s var(--spring), box-shadow .2s; }
.gift-tile > .gift-art { width: 76px; height: 76px; }
.gift-tile b { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.gift-tile .gp { font-size: 11.5px; font-weight: 700; background: rgba(255, 255, 255, .24); padding: 2px 8px; border-radius: 999px; white-space: nowrap; }
.gift-tile.sel { box-shadow: inset 0 0 0 3px var(--accent), inset 0 0 0 5px var(--panel-ring, #fff); } /* ring inside the tile, unscaled: it never spills past the hero or into the gap */
.gift-tile:active { transform: scale(.95); }
.gd-hero { border-radius: 22px; display: flex; flex-direction: column; align-items: center; padding: 2px 12px 14px; text-shadow: 0 1px 2px rgba(0, 0, 0, .3); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35); }
.gd-hero .gift-art { width: 196px; height: 196px; }
.gd-name { font: 700 20px/1.2 var(--display); }
.gd-left { font-size: 12.5px; opacity: .9; }
.showcase { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 8px; }
.sc-item { position: relative; aspect-ratio: 1; border-radius: 16px; display: grid; place-items: center; overflow: hidden; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .4), 0 4px 10px rgba(0, 0, 0, .14); animation: popIn .5s var(--spring) both; transition: transform .3s var(--spring); }
@media (hover: hover) { button.sc-item:hover { transform: translateY(-2px) scale(1.03); } }
.sc-item .gift-art { width: 100%; height: 100%; }
.sc-n { position: absolute; left: 50%; bottom: 4px; transform: translateX(-50%); font-size: 9.5px; font-weight: 700; padding: 1px 6px; border-radius: 999px; background: rgba(0, 0, 0, .34); color: #fff; white-space: nowrap; }
.sc-item.mini { width: 44px; height: 44px; border-radius: 12px; flex: none; animation: none; }
.gift-shop { display: flex; flex-direction: column; gap: 14px; }
.shop-card { border-radius: 24px; overflow: hidden; background: var(--glass-thin); box-shadow: inset 0 0 0 1px var(--glass-rim), 0 8px 24px rgba(0, 30, 80, .12); animation: riseIn .5s var(--spring) both; }
.shop-card:nth-child(2) { animation-delay: 70ms; }
.shop-card:nth-child(3) { animation-delay: 140ms; }
.sh-art { position: relative; height: 210px; display: grid; place-items: center; }
.sh-art .gift-art { width: 214px; height: 214px; }
.sh-ed { position: absolute; top: 10px; left: 10px; font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: rgba(255, 255, 255, .22); text-shadow: 0 1px 2px rgba(0, 0, 0, .25); }
.sh-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 6px; }
.sh-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.sh-top b { font: 700 18px/1.2 var(--display); letter-spacing: -.01em; }
.sh-price { font-weight: 700; font-size: 15px; white-space: nowrap; }
.sh-price s { color: var(--ink-3); font-weight: 500; font-size: 13px; }
.sh-kind { font-size: 12.5px; color: var(--ink-3); }
.sh-left { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; color: var(--ink-2); margin: 2px 0 4px; }
.sh-bar { display: block; height: 6px; border-radius: 999px; background: color-mix(in oklab, var(--ink) 11%, transparent); overflow: hidden; }
.sh-bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #6D5BF5, #0A6CFF); }
.adm-row .sh-bar { margin-top: 5px; }
.gv { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; }
.nicks { display: flex; flex-direction: column; gap: 6px; }
.nick { display: flex; align-items: center; gap: 8px; padding: 9px 12px; border-radius: 14px; background: var(--fill); text-align: left; transition: background .2s, box-shadow .2s; }
@media (hover: hover) { .nick:hover { background: var(--hover); } }
.nick.sel { box-shadow: inset 0 0 0 1.5px var(--accent); background: var(--accent-soft); }
.nk-at { font-weight: 700; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.nk-sub { font-size: 12px; color: var(--ink-3); }
.nk-on { display: inline-flex; align-items: center; gap: 3px; font-size: 12px; font-weight: 600; color: var(--accent-ink); }
.plan-card.gifts .plan-ic { background: linear-gradient(160deg, #8E7BFF, #4B49C8 55%, #1B1650); }

/* ---------- motion ---------- */
:root { --spring: cubic-bezier(.3, 1.35, .5, 1); --soft: cubic-bezier(.25, 1.1, .4, 1); }
@keyframes riseIn { from { opacity: 0; transform: translateY(14px) scale(.98); } }
@keyframes dropIn { from { opacity: 0; transform: translateY(-14px) scale(.97); } }
@keyframes popIn { from { opacity: 0; transform: scale(.55); } }
@keyframes sendUp { from { opacity: .15; transform: translateY(64px) scale(.84); } }
@keyframes msgIn { from { opacity: 0; transform: translateY(22px) scale(.96); } }
@keyframes burn {
  0% { opacity: 1; filter: none; transform: none; }
  45% { filter: blur(.5px) brightness(1.12) drop-shadow(0 0 12px rgba(255, 90, 40, .65)); }
  100% { opacity: 0; filter: blur(12px) brightness(1.5); transform: translateY(-22px) scale(.55); }
}
@keyframes dot { 0%, 70%, 100% { transform: translateY(0); opacity: .4; } 35% { transform: translateY(-4px); opacity: 1; } }
@keyframes shimmer { from { background-position: 180% 0; } to { background-position: -80% 0; } }
@keyframes float { 0%, 100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-7px) rotate(-2deg); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes drift { 0% { transform: translate3d(0, 0, 0) scale(1); } 50% { transform: translate3d(-3%, 2.5%, 0) scale(1.07); } 100% { transform: translate3d(2.5%, -2%, 0) scale(1.03); } }
@keyframes glowPulse { 0%, 100% { box-shadow: 0 6px 16px rgba(88, 86, 214, .4); } 50% { box-shadow: 0 6px 26px rgba(88, 86, 214, .75); } }
@keyframes onlinePop { from { transform: scale(0); } }
@keyframes fadeIn { from { opacity: 0; } }

:root[data-livebg="on"] body::before { animation: drift 48s ease-in-out infinite alternate; will-change: transform; }
:root[data-hidden="1"] body::before { animation-play-state: paused; }

/* the sliding glass lens behind the selected tab, filter or segment */
.filters.has-lens, .seg.has-lens { position: relative; }
.has-lens > :not(.lens) { position: relative; z-index: 1; }
.lens { position: absolute; left: 0; top: 0; z-index: 0; pointer-events: none; border-radius: 999px; will-change: transform;
  transition: transform .58s var(--spring), width .58s var(--spring), height .58s var(--spring); }
.rail .lens { border-radius: 18px; background: var(--glass-strong); box-shadow: inset 0 1px 0 var(--glass-edge), inset 0 0 0 1px var(--glass-rim), 0 6px 18px var(--glass-shade); }
.rail.has-lens .rbtn[aria-current="true"] { background: transparent; box-shadow: none; }
.filters .lens { background: var(--accent-fill); box-shadow: inset 0 1px 0 rgba(255,255,255,.35), 0 4px 14px rgba(0, 110, 255, .32); }
.filters.has-lens .fchip[aria-pressed="true"] { background: transparent; }
.seg .lens { border-radius: 8px; background: var(--seg-on); box-shadow: 0 2px 6px rgba(0, 0, 0, .12), 0 0 0 .5px rgba(0, 0, 0, .04); }
.seg.has-lens button[aria-pressed="true"] { background: transparent; box-shadow: none; }
.fchip, .seg button, .rbtn { transition: color .25s, background .25s, transform .3s var(--spring); }
.fchip:active, .seg button:active { transform: scale(.94); }

/* pressing things: everything gives a little under the finger */
.row, .pick, .item, .dact, .presets button, .att-file, .quote, .pinbar, .sugg, .opt, .react, .emo, .btn, .iconbtn, .send, .mbtn { transition: transform .35s var(--spring), background .2s, color .2s, opacity .2s, filter .2s, box-shadow .2s; }
.row:active, .pick:active, .item:active { transform: scale(.975); }
.att-file:active, .quote:active, .pinbar:active, .sugg:active, .opt:active, .react:active { transform: scale(.95); }
.switch:active .tg::after { width: 33px; }
.switch[aria-checked="true"]:active .tg::after { transform: translateX(14px); }

/* opening a chat: the floating chrome drops in, the conversation rises */
.main.enter .ctop > * { animation: dropIn .6s var(--spring) both; }
.main.enter .ctop > *:nth-child(2) { animation-delay: .05s; }
.main.enter .ctop > *:nth-child(3) { animation-delay: .09s; }
.main.enter .composer > * { animation: riseIn .6s var(--spring) .06s both; }
.main.enter .unread-sep { animation: popIn .55s var(--spring) .2s both; }
.msg.stagger { animation: msgIn .55s var(--spring) both; animation-delay: var(--d, 0ms); }
.msg.in.pop .bubble { animation: popIn .55s var(--spring) both; animation-delay: var(--pd, 0ms); transform-origin: 0 100%; }
.msg.out.pop .bubble { animation: popIn .55s var(--spring) both; animation-delay: var(--pd, 0ms); transform-origin: 100% 100%; }
.msg.out.sent .bubble { animation: sendUp .65s var(--spring) both; animation-delay: var(--pd, 0ms); transform-origin: 100% 100%; }
.msg.burning .bubble { animation: burn 1.4s ease-in forwards; animation-delay: var(--bd, 0ms); }
.mchips .tag { animation: fadeIn .3s both; }

/* someone is typing */
.typing-bubble .bubble { padding: 13px 15px; }
.typing-bubble { animation: popIn .45s var(--spring) both; transform-origin: 0 100%; }
.dots { display: inline-flex; gap: 5px; align-items: center; height: 10px; }
.dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--ink-3); animation: dot 1.2s ease-in-out infinite; animation-delay: var(--dd, 0ms); }
.tdots { display: inline-flex; gap: 2px; margin-left: 3px; vertical-align: middle; }
.tdots i { width: 4px; height: 4px; border-radius: 50%; background: currentColor; animation: dot 1.2s ease-in-out infinite; }
.tdots i:nth-child(2) { animation-delay: .15s; }
.tdots i:nth-child(3) { animation-delay: .3s; }

/* jump back to the newest messages */
.tobottom { position: absolute; right: max(18px, 2.4vw); bottom: calc(var(--bot-h, 72px) + 16px); z-index: 7; width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; color: var(--ink-2);
  background: var(--glass-strong); -webkit-backdrop-filter: blur(20px) saturate(180%); backdrop-filter: blur(20px) saturate(180%); box-shadow: inset 0 1px 0 var(--glass-edge), inset 0 0 0 1px var(--glass-rim), 0 10px 24px var(--glass-shade);
  opacity: 0; visibility: hidden; transform: translateY(14px) scale(.5); pointer-events: none; transition: transform .5s var(--spring), opacity .2s, visibility 0s linear .2s; }
.tobottom.show { opacity: 1; visibility: visible; transform: none; pointer-events: auto; transition: transform .5s var(--spring), opacity .2s, visibility 0s; }
.tobottom:active { transform: scale(.9); }
.tobottom .badge { position: absolute; top: -6px; right: -6px; min-width: 20px; height: 20px; font-size: 11px; }

/* composer */
#cextra > *, .suggest > * { animation: riseIn .45s var(--spring) both; }
.suggest > *:nth-child(2) { animation-delay: .04s; }
.suggest > *:nth-child(3) { animation-delay: .08s; }
.copts .opt { animation: popIn .45s var(--spring) both; }
.copts .opt:nth-child(2) { animation-delay: .03s; }
.copts .opt:nth-child(3) { animation-delay: .06s; }
.copts .opt:nth-child(4) { animation-delay: .09s; }
.send.idle { transform: scale(.9); background: var(--fill-2); color: var(--ink-3); filter: none; opacity: 1; box-shadow: inset 0 0 0 1px var(--glass-rim); }
.swipe-reply { position: absolute; right: -44px; top: 50%; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; opacity: 0; transform: translateY(-50%) scale(.5);
  background: var(--glass-strong); color: var(--accent-ink); box-shadow: inset 0 0 0 1px var(--glass-rim); }
.swipe-reply .ic { width: 18px; height: 18px; }

/* menus, dialogs, toasts, panels */
.menu > *, .emo-row > .emo { animation: riseIn .34s var(--spring) both; animation-delay: calc(var(--n, 0) * 16ms); }
.emo-row > .emo { animation-name: popIn; animation-delay: calc(var(--n, 0) * 22ms); }
.cnote.busy, .ai-msg.think { background-image: linear-gradient(100deg, transparent 30%, var(--sheen) 50%, transparent 70%); background-size: 220% 100%; animation: shimmer 1.6s linear infinite; }
.ai-msg.think { background-color: var(--bubble-in); }
.lokki-live .av.lokki .ic { animation: spin 2.4s linear infinite; }
.rbtn.focus-on { animation: glowPulse 3s ease-in-out infinite; }
.avw .on { animation: onlinePop .5s var(--spring) both; }
.lightbox { animation: fadeIn .25s both; }
.lightbox .lb-top { animation: dropIn .45s var(--spring) .1s both; }
.burst { position: fixed; z-index: 150; pointer-events: none; line-height: 1; will-change: transform, opacity; }
.dwrap { min-width: calc(var(--drawer) - 16px); max-width: 100vw; } /* fills the pane (a fixed width overflowed the scrollbar gutter); the floor keeps text from reflowing while the pane grows open */
@media (max-width: 1180px) { .dwrap { min-width: 0; } }

/* the empty screen */
.empty-card { animation: riseIn .75s var(--spring) both; }
.empty .app-icon { animation: popIn .8s var(--spring) .1s both, float 6s ease-in-out 1.2s infinite; }
.featlist li { animation: riseIn .6s var(--spring) both; animation-delay: calc(.25s + var(--d, 0) * 40ms); }
.empty .cta { animation: riseIn .6s var(--spring) .75s both; }

@media (max-width: 760px) { .rail .lens { border-radius: 999px; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-delay: 0ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; transition-delay: 0ms !important; scroll-behavior: auto !important; }
  :root[data-livebg="on"] body::before { animation: none !important; will-change: auto; }
}

.dlg.dlg-gift { width: min(390px, 100%); gap: 12px; }
.gv:focus { outline: none; }
.gv-x:focus { outline: none; }
.gv-x:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
/* in the dark theme a dark drone next to a name gets a faint light rim so it never sinks into the background */
:root[data-theme="dark"] .gift-mini { filter: drop-shadow(0 0 1.2px rgba(255, 255, 255, .55)) drop-shadow(0 1px 1px rgba(0, 0, 0, .4)); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .gift-mini { filter: drop-shadow(0 0 1.2px rgba(255, 255, 255, .55)) drop-shadow(0 1px 1px rgba(0, 0, 0, .4)); } }
/* the same faint light rim for rank shoulder boards */
:root[data-theme="dark"] .board { filter: drop-shadow(0 0 1px rgba(255, 255, 255, .5)); }
:root[data-theme="dark"] .board.big { filter: drop-shadow(0 0 1.2px rgba(255, 255, 255, .55)) drop-shadow(0 2px 4px rgba(0, 0, 0, .2)); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .board { filter: drop-shadow(0 0 1px rgba(255, 255, 255, .5)); }
  :root:not([data-theme="light"]) .board.big { filter: drop-shadow(0 0 1.2px rgba(255, 255, 255, .55)) drop-shadow(0 2px 4px rgba(0, 0, 0, .2)); }
}
.gift-card.has-meta { padding-bottom: 38px; }
.gift-card > .meta.on-photo { right: 8px; bottom: 8px; text-shadow: none; }

/* ---------- profile photo ---------- */
.ava-edit { position: relative; display: inline-block; }
.ava-cam { position: absolute; right: -4px; bottom: -2px; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: var(--accent); box-shadow: 0 0 0 3px var(--glass-strong), 0 4px 10px rgba(0, 60, 160, .35); transition: transform .3s var(--spring); }
@media (hover: hover) { .ava-cam:hover { transform: scale(1.08); } }
.ava-cam:active { transform: scale(.94); }
.ava-cam .ic { width: 18px; height: 18px; }
.crop { position: relative; width: min(260px, 100%); aspect-ratio: 1; margin: 0 auto; border-radius: 22px; overflow: hidden; background: var(--fill); touch-action: none; }
.crop canvas { width: 100%; height: 100%; display: block; cursor: grab; }
.crop canvas:active { cursor: grabbing; }
.crop canvas:focus { outline: none; }
.crop-ring { position: absolute; inset: 0; border-radius: 50%; box-shadow: 0 0 0 999px rgba(0, 0, 0, .45), inset 0 0 0 2px rgba(255, 255, 255, .85); pointer-events: none; }
.crop:focus-within .crop-ring { box-shadow: 0 0 0 999px rgba(0, 0, 0, .45), inset 0 0 0 3px var(--accent); }
img.av { background: var(--fill); }

/* release polish: readable gift captions, focus on coloured cards, dark-theme gradient numbers, phone tap targets */
.gift-card, .gv-head, .gd-hero, .gift-tile { text-shadow: 0 1px 3px rgba(0, 0, 0, .5); }
.gift-keep:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.menu { max-height: calc(100dvh - 24px); }
:root[data-theme="dark"] .num-row.pretty .nr-num { background-image: linear-gradient(90deg, #6FB1FF, #B3A6FF); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .num-row.pretty .nr-num { background-image: linear-gradient(90deg, #6FB1FF, #B3A6FF); } }
@media (max-width: 760px) { .chead .acts .iconbtn { width: 44px; height: 44px; } }

/* ---------- IDs, every nick and number, deleted accounts ---------- */
.ids { display: flex; flex-direction: column; align-items: center; gap: 6px; margin-top: 2px; }
.ids-line { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.id-chip { padding: 3px 10px; border-radius: 999px; background: var(--fill); color: var(--ink-2); font-size: 13px; font-weight: 600; }
.pid { font-size: 12.5px; color: var(--ink-3); letter-spacing: .02em; }
.av.ghost { background: var(--fill-2); color: var(--ink-3); display: inline-grid; place-items: center; }
.av.ghost .ic { width: 60%; height: 60%; }
.danger-card { box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--red) 30%, transparent); }

/* ---------- group photos, admins, channels ---------- */
.av.chan { display: inline-grid; place-items: center; }
.av.chan .ic { width: 52%; height: 52%; color: #fff; }
.chan-bar { display: flex; gap: 8px; justify-content: center; align-items: center; padding: 10px; border-radius: 22px; background: var(--glass); -webkit-backdrop-filter: blur(var(--blur)) saturate(180%); backdrop-filter: blur(var(--blur)) saturate(180%); box-shadow: inset 0 1px 0 var(--glass-edge), inset 0 0 0 1px var(--glass-rim); }
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) { .chan-bar { background: var(--glass-strong); } }
.newpic { display: flex; align-items: center; gap: 12px; }
.pic-btn { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; overflow: hidden; background: var(--fill); color: var(--accent); flex: none; box-shadow: inset 0 0 0 1.5px var(--glass-rim); }
.pic-btn img { width: 100%; height: 100%; object-fit: cover; }
.pic-btn .ic { width: 26px; height: 26px; }
.chan-row .btn { flex: none; }
.dprof .ava-edit { margin: 0 auto; }
.dprof .bio { text-align: center; }
.shop-more { display: flex; margin: 12px auto 16px; }
.side-title .cnt { font-size: 13px; font-variant-numeric: tabular-nums; }

/* ---------- sign-up and sign-in ---------- */
.auth { position: fixed; inset: var(--vvt, 0px) 0 auto 0; height: var(--vvh, 100%); z-index: 115; overflow: auto; display: grid; place-items: center; padding: max(20px, env(safe-area-inset-top, 0px)) 16px max(20px, env(safe-area-inset-bottom, 0px)); }
.auth-wrap { width: min(420px, 100%); display: flex; flex-direction: column; align-items: center; gap: 12px; }
.auth-card { width: 100%; border-radius: 32px; padding: 28px 24px 22px; display: flex; flex-direction: column; gap: 14px; position: relative; isolation: isolate;
  background: var(--glass-strong); -webkit-backdrop-filter: blur(var(--blur)) saturate(180%); backdrop-filter: blur(var(--blur)) saturate(180%);
  box-shadow: inset 0 1px 0 var(--glass-edge), inset 0 0 0 1px var(--glass-rim), var(--shadow-float); animation: pop .28s cubic-bezier(.3, 1.3, .5, 1); }
.auth-card::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: -1; background: linear-gradient(160deg, var(--sheen) 0%, transparent 34%, transparent 72%, var(--sheen) 130%); opacity: .55; }
.auth-logo { width: 64px; height: 64px; border-radius: 20px; display: grid; place-items: center; align-self: center; color: #fff;
  background: linear-gradient(160deg, #5AC8FA 0%, #007AFF 55%, #3A3AD8 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.6), inset 0 -2px 6px rgba(0,0,40,.25), 0 8px 22px rgba(0, 80, 200, .35); }
.auth-logo .ic { width: 38px; height: 38px; }
.auth-card h1 { font: 700 27px/1.15 var(--display); letter-spacing: -.02em; margin: 0; text-align: center; }
.auth-sub { margin: -6px 0 2px; text-align: center; color: var(--ink-2); font-size: 14.5px; }
.auth-note { display: flex; gap: 8px; align-items: flex-start; padding: 10px 12px; border-radius: 14px; background: var(--red-soft); color: var(--red); font-size: 13.5px; font-weight: 500; }
.auth-note .ic { margin-top: 1px; }
.auth-note.warn { background: var(--orange-soft); color: var(--orange); }
.auth-note.info { background: var(--accent-soft); color: var(--accent-ink); }
.auth-note b { font-variant-numeric: tabular-nums; }
.pw-wrap { position: relative; display: flex; }
.pw-wrap input { flex: 1; min-width: 0; padding-right: 46px; }
.pw-eye { position: absolute; right: 5px; top: 50%; transform: translateY(-50%); width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; color: var(--ink-3); }
@media (hover: hover) { .pw-eye:hover { background: var(--hover); color: var(--ink); } }
.pw-meter { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; margin-top: -6px; }
.pw-meter i { height: 4px; border-radius: 4px; background: var(--fill-2); transition: background .2s; }
.pw-meter[data-bad="1"] i:first-child { background: var(--red); }
.pw-meter[data-s="1"] i:first-child { background: var(--orange); }
.pw-meter[data-s="2"] i:nth-child(-n+2) { background: var(--green); }
.pw-meter[data-s="3"] i { background: var(--green); }
.pw-rules { list-style: none; margin: -6px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 12.5px; color: var(--ink-3); }
.pw-rules li { display: inline-flex; gap: 4px; align-items: center; }
.pw-rules li .ic { opacity: .3; }
.pw-rules li.ok { color: var(--green); }
.pw-rules li.ok .ic { opacity: 1; }
.check-row { display: flex; gap: 10px; align-items: center; font-size: 14px; color: var(--ink-2); cursor: pointer; }
.check-row input { width: 18px; height: 18px; accent-color: var(--accent); margin: 0; flex: none; }
.auth-link { align-self: center; font-size: 14px; color: var(--accent-ink); font-weight: 600; padding: 6px 10px; border-radius: 10px; }
@media (hover: hover) { .auth-link:hover { background: var(--hover); } }
.auth-foot { display: flex; gap: 8px; align-items: flex-start; margin: 2px 0 0; font-size: 12.5px; color: var(--ink-3); }
.auth-foot .ic { margin-top: 1px; }
.auth-who { display: flex; gap: 8px; align-items: center; font-size: 14px; color: var(--ink-2); }
.auth-warn { margin: 0; padding-left: 18px; font-size: 13px; color: var(--ink-2); display: flex; flex-direction: column; gap: 4px; }
.btn .spin { width: 16px; height: 16px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .45); border-top-color: #fff; animation: spin .8s linear infinite; }
@media (prefers-reduced-motion: reduce) { .auth-card { animation: none; } .btn .spin { animation-duration: 2.4s !important; animation-iteration-count: infinite !important; } }

/* ---------- settings: security ---------- */
.sec-login { display: flex; gap: 8px; align-items: center; font-size: 14px; color: var(--ink-2); }
.sec-login b { color: var(--ink); }
.sec-login .sd { display: block; font-size: 12.5px; color: var(--ink-3); }
.sec-acts { display: flex; gap: 8px; flex-wrap: wrap; }
.ses { display: flex; flex-direction: column; gap: 6px; }
.ses-h { font-size: 12.5px; font-weight: 600; color: var(--ink-3); }
.ses-row { display: flex; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 14px; background: var(--fill); }
.ses-row .pb { display: flex; flex-direction: column; min-width: 0; }
.ses-row .pn { font-size: 14px; font-weight: 600; }
.ses-row .ps { font-size: 12.5px; color: var(--ink-3); }
.sec-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; color: var(--ink-3); }
.sec-list li { display: flex; gap: 6px; align-items: flex-start; }
.sec-list li .ic { margin-top: 2px; color: var(--green); }
.cp-err { color: var(--red); font-size: 13.5px; font-weight: 500; }
.switch.stack { flex-direction: column; align-items: stretch; gap: 8px; }
.switch.stack .seg { align-self: stretch; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; }
/* while signing in only the wallpaper and the sign-in card are shown */
body[data-auth="1"] .app { visibility: hidden; }

/* ---------- recovery code, documents, help ---------- */
.choice { display: flex; gap: 12px; align-items: flex-start; text-align: left; padding: 14px; border-radius: 18px; background: var(--fill); }
@media (hover: hover) { .choice:hover { background: var(--fill-2); } }
.choice .ic { color: var(--accent-ink); margin-top: 1px; }
.choice b { display: block; font-size: 15px; }
.choice span span { display: block; font-size: 13px; color: var(--ink-3); margin-top: 2px; }
.code-in { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; letter-spacing: .06em; text-transform: uppercase; }
.check-row.terms { align-items: flex-start; }
.check-row.terms input { margin-top: 2px; }
.check-row .link { color: var(--accent-ink); font-weight: 600; display: inline; }
@media (hover: hover) { .check-row .link:hover { text-decoration: underline; } }
.doc-card { gap: 10px; }
.doc-h { font-size: 23px !important; text-align: left !important; }
.doc { display: flex; flex-direction: column; gap: 6px; }
.doc h3 { margin: 8px 0 0; font-size: 15px; }
.doc p { margin: 0; font-size: 14px; color: var(--ink-2); line-height: 1.5; }
.doc .doc-up { font-size: 12.5px; color: var(--ink-3); }
.rcode { font: 600 21px/1.3 ui-monospace, "SF Mono", Menlo, Consolas, monospace; letter-spacing: .06em; text-align: center; padding: 14px 10px; border-radius: 16px; background: var(--fill); user-select: all; word-break: break-word; }
.sec-rc { display: flex; gap: 8px; align-items: center; font-size: 14px; color: var(--ink-2); }
.sec-rc > span { flex: 1; min-width: 0; }
.sec-rc b { color: var(--ink); }
.sec-rc .sd { display: block; font-size: 12.5px; color: var(--ink-3); }
.sec-rc .btn { flex: none; }
.help-ic { background: linear-gradient(160deg, #5AC8FA, #007AFF); color: #fff; }
.faq { gap: 2px; }
.faq-i summary { list-style: none; display: flex; justify-content: space-between; gap: 8px; align-items: center; cursor: pointer; padding: 10px 2px; font-weight: 600; font-size: 14.5px; }
.faq-i summary::-webkit-details-marker { display: none; }
.faq-i summary .ic { transition: transform .2s; color: var(--ink-3); }
.faq-i[open] summary .ic { transform: rotate(180deg); }
.faq-i p { margin: 0 2px 10px; font-size: 14px; color: var(--ink-2); line-height: 1.5; }
.faq-i + .faq-i { border-top: 1px solid var(--fill-2); }
/* dialogs: the dim layer blurs the app strongly, and the sheet itself is nearly opaque, so text behind never shows through */
.dlg-back { -webkit-backdrop-filter: blur(16px) saturate(140%); backdrop-filter: blur(16px) saturate(140%); }
.dlg { background-color: rgba(255, 255, 255, .9); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .dlg { background-color: rgba(32, 36, 50, .93); } }
:root[data-theme="dark"] .dlg { background-color: rgba(32, 36, 50, .93); }

/* ---------- first steps, invitations, mentions ---------- */
.first-steps { margin: 4px 0 10px; gap: 8px; }
.fs-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 15px; }
.fs-bar { height: 5px; border-radius: 5px; background: var(--fill-2); overflow: hidden; }
.fs-bar i { display: block; height: 100%; border-radius: 5px; background: var(--accent); transition: width .4s; }
.fs-step { display: flex; gap: 10px; align-items: center; text-align: left; padding: 8px 6px; border-radius: 12px; font-size: 14px; font-weight: 500; }
@media (hover: hover) { .fs-step:hover { background: var(--hover); } }
.fs-step > span:nth-child(2) { flex: 1; }
.fs-ic { width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-ink); flex: none; }
.fs-step.ok { color: var(--ink-3); cursor: default; }
.fs-step.ok .fs-ic { background: rgba(31, 157, 69, .14); color: var(--green); }
.fs-step.ok > span:nth-child(2) { text-decoration: line-through; }
.row.invite { cursor: default; }
.inv-acts { display: flex; gap: 6px; flex: none; }
.mention-list { display: flex; flex-direction: column; gap: 2px; padding: 6px; border-radius: 18px; background: var(--glass-strong); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); box-shadow: inset 0 0 0 1px var(--glass-rim), 0 8px 20px var(--glass-shade); max-height: 220px; overflow: auto; }
.mention-list .pick { padding: 6px 8px; border-radius: 12px; }
.mention-list .pick:focus-visible { background: var(--hover); }
@media (hover: hover) { .mention-list .pick:hover { background: var(--hover); } }
.readonly .link { color: var(--accent-ink); font-weight: 600; margin-left: 4px; }

/* ---------- polls, pinned for everyone, reports, banned ---------- */
.poll { display: flex; flex-direction: column; gap: 6px; padding: 10px 12px 8px; width: 300px; max-width: 100%; min-width: 0; }
.poll-q { font-weight: 600; font-size: 15px; overflow-wrap: anywhere; }
.poll-k { display: flex; gap: 4px; align-items: center; font-size: 12.5px; color: var(--ink-3); margin-bottom: 2px; }
.msg.out .poll-k, .msg.out .poll-f { color: var(--bubble-out-meta); }
.poll-o { position: relative; display: flex; gap: 8px; align-items: center; text-align: left; padding: 9px 12px; border-radius: 12px; background: var(--fill); overflow: hidden; font-size: 14px; isolation: isolate; }
.msg.out .poll-o { background: rgba(255, 255, 255, .18); color: #fff; }
@media (hover: hover) {
  .poll-o:not(:disabled):hover { background: var(--fill-2); }
  .msg.out .poll-o:not(:disabled):hover { background: rgba(255, 255, 255, .26); }
}
.po-dot { width: 16px; height: 16px; border-radius: 50%; box-shadow: inset 0 0 0 2px currentColor; opacity: .55; flex: none; }
.po-t { flex: 1; display: flex; gap: 6px; align-items: center; min-width: 0; overflow-wrap: anywhere; }
.po-n { font-variant-numeric: tabular-nums; font-weight: 600; font-size: 13px; }
.po-bar { position: absolute; inset: 0 auto 0 0; background: var(--accent-soft); z-index: -1; border-radius: inherit; transition: width .45s var(--spring, ease); }
.msg.out .po-bar { background: rgba(255, 255, 255, .28); }
.poll-o.mine { box-shadow: inset 0 0 0 1.5px var(--accent); }
.msg.out .poll-o.mine { box-shadow: inset 0 0 0 1.5px #fff; }
.poll-f { display: flex; gap: 10px; align-items: center; font-size: 12.5px; color: var(--ink-3); margin-top: 2px; }
.poll-f .link { color: inherit; text-decoration: underline; font-size: 12.5px; }
.poll-f .meta { margin-left: auto; float: none; position: static; }
.pq-opts { display: flex; flex-direction: column; gap: 6px; }
.pq-opts input { border: 0; background: var(--fill); border-radius: 12px; padding: 10px 12px; outline: 0; color: var(--ink); font-size: 15px; box-shadow: inset 0 0 0 1px var(--field-line); }
.pq-opts input:focus-visible { outline: 2.5px solid var(--accent); }
.radio-list { display: flex; flex-direction: column; gap: 8px; }
.radio-list input { accent-color: var(--accent); }
.pinbar.shared .ic { color: var(--accent-ink); }
.adm-row.rep { align-items: flex-start; flex-wrap: wrap; }
.rep-q { display: block; font-size: 13px; color: var(--ink-2); background: var(--fill); border-radius: 10px; padding: 6px 8px; margin-top: 4px; overflow-wrap: anywhere; }
.rep-acts { display: flex; gap: 6px; flex-wrap: wrap; }
.hint.banned { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.hint.banned > .ic { width: 40px; height: 40px; color: var(--red); }
.hint.banned p { margin: 0; }

/* ---------- touch, on-screen keyboard, selection ---------- */
/* phones: 16px text in fields, so iOS does not zoom the page when one gets focus */
@media (max-width: 760px), (pointer: coarse) {
  .cfield textarea, .search input, .field input, .field textarea, .field select, .addrow input, .note-box, .pq-opts input { font-size: 16px; }
}
@media (pointer: coarse) {
  /* small controls keep their look but get a 44px hit area */
  button.check, .item > .iconbtn, .undo-inline, .meta .edited, .react, .fchip, .seg button, .opt, .btn.sm, .cnote button.link, .banner .bact, .poll-f .link, .readonly .link { position: relative; }
  button.check::after, .item > .iconbtn::after, .undo-inline::after, .meta .edited::after, .react::after, .fchip::after, .seg button::after, .opt::after, .btn.sm::after, .cnote button.link::after, .banner .bact::after, .poll-f .link::after, .readonly .link::after, .gv-x::after, .pw-eye::after, .ava-cam::after {
    content: ""; position: absolute; left: 50%; top: 50%; width: max(100%, 44px); height: max(100%, 44px); transform: translate(-50%, -50%); border-radius: 999px; }
  /* a long press opens the message menu (copying is there), not the system text callout */
  .msg .bubble { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
}
.msg.out .bubble ::selection, .msg.out .bubble::selection { background: rgba(255, 255, 255, .35); }
/* the sheen of panes that scroll is part of their background, so it stays put instead of scrolling away with the content */
.drawer::after, .menu::after, .dlg::after { content: none; }
.drawer, .menu, .dlg { background-image: linear-gradient(160deg, var(--sheen-soft) 0%, transparent 34%, transparent 72%, var(--sheen-soft) 130%); background-repeat: no-repeat; }

/* menus open over bright bubbles: a denser glass keeps their items clean */
:root { --glass-menu: rgba(255, 255, 255, .9); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --glass-menu: rgba(32, 36, 50, .93); } }
:root[data-theme="dark"] { --glass-menu: rgba(32, 36, 50, .93); }
.menu { background: var(--glass-menu); }

/* ---------- phones: the same glass with less work per frame ---------- */
@media (max-width: 760px), (pointer: coarse) {
  :root { --blur: 16px; }
  /* a moving wallpaper makes every glass panel re-blur on every frame: on phones it stays still */
  :root[data-livebg="on"] body::before { animation: none; will-change: auto; }
}
@media (max-width: 760px) {
  /* while a chat slides in or out, the glass inside it stops re-blurring (it is back the moment it stops) */
  .app.sliding .main .chead .who, .app.sliding .main .chead .acts, .app.sliding .main .chead .back,
  .app.sliding .main .cfield, .app.sliding .main .pinbar, .app.sliding .main .cnote, .app.sliding .main .day,
  .app.sliding .main .sys, .app.sliding .main .unread-sep, .app.sliding .rail {
    -webkit-backdrop-filter: none; backdrop-filter: none; background: var(--glass-strong);
  }
}

/* name and surname side by side (one under the other on narrow screens) */
.name-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
.name-row .field, .name-row input { min-width: 0; width: 100%; }
/* phones: dialogs are more compact, so short ones fit without scrolling */
@media (max-width: 520px) {
  .dlg { padding: 18px; gap: 12px; border-radius: 26px; }
  .dlg h2 { font-size: 19px; }
  .dlg .acts .btn { flex: 1; }
}

/* ---------- Lokkidg's own reactions ---------- */
.lkr { display: inline-block; width: var(--s, 20px); height: var(--s, 20px); flex: none; vertical-align: middle; }
.lkr svg { display: block; width: 100%; height: 100%; overflow: visible; }
.lkr .a, .lkr .beam { transform-box: fill-box; transform-origin: center; }
.lkr-fire .a { transform-origin: 50% 100%; }
.lkr-house .beam { transform-origin: 50% 30%; }
.lkr-heart { --lkr: lkr-beat; } .lkr-fire { --lkr: lkr-flick; } .lkr-lol { --lkr: lkr-shake; } .lkr-wow { --lkr: lkr-pop; }
.lkr-ok { --lkr: lkr-pop; } .lkr-gull { --lkr: lkr-flap; } .lkr-wave { --lkr: lkr-sway; } .lkr-house { --lkr: lkr-pop; }
/* the drawing moves when a reaction appears, when it flies up, and under the finger or pointer in the menu */
.react.bump .lkr .a, .burst .lkr .a, .emo.lk:hover .lkr .a, .emo.lk:focus-visible .lkr .a, .emo.lk:active .lkr .a { animation: var(--lkr) .9s cubic-bezier(.3, 1.3, .5, 1) both; animation-delay: var(--bd, 0ms); }
.react.bump .lkr-ok .d, .burst .lkr-ok .d, .emo.lk:hover .lkr-ok .d, .emo.lk:active .lkr-ok .d { animation: lkr-draw .5s .1s ease-out both; }
.react.bump .lkr-house .beam, .burst .lkr-house .beam, .emo.lk:hover .lkr-house .beam, .emo.lk:active .lkr-house .beam { animation: lkr-beam .9s ease-in-out 2 both; }
@keyframes lkr-beat { 0%, 100% { transform: scale(1); } 18% { transform: scale(1.3); } 36% { transform: scale(.92); } 56% { transform: scale(1.16); } 76% { transform: scale(.98); } }
@keyframes lkr-flick { 0%, 100% { transform: scale(1, 1) skewX(0); } 20% { transform: scale(.94, 1.16) skewX(-5deg); } 45% { transform: scale(1.04, .92) skewX(4deg); } 70% { transform: scale(.97, 1.08) skewX(-2deg); } }
@keyframes lkr-shake { 0%, 100% { transform: rotate(0) scale(1); } 15% { transform: rotate(-14deg) scale(1.12); } 35% { transform: rotate(12deg) scale(1.12); } 55% { transform: rotate(-9deg) scale(1.06); } 75% { transform: rotate(6deg); } }
@keyframes lkr-pop { 0%, 100% { transform: scale(1); } 25% { transform: scale(1.32); } 50% { transform: scale(.9); } 72% { transform: scale(1.08); } }
@keyframes lkr-flap { 0%, 100% { transform: translateY(0) rotate(0); } 25% { transform: translateY(-16%) rotate(-10deg); } 50% { transform: translateY(2%) rotate(4deg); } 75% { transform: translateY(-8%) rotate(-4deg); } }
@keyframes lkr-sway { 0%, 100% { transform: translateX(0) rotate(0); } 30% { transform: translateX(-8%) rotate(-12deg); } 65% { transform: translateX(8%) rotate(9deg); } }
@keyframes lkr-draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes lkr-beam { 0%, 100% { opacity: .15; transform: scaleY(.6); } 45% { opacity: .95; transform: scaleY(1.15); } }
/* a reaction chip that just appeared or grew springs in; its number rolls */
.react .lkr { margin: -2px 0; }
.react .rn { display: inline-block; }
.react.bump { animation: reactBump .55s cubic-bezier(.3, 1.5, .5, 1) both; animation-delay: var(--bd, 0ms); }
.react.bump .rn { animation: reactNum .45s cubic-bezier(.2, .9, .3, 1) both; animation-delay: var(--bd, 0ms); }
@keyframes reactBump { 0% { transform: scale(.4); opacity: .3; } 55% { transform: scale(1.14); opacity: 1; } 100% { transform: scale(1); } }
@keyframes reactNum { 0% { transform: translateY(70%); opacity: 0; } 100% { transform: translateY(0); opacity: 1; } }
/* the menu: our reactions first, the usual emoji below */
.emo-row.lk-row { flex-wrap: wrap; justify-content: center; padding-bottom: 2px; }
.emo.lk { width: 38px; height: 38px; }
@media (hover: hover) { .emo.lk:hover { transform: scale(1.18); } }
.emo[aria-pressed="true"] { background: var(--accent-soft); }
/* always alive: in messages and in the menu every drawing keeps moving gently (the one-off play above runs on top) */
.react .lkr, .emo.lk .lkr { animation: var(--lkl) var(--lp, 2.4s) ease-in-out infinite; animation-delay: var(--ld, 0ms); will-change: transform; }
.lkr-heart { --lkl: lkl-beat; } .lkr-fire { --lkl: lkl-flick; --lp: 1.2s; transform-origin: 50% 90%; } .lkr-lol { --lkl: lkl-shake; } .lkr-wow { --lkl: lkl-pop; }
.lkr-ok { --lkl: lkl-pulse; } .lkr-gull { --lkl: lkl-float; } .lkr-wave { --lkl: lkl-sway; } .lkr-house { --lkl: lkl-pulse; }
.react .lkr-house .beam, .emo.lk .lkr-house .beam { animation: lkr-beam 2.4s ease-in-out infinite; animation-delay: var(--ld, 0ms); }
@keyframes lkl-beat { 0%, 36%, 100% { transform: scale(1); } 7% { transform: scale(1.2); } 14% { transform: scale(.95); } 22% { transform: scale(1.12); } 30% { transform: scale(.99); } }
@keyframes lkl-flick { 0%, 100% { transform: scale(1, 1) skewX(0); } 25% { transform: scale(.96, 1.08) skewX(-3deg); } 50% { transform: scale(1.03, .95) skewX(2deg); } 75% { transform: scale(.98, 1.05) skewX(-1deg); } }
@keyframes lkl-shake { 0%, 40%, 100% { transform: rotate(0); } 6% { transform: rotate(-10deg); } 14% { transform: rotate(9deg); } 22% { transform: rotate(-6deg); } 30% { transform: rotate(4deg); } }
@keyframes lkl-pop { 0%, 30%, 100% { transform: scale(1); } 10% { transform: scale(1.18); } 20% { transform: scale(.94); } }
@keyframes lkl-pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.08); } }
@keyframes lkl-float { 0%, 100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-10%) rotate(-6deg); } }
@keyframes lkl-sway { 0%, 100% { transform: rotate(-7deg); } 50% { transform: rotate(7deg); } }
@media (prefers-reduced-motion: reduce) { .lkr, .lkr .a, .lkr .d, .lkr .beam, .react.bump, .react.bump .rn { animation: none !important; } }
