/* Lato zelf gehost (node_modules/@fontsource/lato), zodat bezoekers niet naar Google Fonts gaan */
@font-face { font-family: 'Lato'; font-style: normal; font-weight: 400; font-display: swap; src: url(/vendor/lato/lato-latin-ext-400-normal.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Lato'; font-style: normal; font-weight: 400; font-display: swap; src: url(/vendor/lato/lato-latin-400-normal.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Lato'; font-style: normal; font-weight: 700; font-display: swap; src: url(/vendor/lato/lato-latin-ext-700-normal.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Lato'; font-style: normal; font-weight: 700; font-display: swap; src: url(/vendor/lato/lato-latin-700-normal.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Lato'; font-style: normal; font-weight: 900; font-display: swap; src: url(/vendor/lato/lato-latin-ext-900-normal.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Lato'; font-style: normal; font-weight: 900; font-display: swap; src: url(/vendor/lato/lato-latin-900-normal.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

/* Jaicob-huisstijl: neutrale antraciet-tinten, brons als accent, Lato, zachte kaarten. */
:root {
  --bg: #f7f7f7;
  --panel: #ffffff;
  --panel-2: #f3f3f3;
  --text: #111111;
  --muted: #6d6d6d;
  --border: rgba(24, 24, 27, 0.08);
  --ring: rgba(0, 0, 0, 0.2);
  --primary: #282828;
  --primary-hover: #1d1d1d;
  --primary-text: #ffffff;
  --accent: #ce8946;
  --accent-soft: rgba(206, 137, 70, 0.12);
  --speak: #22c55e;
  --danger: #ff5555;
  --label-bg: rgba(255, 255, 255, 0.92);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 8px 24px rgba(0, 0, 0, 0.06);
  --radius: 10px;
  --radius-card: 16px;

  /* 2D-editor */
  --floor: #ebebeb;
  --floor-dot: #c9c9c9;
  --desk: #ffffff;
  --desk-stroke: #b2b2b2;

  /* 3D-scène */
  --3d-ground: #e0e0e0;
  --3d-floor: #f3f3f3;
  --3d-wall: #fbfbfb;
  --3d-desk: #e8c9aa;
  --3d-metal: #9b9b9b;
  --3d-chair: #3f3f3f;
  --3d-grid: #c9c9c9;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #18181b;
    --panel: #1c1c1e;
    --panel-2: #252527;
    --text: #e7e7e7;
    --muted: #9b9b9c;
    --border: rgba(255, 255, 255, 0.07);
    --ring: rgba(255, 255, 255, 0.2);
    --primary: #e7e7e7;
    --primary-hover: #ffffff;
    --primary-text: #18181b;
    --accent-soft: rgba(206, 137, 70, 0.16);
    --label-bg: rgba(28, 28, 30, 0.92);
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.35);
    --floor: #1c1c1e;
    --floor-dot: #383839;
    --desk: #252527;
    --desk-stroke: #565656;
    --3d-ground: #111113;
    --3d-floor: #2a2a2d;
    --3d-wall: #3a3a3d;
    --3d-desk: #926132;
    --3d-metal: #6a6a6a;
    --3d-chair: #18181b;
    --3d-grid: #3f3f3f;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font: 14px/1.5 Lato, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}
[hidden] { display: none !important; }
h2 { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 0 0 10px; font-weight: 700; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); }

.wordmark { font-weight: 900; font-size: 20px; letter-spacing: -0.02em; }
.wordmark span { font-weight: 400; color: var(--accent); }

input, select, button { font: inherit; color: inherit; }
input:not([type]), input[type="text"], select {
  width: 100%; padding: 9px 12px; border-radius: var(--radius);
  border: 1px solid var(--border); background: var(--panel-2);
  outline: none;
}
input:focus-visible, select:focus-visible, button:focus-visible { box-shadow: 0 0 0 2px var(--ring); }
.field { display: flex; flex-direction: column; gap: 4px; margin: 12px 0; border: 0; padding: 0; min-width: 0; }
.field > span, .field > legend { font-size: 12px; font-weight: 700; color: var(--muted); padding: 0; margin-bottom: 6px; }
.inline select { width: auto; }

.btn {
  display: inline-flex; align-items: center; gap: 6px; cursor: pointer;
  padding: 8px 14px; border-radius: var(--radius); border: 1px solid var(--border);
  background: var(--panel); white-space: nowrap; font-weight: 700; font-size: 13px;
  transition: background .15s, border-color .15s;
}
.btn:hover { background: var(--panel-2); }
a.btn { text-decoration: none; color: inherit; }
.btn.primary { background: var(--primary); color: var(--primary-text); border-color: var(--primary); width: 100%; justify-content: center; padding: 12px; margin-top: 8px; font-size: 14px; }
.btn.primary:hover { background: var(--primary-hover); }
.btn.danger { color: var(--danger); }
.btn.active { background: var(--primary); color: var(--primary-text); border-color: var(--primary); }
.small-btn { padding: 6px 10px; font-size: 12px; }
.link { background: none; border: 0; color: var(--accent); cursor: pointer; padding: 0; font-weight: 700; }

/* ---------- aanmelden ---------- */
.join {
  min-height: 100%; display: grid; place-items: center; padding: 16px;
  background-image: radial-gradient(var(--border) 1px, transparent 1px);
  background-size: 22px 22px;
}
.join-card {
  width: 100%; max-width: 760px; display: grid; grid-template-columns: 1fr 1.15fr;
  background: var(--panel); border: 1px solid var(--border); border-radius: 20px; box-shadow: var(--shadow); overflow: hidden;
}
.join-preview {
  position: relative; background: linear-gradient(180deg, var(--accent-soft), transparent 75%), var(--panel-2);
  display: flex; flex-direction: column; align-items: center; justify-content: flex-end; padding: 16px; min-height: 280px;
}
.avatar-preview { position: absolute; inset: 0 0 36px 0; }
.avatar-preview canvas { display: block; width: 100%; height: 100%; }
.join-fields { padding: 24px; }
.auth-card {
  width: 100%; max-width: 420px; background: var(--panel); border: 1px solid var(--border);
  border-radius: 20px; box-shadow: var(--shadow); padding: 28px;
}
.auth-card .wordmark { font-size: 26px; }
.seg.auth-tabs { display: flex; margin-top: 16px; }
.auth-tabs button { flex: 1; padding: 8px; white-space: nowrap; }
.auth-form { margin-top: 4px; }
.form-error { color: var(--danger); font-size: 13px; min-height: 0; margin: 4px 0 0; }
.form-error:empty { display: none; }
.lock-note { margin: 14px 0 0; }
.auth-alt { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 12px; font-size: 13px; }
.auth-sub { font-size: 16px; font-weight: 900; margin: 16px 0 2px; }
.form-ok { color: var(--speak); font-size: 13px; margin: 4px 0 0; }
.form-ok:empty { display: none; }
.field em { font-style: normal; font-weight: 400; }
.welcome { margin: 6px 0 4px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
input[type="email"], input[type="password"] {
  width: 100%; padding: 9px 12px; border-radius: var(--radius);
  border: 1px solid var(--border); background: var(--panel-2); outline: none;
}
.org-code { font: 700 16px/1 ui-monospace, Menlo, monospace; letter-spacing: .08em; padding: 8px 10px; border-radius: var(--radius); background: var(--accent-soft); display: inline-block; margin: 6px 0; user-select: all; }
.badge.private { color: var(--text); }
.person .org { font-size: 11px; color: var(--muted); }

/* gevulde iconen */
.ico { width: 1.15em; height: 1.15em; flex-shrink: 0; vertical-align: -0.2em; }
.btn .ico { width: 16px; height: 16px; }
h2 .ico { width: 14px; height: 14px; margin-right: 6px; vertical-align: -2px; }
.room-access, .room-mode { display: inline-flex; align-items: center; gap: 4px; }
.room-label .ico { width: 13px; height: 13px; }
.lbl-mic { display: inline-flex; color: var(--speak); }
.lbl-mic .ico { width: 13px; height: 13px; }
.badge { display: inline-flex; align-items: center; gap: 4px; }
.badge .ico { width: 12px; height: 12px; }
.live-ico { color: var(--speak); width: 14px; height: 14px; margin-left: 4px; }
.talk-bubble .ico { width: 14px; height: 14px; }
.lock-note .ico { color: var(--accent); }
.status-wrap { position: relative; display: inline-flex; align-items: center; }
.status-wrap select { padding-left: 28px; }
.status-dot { position: absolute; left: 11px; width: 10px; height: 10px; border-radius: 50%; background: var(--speak); pointer-events: none; }
.status-dot.focus { background: #c14bcc; }
.status-dot.away { background: #9b9b9b; }

/* aanbellen */
.bell-btn { pointer-events: auto; display: inline-flex; align-items: center; gap: 5px; padding: 6px 12px; border-radius: 999px; border: 0; background: var(--accent); color: #fff; font: 700 12px Lato, system-ui, sans-serif; cursor: pointer; box-shadow: var(--shadow); }
.bell-btn:hover { filter: brightness(1.08); }
.bell-btn .ico, .bell-off .ico { width: 13px; height: 13px; }
.bell-off { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 999px; background: var(--label-bg); border: 1px solid var(--border); color: var(--muted); font-size: 11px; font-weight: 700; }
.ring-stack { position: absolute; top: 12px; left: 12px; z-index: 5; display: flex; flex-direction: column; gap: 8px; width: min(340px, calc(100% - 24px)); }
.ring-card { background: var(--panel); border: 1px solid var(--border); border-left: 4px solid var(--accent); border-radius: 14px; box-shadow: var(--shadow); padding: 12px 14px; animation: ring-in .25s ease-out; }
.ring-card h4 { margin: 0 0 2px; font-size: 14px; display: flex; align-items: center; gap: 6px; }
.ring-card h4 .ico { color: var(--accent); width: 16px; height: 16px; animation: ring-shake .9s ease-in-out 3; }
.ring-card p { margin: 0 0 10px; font-size: 13px; color: var(--muted); }
.ring-actions { display: flex; gap: 8px; }
.ring-actions .btn { flex: 1; justify-content: center; }
@keyframes ring-in { from { transform: translateX(20px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes ring-shake { 0%, 100% { transform: rotate(0); } 20% { transform: rotate(-18deg); } 40% { transform: rotate(14deg); } 60% { transform: rotate(-8deg); } 80% { transform: rotate(4deg); } }
@media (prefers-reduced-motion: reduce) { .ring-card, .ring-card h4 .ico { animation: none; } }
.doorbell-settings { margin-top: 18px; }
.doorbell-settings h3 { font-size: 14px; margin: 0 0 4px; }
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; border-radius: var(--radius); background: var(--panel-2); margin: 8px 0; }
.switch-row input[type="checkbox"] { width: 40px; height: 22px; accent-color: var(--accent); }

/* chat */
.chat-card { display: flex; flex-direction: column; gap: 8px; padding: 12px; }
.chat-tabs { display: flex; gap: 4px; flex-wrap: wrap; align-items: center; }
.chat-tab { display: inline-flex; align-items: center; gap: 5px; padding: 5px 10px; border-radius: 999px; border: 1px solid var(--border); background: var(--panel-2); font-size: 12px; font-weight: 700; cursor: pointer; max-width: 100%; }
.chat-tab .ico { width: 12px; height: 12px; color: var(--muted); }
.chat-tab.active { background: var(--primary); color: var(--primary-text); border-color: var(--primary); }
.chat-tab.active .ico { color: inherit; }
.chat-badge { min-width: 16px; height: 16px; padding: 0 4px; border-radius: 999px; background: var(--accent); color: #fff; font-size: 10px; display: inline-grid; place-items: center; }
.chat-close { border: 0; background: none; color: var(--muted); cursor: pointer; font-size: 16px; line-height: 1; padding: 0 4px; }
.chat-log { height: 220px; overflow-y: auto; display: flex; flex-direction: column; gap: 4px; padding: 4px 2px; }
.chat-empty { color: var(--muted); font-size: 12px; margin: auto 8px; text-align: center; }
.chat-msg { display: flex; flex-direction: column; align-items: flex-start; max-width: 100%; }
.chat-msg.mine { align-items: flex-end; }
.chat-meta { font-size: 11px; color: var(--muted); margin: 6px 4px 2px; }
.chat-text { background: var(--panel-2); border-radius: 12px 12px 12px 4px; padding: 6px 10px; font-size: 13px; max-width: 88%; white-space: pre-wrap; overflow-wrap: anywhere; }
.chat-msg.mine .chat-text { background: var(--accent-soft); border-radius: 12px 12px 4px 12px; }
.chat-form { display: flex; gap: 6px; }
.chat-form input { flex: 1; min-width: 0; }
.chat-form .btn .ico { width: 16px; height: 16px; }
.person-row { display: flex; align-items: center; gap: 2px; }
.person-row .person { flex: 1; min-width: 0; }
.person-dm { border: 0; background: none; color: var(--muted); padding: 6px; border-radius: var(--radius); cursor: pointer; display: grid; place-items: center; }
.person-dm:hover { background: var(--panel-2); color: var(--accent); }
.person-dm .ico { width: 16px; height: 16px; }
.talk-bubble.chat-text { background: var(--panel); color: var(--text); border: 1px solid var(--border); white-space: normal; max-width: 220px; font-weight: 400; border-radius: 12px; padding: 6px 10px; }
.talk-bubble.chat-text .ico { color: var(--accent); flex-shrink: 0; }

/* video */
.media-row { display: flex; gap: 6px; margin-top: 10px; flex-wrap: wrap; }
.media-row .btn { flex: 1; justify-content: center; }
.media-row .btn.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.video-strip { position: absolute; top: 56px; right: 12px; display: flex; flex-direction: column; gap: 8px; z-index: 2; max-height: calc(100% - 110px); overflow-y: auto; }
.video-tile { position: relative; width: 220px; aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; background: #111; box-shadow: var(--shadow); border: 2px solid transparent; cursor: zoom-in; flex-shrink: 0; }
.video-tile.speaking { border-color: var(--speak); }
.video-tile.big { width: min(720px, calc(100vw - 420px)); cursor: zoom-out; }
.video-tile video { width: 100%; height: 100%; object-fit: cover; display: block; }
.video-tile.screen video { object-fit: contain; }
.video-tile.self video { transform: scaleX(-1); }
.video-tile.self.screen video { transform: none; }
.video-tile .vt-name { position: absolute; left: 8px; bottom: 6px; display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 999px; background: rgba(0,0,0,.55); color: #fff; font-size: 11px; font-weight: 700; }
.video-tile .vt-name .ico { width: 12px; height: 12px; }
@media (max-width: 800px) {
  .video-strip { flex-direction: row; top: auto; bottom: 8px; left: 8px; right: 8px; overflow-x: auto; }
  .video-tile { width: 160px; }
  .video-tile.big { width: calc(100vw - 32px); }
}

.easel-label { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--label-bg); border: 1px solid var(--border); color: var(--muted); }
.easel-label .ico { width: 12px; height: 12px; color: var(--accent); }

/* flipover */
.board-dialog { width: min(980px, calc(100% - 32px)); height: calc(100% - 48px); display: none; flex-direction: column; }
.board-dialog[open] { display: flex; }
.board-toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 14px 0 10px; }
.board-toolbar .seg button { padding: 6px 10px; }
.board-toolbar .seg .ico, .board-toolbar .btn .ico { width: 16px; height: 16px; }
.board-toolbar .btn:disabled { opacity: .4; cursor: default; }
.board-colors { display: flex; gap: 6px; }
.board-swatch { width: 24px; height: 24px; border-radius: 50%; border: 0; cursor: pointer; box-shadow: inset 0 0 0 1px rgba(255,255,255,.2); }
.board-swatch.active { box-shadow: 0 0 0 2px var(--panel), 0 0 0 4px var(--accent); }
.board-size input { width: 90px; accent-color: var(--accent); }
.board-spacer { flex: 1; }
.board-wrap { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; background: var(--panel-2); border-radius: var(--radius-card); padding: 12px; }
#board-canvas { border-radius: 6px; box-shadow: 0 2px 12px rgba(0,0,0,.18); touch-action: none; cursor: crosshair; background: #fbfaf7; }

/* beheer-dialoog */
.dialog {
  width: min(760px, calc(100% - 32px)); max-height: calc(100% - 48px); padding: 24px;
  border: 1px solid var(--border); border-radius: 20px; background: var(--panel); color: var(--text);
  box-shadow: var(--shadow);
}
.dialog::backdrop { background: rgba(0, 0, 0, .45); backdrop-filter: blur(2px); }
.dialog-head { display: flex; justify-content: space-between; align-items: center; }
.dialog-title { font-size: 20px; text-transform: none; letter-spacing: -0.01em; color: var(--text); font-weight: 900; margin: 0; }
.seg.dialog-tabs { display: flex; margin: 16px 0; width: 100%; }
.dialog-tabs button { flex: 1; padding: 8px; white-space: nowrap; }
.invite-box { display: flex; justify-content: space-between; gap: 16px; align-items: center; flex-wrap: wrap; padding: 14px; border-radius: var(--radius-card); background: var(--panel-2); margin-bottom: 16px; }
.invite-box p { margin: 2px 0 0; }
.invite-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.invite-actions .org-code { margin: 0; }
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); padding: 8px; border-bottom: 1px solid var(--border); }
.table td { padding: 8px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table td.actions { text-align: right; white-space: nowrap; }
.table select { width: auto; padding: 4px 8px; }
.pill { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; }
.pill::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: #9b9b9b; }
.pill.on::before { background: var(--speak); }
.pill.blocked { color: var(--danger); }
.pill.blocked::before { background: var(--danger); }
.tag { font-size: 11px; padding: 1px 7px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-weight: 700; margin-left: 4px; }
.account-info { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0 0 16px; }
.account-info dt { color: var(--muted); }
.account-info dd { margin: 0; font-weight: 700; }
.password-form { max-width: 380px; }
.password-form h3 { font-size: 14px; margin: 8px 0 0; }
@media (max-width: 800px) {
  .dialog { padding: 16px; }
  .dialog .table th:nth-child(2), .dialog .table td:nth-child(2) { display: none; }
}

/* praat-symbolen boven avatars */
.talk-bubble {
  position: relative; display: flex; align-items: center; gap: 6px; padding: 5px 9px;
  border-radius: 12px; background: var(--primary); color: var(--primary-text);
  font-size: 12px; font-weight: 700; white-space: nowrap; box-shadow: var(--shadow);
  transform-origin: 50% 100%; animation: bubble-in .18s ease-out;
}
.talk-bubble::after {
  content: ''; position: absolute; left: 50%; bottom: -5px; width: 10px; height: 10px;
  background: inherit; transform: translateX(-50%) rotate(45deg); border-radius: 2px;
}
.talk-bubble.speaking { background: var(--speak); color: #fff; }
.talk-bubble.direct { background: var(--accent); color: #fff; }
.bars { display: inline-flex; align-items: flex-end; gap: 2px; height: 14px; }
.bars i { width: 3px; height: 4px; border-radius: 2px; background: currentColor; opacity: .9; }
.talk-bubble.speaking .bars i { animation: eq .7s ease-in-out infinite; }
.talk-bubble.speaking .bars i:nth-child(2) { animation-delay: -.45s; }
.talk-bubble.speaking .bars i:nth-child(3) { animation-delay: -.2s; }
.talk-bubble.speaking .bars i:nth-child(4) { animation-delay: -.6s; }
.waves { position: absolute; inset: -6px; border-radius: 16px; border: 2px solid var(--speak); opacity: 0; pointer-events: none; }
.talk-bubble.speaking .waves { animation: wave 1.2s ease-out infinite; }
.talk-bubble.speaking .waves + .waves { animation-delay: .6s; }
@keyframes eq { 0%, 100% { height: 4px; } 50% { height: 14px; } }
@keyframes wave { 0% { opacity: .7; transform: scale(.9); } 100% { opacity: 0; transform: scale(1.35); } }
@keyframes bubble-in { from { scale: .6; opacity: 0; } to { scale: 1; opacity: 1; } } /* "scale" i.p.v. "transform": anders verdringt de animatie de 3D-positie (kaartje schiet eerst naar de hoek) */
@media (prefers-reduced-motion: reduce) {
  .talk-bubble, .talk-bubble.speaking .bars i, .talk-bubble.speaking .waves { animation: none; }
  .talk-bubble.speaking .bars i { height: 10px; }
}
.join-fields .wordmark { font-size: 26px; }
.swatches, .chips { display: flex; gap: 8px; flex-wrap: wrap; }
.swatches label { width: 28px; height: 28px; border-radius: 50%; cursor: pointer; box-shadow: inset 0 0 0 1px var(--border); position: relative; }
.swatches label:has(input:checked) { box-shadow: 0 0 0 2px var(--panel), 0 0 0 4px var(--accent); }
.swatches input, .chips input { position: absolute; opacity: 0; pointer-events: none; }
.chips label { padding: 5px 12px; border-radius: 999px; border: 1px solid var(--border); cursor: pointer; font-size: 13px; background: var(--panel-2); }
.chips label:has(input:checked) { background: var(--primary); color: var(--primary-text); border-color: var(--primary); }
.swatches label:has(input:focus-visible), .chips label:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }

.seg.avatar-tabs { display: flex; margin: 14px 0 2px; width: 100%; }
.avatar-tabs button { flex: 1; padding: 7px 6px; white-space: nowrap; display: inline-flex; align-items: center; justify-content: center; gap: 4px; }
.avatar-tabs .ico { width: 14px; height: 14px; color: var(--accent); }
.chips label { font-size: 12px; }
.avatar-picks { display: grid; grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); gap: 8px; }
.avatar-pick { display: flex; flex-direction: column; align-items: center; gap: 4px; cursor: pointer; font-size: 12px; font-weight: 700; position: relative; }
.avatar-pick input { position: absolute; opacity: 0; pointer-events: none; }
.pick-img { width: 64px; height: 64px; border-radius: 16px; background: var(--panel-2) center / cover no-repeat; display: grid; place-items: center; color: var(--muted); box-shadow: inset 0 0 0 1px var(--border); transition: box-shadow .12s, transform .12s; }
.pick-img .ico { width: 22px; height: 22px; }
.avatar-pick:hover .pick-img { transform: translateY(-1px); }
.avatar-pick:has(input:checked) .pick-img { box-shadow: 0 0 0 2px var(--panel), 0 0 0 4px var(--accent); }
.avatar-pick:has(input:checked) { color: var(--accent); }
.avatar-pick:has(input:focus-visible) .pick-img { outline: 2px solid var(--accent); outline-offset: 3px; }

/* ---------- app ---------- */
.app { height: 100%; display: flex; flex-direction: column; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 16px; border-bottom: 1px solid var(--border); background: var(--panel); flex-wrap: wrap; }
.topbar-actions { display: flex; gap: 8px; flex-wrap: wrap; flex: 1; min-width: 0; }
.main { flex: 1; min-height: 0; display: flex; }
.map-wrap { flex: 1; min-width: 0; position: relative; overflow: hidden; }
.scene { position: absolute; inset: 0; z-index: 0; } /* eigen laag: 3D-labels komen nooit boven meldingen of knoppen */
.scene canvas { display: block; touch-action: none; }
.labels { position: absolute; inset: 0; pointer-events: none; }
#map { display: block; width: 100%; height: 100%; touch-action: none; }

.view-controls { position: absolute; top: 12px; right: 12px; display: flex; gap: 6px; z-index: 2; }
.view-controls .btn { box-shadow: var(--shadow); }
.map-hint { position: absolute; left: 50%; bottom: 12px; transform: translateX(-50%); font-size: 12px; color: var(--muted); background: var(--label-bg); border: 1px solid var(--border); padding: 5px 12px; border-radius: 999px; pointer-events: none; text-align: center; max-width: calc(100% - 32px); }
.edit-toolbar { position: absolute; top: 12px; left: 12px; right: 12px; display: flex; gap: 8px; flex-wrap: wrap; z-index: 3; }
.catalog-title { margin: 4px 0 8px; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.catalog-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; margin-bottom: 14px; }
.catalog-tile { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 6px 4px 8px; border: 1px solid var(--border); border-radius: 12px; background: var(--bg); color: var(--text); font: 600 11px Lato, system-ui, sans-serif; line-height: 1.2; text-align: center; cursor: pointer; transition: border-color .15s, background .15s; }
.catalog-tile img { width: 64px; height: 64px; object-fit: contain; }
.catalog-tile img:not([src]) { visibility: hidden; }
.catalog-tile:hover { border-color: var(--accent); }
.catalog-tile.active { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, var(--bg)); box-shadow: 0 0 0 1px var(--accent) inset; }
.color-swatches { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.swatch { width: 24px; height: 24px; border-radius: 50%; border: 1px solid var(--border); padding: 0; cursor: pointer; }
.swatch.std { background: var(--bg); color: var(--muted); font: 700 10px Lato, system-ui, sans-serif; }
.swatch.on { box-shadow: 0 0 0 2px var(--panel), 0 0 0 4px var(--accent); }
.swatch-own { width: 28px; height: 26px; padding: 0; border: 0; background: none; cursor: pointer; }
.catalog-tile[draggable=true] { cursor: grab; }
.catalog-tile:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.seg { display: inline-flex; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: var(--panel); }
.seg button { border: 0; background: none; padding: 6px 10px; cursor: pointer; font-size: 12px; font-weight: 700; }
.seg button.active { background: var(--primary); color: var(--primary-text); }

/* labels in 3D */
.room-label {
  display: flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 999px;
  background: var(--label-bg); border: 1px solid var(--border); box-shadow: var(--shadow);
  font-size: 12px; white-space: nowrap; backdrop-filter: blur(6px);
}
.room-label strong { font-weight: 900; }
.room-dot { width: 8px; height: 8px; border-radius: 50%; }
.room-mode { color: var(--muted); }
.room-access { font-weight: 700; color: var(--accent); }
.room-label.locked { opacity: .85; }
.room-label.locked .room-access { color: var(--muted); }
.room-count:not(:empty) { background: var(--primary); color: var(--primary-text); border-radius: 999px; padding: 0 7px; font-weight: 700; }
.desk-label { font-size: 10px; color: var(--muted); background: var(--label-bg); padding: 1px 6px; border-radius: 6px; white-space: nowrap; }
.desk-label.mine { color: var(--accent); font-weight: 700; }
.avatar-label {
  display: flex; align-items: center; gap: 5px; padding: 3px 9px 3px 6px; border-radius: 999px;
  background: var(--label-bg); border: 1px solid var(--border); box-shadow: var(--shadow);
  font-size: 12px; font-weight: 700; white-space: nowrap; transition: border-color .15s;
}
.avatar-label.speaking { border-color: var(--speak); }
.avatar-label.target { border-color: var(--accent); }
.lbl-status { width: 8px; height: 8px; border-radius: 50%; background: var(--speak); }
.lbl-status.focus { background: #c14bcc; }
.lbl-status.away { background: #9b9b9b; }
.lbl-you { font-weight: 400; color: var(--accent); }
.lbl-mic { font-size: 11px; }

/* ---------- zijbalk ---------- */
.sidebar { width: 330px; flex-shrink: 0; border-left: 1px solid var(--border); padding: 12px; overflow-y: auto; display: flex; flex-direction: column; gap: 12px; background: var(--bg); }
.card { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius-card); padding: 16px; background-image: linear-gradient(180deg, rgba(255,255,255,.02), transparent 73%); }
.room-line { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.room-line strong { font-weight: 900; }
.badge { font-size: 12px; padding: 2px 9px; border-radius: 999px; background: var(--panel-2); border: 1px solid var(--border); font-weight: 700; }
.badge.open { color: var(--accent); background: var(--accent-soft); border-color: transparent; }

.talk-btn {
  width: 100%; min-height: 88px; border-radius: 14px; border: 1px solid var(--border);
  background: var(--panel-2); cursor: pointer; font-weight: 700; font-size: 15px; padding: 12px;
  user-select: none; -webkit-user-select: none; touch-action: none; transition: background .12s, border-color .12s, transform .08s;
}
.talk-btn:hover { border-color: var(--ring); }
.talk-btn:active { transform: scale(.99); }
.talk-btn.live { background: var(--speak); border-color: var(--speak); color: #fff; }
.talk-btn.muted { border-style: dashed; color: var(--muted); }
.talk-btn:disabled { cursor: not-allowed; opacity: .6; }
.meter { height: 6px; border-radius: 3px; background: var(--panel-2); margin: 12px 0 6px; overflow: hidden; }
#meter-fill { height: 100%; width: 0; background: var(--speak); transition: width .05s; }
.target-line { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; padding: 8px 12px; border-radius: var(--radius); background: var(--accent-soft); }

.room-group { margin-bottom: 10px; }
.room-group h3 { font-size: 12px; margin: 0 0 4px; color: var(--muted); font-weight: 700; }
.person { display: flex; align-items: center; gap: 8px; width: 100%; padding: 6px 8px; border-radius: var(--radius); border: 0; background: none; cursor: pointer; text-align: left; }
.person:hover { background: var(--panel-2); }
.person.me { cursor: default; }
.dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; box-shadow: inset 0 0 0 1px var(--border); }
.person .status { margin-left: auto; font-size: 12px; color: var(--muted); }

.prop-row { display: flex; gap: 8px; align-items: center; }
.prop-row input[type="color"] { width: 44px; height: 36px; padding: 2px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--panel); }

.toast { position: fixed; left: 50%; bottom: 56px; transform: translateX(-50%) translateY(calc(100% + 80px)); background: var(--primary); color: var(--primary-text); padding: 9px 16px; border-radius: 999px; transition: transform .2s; z-index: 10; max-width: calc(100% - 32px); font-weight: 700; font-size: 13px; box-shadow: var(--shadow); }
.toast.show { transform: translateX(-50%) translateY(0); }

@media (max-width: 800px) {
  .join-card { grid-template-columns: 1fr; }
  .join-preview { min-height: 220px; }
  .main { flex-direction: column; }
  .map-wrap { flex: none; height: 58vh; }
  .sidebar { width: 100%; border-left: 0; border-top: 1px solid var(--border); }
  .map-hint { display: none; }
}
.ring-actions .btn { margin-top: 0; padding: 8px 10px; font-size: 13px; }

/* ---------- pand-marketplace ---------- */
.door-sign { pointer-events: auto; width: 22px; height: 22px; border-radius: 50%; border: 2px solid #fff; background: var(--primary); color: var(--primary-text); font: 900 12px/1 Georgia, serif; cursor: pointer; box-shadow: var(--shadow); }
.door-sign:hover { background: var(--accent); color: #fff; }
.door-card { pointer-events: auto; width: 260px; background: var(--panel); color: var(--text); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow); padding: 12px; font-size: 13px; animation: bubble-in .18s ease-out; }
.door-card[hidden] { display: none; }
.door-card-preview { animation: none; margin-top: 8px; }
.mk-head { display: flex; gap: 10px; align-items: center; }
.mk-logo { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; color: #fff; font-weight: 900; font-size: 14px; overflow: hidden; flex-shrink: 0; background: var(--panel-2); }
.mk-logo img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.mk-title { display: flex; flex-direction: column; min-width: 0; }
.mk-title strong { font-size: 14px; }
.mk-tag { font-size: 10px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; }
.mk-text { margin: 8px 0; color: var(--text); }
.mk-jobs { font-size: 12px; margin-bottom: 8px; }
.mk-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.mk-actions .btn .ico { width: 14px; height: 14px; }
.market-sign { pointer-events: auto; display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--border); background: var(--label-bg); color: var(--text); font: 700 12px Lato, system-ui, sans-serif; cursor: pointer; box-shadow: var(--shadow); }
.market-sign .ico { width: 13px; height: 13px; color: var(--accent); }
.market-count:not(:empty) { background: var(--accent); color: #fff; border-radius: 999px; padding: 0 6px; font-size: 11px; }
.mk-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; max-height: 60vh; overflow-y: auto; }
.mk-empty { grid-column: 1 / -1; text-align: center; padding: 30px 10px; }
.mk-post { background: var(--panel-2); border-radius: var(--radius-card); padding: 12px 14px; display: flex; flex-direction: column; gap: 4px; }
.mk-post h4 { margin: 2px 0; font-size: 15px; }
.mk-post-top { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); font-weight: 700; }
.mk-post-top .org-dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.mk-date { margin-left: auto; color: var(--accent); }
.mk-meta { font-size: 12px; color: var(--muted); }
.mk-body { margin: 4px 0 6px; font-size: 13px; white-space: pre-wrap; }
.mk-admin { display: grid; grid-template-columns: 1.3fr 1fr; gap: 20px; }
.mk-admin h3, [data-admin-panel="market"] > h3 { font-size: 14px; margin: 0 0 4px; }
.mk-sep { border: 0; border-top: 1px solid var(--border); margin: 18px 0; }
.mk-post-form { display: flex; flex-direction: column; gap: 8px; margin: 8px 0 12px; }
.mk-post-form .bo-row { margin: 0; }
.mk-post-form input, .mk-post-form textarea, .mk-post-form select { padding: 8px 10px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--panel-2); color: inherit; font: inherit; flex: 1; min-width: 140px; }
.mk-post-form textarea { resize: vertical; }
.bo-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
@media (max-width: 800px) { .mk-admin { grid-template-columns: 1fr; } }

/* ---------- PLG: startindeling, bedrijvengids, eerste stappen ---------- */
.tpl-picks { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.tpl-pick { position: relative; display: flex; flex-direction: column; gap: 4px; padding: 10px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--panel-2); cursor: pointer; font-size: 12px; }
.tpl-pick input { position: absolute; opacity: 0; pointer-events: none; }
.tpl-pick:has(input:checked) { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.tpl-pick:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.tpl-pick strong { font-size: 13px; }
.tpl-art { display: grid; gap: 3px; height: 46px; border-radius: 6px; padding: 4px; background: var(--panel); }
.tpl-art i { border-radius: 3px; background: var(--accent-soft); border: 1px solid var(--accent); }
.tpl-klein { grid-template-columns: 2fr 1fr; }
.tpl-team { grid-template-columns: 3fr 2fr; grid-template-rows: 1fr 1fr; }
.tpl-werkplaats { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; }
.tpl-werkplaats i:last-child { grid-column: 1 / -1; }
.gids-list { display: flex; flex-direction: column; gap: 6px; max-height: 60vh; overflow-y: auto; }
.gids-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--radius); background: var(--panel-2); }
.gids-info { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.gids-row .btn .ico { width: 14px; height: 14px; }
.steps-head { display: flex; justify-content: space-between; align-items: center; }
.steps-head h2 { margin: 0; }
.steps-bar { height: 6px; border-radius: 3px; background: var(--panel-2); margin: 10px 0; overflow: hidden; }
.steps-bar span { display: block; height: 100%; background: var(--accent); transition: width .3s; }
.steps-list { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.steps-list li { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.steps-list li::before { content: ''; width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--border); flex-shrink: 0; }
.steps-list li.done { color: var(--muted); text-decoration: line-through; }
.steps-list li.done::before { background: var(--speak); border-color: var(--speak); }
.steps-list .link { margin-left: auto; font-size: 12px; }
.exit-btn { background: var(--primary); color: var(--primary-text); }
@media (max-width: 800px) { .tpl-picks { grid-template-columns: 1fr; } }

/* ---------- buren uitnodigen ---------- */
.buren-btn { position: relative; }
.buren-count { margin-left: 6px; font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 999px; background: var(--accent); color: #18181b; }
.buren-dialog { width: min(560px, calc(100vw - 32px)); }
.buren-lead { margin: 6px 0 10px; }
.buren-empty { margin: 0 0 10px; padding: 10px 12px; border-radius: var(--radius); background: var(--accent-soft); font-weight: 700; }
.buren-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 12px; }
.buren-stat { display: flex; flex-direction: column; padding: 10px 12px; border-radius: var(--radius); background: var(--panel-2); }
.buren-stat strong { font-size: 22px; line-height: 1.1; }
.buren-share { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.buren-link-row { display: flex; gap: 8px; }
.buren-link-row .btn { flex: none; width: auto; }
.buren-link-row input { flex: 1; min-width: 0; font: 13px/1.2 ui-monospace, Menlo, monospace; }
.buren-channels { display: flex; flex-wrap: wrap; gap: 6px; }
.buren-channels .btn { text-decoration: none; }
.buren-qr { display: flex; gap: 14px; align-items: center; padding: 12px; border-radius: var(--radius-card); background: var(--panel-2); margin-bottom: 12px; }
.buren-qr img { width: 120px; height: 120px; border-radius: 8px; background: #fff; padding: 4px; flex: none; }
.buren-qr p { margin: 4px 0 8px; }
.buren-section h3 { display: flex; align-items: center; gap: 6px; font-size: 14px; margin: 14px 0 6px; }
.buren-section h3 .ico { width: 16px; height: 16px; color: var(--accent); }
.buren-row, .buren-promo { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 10px; border-radius: var(--radius); background: var(--panel-2); margin-bottom: 6px; }
.buren-promo { background: var(--accent-soft); }
.buren-promo-info { display: flex; flex-direction: column; }
.buren-status { font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--panel); }
.buren-status.ok { color: #2f8a4e; }
.buren-status.off { color: var(--muted); }
.buren-redeem { display: flex; gap: 8px; margin-top: 4px; }
.buren-redeem select { flex: 1; min-width: 0; }
.buur-banner { display: flex; gap: 10px; align-items: flex-start; padding: 12px; border-radius: var(--radius-card); background: var(--accent-soft); margin-bottom: 4px; }
.buur-banner .org-dot { width: 12px; height: 12px; border-radius: 50%; flex: none; margin-top: 4px; }
.gids-invite { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px; border-radius: var(--radius); border: 1px dashed var(--accent); margin-top: 6px; }
.mk-post.featured { box-shadow: inset 0 0 0 2px var(--accent); }
.mk-featured { margin-left: auto; font-size: 11px; padding: 1px 8px; border-radius: 999px; background: var(--accent); color: #18181b; }
@media (max-width: 560px) { .buren-stats { grid-template-columns: 1fr 1fr; } .buren-qr { flex-direction: column; align-items: flex-start; } }
@media (prefers-color-scheme: dark) { .buren-status.ok { color: #6fd08f; } }
.bo-funnel { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.bo-funnel-row { display: grid; grid-template-columns: 150px 1fr 56px 48px; align-items: center; gap: 10px; }
.bo-funnel-track { height: 18px; background: var(--panel-2); border-radius: 6px; overflow: hidden; }
.bo-funnel-bar { display: block; height: 100%; background: var(--chart-1, var(--accent)); border-radius: 6px; }
.bo-funnel-num { text-align: right; font-variant-numeric: tabular-nums; }
@media (max-width: 560px) { .bo-funnel-row { grid-template-columns: 100px 1fr 40px; } .bo-funnel-pct { display: none; } }

/* ---------- feed ---------- */
.feed-count { margin-left: 6px; font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 999px; background: var(--accent); color: #18181b; }
.feed-dialog { width: min(620px, calc(100vw - 32px)); }
.feed-tabs { display: flex; gap: 6px; margin: 4px 0 14px; border-bottom: 1px solid var(--border); }
.feed-tabs button { flex: 1; display: inline-flex; justify-content: center; align-items: center; gap: 6px; padding: 10px 8px; border: 0; border-bottom: 2px solid transparent; background: none; color: var(--muted); font: 700 14px Lato, system-ui, sans-serif; cursor: pointer; margin-bottom: -1px; }
.feed-tabs button[aria-selected="true"] { color: var(--text); border-bottom-color: var(--accent); }
.feed-tab-count:not(:empty) { font-size: 11px; padding: 1px 7px; border-radius: 999px; background: var(--accent); color: #18181b; }
.feed-compose { display: flex; flex-direction: column; gap: 8px; padding: 12px; border: 1px solid var(--border); border-radius: 14px; background: var(--bg); margin-bottom: 14px; }
.feed-compose textarea { width: 100%; resize: vertical; margin: 0; }
.feed-kinds { display: flex; gap: 6px; flex-wrap: wrap; }
.feed-kinds button { display: inline-flex; align-items: center; gap: 5px; padding: 6px 10px; border-radius: 999px; border: 1px solid var(--border); background: var(--panel); color: var(--muted); font: 700 12px Lato, system-ui, sans-serif; cursor: pointer; }
.feed-kinds button .ico { width: 14px; height: 14px; }
.feed-kinds button[aria-pressed="true"] { border-color: var(--accent); color: var(--text); background: color-mix(in srgb, var(--accent) 14%, var(--panel)); }
.feed-event-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.feed-event-fields input { margin: 0; }
.feed-event-fields #feed-ev-title { grid-column: 1 / -1; }
.feed-compose-foot { display: flex; justify-content: flex-end; }
.feed-compose-foot .btn { width: auto; margin: 0; }
.feed-upcoming { border: 1px solid var(--border); border-radius: 14px; padding: 10px 12px; margin-bottom: 14px; }
.feed-upcoming-title { margin: 0 0 6px; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.feed-upcoming-row { display: flex; gap: 10px; align-items: center; padding: 6px 0; }
.feed-upcoming-ic { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 10px; background: color-mix(in srgb, var(--accent) 18%, var(--panel)); color: var(--accent); flex: none; }
.feed-upcoming-ic .ico { width: 16px; height: 16px; }
.feed-upcoming-info { display: flex; flex-direction: column; min-width: 0; }
.feed-list { display: flex; flex-direction: column; gap: 12px; }
.feed-empty { text-align: center; padding: 20px 8px; font-size: 14px; }
.feed-card { border: 1px solid var(--border); border-radius: 14px; padding: 12px 14px; background: var(--panel); }
.feed-card.kind-notitie { background: color-mix(in srgb, #f3d27a 16%, var(--panel)); border-color: color-mix(in srgb, #f3d27a 45%, var(--border)); }
.feed-head { display: flex; align-items: center; gap: 10px; }
.feed-avatar { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; color: #fff; font: 800 13px Lato, system-ui, sans-serif; flex: none; }
.feed-who { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.feed-who strong { font-size: 14px; }
.feed-tag { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 700; background: var(--label-bg); color: var(--muted); }
.feed-tag .ico { width: 12px; height: 12px; }
.feed-tag.evenement { color: var(--accent); }
.feed-del { border: 0; background: none; color: var(--muted); cursor: pointer; padding: 4px; border-radius: 8px; }
.feed-del:hover { color: #e5484d; background: var(--label-bg); }
.feed-del .ico { width: 16px; height: 16px; }
.feed-text { margin: 10px 0 0; font-size: 14px; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
.feed-event { margin-top: 10px; padding: 10px 12px; border-radius: 12px; border-left: 4px solid var(--accent); background: var(--bg); display: flex; flex-direction: column; gap: 2px; }
.feed-event-title { font-size: 15px; }
.feed-event-when { font-size: 13px; color: var(--muted); }
.feed-actions { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.feed-act { display: inline-flex; align-items: center; gap: 5px; padding: 5px 10px; border-radius: 999px; border: 1px solid var(--border); background: none; color: var(--muted); font: 700 12px Lato, system-ui, sans-serif; cursor: pointer; }
.feed-act .ico { width: 14px; height: 14px; }
.feed-act.on { color: var(--accent); border-color: var(--accent); }
.feed-going { margin-left: 4px; }
.feed-comments { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: 6px; }
.feed-comment { display: flex; gap: 6px; align-items: flex-start; }
.feed-comment p { margin: 0; flex: 1; font-size: 13px; line-height: 1.45; padding: 6px 10px; border-radius: 12px; background: var(--bg); overflow-wrap: anywhere; }
.feed-comment-del { border: 0; background: none; color: var(--muted); cursor: pointer; font-size: 16px; line-height: 1; padding: 4px; }
.feed-reply { display: flex; gap: 6px; }
.feed-reply input { flex: 1; margin: 0; }
.feed-reply .btn { width: auto; margin: 0; }
.feed-more { width: 100%; margin-top: 12px; }
.feed-mail { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--border); font-size: 13px; color: var(--muted); }
.feed-mail select { width: auto; margin: 0; }
@media (max-width: 560px) { .feed-event-fields { grid-template-columns: 1fr; } }

/* ---------- feed-zijbalk en meldingskaartjes ---------- */
.feed-rail { width: 280px; flex-shrink: 0; border-right: 1px solid var(--border); background: var(--bg); display: flex; flex-direction: column; min-height: 0; transition: width .2s; }
.rail-head { padding: 10px 10px 6px; }
/* knop om de zijbalk in te klappen, rechtsboven in de balk */
.rail-head { display: flex; justify-content: flex-end; }
.rail-collapse { display: grid; place-items: center; width: 30px; height: 30px; border: 0; border-radius: 8px; background: none; color: var(--muted); cursor: pointer; }
.rail-collapse:hover { background: var(--label-bg); color: var(--text); }
.rail-collapse .ico { width: 16px; height: 16px; transition: transform .2s; }
.feed-rail.collapsed .rail-collapse .ico { transform: rotate(180deg); }
.feed-rail.collapsed .rail-head { justify-content: center; }
/* navigatie */
.rail-scroll { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; padding: 0 10px 10px; gap: 2px; }
.rail-nav { display: flex; flex-direction: column; gap: 2px; }
.rail-sec { margin: 10px 10px 4px; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.rail-nav .rail-sec:first-child { margin-top: 0; }
.rail-link { display: flex; align-items: center; gap: 10px; width: 100%; padding: 7px 10px; border: 0; border-radius: 10px; background: none; color: var(--text); font: 700 14px Lato, system-ui, sans-serif; cursor: pointer; text-align: left; }
.rail-link:hover { background: var(--label-bg); }
.rail-link[hidden] { display: none; }
.rail-link .ico { width: 18px; height: 18px; color: var(--accent); flex: none; }
.rail-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rail-rooms { display: flex; flex-direction: column; gap: 1px; margin: 2px 0 0 18px; padding-left: 10px; border-left: 1px solid var(--border); max-height: 30vh; overflow-y: auto; }
.rail-room { display: flex; align-items: center; gap: 8px; width: 100%; padding: 5px 8px; border: 0; border-radius: 8px; background: none; color: var(--muted); font: 600 13px Lato, system-ui, sans-serif; cursor: pointer; text-align: left; }
.rail-room:hover { background: var(--label-bg); color: var(--text); }
.rail-room.here { color: var(--text); font-weight: 800; background: var(--label-bg); }
.rail-room .dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.rail-room .n { margin-left: auto; font-size: 11px; font-weight: 700; color: var(--muted); display: inline-flex; align-items: center; gap: 3px; }
.rail-room .n .ico { width: 11px; height: 11px; }
.rail-soon { display: flex; flex-direction: column; gap: 4px; margin-top: 6px; }
.rail-soon[hidden] { display: none; }
.rail-soon-row { display: flex; gap: 9px; align-items: center; padding: 7px 10px; border: 1px solid var(--border); border-radius: 12px; background: var(--panel); color: var(--text); font: inherit; cursor: pointer; text-align: left; width: 100%; }
.rail-soon-row:hover { border-color: var(--accent); }
.rail-soon-row .ico { width: 16px; height: 16px; color: var(--accent); flex: none; }
.rail-soon-row span { display: flex; flex-direction: column; min-width: 0; }
.rail-soon-row strong { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rail-soon-row small { font-size: 11px; color: var(--muted); }
.rail-feed-head { margin-top: 8px; }
.rail-feed-head .feed-count { margin-left: 0; }
.rail-body { flex: 1; min-height: 260px; display: flex; flex-direction: column; gap: 8px; }
.rail-tabs { display: flex; gap: 4px; padding: 3px; border-radius: 10px; background: var(--label-bg); }
.rail-tabs button { flex: 1; min-width: 0; display: inline-flex; justify-content: center; align-items: center; gap: 5px; padding: 6px; border: 0; border-radius: 8px; background: none; color: var(--muted); font: 700 12px Lato, system-ui, sans-serif; cursor: pointer; }
.rail-tabs button[aria-selected="true"] { background: var(--panel); color: var(--text); box-shadow: var(--shadow); }
.rail-org { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rail-compose { display: flex; align-items: center; gap: 8px; padding: 9px 12px; border: 1px dashed var(--border); border-radius: 12px; background: var(--panel); color: var(--muted); font: 600 13px Lato, system-ui, sans-serif; cursor: pointer; text-align: left; }
.rail-compose:hover { border-color: var(--accent); color: var(--text); }
.rail-compose .ico { width: 15px; height: 15px; color: var(--accent); }
.rail-list { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 6px; margin: 0 -4px; padding: 0 4px; }
.rail-item { position: relative; display: flex; gap: 9px; padding: 9px 10px; border: 1px solid var(--border); border-radius: 12px; background: var(--panel); cursor: pointer; text-align: left; color: var(--text); font: inherit; width: 100%; }
.rail-item:hover { border-color: var(--accent); }
.rail-item.new { border-color: color-mix(in srgb, var(--accent) 60%, var(--border)); }
.rail-item.new::after { content: ''; position: absolute; top: 10px; right: 10px; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.rail-item.flash { animation: rail-flash 1.6s ease-out; }
@keyframes rail-flash { from { background: color-mix(in srgb, var(--accent) 30%, var(--panel)); } to { background: var(--panel); } }
.rail-item.kind-notitie { background: color-mix(in srgb, #f3d27a 14%, var(--panel)); }
.rail-av { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; color: #fff; font: 800 11px Lato, system-ui, sans-serif; flex: none; }
.rail-main { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 2px; }
.rail-meta { font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding-right: 12px; }
.rail-meta strong { color: var(--text); font-size: 12px; }
.rail-text { font-size: 13px; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.rail-ev { display: flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 700; color: var(--accent); }
.rail-ev .ico { width: 13px; height: 13px; }
.rail-stats { display: flex; gap: 10px; font-size: 11px; color: var(--muted); }
.rail-stats span { display: inline-flex; align-items: center; gap: 3px; }
.rail-stats .ico { width: 11px; height: 11px; }
.rail-empty { font-size: 13px; color: var(--muted); text-align: center; padding: 16px 6px; }
.rail-all { align-self: center; font-size: 13px; }
.feed-rail.collapsed { width: 60px; }
.feed-rail.collapsed .rail-body, .feed-rail.collapsed .rail-label, .feed-rail.collapsed .rail-sec, .feed-rail.collapsed .rail-rooms, .feed-rail.collapsed .rail-soon { display: none; }
.feed-rail.collapsed .rail-scroll { padding: 0 6px 10px; }
.feed-rail.collapsed .rail-link { position: relative; justify-content: center; padding: 9px 4px; }
.feed-rail.collapsed .rail-link .feed-count { position: absolute; top: 2px; right: 2px; padding: 0 5px; font-size: 10px; }
.feed-rail.collapsed .feed-count { margin-left: 0; }
.feed-pops { position: absolute; left: 12px; bottom: 72px; z-index: 6; display: flex; flex-direction: column-reverse; gap: 8px; width: min(340px, calc(100% - 24px)); pointer-events: none; }
.feed-pop { pointer-events: auto; display: flex; gap: 10px; padding: 12px 12px 12px 14px; border-radius: 14px; background: var(--panel); border: 1px solid var(--border); border-left: 4px solid var(--accent); box-shadow: var(--shadow); animation: pop-in .25s ease-out; }
.feed-pop.out { animation: pop-out .25s ease-in forwards; }
@keyframes pop-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes pop-out { to { opacity: 0; transform: translateY(12px); } }
.feed-pop .rail-av { width: 34px; height: 34px; font-size: 12px; }
.feed-pop-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.feed-pop-head { font-size: 12px; color: var(--muted); }
.feed-pop-head strong { color: var(--text); font-size: 13px; }
.feed-pop-text { font-size: 13px; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.feed-pop-actions { display: flex; gap: 8px; margin-top: 4px; }
.feed-pop-actions .btn { width: auto; margin: 0; padding: 5px 12px; font-size: 12px; }
.feed-pop-x { border: 0; background: none; color: var(--muted); cursor: pointer; font-size: 18px; line-height: 1; padding: 0 2px; align-self: flex-start; }
.feed-card.flash { animation: rail-flash 1.6s ease-out; }
@media (max-width: 1100px) { .feed-rail:not(.collapsed) { width: 240px; } }
@media (max-width: 800px) { .feed-rail { display: none; } .feed-pops { bottom: 12px; } }
@media (prefers-reduced-motion: reduce) { .feed-pop, .feed-pop.out, .rail-item.flash, .feed-card.flash { animation: none; } }

.rotate-row { display: flex; gap: 6px; margin: 6px 0 8px; }
.rotate-row .btn { flex: 1; justify-content: center; margin: 0; }

/* editor: zoomknoppen en tijdens indelen geen Eerste stappen */
.zoom-ctl { display: inline-flex; gap: 2px; margin-left: auto; }
.zoom-ctl .btn { min-width: 34px; justify-content: center; box-shadow: var(--shadow); }
body.editing #steps-card { display: none !important; }

/* ---------- foto's in de feed ---------- */
.feed-compose-foot { gap: 8px; }
.feed-compose-foot .feed-photo-btn { margin-right: auto; cursor: pointer; }
.feed-photos { display: flex; gap: 8px; flex-wrap: wrap; }
.feed-photo-thumb { position: relative; width: 72px; height: 72px; border-radius: 10px; overflow: hidden; border: 1px solid var(--border); }
.feed-photo-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.feed-photo-thumb.busy img { opacity: .45; }
.feed-photo-thumb.busy::after { content: ''; position: absolute; inset: 0; margin: auto; width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--accent); border-top-color: transparent; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.feed-photo-x { position: absolute; top: 3px; right: 3px; width: 20px; height: 20px; border-radius: 50%; border: 0; background: rgba(0,0,0,.65); color: #fff; font-size: 14px; line-height: 1; cursor: pointer; }
.feed-images { display: grid; gap: 4px; margin-top: 10px; border-radius: 12px; overflow: hidden; }
.feed-images.n1 { grid-template-columns: 1fr; }
.feed-images.n2, .feed-images.n4 { grid-template-columns: 1fr 1fr; }
.feed-images.n3 { grid-template-columns: 2fr 1fr; grid-template-rows: 1fr 1fr; }
.feed-images.n3 .feed-image:first-child { grid-row: 1 / 3; }
.feed-image { padding: 0; border: 0; background: var(--label-bg); cursor: zoom-in; display: block; min-height: 0; }
.feed-image img { width: 100%; height: 100%; display: block; object-fit: cover; }
.feed-images.n1 .feed-image img { max-height: 380px; }
.feed-images:not(.n1) .feed-image { aspect-ratio: 4 / 3; }
.feed-images.n3 .feed-image:first-child { aspect-ratio: auto; }
.rail-img { width: 100%; max-height: 120px; object-fit: cover; border-radius: 8px; margin-top: 4px; }
.feed-pop-img { width: 100%; max-height: 110px; object-fit: cover; border-radius: 8px; }
.photo-viewer { padding: 0; border: 0; background: transparent; max-width: 94vw; max-height: 92vh; overflow: visible; }
.photo-viewer::backdrop { background: rgba(0,0,0,.82); }
.photo-viewer img { display: block; max-width: 94vw; max-height: 92vh; border-radius: 10px; }
.photo-close { position: absolute; top: -14px; right: -14px; width: 34px; height: 34px; border-radius: 50%; border: 0; background: var(--panel); color: var(--text); font-size: 20px; cursor: pointer; box-shadow: var(--shadow); }
@media (prefers-reduced-motion: reduce) { .feed-photo-thumb.busy::after { animation: none; } }

/* ---------- gebruikersmenu en instellingen ---------- */
.user-menu { position: relative; }
.user-btn { gap: 8px; padding-left: 6px; }
.user-av { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; color: #fff; font: 800 11px Lato, system-ui, sans-serif; text-shadow: 0 1px 1px rgba(0,0,0,.35); }
.user-name { max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-pop { position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; min-width: 250px; padding: 6px; border-radius: 14px; background: var(--panel); border: 1px solid var(--border); box-shadow: var(--shadow); display: flex; flex-direction: column; }
.user-pop-head { display: flex; flex-direction: column; padding: 8px 10px 10px; border-bottom: 1px solid var(--border); margin-bottom: 4px; }
.user-pop button, .user-pop a { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border: 0; border-radius: 10px; background: none; color: var(--text); font: 600 14px Lato, system-ui, sans-serif; text-align: left; text-decoration: none; cursor: pointer; }
.user-pop button .muted { margin-left: auto; font-weight: 400; }
.user-pop button:hover, .user-pop a:hover, .user-pop button:focus-visible, .user-pop a:focus-visible { background: var(--label-bg); outline: none; }
.user-pop .ico { width: 16px; height: 16px; color: var(--muted); }
.user-pop hr { border: 0; border-top: 1px solid var(--border); margin: 4px 0; width: 100%; }
.user-pop [hidden] { display: none; }
.edit-done:not([hidden]) { background: var(--accent); color: #18181b; border-color: var(--accent); }
.settings-dialog { width: min(760px, calc(100vw - 32px)); }
.settings-avatar { display: grid; grid-template-columns: 240px 1fr; gap: 16px; margin-top: 12px; }
.settings-preview .join-preview { min-height: 320px; height: 100%; border-radius: 14px; }
.settings-fields { max-height: 52vh; overflow-y: auto; padding-right: 4px; }
.settings-foot { display: flex; justify-content: flex-end; margin-top: 12px; }
.settings-foot .btn { width: auto; margin: 0; }
[data-settings-panel="meldingen"] { display: flex; flex-direction: column; gap: 12px; margin-top: 12px; }
[data-settings-panel="meldingen"][hidden] { display: none; }
@media (max-width: 640px) { .settings-avatar { grid-template-columns: 1fr; } .settings-preview .join-preview { min-height: 220px; } }

/* ---------- feed + prikbord samen ---------- */
.feed-filters { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.feed-chip { padding: 6px 12px; border-radius: 999px; border: 1px solid var(--border); background: none; color: var(--muted); font: 700 12px Lato, system-ui, sans-serif; cursor: pointer; }
.feed-chip:hover { color: var(--text); }
.feed-chip[aria-pressed="true"] { background: var(--text); color: var(--bg); border-color: var(--text); }
.feed-card.market { border-left: 4px solid var(--accent); }
.feed-card.featured { box-shadow: 0 0 0 1px var(--accent) inset; }
.feed-avatar.logo { background: #fff; overflow: hidden; }
.feed-avatar.logo img { width: 100%; height: 100%; object-fit: contain; }
.feed-tag.vacature { color: #23b0a0; }
.feed-tag.featured { background: var(--accent); color: #18181b; }
.feed-event.job { border-left-color: #23b0a0; }
.rail-item.market { border-left: 3px solid var(--accent); }
.rail-item.market.featured { box-shadow: 0 0 0 1px var(--accent) inset; }

/* ---------- plan ---------- */
.plan-card { border: 1px solid var(--border); border-radius: 14px; padding: 14px 16px; margin-bottom: 16px; background: var(--bg); display: flex; flex-direction: column; gap: 6px; }
.plan-card:empty { display: none; }
.plan-card p { margin: 0; }
.plan-head { display: flex; align-items: center; gap: 8px; }
.plan-name { font-size: 16px; }
.plan-bar { height: 6px; border-radius: 999px; background: var(--label-bg); overflow: hidden; }
.plan-bar span { display: block; height: 100%; background: var(--accent); border-radius: inherit; }
.plan-bar span.full { background: var(--danger); }
.plan-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.plan-actions .btn { width: auto; margin: 0; }
.plan-requested { font-size: 13px; color: var(--accent); font-weight: 700; }
.plan-banner { position: absolute; top: 12px; left: 50%; transform: translateX(-50%); z-index: 7; display: flex; align-items: center; gap: 10px; max-width: min(640px, calc(100% - 24px)); padding: 8px 10px 8px 14px; border-radius: 12px; background: var(--panel); border: 1px solid var(--accent); box-shadow: var(--shadow); font-size: 13px; }
.plan-banner[hidden] { display: none; }
.plan-banner .btn { width: auto; margin: 0; flex: none; }
.plan-banner-x { border: 0; background: none; color: var(--muted); font-size: 18px; cursor: pointer; }
.join-limit:not([hidden]) { margin: 8px 0; }

/* ---------- telefoon: compacte bovenbalk, kantoor op volle scherm, balk onderaan ---------- */
.menu-toggle, .mobile-bar, .sheet-head { display: none; }
.menu-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); display: inline-block; }
.menu-dot[hidden] { display: none; }
.talk-btn { -webkit-touch-callout: none; }
@media (hover: none) { .kbd-hint { display: none; } }

@media (max-width: 800px) {
  .app { height: 100dvh; }
  body:has(.app:not([hidden])) { overflow: hidden; }
  .topbar { position: relative; flex-wrap: nowrap; padding: 8px 12px; padding-top: max(8px, env(safe-area-inset-top)); gap: 8px; z-index: 6; }
  .topbar .wordmark { font-size: 20px; margin-right: auto; }
  .menu-toggle { display: inline-flex; position: relative; }
  .menu-toggle .menu-dot { position: absolute; top: 4px; right: 4px; }
  .user-menu .user-name { display: none; }
  .topbar-actions {
    display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; gap: 6px;
    padding: 10px 12px 14px; background: var(--panel); border-bottom: 1px solid var(--border); box-shadow: var(--shadow);
    max-height: calc(100dvh - 140px); overflow-y: auto;
  }
  .topbar.menu-open .topbar-actions { display: flex; }
  .topbar-actions .btn, .topbar-actions .status-wrap { width: 100%; justify-content: flex-start; }
  .topbar-actions .status-wrap select { flex: 1; }

  .main { flex: 1; min-height: 0; flex-direction: column; }
  .map-wrap { flex: 1; height: auto; }
  .view-controls { top: 8px; right: 8px; }

  /* zijbalk wordt een uitschuifpaneel boven de balk onderaan */
  .sidebar {
    position: fixed; left: 0; right: 0; bottom: var(--mbar); width: auto; max-height: min(72dvh, calc(100dvh - var(--mbar) - 60px));
    border: 0; border-top: 1px solid var(--border); border-radius: 18px 18px 0 0; box-shadow: 0 -8px 30px rgba(0,0,0,.25);
    transform: translateY(calc(100% + var(--mbar))); transition: transform .22s ease; z-index: 5; padding-top: 0;
  }
  .app.sheet-open .sidebar { transform: none; }
  .sheet-head { display: flex; position: sticky; top: 0; z-index: 1; justify-content: space-between; align-items: center; padding: 12px 4px 8px; margin: 0 -4px; background: var(--bg); }
  .sheet-head .chat-close { font-size: 24px; padding: 4px 10px; }
  .chat-log { height: 180px; }

  .mobile-bar {
    --pad: max(8px, env(safe-area-inset-bottom));
    display: flex; align-items: stretch; gap: 8px; flex-shrink: 0; height: var(--mbar); box-sizing: border-box;
    padding: 8px 10px var(--pad); background: var(--panel); border-top: 1px solid var(--border); z-index: 6;
  }
  .mb-btn {
    position: relative; flex: 0 0 64px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
    border: 1px solid var(--border); border-radius: 12px; background: var(--panel-2); color: var(--text); font: 700 11px/1 inherit; cursor: pointer;
  }
  .mb-btn .ico { width: 20px; height: 20px; }
  .mb-btn.active { border-color: var(--accent); color: var(--accent); }
  .mb-btn .menu-dot { position: absolute; top: 6px; right: 10px; }
  .mb-talk-slot { flex: 1; min-width: 0; display: flex; }
  .mb-talk-slot .talk-btn { min-height: 0; height: 100%; font-size: 13px; padding: 6px 10px; line-height: 1.25; }

  .feed-pops { bottom: 12px; left: 8px; right: 8px; width: auto; }
  .toast { bottom: calc(var(--mbar) + 12px); }
}
:root { --mbar: calc(72px + env(safe-area-inset-bottom)); }

/* computer: de navigatie staat in de linkerbalk, dus niet nog eens bovenaan */
@media (min-width: 801px) {
  #desk-btn, #space-btn, #feed-btn, #market-btn, #gids-btn, #buren-btn { display: none !important; }
  .topbar-actions { justify-content: flex-end; }
}

/* meldingencentrum (belletje rechtsboven) */
.notif-menu { position: relative; }
.notif-btn { position: relative; padding-left: 10px; padding-right: 10px; }
.notif-btn .ico { width: 18px; height: 18px; margin: 0; }
.notif-count { position: absolute; top: -4px; right: -4px; min-width: 18px; height: 18px; padding: 0 5px; box-sizing: border-box; border-radius: 999px; background: var(--accent); color: #18181b; font: 800 11px/18px Lato, system-ui, sans-serif; text-align: center; }
.notif-count[hidden] { display: none; }
.notif-pop { position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; width: 360px; max-width: calc(100vw - 24px); padding: 6px; border-radius: 14px; background: var(--panel); border: 1px solid var(--border); box-shadow: var(--shadow); display: flex; flex-direction: column; }
.notif-pop[hidden] { display: none; }
.notif-head { display: flex; justify-content: space-between; align-items: center; padding: 8px 10px 10px; border-bottom: 1px solid var(--border); margin-bottom: 4px; }
.notif-head .link { font-size: 13px; }
.notif-list { max-height: min(460px, 70vh); overflow-y: auto; display: flex; flex-direction: column; gap: 2px; }
.notif-item { display: flex; gap: 10px; align-items: flex-start; width: 100%; padding: 9px 10px; border: 0; border-radius: 10px; background: none; color: var(--text); font: inherit; text-align: left; cursor: pointer; position: relative; }
.notif-item:hover, .notif-item:focus-visible { background: var(--label-bg); outline: none; }
.notif-item.unread { background: color-mix(in srgb, var(--accent) 9%, transparent); }
.notif-item.unread::after { content: ''; position: absolute; top: 14px; right: 10px; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.notif-ic { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--label-bg); flex: none; }
.notif-ic .ico { width: 15px; height: 15px; color: var(--accent); }
.notif-item.kind-ring .notif-ic { background: var(--accent); }
.notif-item.kind-ring .notif-ic .ico { color: #18181b; }
.notif-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; padding-right: 14px; }
.notif-main strong { font-size: 13px; }
.notif-text { font-size: 13px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.notif-main small { font-size: 11px; color: var(--muted); }
.notif-empty { font-size: 13px; color: var(--muted); padding: 14px 10px; margin: 0; }
@media (max-width: 800px) { .notif-pop { position: fixed; left: 8px; right: 8px; top: 56px; width: auto; max-width: none; } }
.ring-card.flash { animation: ring-shake .5s ease-in-out 2; }

/* taalkeuze */
.lang-pick { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); }
.lang-pick .ico { width: 16px; height: 16px; }
.lang-pick select { width: auto; padding: 5px 8px; font-size: 13px; }
.auth-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.dialog-head-actions { display: flex; align-items: center; gap: 14px; }

/* personages van de website in de avatar-maker */
.cast-wrap { margin: 4px 0 12px; }
.cast-title { display: block; font-size: 12px; font-weight: 700; color: var(--muted); margin-bottom: 6px; }
.cast-row { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; }
.cast-pick { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 4px 2px 6px; border: 1px solid var(--border); border-radius: 12px; background: var(--panel-2); color: var(--text); font: 700 11px Lato, system-ui, sans-serif; cursor: pointer; }
.cast-pick:hover { border-color: var(--accent); }
.cast-pick img { width: 100%; max-width: 56px; aspect-ratio: 1; border-radius: 50%; background: #1c1c1e; }
@media (max-width: 480px) { .cast-row { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
