/* Snappy — professioneel, rustig ontwerp. Licht + donker, instelbare accentkleur, alleen SVG-iconen. */
:root {
  --accent: #2f6bff;
  --page: #e9ebef; --bg: #ffffff; --bg-2: #f7f8fa; --fg: #0e1116; --on-fg: #ffffff; --muted: #737a87; --line: #eceef2; --soft: #f2f3f6; --soft-2: #e6e8ed;
  --red: #ff3b4e; --flame: #ff7a1a; --green: #1fb768; --yellow: #f5b301; --blue: var(--accent);
  --bubble-me: var(--accent); --bubble-me-fg: #fff; --bubble-them: #f0f1f4; --bubble-them-fg: var(--fg);
  --radius: 14px; --shadow: 0 12px 34px rgba(15,17,22,.12), 0 2px 6px rgba(15,17,22,.05);
  --safe-b: env(safe-area-inset-bottom, 0px); --safe-t: env(safe-area-inset-top, 0px);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --page: #050607; --bg: #0f1115; --bg-2: #13161b; --fg: #f1f3f6; --on-fg: #0e1116; --muted: #8c929e; --line: #1f232a; --soft: #181b21; --soft-2: #242830;
    --bubble-them: #1c1f26; --shadow: 0 12px 34px rgba(0,0,0,.55); color-scheme: dark; }
}
:root[data-theme="dark"] { --page: #050607; --bg: #0f1115; --bg-2: #13161b; --fg: #f1f3f6; --on-fg: #0e1116; --muted: #8c929e; --line: #1f232a; --soft: #181b21; --soft-2: #242830;
  --bubble-them: #1c1f26; --shadow: 0 12px 34px rgba(0,0,0,.55); color-scheme: dark; }

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; margin: 0; background: var(--page); color: var(--fg); overscroll-behavior: none;
  font: 15px/1.45 Inter, "SF Pro Text", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
a { color: inherit; }
button:focus-visible, input:focus-visible, textarea:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
[hidden] { display: none !important; }
::-webkit-scrollbar { width: 6px; height: 6px; } ::-webkit-scrollbar-thumb { background: var(--soft-2); border-radius: 3px; }
#root { position: relative; height: 100%; height: 100dvh; max-width: 480px; margin: 0 auto; background: var(--bg); overflow: hidden; }
@media (min-width: 560px) and (min-height: 700px) {
  body { display: grid; place-items: center; background: radial-gradient(1200px 700px at 15% 10%, color-mix(in srgb, var(--accent) 22%, var(--page)), transparent 60%), radial-gradient(900px 600px at 90% 90%, color-mix(in srgb, #b65cff 16%, var(--page)), transparent 60%), var(--page); }
  #root { height: min(100dvh - 48px, 900px); border-radius: 30px; box-shadow: var(--shadow), 0 0 0 1px var(--line); width: 100%; }
}
.i { width: 22px; height: 22px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.i.fill { fill: currentColor; stroke: none; }
.i.sm { width: 17px; height: 17px; } .i.xs { width: 14px; height: 14px; } .i.lg { width: 28px; height: 28px; } .i.xl { width: 46px; height: 46px; stroke-width: 1.3; }
.grow { flex: 1; min-width: 0; }
.center { text-align: center; justify-content: center; }
.pad { padding: 8px 20px; }
.note { color: var(--muted); font-size: 13px; padding: 6px 20px 10px; margin: 0; display: flex; gap: 8px; align-items: flex-start; }
.spinner { width: 22px; height: 22px; border-radius: 50%; border: 2.5px solid var(--soft-2); border-top-color: var(--accent); animation: spin .8s linear infinite; display: inline-block; }
.spinner.xs { width: 13px; height: 13px; border-width: 2px; } .spinner.light { border-color: rgba(255,255,255,.25); border-top-color: #fff; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- auth ---------- */
#auth { height: 100%; display: flex; flex-direction: column; justify-content: center; padding: calc(32px + var(--safe-t)) 28px 28px; background: var(--bg); overflow-y: auto; }
#auth .auth-art { margin-bottom: 26px; }
#auth .logo { width: 60px; height: 60px; border-radius: 18px; background: var(--accent); color: #fff; display: grid; place-items: center; box-shadow: 0 10px 26px color-mix(in srgb, var(--accent) 40%, transparent); }
#auth .logo .i { width: 32px; height: 32px; stroke-width: 1.6; }
#auth h2 { margin: 0 0 6px; font-size: 29px; font-weight: 750; letter-spacing: -.7px; }
#auth .tag { color: var(--muted); margin: 0 0 26px; }
#auth form { display: flex; flex-direction: column; gap: 10px; }
#auth input { width: 100%; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--soft); outline: none; transition: border-color .15s, background .15s; }
#auth input:focus { border-color: var(--accent); background: var(--bg); }
.pw-wrap { position: relative; } .pw-wrap input { padding-right: 48px; }
.pw-eye { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; display: grid; place-items: center; color: var(--muted); }
.pw-meter { display: flex; gap: 5px; align-items: center; padding: 0 2px; }
.pw-meter i { flex: 1; height: 4px; border-radius: 2px; background: var(--soft-2); transition: background .2s; }
.pw-meter span { font-size: 12px; color: var(--muted); min-width: 56px; text-align: right; }
.pw-meter[data-s="1"] i:nth-child(-n+1) { background: var(--red); } .pw-meter[data-s="2"] i:nth-child(-n+2) { background: var(--flame); }
.pw-meter[data-s="3"] i:nth-child(-n+3) { background: var(--yellow); } .pw-meter[data-s="4"] i { background: var(--green); }
#auth .primary { background: var(--accent); color: #fff; padding: 14px; border-radius: var(--radius); font-weight: 650; margin-top: 8px; transition: transform .08s, opacity .15s; }
#auth .primary:active { transform: scale(.985); } #auth .primary[disabled] { opacity: .6; }
#auth .switch { margin-top: 22px; color: var(--muted); font-size: 14px; }
#auth .switch button { color: var(--accent); font-weight: 650; margin-left: 4px; }
.auth-foot { margin-top: 30px; color: var(--muted); font-size: 12px; display: flex; align-items: center; gap: 6px; }
.error { color: var(--red); font-size: 13px; padding: 2px 2px 0; }

/* ---------- shell ---------- */
#app { height: 100%; display: flex; flex-direction: column; position: relative; }
#topbar { padding: calc(10px + var(--safe-t)) 12px 6px 14px; z-index: 3; display: flex; align-items: center; gap: 10px; min-height: 58px; }
#topbar h1 { margin: 0; font-size: 25px; font-weight: 750; letter-spacing: -.6px; flex: 1; }
#topact { display: flex; gap: 2px; }
#app.camera-mode #topbar { position: absolute; left: 0; right: 0; top: 0; color: #fff; }
#app.camera-mode #topbar .ibtn { color: #fff; }
#netbar { background: var(--yellow); color: #1b1300; font-size: 12.5px; font-weight: 600; padding: 5px 12px; display: flex; align-items: center; justify-content: center; gap: 8px; z-index: 4; }
#view { flex: 1; overflow-y: auto; position: relative; overscroll-behavior: contain; }
#nav { display: flex; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); border-top: 1px solid var(--line); padding: 4px 6px var(--safe-b); z-index: 3; }
#nav .ico { width: 54px; height: 30px; border-radius: 999px; display: grid; place-items: center; transition: background .2s, color .2s; }
#nav button.active .ico { background: color-mix(in srgb, var(--accent) 16%, transparent); }
#app.camera-mode #nav button.active .ico { background: rgba(255,255,255,.14); color: #fff; }
#app.camera-mode #nav { background: #000; border-color: #16171a; }
#nav button { flex: 1; padding: 9px 0 8px; display: flex; flex-direction: column; align-items: center; gap: 3px; position: relative; color: var(--muted); transition: color .15s; }
#nav button.active { color: var(--fg); }
#nav button.active .ico { color: var(--accent); }
#app.camera-mode #nav button { color: #7d8089; } #app.camera-mode #nav button.active { color: #fff; }
#nav .lbl { font-size: 10.5px; font-weight: 650; letter-spacing: .2px; }
.badge { position: absolute; top: 3px; left: calc(50% + 6px); min-width: 18px; height: 18px; border-radius: 9px; background: var(--red);
  color: #fff; font-size: 10.5px; font-weight: 750; line-height: 18px; text-align: center; padding: 0 5px; font-style: normal; box-shadow: 0 0 0 2px var(--bg); }
.badge.dot { min-width: 9px; width: 9px; height: 9px; padding: 0; top: 7px; left: calc(50% + 10px); background: var(--accent); }

/* ---------- lijsten ---------- */
.list { list-style: none; margin: 0; padding: 0; }
.row { display: flex; align-items: center; gap: 13px; padding: 11px 18px; width: 100%; text-align: left; background: none; transition: background .12s; position: relative; }
button.row:hover, .row.toggle:hover { background: var(--soft); }
button.row:active, .row.sel { background: var(--soft-2); }
.row.danger, .row.danger .i { color: var(--red); }
.row > .i { color: var(--muted); }
.row .txt { text-align: left; }
.row-end { display: flex; align-items: center; gap: 6px; flex: none; }
.avatar { width: 46px; height: 46px; border-radius: 50%; flex: none; display: grid; place-items: center; color: #fff;
  background: hsl(var(--hue, 220) 55% 58%); font-weight: 650; font-size: 17px; position: relative; overflow: visible; }
.avatar.has-av { background: transparent; }
.avatar .av-svg { width: 100%; height: 100%; display: block; border-radius: 50%; }
.avatar.sm { width: 38px; height: 38px; font-size: 14px; } .avatar.lg { width: 88px; height: 88px; font-size: 34px; } .avatar.xl { width: 128px; height: 128px; font-size: 48px; }
.avatar.group { background: var(--soft); color: var(--muted); } .avatar.group .i { width: 22px; height: 22px; }
.avatar-stack { width: 46px; height: 46px; position: relative; flex: none; }
.avatar-stack .avatar { position: absolute; width: 32px; height: 32px; box-shadow: 0 0 0 2px var(--bg); border-radius: 50%; }
.avatar-stack .avatar:first-child { left: 0; top: 0; } .avatar-stack .avatar:last-child { right: 0; bottom: 0; }
.avatar-stack.sm { width: 38px; height: 38px; } .avatar-stack.sm .avatar { width: 26px; height: 26px; }
.avatar-stack.lg { width: 92px; height: 92px; } .avatar-stack.lg .avatar { width: 62px; height: 62px; }
button.avatar { cursor: pointer; padding: 0; }
.avatar .online { position: absolute; right: -1px; bottom: -1px; width: 13px; height: 13px; border-radius: 50%; background: var(--green); border: 2.5px solid var(--bg); }
.name { font-weight: 620; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: flex; align-items: center; gap: 5px; }
.sub { color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: flex; align-items: center; gap: 6px; }
.sub.wrap { white-space: normal; }
.sub .i { color: inherit; }
.sub.new { color: var(--red); font-weight: 620; } .sub.newtext { color: var(--accent); font-weight: 620; }
.chatrow.unread .name { font-weight: 750; }
.chatrow { padding: 10px 16px; border-radius: 16px; margin: 0 6px; width: calc(100% - 12px); }
.chatrow .row-time { font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.chatrow.unread .row-time { color: var(--accent); font-weight: 650; }
.row-end { flex-direction: column; align-items: flex-end; gap: 4px; }
.row-end .row-badges { display: flex; gap: 5px; align-items: center; }
.udot { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); }
.udot.red { background: var(--red); }
.empty-av { width: 150px; height: 150px; }
.empty-av svg { width: 100%; height: 100%; filter: drop-shadow(0 8px 16px rgba(0,0,0,.18)); }
.empty h3 { margin: 0; color: var(--fg); font-size: 18px; letter-spacing: -.3px; }
.sq { display: inline-block; width: 10px; height: 10px; border-radius: 3px; flex: none; }
.sq.red { background: var(--red); } .sq.blue { background: var(--accent); } .sq.hollow { box-shadow: inset 0 0 0 1.8px var(--muted); }
.sq.hollow-red { box-shadow: inset 0 0 0 1.8px var(--red); } .sq.hollow-blue { box-shadow: inset 0 0 0 1.8px var(--accent); }
.i.pinned { color: var(--muted); } .i.muted { color: var(--muted); }
.streak { display: inline-flex; align-items: center; gap: 2px; font-weight: 650; font-size: 13px; color: var(--flame); white-space: nowrap; }
.streak .i { width: 15px; height: 15px; } .streak.risk { color: var(--muted); }
.best { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; color: #fff; background: var(--yellow); }
.best.b2, .best.b3 { background: var(--soft-2); color: var(--yellow); }
.tag { font-size: 11px; font-weight: 650; color: var(--muted); background: var(--soft); border-radius: 6px; padding: 1px 7px; margin-left: 4px; }
.tag.accent { color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent); }
.section { padding: 20px 20px 6px; font-size: 11.5px; font-weight: 650; color: var(--muted); letter-spacing: .7px; text-transform: uppercase; }
.empty { text-align: center; color: var(--muted); padding: 52px 32px; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.empty .i { color: var(--soft-2); } .empty p { margin: 0; max-width: 270px; }
.hint-foot { color: var(--muted); font-size: 12px; text-align: center; padding: 16px 28px 24px; display: flex; gap: 6px; justify-content: center; align-items: center; margin: 0; }
.btn { background: var(--accent); color: #fff; border-radius: 999px; padding: 8px 16px; font-weight: 650; font-size: 13.5px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; transition: opacity .12s, transform .08s, background .12s; white-space: nowrap; }
.btn:active { transform: scale(.97); }
.btn.ghost { background: var(--soft); color: var(--fg); } .btn.ghost:hover { background: var(--soft-2); }
.btn.ghost.dark { background: rgba(255,255,255,.15); color: #fff; }
.btn.red { background: var(--red); color: #fff; } .btn.blue, .btn.add-btn, .btn.accept { background: var(--accent); color: #fff; }
.btn.icon { padding: 8px; } .btn.sm { padding: 6px 12px; font-size: 12.5px; } .btn.wide { width: 100%; padding: 12px; }
.btn[disabled] { opacity: .4; pointer-events: none; }
.search { margin: 6px 16px 4px; position: relative; display: flex; align-items: center; }
.search input, .field { width: 100%; padding: 12px 16px; border-radius: var(--radius); border: 1px solid transparent; background: var(--soft); outline: none; transition: border-color .15s, background .15s; resize: none; }
.search input { padding-left: 42px; } .search input:focus, .field:focus { background: var(--bg); border-color: var(--accent); }
.search > .i { position: absolute; left: 14px; width: 18px; height: 18px; color: var(--muted); pointer-events: none; }
.search.fake { width: calc(100% - 32px); padding: 12px 16px 12px 42px; border-radius: var(--radius); background: var(--soft); color: var(--muted); text-align: left; font-size: 14.5px; }
.chips { display: flex; gap: 8px; padding: 8px 16px 6px; }
.scroll-x { overflow-x: auto; scrollbar-width: none; } .scroll-x::-webkit-scrollbar { display: none; }
.fchip { padding: 7px 14px; border-radius: 999px; background: var(--soft); font-size: 13px; font-weight: 600; white-space: nowrap; display: inline-flex; gap: 6px; align-items: center; transition: background .12s, color .12s; }
.fchip.on { background: var(--fg); color: var(--on-fg); }
.fchip b { background: var(--red); color: #fff; font-size: 11px; border-radius: 9px; padding: 0 6px; line-height: 17px; }
.pills { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.pill { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 999px; background: var(--soft); color: var(--fg); }
.pill.flame { color: var(--flame); } .pill.green { color: var(--green); }
.story-ring { padding: 2.5px; border-radius: 50%; background: linear-gradient(135deg, var(--accent), #b65cff); flex: none; } .story-ring.seen { background: var(--soft-2); }
.story-ring .avatar { box-shadow: 0 0 0 2.5px var(--bg); }

/* ---------- vrienden ---------- */
.profile-card { display: flex; align-items: center; gap: 14px; margin: 6px 16px 10px; padding: 14px; width: calc(100% - 32px); border-radius: 20px; background: var(--soft); text-align: left; }
.profile-card .name { font-size: 18px; }
.sugg { display: flex; gap: 10px; padding: 4px 16px 6px; }
.sugg-card { flex: none; width: 132px; background: var(--soft); border-radius: 18px; padding: 14px 10px; display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; }
.sugg-card .avatar.lg { width: 64px; height: 64px; }
.sugg-card b { font-size: 13.5px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .sugg-card span { font-size: 11.5px; color: var(--muted); }
.online-strip { display: flex; gap: 14px; padding: 6px 18px; }
.online-av { display: flex; flex-direction: column; align-items: center; gap: 4px; width: 58px; flex: none; font-size: 11.5px; color: var(--muted); }
.online-av span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.add-actions, .gi-actions { display: flex; justify-content: center; gap: 10px; padding: 8px 16px 12px; }
.abtn { flex: 1; max-width: 120px; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 6px; border-radius: var(--radius); background: var(--soft); font-size: 12px; font-weight: 620; transition: background .12s; }
.abtn:hover { background: var(--soft-2); } .abtn .i { color: var(--accent); }
.qr-wrap { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 6px 20px 14px; }
.qr-box { width: 230px; height: 230px; background: #fff; border-radius: 22px; padding: 14px; position: relative; box-shadow: 0 0 0 1px var(--line); }
.qr-box svg { width: 100%; height: 100%; display: block; }
.qr-av { position: absolute; left: 50%; top: 50%; width: 54px; height: 54px; transform: translate(-50%, -50%); border-radius: 50%; box-shadow: 0 0 0 5px #fff; overflow: hidden; }
.qr-av svg { width: 100%; height: 100%; }
.scan-frame { position: absolute; width: 64%; aspect-ratio: 1; border: 3px solid #fff; border-radius: 26px; box-shadow: 0 0 0 9999px rgba(0,0,0,.45); }

/* profielpagina */
.p-top { display: flex; flex-direction: column; align-items: center; padding: 10px 20px 8px; text-align: center; }
.p-top h2 { margin: 10px 0 2px; font-size: 24px; letter-spacing: -.5px; }
.p-hero { width: 150px; height: 150px; border-radius: 50%; overflow: hidden; position: relative; box-shadow: var(--shadow); }
.p-hero svg { width: 100%; height: 100%; display: block; }
.p-hero.editable { cursor: pointer; overflow: visible; }
.p-hero.editable svg { border-radius: 50%; }
.p-edit { position: absolute; right: 4px; bottom: 6px; width: 36px; height: 36px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; box-shadow: 0 0 0 3px var(--bg); }
.p-bio { margin: 8px 0 0; color: var(--fg); max-width: 320px; white-space: pre-wrap; }
.p-list { padding: 6px 0 24px; }

/* ---------- chatlijst & peek ---------- */
.peek { position: absolute; inset: 0; z-index: 8; background: transparent; }
.peek-panel { position: absolute; top: 0; bottom: 0; left: 0; width: 100%; background: var(--bg); transform: translateX(-100%); display: flex; flex-direction: column; box-shadow: 10px 0 30px rgba(0,0,0,.2); padding-top: var(--safe-t); }
.peek-head { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.peek-badge { margin-left: auto; font-size: 11.5px; font-weight: 650; color: var(--accent); display: inline-flex; gap: 4px; align-items: center; background: color-mix(in srgb, var(--accent) 12%, transparent); padding: 4px 9px; border-radius: 999px; }
.peek-msgs { flex: 1; overflow: hidden; padding: 14px; display: flex; flex-direction: column; gap: 5px; justify-content: flex-end; }
.pm { max-width: 80%; padding: 8px 12px; border-radius: 16px; font-size: 14px; overflow-wrap: anywhere; }
.pm.me { align-self: flex-end; background: var(--bubble-me); color: var(--bubble-me-fg); } .pm.them { align-self: flex-start; background: var(--bubble-them); }
.pm .pt { font-size: 10.5px; opacity: .6; margin-left: 8px; } .pm.sys, .pm.snapline { align-self: center; background: transparent; color: var(--muted); font-size: 12.5px; display: inline-flex; gap: 6px; align-items: center; }
.pm.sticker-mini { background: transparent; padding: 0; } .pm.sticker-mini .sticker { width: 80px; height: 80px; }
.peek-hint { text-align: center; color: var(--muted); font-size: 12px; padding: 10px 16px calc(14px + var(--safe-b)); }

/* ---------- stories ---------- */
.story-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px 8px; padding: 8px 14px 6px; }
.story-tile { display: flex; flex-direction: column; align-items: center; gap: 5px; text-align: center; min-width: 0; }
.story-tile .avatar.lg { width: 76px; height: 76px; }
.story-tile b { font-size: 13px; font-weight: 620; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.story-tile span { font-size: 11.5px; color: var(--muted); }
.story-grid.muted { opacity: .55; }
.plus { position: relative; flex: none; } .plus-badge { position: absolute; right: -2px; bottom: -2px; width: 20px; height: 20px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; box-shadow: 0 0 0 2.5px var(--bg); }
.story-av { background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent); }

/* ---------- camera ---------- */
.camera { position: absolute; inset: 0; background: #000; overflow: hidden; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; color: #fff; touch-action: none; }
.camera video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transform: scale(var(--dz, 1)); transition: filter .25s; }
.camera video.mirror { transform: scaleX(-1) scale(var(--dz, 1)); }
.cam-grid { position: absolute; inset: 0; pointer-events: none; background:
  linear-gradient(90deg, transparent calc(33.33% - .5px), rgba(255,255,255,.35) 33.33%, transparent calc(33.33% + .5px), transparent calc(66.66% - .5px), rgba(255,255,255,.35) 66.66%, transparent calc(66.66% + .5px)),
  linear-gradient(180deg, transparent calc(33.33% - .5px), rgba(255,255,255,.35) 33.33%, transparent calc(33.33% + .5px), transparent calc(66.66% - .5px), rgba(255,255,255,.35) 66.66%, transparent calc(66.66% + .5px)); }
.front-flash { position: absolute; inset: 0; background: #fff8ec; opacity: 0; pointer-events: none; transition: opacity .12s; z-index: 4; } .front-flash.on { opacity: 1; }
.cam-count { position: absolute; inset: 0; display: grid; place-items: center; font-size: 110px; font-weight: 800; text-shadow: 0 4px 30px rgba(0,0,0,.5); z-index: 3; }
.filter-name { position: absolute; top: 42%; font-size: 22px; font-weight: 700; opacity: 0; text-shadow: 0 2px 12px rgba(0,0,0,.6); pointer-events: none; }
.filter-name.show { animation: fname 1.1s ease-out; }
@keyframes fname { 0% { opacity: 0; transform: translateY(8px); } 20%, 70% { opacity: 1; transform: none; } 100% { opacity: 0; } }
.filter-dots { position: relative; z-index: 2; display: flex; gap: 5px; margin-bottom: 10px; }
.filter-dots i { width: 5px; height: 5px; border-radius: 50%; background: rgba(255,255,255,.4); } .filter-dots i.on { background: #fff; width: 14px; border-radius: 3px; }
.camera .nocam { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; color: #aeb2ba; padding: 32px; gap: 16px; }
.camera .nocam .btn { background: #fff; color: #000; }
.cam-side { position: absolute; right: 12px; top: calc(70px + var(--safe-t)); display: flex; flex-direction: column; gap: 10px; z-index: 2; }
.cam-side .round b { font-size: 12px; }
.zoom-chip { position: absolute; bottom: 160px; background: rgba(0,0,0,.5); border-radius: 999px; padding: 4px 12px; font-size: 13px; font-weight: 700; opacity: 0; transition: opacity .2s; z-index: 2; } .zoom-chip.show { opacity: 1; }
.camera .controls { position: relative; z-index: 2; display: flex; align-items: center; justify-content: space-around; width: 100%; padding: 0 24px 24px; }
.shutter { width: 84px; height: 84px; border-radius: 50%; border: 5px solid #fff; background: transparent; position: relative; touch-action: none; transition: transform .12s; }
.shutter::after { content: ""; position: absolute; inset: 6px; border-radius: 50%; background: rgba(255,255,255,.22); transition: background .15s, inset .15s, border-radius .15s; }
.shutter:active { transform: scale(.93); } .shutter.rec { border-color: rgba(255,255,255,.4); transform: scale(1.12); }
.shutter.rec::after { background: var(--red); inset: 22px; border-radius: 9px; }
.shutter svg { position: absolute; inset: -5px; width: 84px; height: 84px; transform: rotate(-90deg); pointer-events: none; }
.round { width: 44px; height: 44px; border-radius: 50%; background: rgba(20,20,22,.45); color: #fff; display: grid; place-items: center; backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); transition: background .12s, transform .08s; flex: none; }
.round:active { transform: scale(.93); } .round.on { background: #fff; color: #000; } .round.lg { width: 50px; height: 50px; }
.camera .hint { position: relative; z-index: 2; font-size: 12px; margin-bottom: 8px; color: rgba(255,255,255,.8); letter-spacing: .2px; text-shadow: 0 1px 4px rgba(0,0,0,.6); }
.camera .pre { position: absolute; top: calc(66px + var(--safe-t)); left: 0; right: 64px; text-align: center; z-index: 2; }
.chip { display: inline-flex; align-items: center; gap: 8px; background: rgba(20,20,22,.55); color: #fff; padding: 6px 12px; border-radius: 999px; font-size: 12.5px; font-weight: 550; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.chip button { display: grid; place-items: center; color: #fff; }
.ibtn.glass { background: rgba(20,20,22,.4); backdrop-filter: blur(10px); color: #fff; }

/* ---------- overlays ---------- */
#overlay { position: absolute; inset: 0; pointer-events: none; z-index: 20; }
#overlay > * { pointer-events: auto; }
.full { position: absolute; inset: 0; background: var(--bg); display: flex; flex-direction: column; animation: slidein .24s cubic-bezier(.2,.8,.2,1); }
@keyframes slidein { from { transform: translateX(30px); opacity: 0; } }
.page-body { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding-bottom: calc(16px + var(--safe-b)); }
.chat-head { display: flex; align-items: center; gap: 6px; padding: calc(8px + var(--safe-t)) 6px 8px 4px; border-bottom: 1px solid var(--line); background: var(--bg); z-index: 2; min-height: 58px; }
.chat-head .title { flex: 1; min-width: 0; text-align: left; display: flex; align-items: center; gap: 11px; padding: 4px; border-radius: 12px; }
.head-title { font-size: 17px; }
.typing-sub { color: var(--accent) !important; font-weight: 600; }
.ret-pill { display: inline-flex; align-items: center; gap: 3px; font-size: 11px; font-weight: 650; color: var(--accent); }
.ibtn { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; color: var(--fg); transition: background .12s; flex: none; }
.ibtn:hover, .ibtn:active { background: var(--soft); } .ibtn.sm { width: 34px; height: 34px; } .ibtn.sm .i { width: 20px; height: 20px; color: var(--muted); }

/* ---------- chat ---------- */
.msgs-wrap { flex: 1; position: relative; min-height: 0; background-size: cover; background-position: center; }
.msgs { position: absolute; inset: 0; overflow-y: auto; padding: 10px 12px 6px; display: flex; flex-direction: column; overscroll-behavior: contain; }
.msgs-loading { flex: 1; display: grid; place-items: center; padding: 40px; }
.chat-start { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 24px 20px 18px; text-align: center; color: var(--muted); font-size: 13px; }
.chat-start b { color: var(--fg); font-size: 17px; margin-top: 4px; }
.e2e { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; color: var(--muted); }
.load-older { align-self: center; font-size: 12.5px; font-weight: 600; color: var(--accent); padding: 8px 14px; border-radius: 999px; background: var(--soft); margin: 8px 0; }
.daysep { display: flex; justify-content: center; margin: 14px 0 6px; } .daysep span { font-size: 11.5px; font-weight: 650; color: var(--muted); background: var(--bg); padding: 3px 10px; border-radius: 999px; box-shadow: 0 0 0 1px var(--line); }
.wp .daysep span, .wp .sysmsg, .wp .callmsg, .wp .receipt, .wp .msgname { background: color-mix(in srgb, var(--bg) 85%, transparent); backdrop-filter: blur(6px); border-radius: 999px; }
.wp .msgname { padding: 1px 8px; }
.mrow { display: flex; flex-direction: column; padding-left: 10px; position: relative; transition: transform .15s; touch-action: pan-y; }
.mrow.me { align-items: flex-end; padding-left: 0; padding-right: 0; }
.mrow::before { content: ""; position: absolute; left: 0; top: 2px; bottom: 2px; width: 3px; border-radius: 2px; background: var(--accent); opacity: .9; }
.mrow.me::before { background: var(--red); }
.mrow:not(.first)::before { top: -1px; }
.mrow.me { padding-right: 10px; } .mrow.me::before { left: auto; right: 0; }
.mrow.saved .msg { box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--yellow) 80%, transparent); }
.mrow.first { margin-top: 8px; }
.mrow.flash .msg { animation: flash 1.2s; }
@keyframes flash { 30% { box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 40%, transparent); } }
.mrow.reply-ready::after { content: ""; position: absolute; left: -26px; top: 50%; width: 20px; height: 20px; margin-top: -10px; border-radius: 50%; background: var(--accent); }
.msgname { font-size: 11.5px; font-weight: 750; letter-spacing: .3px; text-transform: uppercase; color: var(--accent); margin: 0 0 2px; align-self: flex-start; }
.msgname.me { color: var(--red); align-self: flex-end; }
.mline { display: flex; flex-direction: column; max-width: 82%; } .mrow.me .mline { align-items: flex-end; }
.msg { position: relative; padding: 7px 12px 7px; border-radius: 18px; overflow-wrap: anywhere; white-space: pre-wrap; margin: 1px 0; max-width: 100%; user-select: text; -webkit-user-select: text; }
.msg.them { background: var(--bubble-them); color: var(--bubble-them-fg); border-top-left-radius: 6px; }
.msg.me { background: var(--bubble-me); color: var(--bubble-me-fg); border-top-right-radius: 6px; }
.mrow:not(.first) .msg.them { border-top-left-radius: 6px; } .mrow:not(.last) .msg.them { border-bottom-left-radius: 6px; }
.mrow:not(.first) .msg.me { border-top-right-radius: 6px; } .mrow:not(.last) .msg.me { border-bottom-right-radius: 6px; }
.mtext a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.mtime { font-size: 10.5px; opacity: .55; margin-left: 8px; float: right; margin-top: 6px; line-height: 1; user-select: none; }
.msg.big-emoji { background: transparent !important; font-size: 40px; line-height: 1.15; padding: 0 2px; }
.msg.big-emoji .mtime { display: none; }
.msg.sticker-msg { background: transparent !important; padding: 0; }
.saved-tag { position: absolute; top: -6px; right: -6px; width: 20px; height: 20px; border-radius: 50%; background: var(--yellow); color: #fff; display: grid; place-items: center; }
.quote { display: flex; flex-direction: column; text-align: left; border-left: 3px solid currentColor; padding: 3px 8px; margin: 1px 0 5px; border-radius: 6px; background: rgba(0,0,0,.08); font-size: 12.5px; max-width: 100%; opacity: .9; }
.msg.me .quote { background: rgba(255,255,255,.18); }
.quote b { font-size: 12px; } .quote span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.storyref { font-size: 11.5px; font-weight: 650; opacity: .75; display: flex; align-items: center; gap: 5px; margin-bottom: 3px; }
.reacts { display: flex; gap: 3px; margin: -6px 6px 2px; z-index: 1; }
.react { background: var(--bg); box-shadow: 0 0 0 1.5px var(--line), 0 2px 6px rgba(0,0,0,.08); border-radius: 999px; padding: 1px 6px; font-size: 13px; display: inline-flex; align-items: center; gap: 3px; }
.react.mine { box-shadow: 0 0 0 1.5px var(--accent); } .react b { font-size: 11px; color: var(--muted); }
.media-msg { padding: 4px; } .media-msg .mtext { padding: 4px 8px 2px; }
.media-box { position: relative; width: 240px; max-width: 100%; aspect-ratio: 4 / 5; max-height: 340px; border-radius: 14px; overflow: hidden; background: var(--soft-2); display: grid; place-items: center; cursor: zoom-in; }
.media-box img, .media-box video { width: 100%; height: 100%; object-fit: cover; display: block; }
.play-ov { position: absolute; width: 46px; height: 46px; border-radius: 50%; background: rgba(0,0,0,.5); color: #fff; display: grid; place-items: center; }
.play-ov.sm { width: 26px; height: 26px; right: 6px; bottom: 6px; }
.media-msg .mtime { position: absolute; right: 12px; bottom: 10px; color: #fff; opacity: .9; text-shadow: 0 1px 3px rgba(0,0,0,.6); margin: 0; }
.voice { display: flex; align-items: center; gap: 10px; min-width: 200px; padding: 2px 0; }
.vplay { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.22); flex: none; }
.msg.them .vplay { background: var(--accent); color: #fff; }
.vplay .i { width: 16px; height: 16px; }
.vwave { flex: 1; display: flex; align-items: center; gap: 2px; height: 30px; cursor: pointer; }
.vwave i { flex: 1; min-width: 2px; border-radius: 2px; background: currentColor; opacity: .35; }
.vwave i.on { opacity: 1; }
.vtime { font-size: 12px; font-variant-numeric: tabular-nums; opacity: .8; }
.voice-msg .mtime { display: none; }
.sticker { width: 130px; height: 130px; position: relative; display: block; }
.sticker svg { width: 100%; height: 100%; display: block; filter: drop-shadow(0 3px 6px rgba(0,0,0,.15)); }
.sticker.duo { width: 170px; display: flex; } .sticker.duo .st-a, .sticker.duo .st-b { width: 100px; height: 130px; flex: none; } .sticker.duo .st-b { margin-left: -30px; }
.st-cap { position: absolute; left: 50%; bottom: 2px; transform: translateX(-50%) rotate(-4deg); background: #fff; color: #111; font-weight: 850; font-size: 13px; padding: 3px 10px; border-radius: 10px; box-shadow: 0 2px 0 #111, 0 0 0 2px #111; white-space: nowrap; letter-spacing: .3px; }
.sysmsg { align-self: center; text-align: center; color: var(--muted); font-size: 12px; padding: 4px 12px; max-width: 90%; margin: 8px 0; }
.snapmsg { display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border-radius: 12px; font-weight: 650; font-size: 13.5px; border: 1.5px solid; margin: 2px 0; background: var(--bg); }
.snapmsg .i { width: 16px; height: 16px; }
.snapmsg.in-new { color: var(--red); border-color: var(--red); cursor: pointer; background: color-mix(in srgb, var(--red) 8%, var(--bg)); }
.snapmsg.in-open, .snapmsg.out-open { color: var(--muted); border-color: var(--line); }
.snapmsg.out-new { color: var(--red); border-color: var(--red); }
.callmsg { align-self: center; display: inline-flex; align-items: center; gap: 7px; color: var(--muted); font-size: 12.5px; padding: 6px 8px 6px 12px; margin: 8px 0; background: var(--soft); border-radius: 999px; }
.callmsg .i { width: 15px; height: 15px; } .callmsg.missed { color: var(--red); } .callmsg .ct { opacity: .7; }
.callback { width: 26px; height: 26px; border-radius: 50%; background: var(--bg); display: grid; place-items: center; color: var(--accent); }
.receipt { align-self: flex-end; font-size: 11.5px; color: var(--muted); display: inline-flex; gap: 4px; align-items: center; margin: 4px 4px 2px; padding: 1px 6px; }
.typing { min-height: 0; padding: 0 14px; }
.typing-bubble { display: inline-flex; align-items: center; gap: 6px; padding: 4px 0 6px; }
.typing-bubble .avatar.sm { width: 24px; height: 24px; font-size: 11px; }
.dots { display: inline-flex; gap: 3px; background: var(--bubble-them); padding: 9px 11px; border-radius: 14px; }
.dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--muted); animation: bounce 1.2s infinite; } .dots i:nth-child(2) { animation-delay: .15s; } .dots i:nth-child(3) { animation-delay: .3s; }
@keyframes bounce { 0%, 60%, 100% { transform: none; opacity: .5; } 30% { transform: translateY(-4px); opacity: 1; } }
.composer-wrap { background: var(--bg); border-top: 1px solid var(--line); padding-bottom: var(--safe-b); }
.cbar { display: flex; align-items: center; gap: 10px; padding: 8px 10px 0 16px; color: var(--accent); }
.cbar .grow { display: flex; flex-direction: column; border-left: 3px solid var(--accent); padding-left: 8px; }
.cbar b { font-size: 12.5px; } .cbar span { font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.composer { display: flex; gap: 6px; padding: 8px 8px 8px; align-items: flex-end; }
.composer .cam { background: var(--soft); }
.cfield { flex: 1; display: flex; align-items: flex-end; background: var(--soft); border-radius: 22px; padding: 3px 4px 3px 14px; min-height: 42px; border: 1px solid transparent; transition: border-color .15s; }
.cfield:focus-within { border-color: var(--line); background: var(--bg); }
.cfield textarea { flex: 1; border: 0; outline: none; background: transparent; resize: none; padding: 8px 0; max-height: 140px; line-height: 1.35; }
.composer .send { background: var(--accent); color: #fff; border-radius: 50%; width: 42px; height: 42px; display: grid; place-items: center; flex: none; transition: transform .1s; }
.composer .send:active { transform: scale(.92); }
.composer.recording { align-items: center; padding: 10px 8px; }
.rec-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--red); animation: blink 1s infinite; flex: none; }
@keyframes blink { 50% { opacity: .25; } }
.rec-time { font-variant-numeric: tabular-nums; font-weight: 650; min-width: 40px; }
.rec-wave { flex: 1; display: flex; align-items: center; gap: 2px; height: 32px; overflow: hidden; justify-content: flex-end; color: var(--red); }
.rec-wave i { width: 3px; flex: none; border-radius: 2px; background: currentColor; }
.react-bar { display: flex; justify-content: space-between; gap: 4px; padding: 4px 16px 10px; }
.rb { font-size: 27px; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; transition: transform .1s, background .1s; }
.rb:hover { background: var(--soft); transform: scale(1.12); } .rb.more { font-size: 15px; background: var(--soft); }
.emoji-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 2px; padding: 4px 12px 12px; max-height: 40vh; overflow-y: auto; }
.emoji-grid button { font-size: 25px; aspect-ratio: 1; border-radius: 10px; } .emoji-grid button:hover { background: var(--soft); }
.st-picker { padding: 0 8px 8px; }
.st-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; max-height: 46vh; overflow-y: auto; padding: 4px 8px; }
.st-cell { border-radius: 14px; padding: 4px; display: grid; place-items: center; } .st-cell:hover { background: var(--soft); }
.st-cell .sticker { width: 100%; height: auto; aspect-ratio: 1; } .st-cell .sticker.duo { width: 100%; } .st-cell .sticker.duo .st-a, .st-cell .sticker.duo .st-b { width: 62%; height: auto; aspect-ratio: 10/13; }
.st-cell > svg { width: 100%; height: auto; aspect-ratio: 1; }
.seg { display: flex; background: var(--soft); border-radius: 12px; padding: 3px; gap: 3px; margin: 0 8px 6px; }
.seg button { flex: 1; padding: 7px 10px; border-radius: 9px; font-size: 13px; font-weight: 620; color: var(--muted); transition: background .12s, color .12s; }
.seg button.on { background: var(--bg); color: var(--fg); box-shadow: 0 1px 4px rgba(0,0,0,.08); }
.seg.wide { margin: 0; }

/* wallpapers (verlopen + patronen) */
.wp-0 { background: linear-gradient(160deg, #e0eafc, #cfdef3); } .wp-1 { background: linear-gradient(160deg, #fbd3e9, #bb377d33); }
.wp-2 { background: linear-gradient(160deg, #d4fc79, #96e6a1); } .wp-3 { background: linear-gradient(160deg, #a1c4fd, #c2e9fb); }
.wp-4 { background: linear-gradient(160deg, #ffecd2, #fcb69f); } .wp-5 { background: linear-gradient(160deg, #cfd9df, #e2ebf0); }
.wp-6 { background: linear-gradient(160deg, #667eea, #764ba2); } .wp-7 { background: linear-gradient(160deg, #0f2027, #2c5364); }
.wp-8 { background: linear-gradient(160deg, #f093fb, #f5576c); } .wp-9 { background: linear-gradient(160deg, #43e97b, #38f9d7); }
.wp-10 { background: linear-gradient(160deg, #141e30, #243b55); } .wp-11 { background: linear-gradient(160deg, #fddb92, #d1fdff); }
.wp-12 { background-color: #fff6e0; background-image: radial-gradient(#f4b740 1.4px, transparent 1.5px); background-size: 18px 18px; }
.wp-13 { background-color: #eef2ff; background-image: linear-gradient(45deg, #dfe6ff 25%, transparent 25%, transparent 75%, #dfe6ff 75%), linear-gradient(45deg, #dfe6ff 25%, transparent 25%, transparent 75%, #dfe6ff 75%); background-size: 24px 24px; background-position: 0 0, 12px 12px; }
.wp-14 { background-color: #1a1027; background-image: radial-gradient(rgba(255,255,255,.5) 1px, transparent 1.2px), radial-gradient(rgba(255,255,255,.25) 1px, transparent 1.2px); background-size: 40px 40px, 23px 23px; background-position: 0 0, 11px 17px; }
.wp-15 { background-color: #e8fbf3; background-image: repeating-linear-gradient(-45deg, transparent 0 12px, #c9f2e0 12px 14px); }
.wp-photo { background-color: #222; }
.wp-6 .chat-start, .wp-7 .chat-start, .wp-10 .chat-start, .wp-14 .chat-start, .wp-photo .chat-start, .wp-6 .e2e, .wp-7 .e2e, .wp-10 .e2e, .wp-14 .e2e, .wp-photo .e2e { color: rgba(255,255,255,.85); }
.wp-6 .chat-start b, .wp-7 .chat-start b, .wp-10 .chat-start b, .wp-14 .chat-start b, .wp-photo .chat-start b { color: #fff; }
.wp-6 .msg.them, .wp-7 .msg.them, .wp-10 .msg.them, .wp-14 .msg.them, .wp-photo .msg.them { background: rgba(255,255,255,.92); color: #0e1116; }
.wp-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; padding: 6px 16px 14px; }
.wp-opt { aspect-ratio: 3 / 4; border-radius: 12px; box-shadow: inset 0 0 0 1px var(--line); font-size: 12px; font-weight: 600; color: var(--muted); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; }
.wp-opt.on { box-shadow: 0 0 0 3px var(--accent); }
.wp-opt.none, .wp-opt.photo { background: var(--soft); }

/* ---------- media viewer ---------- */
.viewer { position: absolute; inset: 0; background: #000; color: #fff; display: flex; align-items: center; justify-content: center; animation: fade .18s; z-index: 6; }
@keyframes fade { from { opacity: 0; } }
.viewer img, .viewer video { max-width: 100%; max-height: 100%; width: 100%; height: 100%; object-fit: contain; }
.viewer .cap { position: absolute; left: 0; right: 0; top: 58%; background: rgba(0,0,0,.55); text-align: center; padding: 10px 18px; font-size: 17px; overflow-wrap: anywhere; }
.viewer .count { position: absolute; top: calc(18px + var(--safe-t)); right: 16px; width: 38px; height: 38px; border-radius: 50%; background: rgba(0,0,0,.45); display: grid; place-items: center; font-weight: 750; font-size: 14px; border: 2px solid #fff; }
.viewer .from { position: absolute; top: calc(20px + var(--safe-t)); left: 16px; display: flex; align-items: center; gap: 10px; text-shadow: 0 1px 4px rgba(0,0,0,.7); z-index: 2; }
.viewer .from b { display: block; font-size: 14.5px; } .viewer .from span { display: block; font-size: 12px; opacity: .8; }
.snap-reply { position: absolute; bottom: calc(24px + var(--safe-b)); left: 50%; transform: translateX(-50%); background: rgba(255,255,255,.18); backdrop-filter: blur(10px); padding: 10px 18px; border-radius: 999px; font-weight: 650; display: inline-flex; gap: 8px; align-items: center; color: #fff; }
.media-viewer .mv-top { position: absolute; top: calc(14px + var(--safe-t)); left: 14px; right: 14px; display: flex; justify-content: space-between; }
.mv-cap { position: absolute; bottom: calc(90px + var(--safe-b)); left: 16px; right: 16px; text-align: center; background: rgba(0,0,0,.5); padding: 8px 14px; border-radius: 12px; }
.mv-actions { position: absolute; bottom: calc(20px + var(--safe-b)); left: 0; right: 0; display: flex; gap: 10px; justify-content: center; }
.story-stage { position: absolute; inset: 0; display: grid; place-items: center; }
.bars { position: absolute; top: calc(8px + var(--safe-t)); left: 10px; right: 10px; display: flex; gap: 4px; z-index: 3; }
.bars i { flex: 1; height: 2.5px; border-radius: 2px; background: rgba(255,255,255,.3); overflow: hidden; }
.bars i b { display: block; height: 100%; width: 0; background: #fff; } .bars i.done b { width: 100%; }
.viewer .tap { position: absolute; top: 90px; bottom: 110px; width: 38%; z-index: 2; } .viewer .tap.l { left: 0; } .viewer .tap.r { right: 0; }
.viewer .foot { position: absolute; bottom: calc(16px + var(--safe-b)); left: 0; right: 0; display: flex; justify-content: center; gap: 10px; z-index: 3; padding: 0 14px; }
.viewer .vclose { position: absolute; right: 14px; top: calc(50px + var(--safe-t)); z-index: 4; }
.story-reply { width: 100%; display: flex; flex-direction: column; gap: 8px; }
.story-input { width: 100%; padding: 12px 18px; border-radius: 999px; border: 1.5px solid rgba(255,255,255,.5); background: rgba(0,0,0,.3); color: #fff; outline: none; }
.story-input::placeholder { color: rgba(255,255,255,.7); }
.story-reply .quick { display: flex; justify-content: center; gap: 8px; } .story-reply .quick button { font-size: 26px; width: 44px; height: 44px; border-radius: 50%; background: rgba(255,255,255,.12); }
.fly { position: absolute; left: 50%; bottom: 120px; font-size: 64px; animation: fly 1.2s ease-out forwards; pointer-events: none; z-index: 5; }
@keyframes fly { to { transform: translate(-50%, -260px) scale(1.4); opacity: 0; } }

/* ---------- editor ---------- */
.editor { position: absolute; inset: 0; background: #0b0b0c; display: flex; flex-direction: column; color: #fff; animation: fade .18s; z-index: 5; }
.editor .stage { flex: 1; display: grid; place-items: center; position: relative; min-height: 0; overflow: hidden; }
.editor .wrap { position: relative; display: inline-block; max-width: 100%; max-height: 100%; line-height: 0; }
.editor .wrap img, .editor .wrap video { max-width: 100%; max-height: calc(100dvh - 120px); display: block; border-radius: 0; }
.editor canvas { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; } .editor canvas.pen { cursor: crosshair; z-index: 2; }
.ed-layer { position: absolute; inset: 0; overflow: hidden; } .ed-layer.locked { pointer-events: none; }
.ed-item { position: absolute; touch-action: none; user-select: none; cursor: grab; line-height: 1.2; white-space: pre; transform-origin: center; }
.ed-text { font-weight: 800; font-size: 26px; text-align: center; text-shadow: 0 2px 6px rgba(0,0,0,.45); }
.ed-text.s-bar { background: rgba(0,0,0,.55); padding: 6px 2000px; font-size: 19px; font-weight: 600; text-shadow: none; }
.ed-text.s-bold { font-size: 34px; -webkit-text-stroke: 1px rgba(0,0,0,.35); }
.ed-text.s-neon { color: #fff !important; text-shadow: 0 0 6px var(--c), 0 0 16px var(--c), 0 0 28px var(--c); font-size: 32px; }
.ed-text.s-type { font-family: ui-monospace, Menlo, monospace; font-weight: 600; font-size: 24px; }
.ed-sticker { width: 110px; height: 110px; } .ed-sticker svg { width: 100%; height: 100%; } .ed-sticker.emoji { width: auto; height: auto; font-size: 64px; line-height: 1; }
.ed-textedit { position: absolute; inset: 0; background: rgba(0,0,0,.55); z-index: 6; display: flex; flex-direction: column; padding: calc(14px + var(--safe-t)) 16px 16px; }
.ed-te-top { display: flex; justify-content: space-between; align-items: center; }
.ed-input { margin-top: 30%; background: transparent; border: 0; outline: none; text-align: center; font-size: 28px; font-weight: 800; resize: none; color: #fff; }
.ed-input.s-bar { background: rgba(0,0,0,.55); font-size: 19px; font-weight: 600; padding: 8px; } .ed-input.s-type { font-family: ui-monospace, Menlo, monospace; font-weight: 600; }
.ed-trash { position: absolute; bottom: 92px; left: 50%; transform: translateX(-50%) scale(.6); width: 56px; height: 56px; border-radius: 50%; background: rgba(0,0,0,.5); display: grid; place-items: center; opacity: 0; transition: .15s; pointer-events: none; z-index: 4; }
.ed-trash.show { opacity: 1; transform: translateX(-50%) scale(1); } .ed-trash.hot { background: var(--red); transform: translateX(-50%) scale(1.2); }
.editor .tools { position: absolute; right: 12px; top: calc(12px + var(--safe-t)); display: flex; flex-direction: column; gap: 10px; z-index: 4; }
.editor .colors { position: absolute; right: 66px; top: calc(16px + var(--safe-t)); display: flex; flex-direction: column; gap: 9px; z-index: 4; align-items: center; }
.editor .colors i { width: 24px; height: 24px; border-radius: 50%; border: 2.5px solid rgba(255,255,255,.95); display: block; transition: transform .1s; cursor: pointer; } .editor .colors i.sel { transform: scale(1.3); }
.editor .colors .size { writing-mode: vertical-lr; direction: rtl; height: 110px; width: 24px; accent-color: #fff; }
.editor .close { position: absolute; left: 12px; top: calc(12px + var(--safe-t)); z-index: 4; }
.editor .bottom { display: flex; align-items: center; padding: 10px 12px calc(12px + var(--safe-b)); gap: 8px; z-index: 4; }
.sendbtn { background: var(--accent); color: #fff; border-radius: 999px; padding: 12px 18px; font-weight: 750; display: inline-flex; align-items: center; gap: 8px; margin-left: auto; }
.storybtn { background: rgba(255,255,255,.14); color: #fff; border-radius: 999px; padding: 11px 14px; font-weight: 650; display: inline-flex; align-items: center; gap: 6px; }
.timerbtn { background: rgba(255,255,255,.14); border-radius: 999px; padding: 10px 13px; font-weight: 650; color: #fff; display: inline-flex; align-items: center; gap: 6px; font-size: 14px; }
.timerbtn span { display: inline-flex; }

/* ---------- avatar-editor ---------- */
.ae { display: flex; flex-direction: column; align-items: center; height: 100%; }
.ae-preview { width: 190px; height: 190px; margin: 12px auto 6px; border-radius: 50%; overflow: hidden; box-shadow: var(--shadow); flex: none; }
.ae-preview svg { width: 100%; height: 100%; }
.ae-moods { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; padding: 4px 14px 8px; }
.ae-mood { font-size: 12px; font-weight: 600; padding: 5px 11px; border-radius: 999px; background: var(--soft); }
.ae-tabs { display: flex; gap: 6px; padding: 6px 14px; width: 100%; flex: none; }
.ae-tab { padding: 8px 14px; border-radius: 999px; background: var(--soft); font-size: 13px; font-weight: 620; white-space: nowrap; flex: none; }
.ae-tab.on { background: var(--fg); color: var(--on-fg); }
.ae-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; padding: 10px 16px 24px; width: 100%; overflow-y: auto; }
.ae-grid.colors { grid-template-columns: repeat(6, 1fr); }
.ae-opt { aspect-ratio: 1; border-radius: 18px; overflow: hidden; background: var(--soft); box-shadow: inset 0 0 0 1px var(--line); transition: transform .1s; }
.ae-opt svg { width: 100%; height: 100%; display: block; }
.ae-grid.zoom .ae-opt svg { transform: scale(2.1) translateY(4%); }
.ae-opt.on { box-shadow: 0 0 0 3px var(--accent); }
.ae-opt i { display: block; width: 100%; height: 100%; }
.ae-grid.colors .ae-opt { border-radius: 50%; }

/* ---------- herinneringen ---------- */
.mem-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px; padding: 0 3px; }
.mem-cell { aspect-ratio: 3 / 4; background: var(--soft); position: relative; overflow: hidden; display: grid; place-items: center; }
.mem-cell img, .mem-cell video { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }

/* ---------- groepsinfo / instellingen ---------- */
.gi-body { flex: 1; overflow-y: auto; }
.gi-top { display: flex; flex-direction: column; align-items: center; padding: 22px 20px 8px; gap: 8px; text-align: center; }
.gi-top h2 { margin: 0; font-size: 22px; letter-spacing: -.4px; } .gi-top .editrow { display: flex; gap: 6px; align-items: center; justify-content: center; }
.gi-leave { padding: 8px 20px 28px; }
.gi-leave button { width: 100%; padding: 13px; border-radius: var(--radius); background: var(--soft); color: var(--red); font-weight: 650; }
.row.toggle { cursor: pointer; }
.tgl { position: relative; width: 46px; height: 28px; flex: none; }
.tgl input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.tgl i { position: absolute; inset: 0; border-radius: 999px; background: var(--soft-2); transition: background .15s; pointer-events: none; }
.tgl i::after { content: ""; position: absolute; left: 3px; top: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .18s; }
.tgl input:checked + i { background: var(--accent); } .tgl input:checked + i::after { transform: translateX(18px); }
.accents { display: flex; gap: 10px; flex-wrap: wrap; }
.accent { width: 34px; height: 34px; border-radius: 50%; color: #fff; display: grid; place-items: center; }
.accent.on { box-shadow: 0 0 0 3px var(--bg), 0 0 0 5px var(--fg); }

/* ---------- sheets ---------- */
.sheet { position: absolute; inset: 0; background: rgba(5,6,8,.5); display: flex; align-items: flex-end; z-index: 30; animation: fade .15s; }
.sheet.closing { animation: fadeout .18s forwards; } .sheet.closing .panel { animation: sheetdown .18s forwards; }
@keyframes fadeout { to { opacity: 0; } } @keyframes sheetdown { to { transform: translateY(40px); } }
.sheet .panel { background: var(--bg); color: var(--fg); width: 100%; max-height: 86%; border-radius: 24px 24px 0 0; display: flex; flex-direction: column; padding-bottom: var(--safe-b); animation: sheetup .26s cubic-bezier(.2,.8,.2,1); box-shadow: 0 -10px 40px rgba(0,0,0,.2); transition: transform .05s; }
.sheet .panel.dark { background: #16171a; color: #fff; }
@keyframes sheetup { from { transform: translateY(60px); opacity: 0; } }
.grab { width: 38px; height: 5px; border-radius: 3px; background: var(--soft-2); margin: 9px auto 0; flex: none; }
.sheet .panel h3 { margin: 0; padding: 12px 20px 8px; font-size: 17px; letter-spacing: -.2px; }
.sheet .panel p.lead, .sheet .lead { margin: 0; padding: 0 20px 10px; color: var(--muted); font-size: 14px; }
.sheet .panel .hd { padding: 0 20px 10px; display: flex; flex-direction: column; gap: 8px; }
.sheet .panel .scroll { overflow-y: auto; flex: 1; }
.sheet .panel .foot { padding: 12px 20px 14px; display: flex; gap: 10px; justify-content: flex-end; align-items: center; border-top: 1px solid var(--line); }
.sel-count { margin-right: auto; font-size: 13px; color: var(--muted); }
.actions { display: flex; flex-direction: column; padding: 2px 8px 10px; overflow-y: auto; }
.act { display: flex; align-items: center; gap: 14px; padding: 13px 14px; border-radius: 12px; text-align: left; font-weight: 550; }
.act:hover { background: var(--soft); } .act .i { color: var(--muted); } .act.danger, .act.danger .i { color: var(--red); }
.check { width: 24px; height: 24px; border-radius: 50%; border: 1.8px solid var(--soft-2); display: grid; place-items: center; color: #fff; flex: none; transition: background .12s; }
.check .i { width: 14px; height: 14px; stroke-width: 2.6; opacity: 0; }
.row.sel .check { background: var(--accent); border-color: var(--accent); } .row.sel .check .i { opacity: 1; }

/* ---------- bellen ---------- */
.call { position: absolute; inset: 0; background: radial-gradient(120% 80% at 50% 0%, #1b2030, #0a0b0e 70%); color: #fff; display: flex; flex-direction: column; animation: fade .2s; z-index: 40; }
.call-in { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 24px; gap: 6px; }
.call-in .avatar { margin-bottom: 18px; }
.call-in h2 { margin: 0; font-size: 26px; font-weight: 650; letter-spacing: -.5px; } .call-in p { margin: 0; color: #a0a6b1; font-size: 14px; }
.call-in .e2e { color: #7d838e; margin-top: 10px; }
.call.pulse .call-in .avatar, .call.pulse .call-in .avatar-stack { animation: pulse 1.6s infinite; border-radius: 50%; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(255,255,255,.25); } 100% { box-shadow: 0 0 0 34px rgba(255,255,255,0); } }
.call-head { padding: calc(12px + var(--safe-t)) 14px 6px; display: flex; align-items: center; gap: 12px; }
.call-head h2 { margin: 0; font-size: 17px; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.call-head p { margin: 2px 0 0; font-size: 13px; color: #a0a6b1; font-variant-numeric: tabular-nums; }
.call-head .count { display: inline-flex; align-items: center; gap: 6px; background: rgba(255,255,255,.08); border-radius: 999px; padding: 6px 12px; font-size: 13px; font-weight: 650; color: #d0d4db; }
.call-grid { flex: 1; display: grid; gap: 8px; padding: 6px 10px; min-height: 0; grid-template-columns: 1fr; grid-auto-rows: 1fr; }
.call-grid[data-count="3"], .call-grid[data-count="4"], .call-grid[data-count="5"] { grid-template-columns: 1fr 1fr; }
.call-grid.has-pin { grid-template-columns: 1fr 1fr 1fr; grid-template-rows: 3fr 1fr; }
.call-grid.has-pin .tile.pinned { grid-column: 1 / -1; grid-row: 1; }
.tile { position: relative; background: #151820; border-radius: 20px; overflow: hidden; display: grid; place-items: center; min-height: 0; box-shadow: inset 0 0 0 1px #20242c; transition: box-shadow .15s; cursor: pointer; }
.tile.speaking { box-shadow: inset 0 0 0 3px var(--accent); }
.tile video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .2s; }
.tile.screen video { object-fit: contain; background: #000; }
.tile.has-video video { opacity: 1; }
.tile .tile-av { transition: opacity .2s; } .tile.has-video .tile-av { opacity: 0; }
.tile .tile-name { position: absolute; left: 10px; bottom: 9px; font-size: 12.5px; font-weight: 650; text-shadow: 0 1px 4px rgba(0,0,0,.7); display: flex; align-items: center; gap: 5px; background: rgba(0,0,0,.35); padding: 3px 9px; border-radius: 999px; }
.tile .tile-mic .i { color: var(--red); }
.tile .tile-state { position: absolute; left: 0; right: 0; top: 58%; text-align: center; font-size: 12.5px; color: #c8ccd4; }
.tile.has-video .tile-state { top: auto; bottom: 40px; }
.tile-q { position: absolute; right: 10px; top: 10px; color: var(--green); opacity: .9; }
.tile-q[data-q="2"] { color: var(--yellow); } .tile-q[data-q="1"] { color: var(--red); } .tile-q[data-q="0"] { display: none; }
.tile[data-state="ringing"] .tile-av { animation: pulse 1.6s infinite; border-radius: 50%; }
.call.audio-only .call-grid[data-count="1"] .tile { background: transparent; box-shadow: none; }
.call.audio-only .call-grid[data-count="1"] .tile .avatar.lg { width: 140px; height: 140px; }
.call .local { position: absolute; right: 16px; top: calc(80px + var(--safe-t)); width: 100px; height: 144px; object-fit: cover; border-radius: 16px; background: #222; z-index: 2; box-shadow: 0 6px 20px rgba(0,0,0,.5); touch-action: none; cursor: move; }
.call .local.mirror { transform: scaleX(-1); }
.call-ctl { padding: 12px 10px calc(22px + var(--safe-b)); display: flex; gap: 10px; align-items: flex-start; justify-content: center; flex-wrap: wrap; }
.cbtn { width: 56px; display: flex; flex-direction: column; align-items: center; gap: 6px; color: #fff; }
.cbtn > .i { width: 56px; height: 56px; padding: 16px; border-radius: 50%; background: rgba(255,255,255,.1); transition: transform .1s, background .12s; box-sizing: border-box; }
.cbtn:hover > .i { background: rgba(255,255,255,.18); } .cbtn:active > .i { transform: scale(.93); }
.cbtn.on > .i { background: #fff; color: #000; } .cbtn.end > .i, .cbtn.no > .i { background: var(--red); } .cbtn.yes > .i { background: var(--green); }
.cbtn.yes.alt > .i { background: rgba(31,183,104,.25); color: var(--green); }
.clbl { font-size: 11px; color: #b6bac2; font-weight: 550; white-space: nowrap; }
.cbtn.sm { width: 40px; } .cbtn.sm > .i { width: 40px; height: 40px; padding: 10px; }
.call.incoming .call-ctl { padding-bottom: calc(52px + var(--safe-b)); gap: 22px; }
.call.incoming .cbtn { width: 68px; } .call.incoming .cbtn > .i { width: 68px; height: 68px; padding: 20px; }
.call-react { position: absolute; inset: 0; pointer-events: none; overflow: hidden; z-index: 3; }
.float-react { position: absolute; bottom: 120px; display: flex; flex-direction: column; align-items: center; animation: rise 2.6s ease-out forwards; }
.float-react span { font-size: 44px; } .float-react small { font-size: 11px; background: rgba(0,0,0,.4); padding: 1px 7px; border-radius: 999px; }
@keyframes rise { to { transform: translateY(-340px); opacity: 0; } }
.call-mini { position: absolute; right: 12px; top: calc(70px + var(--safe-t)); width: 150px; background: #12141a; color: #fff; border-radius: 18px; box-shadow: 0 10px 30px rgba(0,0,0,.4); overflow: hidden; z-index: 35; display: flex; flex-direction: column; touch-action: none; cursor: pointer; }
.call-mini video { width: 100%; height: 0; object-fit: cover; display: block; } .call-mini.has-video video { height: 110px; }
.mini-info { padding: 8px 10px 0; display: flex; flex-direction: column; } .mini-info b { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .mini-info span { font-size: 12px; color: var(--green); font-variant-numeric: tabular-nums; }
.call-mini .cbtn { align-self: flex-end; margin: -32px 8px 8px 0; }

/* ---------- toasts ---------- */
#toasts { position: absolute; top: calc(10px + var(--safe-t)); left: 12px; right: 12px; z-index: 60; display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.toast { background: var(--fg); color: var(--on-fg); padding: 11px 14px; border-radius: 16px; font-size: 14px; animation: tin .25s cubic-bezier(.2,.8,.2,1); box-shadow: var(--shadow); display: flex; align-items: center; gap: 10px; pointer-events: auto; cursor: pointer; transition: opacity .25s, transform .25s; }
.toast.out { opacity: 0; transform: translateY(-8px); }
.toast.error { background: var(--red); color: #fff; } .toast .i { width: 17px; height: 17px; }
.toast.snap { border-left: 4px solid var(--red); } .toast.msg { border-left: 4px solid var(--accent); }
.toast-act { font-weight: 750; color: var(--accent); padding: 2px 4px; } .toast.error .toast-act { color: #fff; }
@keyframes tin { from { transform: translateY(-14px); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
