/* ==========================================================================
   Chatzo UI: the design system for every page (header.vm loads it last).
   Photo-first, quiet surfaces, one accent. Bootstrap 5.3 underneath; core's
   Bootstrap 4 is no longer loaded.
   Sections: tokens, base, frame (side nav, top bar, tab bar, footer), buttons
   and inputs, avatars, feed, profile, explore, suggestions, modals, chat,
   forms and the older pages, utilities.
   ========================================================================== */

:root {
    --cz-bg: #fafafa;
    --cz-surface: #ffffff;
    --cz-surface-2: #f4f4f5;
    --cz-hover: #f2f2f2;
    --cz-border: #dbdbdb;
    --cz-border-soft: #efefef;
    --cz-text: #0c0c0d;
    --cz-text-2: #262626;
    --cz-muted: #737373;
    --cz-accent: #7c3aed;
    --cz-accent-hover: #6d28d9;
    --cz-accent-soft: #f3edff;
    --cz-link: #4c1d95;
    --cz-like: #ff3040;
    --cz-online: #22c55e;
    --cz-danger: #ed4956;
    --cz-fill: #efefef;
    --cz-fill-hover: #dbdbdb;
    --cz-faint: #c7c7c7;
    --cz-border-strong: #a8a8a8;
    --cz-glass: rgba(255, 255, 255, .92);
    --cz-ring: linear-gradient(45deg, #ffb347 0%, #ff4f8b 45%, #9b4dff 100%);
    --cz-brand: linear-gradient(135deg, #8b5cf6 0%, #ec4899 100%);
    --cz-radius: 12px;
    --cz-radius-sm: 8px;
    --cz-shadow: 0 4px 24px rgba(0, 0, 0, .08);
    --cz-shadow-lg: 0 12px 40px rgba(0, 0, 0, .18);
    --cz-nav-w: 72px;
    --cz-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
    --bs-body-font-family: var(--cz-font);
    --bs-primary: #7c3aed;
    --bs-primary-rgb: 124, 58, 237;
    --bs-link-color: #4c1d95;
    --bs-link-color-rgb: 76, 29, 149;
    --bs-link-hover-color: #2e1065;
    --bs-border-color: #dbdbdb;
}

/* ---------- Base ---------- */

html { -webkit-text-size-adjust: 100%; }

body.cz-body {
    margin: 0;
    background: var(--cz-bg);
    color: var(--cz-text-2);
    font-family: var(--cz-font);
    font-size: 15px;
    line-height: 1.45;
    padding-top: 0 !important;
}

.cz-body a { color: var(--cz-link); text-decoration: none; }
.cz-body a:hover { color: var(--bs-link-hover-color); }
/* Links styled as Bootstrap buttons keep the button's own colours */
.cz-body a.btn { color: var(--bs-btn-color); }
.cz-body a.btn:hover { color: var(--bs-btn-hover-color); }
.cz-body h1, .cz-body h2, .cz-body h3, .cz-body h4, .cz-body h5, .cz-body h6 {
    color: var(--cz-text);
    font-weight: 700;
    letter-spacing: -.01em;
}
.cz-body h1 { font-size: 1.6rem; }
.cz-body h2 { font-size: 1.35rem; }
.cz-body h3 { font-size: 1.15rem; }
.cz-body h4 { font-size: 1.05rem; }
.cz-body img { max-width: 100%; }
.cz-muted { color: var(--cz-muted) !important; }
.cz-lc { text-transform: lowercase; }
.cz-body .text-muted { color: var(--cz-muted) !important; }
.cz-body ::selection { background: #e9d5ff; }

/* Old helpers some templates still print */
.topFiller, .chatzo-breadcrumb, .breadcrumb { display: none !important; }
.clr, .clearfix { clear: both; }

/* ---------- Frame ---------- */

.cz-main { min-height: 100vh; display: flex; flex-direction: column; }
.cz-page { flex: 1 0 auto; width: 100%; max-width: 975px; margin: 0 auto; padding: 32px 20px 24px; }
.cz-page > .container, .cz-page > .container-fluid { max-width: none; padding-left: 0; padding-right: 0; }
.cz-page .container { max-width: 100%; }
body.cz-wide .cz-page { max-width: 1240px; }

/* Side navigation, members on tablet and desktop */
.cz-sidenav {
    position: fixed; inset: 0 auto 0 0; z-index: 1030;
    width: var(--cz-nav-w);
    display: flex; flex-direction: column;
    padding: 8px 12px 20px;
    background: var(--cz-surface);
    border-right: 1px solid var(--cz-border);
}
.cz-sidenav-logo {
    display: flex; align-items: center;
    height: 76px; padding: 0 12px; margin-bottom: 8px;
}
.cz-logo-full { height: 30px; width: auto; display: none; }
.cz-logo-mark {
    display: inline-grid; place-items: center;
    width: 28px; height: 28px; font-size: 24px;
    background: var(--cz-brand); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.cz-sidenav-items { list-style: none; margin: 0; padding: 0; flex: 1; }
.cz-sidenav-items li { margin: 2px 0; }
.cz-nav-link {
    display: flex; align-items: center; gap: 16px; width: 100%;
    padding: 12px; border: 0; border-radius: var(--cz-radius-sm);
    background: none; color: var(--cz-text) !important; font-size: 16px; text-align: left;
    transition: background .15s ease;
}
.cz-nav-link:hover { background: var(--cz-hover); }
.cz-nav-link > i, .cz-nav-icon > i { font-size: 24px; line-height: 1; width: 24px; text-align: center; transition: transform .15s ease; }
.cz-nav-link:hover > i, .cz-nav-link:hover .cz-nav-icon > i { transform: scale(1.06); }
/* Every icon comes twice: outline, and filled for the active page */
.cz-nav-link > i:nth-of-type(2), .cz-nav-icon > i:nth-of-type(2), .cz-tabbar a > i:nth-of-type(2), .cz-tabbar button > i:nth-of-type(2) { display: none; }
.cz-nav-link.active > i:nth-of-type(1), .cz-nav-link.active .cz-nav-icon > i:nth-of-type(1), .cz-tabbar .active > i:nth-of-type(1) { display: none; }
.cz-nav-link.active > i:nth-of-type(2), .cz-nav-link.active .cz-nav-icon > i:nth-of-type(2), .cz-tabbar .active > i:nth-of-type(2) { display: inline-block; }
.cz-nav-link.active { font-weight: 700; }
.cz-nav-link.active .cz-avatar { box-shadow: 0 0 0 2px var(--cz-surface), 0 0 0 4px var(--cz-text); }
.cz-nav-link > span:last-child { display: none; white-space: nowrap; }
.cz-nav-icon { position: relative; display: inline-flex; }
.cz-sidenav .cz-avatar-xs { width: 24px; height: 24px; }
.cz-sidenav-more .dropdown-menu { min-width: 240px; }

.cz-badge {
    position: absolute; top: -6px; right: -9px;
    min-width: 18px; height: 18px; padding: 0 5px;
    border-radius: 9px; border: 2px solid var(--cz-surface);
    background: var(--cz-like); color: #fff;
    font-size: 11px; font-weight: 700; line-height: 14px; text-align: center;
}
.cz-badge[hidden] { display: none; }

/* Top bar: members on phones, visitors everywhere */
.cz-topbar {
    position: sticky; top: 0; z-index: 1030;
    display: flex; align-items: center; justify-content: space-between;
    height: 60px; padding: 0 16px;
    background: var(--cz-glass);
    -webkit-backdrop-filter: saturate(180%) blur(16px); backdrop-filter: saturate(180%) blur(16px);
    border-bottom: 1px solid var(--cz-border);
}
.cz-topbar-logo img { height: 30px; width: auto; display: block; }
.cz-topbar-actions { display: flex; align-items: center; gap: 8px; }
.cz-topbar-guest { padding: 0; }
.cz-topbar-inner { display: flex; align-items: center; gap: 24px; width: 100%; max-width: 975px; margin: 0 auto; padding: 0 20px; }
.cz-topbar-links { display: flex; gap: 20px; flex: 1; }
.cz-topbar-links a { color: var(--cz-text-2) !important; font-weight: 600; font-size: 14px; }
.cz-topbar-links a:hover, .cz-topbar-links a.active { color: var(--cz-accent) !important; }
.cz-icon-btn {
    position: relative; display: inline-grid; place-items: center;
    width: 40px; height: 40px; border-radius: 50%;
    color: var(--cz-text) !important; font-size: 24px;
}
.cz-icon-btn .cz-badge { top: 2px; right: 0; }

/* Tab bar: members on phones */
.cz-tabbar {
    position: fixed; inset: auto 0 0 0; z-index: 1030;
    display: none; justify-content: space-around; align-items: center;
    height: calc(52px + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
    background: var(--cz-surface); border-top: 1px solid var(--cz-border);
}
.cz-tabbar a, .cz-tabbar button {
    display: grid; place-items: center; flex: 1; height: 52px;
    border: 0; background: none; color: var(--cz-text) !important; font-size: 25px;
}
.cz-tabbar .cz-avatar-xs { width: 26px; height: 26px; }
.cz-tabbar .active .cz-avatar { box-shadow: 0 0 0 2px var(--cz-surface), 0 0 0 3.5px var(--cz-text); }

/* Breakpoints of the frame */
@media (min-width: 768px) {
    body.cz-member .cz-main { margin-left: var(--cz-nav-w); }
    .cz-topbar-member { display: none; }
}
@media (min-width: 1264px) {
    :root { --cz-nav-w: 244px; }
    .cz-logo-full { display: block; }
    .cz-logo-mark { display: none; }
    .cz-nav-link > span:last-child { display: inline; }
}
@media (max-width: 767.98px) {
    .cz-sidenav { display: none; }
    .cz-tabbar { display: flex; }
    body.cz-member .cz-main { padding-bottom: calc(52px + env(safe-area-inset-bottom)); }
    .cz-page { padding: 16px 12px; }
    .cz-topbar-links { display: none; }
    .cz-topbar-inner { justify-content: space-between; padding: 0 12px; }
}

/* Footer */
.cz-footer { padding: 32px 16px 40px; text-align: center; color: var(--cz-muted); font-size: 12px; }
.cz-footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 16px; margin-bottom: 12px; }
.cz-footer-links a { color: var(--cz-muted) !important; }
.cz-footer-links a:hover { text-decoration: underline; }
body.cz-member.cz-ctl-timeline .cz-footer,
body.cz-member.cz-ctl-chat .cz-footer,
body.cz-member.cz-ctl-message .cz-footer { display: none; }

/* ---------- Buttons and inputs ---------- */

.cz-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    min-height: 34px; padding: 7px 16px;
    border: 0; border-radius: var(--cz-radius-sm);
    font: 600 14px/1.2 var(--cz-font); white-space: nowrap; cursor: pointer;
    transition: background .15s ease, opacity .15s ease, transform .1s ease;
}
.cz-btn:active { transform: scale(.98); }
.cz-btn-primary { background: var(--cz-accent); color: #fff !important; }
.cz-btn-primary:hover { background: var(--cz-accent-hover); }
.cz-btn-secondary { background: var(--cz-fill); color: var(--cz-text) !important; }
.cz-btn-secondary:hover { background: var(--cz-fill-hover); }
.cz-btn-link { background: none; color: var(--cz-accent) !important; padding-left: 8px; padding-right: 8px; }
.cz-btn-link:hover { color: var(--cz-accent-hover) !important; }
.cz-btn-sm { min-height: 32px; padding: 6px 14px; font-size: 14px; }
.cz-btn-block { width: 100%; }
.cz-btn[disabled], .cz-btn.disabled { opacity: .55; pointer-events: none; }
.cz-btn-icon { width: 34px; padding: 0; }

.cz-input {
    display: block; width: 100%;
    height: 40px; padding: 9px 12px;
    background: var(--cz-bg); border: 1px solid var(--cz-border); border-radius: 6px;
    font: 14px var(--cz-font); color: var(--cz-text);
}
.cz-input:focus { outline: none; border-color: var(--cz-border-strong); background: var(--cz-surface); }

/* Bootstrap buttons and fields across the older pages */
.cz-body .btn { border-radius: var(--cz-radius-sm); font-weight: 600; font-size: 14px; padding: 7px 16px; box-shadow: none !important; }
.cz-body .btn-lg { padding: 10px 22px; font-size: 15px; }
.cz-body .btn-sm { padding: 5px 12px; font-size: 13px; }
.cz-body .btn-primary { background: var(--cz-accent); border-color: var(--cz-accent); color: #fff; }
.cz-body .btn-primary:hover, .cz-body .btn-primary:focus { background: var(--cz-accent-hover); border-color: var(--cz-accent-hover); }
.cz-body .btn-secondary, .cz-body .btn-default, .cz-body .btn-light { background: var(--cz-fill); border-color: var(--cz-fill); color: var(--cz-text); }
.cz-body .btn-secondary:hover, .cz-body .btn-default:hover, .cz-body .btn-light:hover { background: var(--cz-fill-hover); border-color: var(--cz-fill-hover); color: var(--cz-text); }
.cz-body .btn-outline-primary { color: var(--cz-accent); border-color: var(--cz-accent); }
.cz-body .btn-outline-primary:hover { background: var(--cz-accent); color: #fff; }
.cz-body .btn-success { background: #16a34a; border-color: #16a34a; }
.cz-body .btn-info { background: var(--cz-accent); border-color: var(--cz-accent); color: #fff; }
.cz-body .form-control, .cz-body .form-select, .cz-body select.select {
    border-radius: 8px; border-color: var(--cz-border); background-color: var(--cz-bg);
    font-size: 14px; padding: 9px 12px; color: var(--cz-text);
}
.cz-body .form-control:focus, .cz-body .form-select:focus {
    border-color: #a78bfa; background-color: #fff; box-shadow: 0 0 0 3px rgba(124, 58, 237, .14);
}
.cz-body .form-check-input:checked { background-color: var(--cz-accent); border-color: var(--cz-accent); }
.cz-body .form-check-input:focus { box-shadow: 0 0 0 3px rgba(124, 58, 237, .18); border-color: #a78bfa; }
.cz-body label, .cz-body .form-label, .cz-body .control-label { font-size: 13px; font-weight: 600; color: var(--cz-text-2); }
.cz-body .badge.bg-primary, .cz-body .badge-primary { background: var(--cz-accent) !important; }
.cz-body .card { border: 1px solid var(--cz-border); border-radius: var(--cz-radius); box-shadow: none; }
.cz-body .card-header { background: var(--cz-surface); border-bottom: 1px solid var(--cz-border-soft); font-weight: 700; color: var(--cz-text); }
.cz-body .card-header.bg-primary { background: var(--cz-surface) !important; color: var(--cz-text) !important; }
.cz-body .card-header.bg-primary * { color: var(--cz-text) !important; }
.cz-body .alert { border-radius: var(--cz-radius); border: 1px solid transparent; font-size: 14px; }
.cz-body .alert-warning { background: #fff7e6; border-color: #fde3a7; color: #7a4b00; }
.cz-body .alert-danger { background: #fff0f1; border-color: #ffd1d6; color: #9f1239; }
.cz-body .alert-success { background: #ecfdf3; border-color: #bbf7d0; color: #166534; }
.cz-body .alert-info { background: var(--cz-accent-soft); border-color: #e4d7ff; color: #4c1d95; }
.cz-body .dropdown-menu, .cz-menu {
    border: 0; border-radius: var(--cz-radius); padding: 8px;
    box-shadow: var(--cz-shadow-lg); font-size: 14px;
}
.cz-body .dropdown-item { border-radius: 8px; padding: 9px 12px; color: var(--cz-text); }
.cz-body .dropdown-item i { width: 22px; display: inline-block; }
.cz-body .dropdown-item:hover, .cz-body .dropdown-item:focus { background: var(--cz-hover); color: var(--cz-text); }
.cz-body .pagination .page-link { border: 0; color: var(--cz-text); border-radius: 8px !important; margin: 0 2px; }
.cz-body .pagination .active .page-link, .cz-body .pagination .page-item.active .page-link { background: var(--cz-text); color: #fff; }

/* ---------- Avatars ---------- */

.cz-avatar {
    display: inline-block; flex: none;
    width: 32px; height: 32px; border-radius: 50%;
    object-fit: cover; background: var(--cz-surface-2);
}
.cz-avatar-xs { width: 24px; height: 24px; }
.cz-avatar-sm { width: 32px; height: 32px; }
.cz-avatar-md { width: 44px; height: 44px; }
.cz-avatar-lg { width: 56px; height: 56px; }
.cz-avatar-xl { width: 150px; height: 150px; }
/* A ring like a story: gradient for recent activity, grey otherwise */
.cz-ring { display: inline-grid; place-items: center; padding: 2px; border-radius: 50%; background: var(--cz-ring); flex: none; }
.cz-ring > .cz-avatar { border: 2.5px solid var(--cz-surface); }
.cz-ring.is-seen { background: var(--cz-border); }
.cz-online-dot { position: relative; }
.cz-online-dot::after {
    content: ""; position: absolute; right: 2px; bottom: 2px;
    width: 12px; height: 12px; border-radius: 50%;
    background: var(--cz-online); border: 2px solid var(--cz-surface);
}

/* ---------- Feed ---------- */

.cz-feed-layout { display: flex; justify-content: center; gap: 64px; }
.cz-feed { width: 100%; max-width: 470px; flex: none; }
.cz-feed-aside { width: 320px; flex: none; padding-top: 12px; }
@media (max-width: 1159.98px) { .cz-feed-aside { display: none; } }
body.cz-ctl-timeline .cz-page { max-width: 935px; padding-top: 22px; }

.cz-stories {
    display: flex; gap: 14px; overflow-x: auto; scrollbar-width: none;
    padding: 6px 2px 14px; margin-bottom: 8px;
}
.cz-stories::-webkit-scrollbar { display: none; }
.cz-story { display: flex; flex-direction: column; align-items: center; gap: 5px; width: 72px; flex: none; color: var(--cz-text-2) !important; }
.cz-story .cz-avatar { width: 62px; height: 62px; }
.cz-story-name { max-width: 72px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.cz-story-add { position: relative; }
.cz-story-add .cz-plus {
    position: absolute; right: 4px; top: 46px;
    width: 22px; height: 22px; border-radius: 50%;
    display: grid; place-items: center;
    background: var(--cz-accent); color: #fff; border: 2px solid var(--cz-surface); font-size: 13px;
}

.cz-post { background: var(--cz-surface); border-bottom: 1px solid var(--cz-border); padding-bottom: 16px; margin-bottom: 18px; }
body.cz-ctl-timeline .cz-post { background: transparent; }
.cz-post-head { display: flex; align-items: center; gap: 10px; padding: 8px 0 10px; }
.cz-post-who { flex: 1; min-width: 0; line-height: 1.25; }
.cz-post-user { font-weight: 600; color: var(--cz-text) !important; font-size: 14px; }
.cz-post-meta { color: var(--cz-muted); font-size: 14px; }
.cz-post-meta .bi { font-size: 12px; }
.cz-post-sub { display: block; color: var(--cz-muted); font-size: 12px; }
.cz-post-menu { border: 0; background: none; padding: 4px 6px; font-size: 18px; color: var(--cz-text); line-height: 1; }
.cz-post-media {
    position: relative; overflow: hidden;
    border: 1px solid var(--cz-border-soft); border-radius: 4px;
    background: #000; aspect-ratio: 4 / 5; max-height: 585px;
}
.cz-post-media.is-square { aspect-ratio: 1 / 1; }
.cz-post-media img { width: 100%; height: 100%; object-fit: cover; display: block; user-select: none; }
.cz-post-text {
    display: grid; place-items: center; padding: 32px;
    aspect-ratio: 1 / 1; border-radius: 4px; background: var(--cz-brand);
    color: #fff; font-size: clamp(18px, 4.4vw, 24px); font-weight: 700; line-height: 1.3; text-align: center;
    overflow-wrap: anywhere;
}
.cz-post-text.v1 { background: linear-gradient(135deg, #f97316, #ec4899); }
.cz-post-text.v2 { background: linear-gradient(135deg, #0ea5e9, #6366f1); }
.cz-post-text.v3 { background: linear-gradient(135deg, #10b981, #0ea5e9); }
.cz-heart-burst {
    position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none;
    color: #fff; font-size: 96px; opacity: 0; transform: scale(.4);
    filter: drop-shadow(0 4px 16px rgba(0, 0, 0, .35));
}
.cz-heart-burst.go { animation: cz-burst .9s ease forwards; }
@keyframes cz-burst {
    15% { opacity: .95; transform: scale(1.15); }
    30% { transform: scale(.95); }
    45%, 80% { opacity: .95; transform: scale(1); }
    100% { opacity: 0; transform: scale(.8); }
}
.cz-post-actions { display: flex; align-items: center; gap: 4px; padding: 6px 0 2px; margin-left: -8px; }
.cz-act {
    display: inline-grid; place-items: center; width: 40px; height: 40px;
    border: 0; background: none; color: var(--cz-text) !important; font-size: 24px; line-height: 1;
    transition: transform .1s ease, opacity .15s ease;
}
.cz-act:hover { opacity: .55; }
.cz-act:active { transform: scale(.88); }
.cz-act-like.is-liked { color: var(--cz-like) !important; animation: cz-pop .35s ease; }
.cz-act-like.is-liked:hover { opacity: 1; }
.cz-act-spacer { flex: 1; }
@keyframes cz-pop { 50% { transform: scale(1.25); } }
.cz-post-likes { font-weight: 600; font-size: 14px; color: var(--cz-text); }
.cz-post-caption { font-size: 14px; color: var(--cz-text); margin: 4px 0 0; white-space: pre-line; overflow-wrap: anywhere; }
.cz-post-caption .cz-post-user { margin-right: 4px; }
.cz-post-more { display: inline-block; margin-top: 6px; color: var(--cz-muted) !important; font-size: 14px; border: 0; background: none; padding: 0; }
.cz-comments { list-style: none; margin: 4px 0 0; padding: 0; }
.cz-comment { font-size: 14px; color: var(--cz-text); margin: 3px 0; overflow-wrap: anywhere; }
.cz-comment .cz-post-user { margin-right: 4px; }
.cz-comment-time { color: var(--cz-muted); font-size: 12px; margin-left: 6px; }
.cz-comments-all .cz-comment { display: flex; gap: 10px; margin: 12px 0; }
.cz-comment-form { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.cz-comment-form input {
    flex: 1; border: 0; background: none; padding: 6px 0; font-size: 14px; color: var(--cz-text);
}
.cz-comment-form input:focus { outline: none; }
.cz-comment-form button { border: 0; background: none; color: var(--cz-accent); font-weight: 600; font-size: 14px; padding: 0; }
.cz-comment-form button:disabled { opacity: .35; }
.cz-feed-end { text-align: center; color: var(--cz-muted); padding: 24px 0 40px; font-size: 14px; }
.cz-feed-end .bi { display: block; font-size: 44px; color: var(--cz-accent); margin-bottom: 6px; }
.cz-spinner { width: 28px; height: 28px; border: 3px solid var(--cz-border); border-top-color: var(--cz-muted); border-radius: 50%; margin: 20px auto; animation: cz-spin .8s linear infinite; }
@keyframes cz-spin { to { transform: rotate(360deg); } }

.cz-empty { text-align: center; padding: 56px 24px; }
.cz-empty-icon {
    display: inline-grid; place-items: center; width: 88px; height: 88px; margin-bottom: 16px;
    border: 2px solid var(--cz-text); border-radius: 50%; font-size: 40px; color: var(--cz-text);
}
.cz-empty h2 { font-size: 26px; font-weight: 800; margin-bottom: 8px; }
.cz-empty p { color: var(--cz-muted); max-width: 360px; margin: 0 auto 18px; }

@media (max-width: 767.98px) {
    body.cz-ctl-timeline .cz-page { padding: 0 0 16px; }
    .cz-stories { padding: 12px 12px 12px; border-bottom: 1px solid var(--cz-border); background: var(--cz-surface); }
    .cz-post { margin-bottom: 4px; padding-bottom: 14px; }
    .cz-post-head, .cz-post-body { padding-left: 12px; padding-right: 12px; }
    .cz-post-actions { margin-left: 4px; }
    .cz-post-media, .cz-post-text { border-radius: 0; border-left: 0; border-right: 0; }
}

/* ---------- Suggestions (beside the feed) ---------- */

.cz-me { display: flex; align-items: center; gap: 12px; margin-bottom: 22px; }
.cz-row-user { display: flex; align-items: center; gap: 12px; }
.cz-row-who { flex: 1; min-width: 0; line-height: 1.25; font-size: 14px; }
.cz-row-who a { color: var(--cz-text) !important; font-weight: 600; }
.cz-row-who small { display: block; color: var(--cz-muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cz-row-action { border: 0; background: none; padding: 0; color: var(--cz-accent) !important; font-size: 12px; font-weight: 600; }
.cz-row-action:hover { color: var(--cz-text) !important; }
.cz-aside-title { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; font-size: 14px; }
.cz-aside-title span { color: var(--cz-muted); font-weight: 600; }
.cz-aside-title a { color: var(--cz-text) !important; font-size: 12px; font-weight: 600; }
.cz-suggest .cz-row-user { padding: 8px 0; }
.cz-aside-foot { margin-top: 28px; color: var(--cz-faint); font-size: 12px; line-height: 1.7; }
.cz-aside-foot a { color: var(--cz-faint) !important; }
.cz-aside-foot a:not(:last-child)::after { content: " \00b7 "; }

/* ---------- Profile ---------- */

.cz-profile { max-width: 935px; margin: 0 auto; }
.cz-profile-head { display: flex; align-items: center; gap: 28px; padding: 8px 0 32px; }
.cz-profile-photo { flex: 0 0 290px; display: flex; justify-content: center; }
.cz-profile-photo .cz-avatar { width: 150px; height: 150px; }
.cz-profile-photo .cz-ring { padding: 3px; }
.cz-profile-photo .cz-ring > .cz-avatar { border-width: 4px; }
.cz-profile-info { flex: 1; min-width: 0; }
.cz-profile-top { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 10px; margin-bottom: 18px; }
.cz-profile-name { font-size: 20px; font-weight: 400; color: var(--cz-text); margin: 0 12px 0 0; overflow-wrap: anywhere; }
.cz-profile-name .bi-patch-check-fill { color: var(--cz-accent); font-size: 16px; margin-left: 4px; }
.cz-profile-stats { text-transform: lowercase; display: flex; gap: 40px; list-style: none; padding: 0; margin: 0 0 18px; font-size: 16px; color: var(--cz-text); }
.cz-profile-stats strong { font-weight: 600; }
.cz-profile-stats a { color: inherit !important; }
.cz-profile-bio { font-size: 14px; color: var(--cz-text); }
.cz-profile-bio .cz-bio-name { font-weight: 600; }
.cz-profile-bio .cz-bio-meta { color: var(--cz-muted); }
.cz-profile-bio p { margin: 4px 0 0; white-space: pre-line; overflow-wrap: anywhere; }
.cz-profile-online { display: inline-flex; align-items: center; gap: 6px; margin-top: 6px; color: var(--cz-muted); font-size: 13px; }
.cz-profile-online .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--cz-online); }
.cz-tabs { display: flex; justify-content: center; gap: 60px; border-top: 1px solid var(--cz-border); }
.cz-tab {
    display: inline-flex; align-items: center; gap: 6px; height: 52px; margin-top: -1px;
    border: 0; border-top: 1px solid transparent; background: none;
    color: var(--cz-muted) !important; font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
}
.cz-tab .bi { font-size: 13px; }
.cz-tab.active { color: var(--cz-text) !important; border-top-color: var(--cz-text); }
.cz-tabpane[hidden] { display: none; }
.cz-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
.cz-tile { position: relative; display: block; aspect-ratio: 1 / 1; overflow: hidden; background: var(--cz-surface-2); }
.cz-tile img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .35s ease; }
.cz-tile-text {
    display: grid; place-items: center; height: 100%; padding: 16px;
    background: var(--cz-brand); color: #fff; font-weight: 700; text-align: center; font-size: 15px; line-height: 1.3;
    overflow: hidden; overflow-wrap: anywhere;
}
.cz-tile-hover {
    position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 26px;
    background: rgba(0, 0, 0, .32); color: #fff; font-weight: 700; font-size: 16px; opacity: 0; transition: opacity .15s ease;
}
.cz-tile-hover .bi { margin-right: 6px; }
.cz-tile:hover .cz-tile-hover { opacity: 1; }
.cz-tile-badge { position: absolute; top: 8px; right: 8px; color: #fff; font-size: 18px; filter: drop-shadow(0 1px 3px rgba(0, 0, 0, .5)); }
.cz-locked { text-align: center; padding: 48px 16px; border-top: 1px solid var(--cz-border); }
.cz-locked .cz-empty-icon { width: 64px; height: 64px; font-size: 28px; }
.cz-about { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 32px; padding: 24px 0; }
.cz-about dl { margin: 0; }
.cz-about-item { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--cz-border-soft); font-size: 14px; }
.cz-about-item dt { color: var(--cz-muted); font-weight: 400; }
.cz-about-item dd { margin: 0; color: var(--cz-text); font-weight: 600; text-align: right; overflow-wrap: anywhere; }
.cz-about-block { grid-column: 1 / -1; padding: 16px 0 4px; }
.cz-about-block h3 { font-size: 14px; color: var(--cz-muted); font-weight: 600; margin-bottom: 10px; }
.cz-about-block p { white-space: pre-line; overflow-wrap: anywhere; }
.cz-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.cz-chip { display: inline-flex; align-items: center; padding: 6px 12px; border-radius: 999px; background: var(--cz-accent-soft); color: var(--cz-link); font-size: 13px; font-weight: 600; }

@media (max-width: 735.98px) {
    .cz-profile-head { gap: 20px; padding: 4px 4px 20px; align-items: flex-start; flex-wrap: wrap; }
    .cz-profile-photo { flex: 0 0 auto; }
    .cz-profile-photo .cz-avatar { width: 86px; height: 86px; }
    .cz-profile-photo .cz-ring > .cz-avatar { border-width: 3px; }
    .cz-profile-info { display: contents; }
    .cz-profile-top { flex: 1; min-width: 0; flex-direction: column; align-items: stretch; margin: 6px 0 0; }
    .cz-profile-top .cz-btn { width: 100%; }
    .cz-profile-name { margin: 0; }
    .cz-profile-bio { order: 3; flex: 0 0 100%; }
    .cz-profile-stats {
        order: 4; flex: 0 0 calc(100% + 8px); margin: 0 -4px; padding: 12px 0;
        justify-content: space-around; text-align: center; gap: 0;
        border-top: 1px solid var(--cz-border); font-size: 14px;
    }
    .cz-profile-stats li { display: flex; flex-direction: column; color: var(--cz-muted); }
    .cz-profile-stats strong { color: var(--cz-text); }
    .cz-tabs { gap: 0; justify-content: space-around; }
    .cz-tab span { display: none; }
    .cz-tab .bi { font-size: 22px; }
    .cz-grid { gap: 2px; }
    .cz-about { grid-template-columns: 1fr; padding: 8px 4px; }
}

/* ---------- Explore (member search) ---------- */

.cz-explore-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.cz-explore-head h1 { margin: 0; font-size: 24px; font-weight: 800; }
.cz-filter-chips { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.cz-filter-chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; background: var(--cz-fill); color: var(--cz-text); font-size: 13px; font-weight: 600; }
.cz-people { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.cz-person {
    position: relative; display: block; overflow: hidden; border-radius: var(--cz-radius);
    aspect-ratio: 4 / 5; background: var(--cz-surface-2); color: #fff !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, .06);
}
.cz-person img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s ease; }
.cz-person:hover img { transform: scale(1.04); }
.cz-person-info {
    position: absolute; inset: auto 0 0 0; padding: 40px 12px 12px;
    background: linear-gradient(to top, rgba(0, 0, 0, .72), rgba(0, 0, 0, 0));
}
.cz-person-name { display: flex; align-items: center; gap: 6px; font-weight: 700; font-size: 15px; line-height: 1.2; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.cz-person-name .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--cz-online); flex: none; box-shadow: 0 0 0 2px rgba(255, 255, 255, .35); }
.cz-person-meta { font-size: 12px; opacity: .9; margin-top: 2px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.cz-person-promo { font-size: 12px; opacity: .85; margin-top: 4px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
@media (max-width: 991.98px) { .cz-people { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 575.98px) { .cz-people { grid-template-columns: repeat(2, 1fr); gap: 6px; } .cz-person { border-radius: 8px; } }

/* The filter bar of profile/filter.vm */
.cz-body .filter-topbar, .cz-body .search-filter-bar, .cz-body .active-filters-bar {
    background: none !important; border: 0 !important; box-shadow: none !important; padding: 0 !important;
}

/* ---------- Modals ---------- */

.cz-modal .modal-content { border: 0; border-radius: var(--cz-radius); overflow: hidden; box-shadow: var(--cz-shadow-lg); }
.cz-modal-narrow { max-width: 400px; }
.cz-modal-center { text-align: center; padding: 28px 0 0; }
.cz-modal-center h5 { font-size: 20px; margin: 0 24px 6px; }
.cz-modal-center p { margin: 0 24px 22px; font-size: 14px; }
.cz-modal-icon { display: inline-grid; place-items: center; width: 72px; height: 72px; margin-bottom: 14px; border-radius: 50%; background: var(--cz-accent-soft); color: var(--cz-accent); font-size: 34px; }
.cz-modal-actions { display: flex; flex-direction: column; }
.cz-modal-action { display: block; padding: 13px; border: 0; border-top: 1px solid var(--cz-border); background: none; color: var(--cz-text) !important; font-size: 14px; }
.cz-modal-action:hover { background: var(--cz-bg); }
.cz-modal-action-primary { color: var(--cz-accent) !important; font-weight: 700; }
.modal-backdrop.show { opacity: .65; }

.cz-auth-card { padding: 36px 40px 22px; text-align: center; }
.cz-auth-logo { height: 42px; width: auto; margin-bottom: 26px; }
.cz-auth-form { display: flex; flex-direction: column; gap: 8px; }
.cz-auth-form .cz-btn { margin-top: 8px; }
.cz-auth-forgot { display: inline-block; margin-top: 18px; font-size: 13px; color: var(--cz-link) !important; }
.cz-auth-switch { padding: 18px; border-top: 1px solid var(--cz-border); text-align: center; font-size: 14px; }
.cz-auth-switch a { font-weight: 700; color: var(--cz-accent) !important; }

.cz-modal-create { max-width: 860px; }
.cz-modal-head { display: grid; grid-template-columns: 64px 1fr 64px; align-items: center; height: 46px; border-bottom: 1px solid var(--cz-border); }
.cz-modal-head h5 { margin: 0; text-align: center; font-size: 16px; font-weight: 700; }
.cz-modal-head-btn { border: 0; background: none; height: 46px; font-size: 16px; color: var(--cz-text); }
.cz-modal-head-primary { color: var(--cz-accent); font-weight: 700; font-size: 14px; }
.cz-create { display: flex; min-height: 420px; }
.cz-create-drop {
    position: relative; flex: 1 1 60%; display: grid; place-items: center; margin: 0;
    background: var(--cz-bg); cursor: pointer; border-right: 1px solid var(--cz-border); overflow: hidden;
}
.cz-create-drop.is-dragging { background: var(--cz-accent-soft); }
.cz-create-empty { display: flex; flex-direction: column; align-items: center; gap: 14px; color: var(--cz-text); font-size: 20px; font-weight: 400; }
.cz-create-empty .bi { font-size: 72px; line-height: 1; color: var(--cz-text); }
.cz-create-drop.has-image .cz-create-empty { display: none; }
.cz-create-drop img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cz-create-side { flex: 1 1 40%; display: flex; flex-direction: column; padding: 16px; min-width: 0; }
.cz-create-author { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--cz-text); margin-bottom: 12px; }
.cz-create-caption { width: 100%; border: 0; resize: none; font: 15px/1.45 var(--cz-font); color: var(--cz-text); flex: 1; min-height: 140px; }
.cz-create-caption:focus { outline: none; }
.cz-create-count { text-align: right; font-size: 12px; color: var(--cz-faint); padding: 4px 0 12px; border-bottom: 1px solid var(--cz-border-soft); }
.cz-create-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--cz-border-soft); }
.cz-create-row label { font-weight: 400; cursor: pointer; }
.cz-create-row-title { display: block; font-size: 15px; color: var(--cz-text); }
.cz-create-row .form-check-input { width: 2.6em; height: 1.4em; cursor: pointer; }
.cz-create-remove { margin-top: 12px; align-self: flex-start; border: 0; background: none; color: var(--cz-danger); font-size: 14px; font-weight: 600; padding: 0; }
@media (max-width: 767.98px) {
    .cz-modal-create { margin: 0; max-width: none; min-height: 100%; }
    .cz-modal-create .modal-content { border-radius: 0; min-height: 100vh; }
    .cz-create { flex-direction: column; }
    .cz-create-drop { flex: none; aspect-ratio: 1 / 1; border-right: 0; border-bottom: 1px solid var(--cz-border); }
    .cz-create-empty { font-size: 16px; }
    .cz-create-empty .bi { font-size: 56px; }
}

/* ---------- Landing page (visitors) ---------- */

body.cz-guest.cz-ctl-index .cz-page { max-width: 935px; padding-top: 40px; }
.cz-landing { display: flex; align-items: center; justify-content: center; gap: 40px; min-height: calc(100vh - 220px); }
.cz-landing-art { position: relative; flex: 0 0 380px; height: 540px; }
.cz-landing-card {
    position: absolute; overflow: hidden; border-radius: 22px; box-shadow: var(--cz-shadow-lg); background: var(--cz-surface);
}
.cz-landing-card img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cz-landing-card.c1 { left: 0; top: 40px; width: 230px; height: 400px; transform: rotate(-6deg); }
.cz-landing-card.c2 { right: 0; top: 0; width: 230px; height: 420px; transform: rotate(5deg); z-index: 1; }
.cz-landing-card.c3 { left: 70px; bottom: 0; width: 240px; height: 190px; z-index: 2; transform: rotate(-2deg); }
.cz-landing-chat {
    position: absolute; right: -8px; bottom: 70px; z-index: 3; max-width: 230px;
    padding: 10px 14px; border-radius: 18px 18px 4px 18px; background: var(--cz-accent); color: #fff;
    font-size: 14px; box-shadow: var(--cz-shadow);
}
.cz-landing-like {
    position: absolute; left: -10px; top: 18px; z-index: 3; display: flex; align-items: center; gap: 6px;
    padding: 8px 12px; border-radius: 999px; background: var(--cz-surface); color: var(--cz-like); font-weight: 700; font-size: 14px; box-shadow: var(--cz-shadow);
}
.cz-landing-auth { flex: 0 0 350px; }
.cz-landing-box { background: var(--cz-surface); border: 1px solid var(--cz-border); border-radius: var(--cz-radius); }
.cz-landing-box + .cz-landing-box { margin-top: 10px; }
.cz-landing-tagline { color: var(--cz-muted); font-size: 16px; font-weight: 600; margin: -8px 0 22px; }
.cz-landing-features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 56px 0 8px; }
.cz-feature { padding: 20px; border-radius: var(--cz-radius); background: var(--cz-surface); border: 1px solid var(--cz-border-soft); }
.cz-feature .bi { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--cz-accent-soft); color: var(--cz-accent); font-size: 22px; margin-bottom: 12px; }
.cz-feature h3 { font-size: 15px; margin-bottom: 4px; }
.cz-feature p { margin: 0; color: var(--cz-muted); font-size: 14px; }
.cz-check { display: flex; align-items: center; gap: 8px; margin: 4px 0 0; font-size: 13px; color: var(--cz-muted); text-align: left; }
.cz-check input { accent-color: var(--cz-accent); }
@media (max-width: 875.98px) {
    .cz-landing-art { display: none; }
    .cz-landing { min-height: 0; }
    .cz-landing-features { grid-template-columns: 1fr; margin-top: 32px; }
}
@media (max-width: 450px) {
    .cz-landing-auth { flex: 1 1 auto; }
    .cz-landing-box { border: 0; background: none; }
    .cz-auth-card { padding: 24px 12px 12px; }
}

/* ---------- Chat (messenger.css and chatroom.css lay it out; this restyles it) ---------- */

body.cz-ctl-chat.cz-act-room .cz-page, body.cz-ctl-message.cz-act-messenger .cz-page { max-width: 1240px; padding: 0; }
/* chatroom.css fixes the layout to the window; fit it between the navigation bars */
.cz-body .chat-messenger-layout {
    top: 0; left: var(--cz-nav-w); right: 0; bottom: 0; height: auto;
    margin: 0; border: 0; border-radius: 0; box-shadow: none; background: var(--cz-surface);
}
@media (max-width: 767.98px) {
    .cz-body .chat-messenger-layout { top: 60px; left: 0; bottom: calc(52px + env(safe-area-inset-bottom)); }
    .cz-body .chatroom-panel { top: 60px; bottom: calc(52px + env(safe-area-inset-bottom)); }
}
/* The "no connection" notice of websockets.js: a small toast instead of a grey screen */
.cz-body .blockUI.blockMsg {
    top: auto !important; bottom: 24px !important; left: 50% !important; right: auto !important; width: auto !important; max-width: 360px;
    transform: translateX(-50%); padding: 12px 18px !important; border: 0 !important; border-radius: 12px !important;
    background: rgba(38, 38, 38, .92) !important; color: #fff !important; opacity: 1 !important; font-size: 13px !important; text-align: left !important;
}
.cz-body .blockUI.blockMsg h1, .cz-body .blockUI.blockMsg h2 { font-size: 14px !important; color: #fff !important; margin: 0 0 2px !important; }
.cz-body .blockUI.blockOverlay { background: transparent !important; }
.cz-body .conversations-panel { width: 360px; border-right: 1px solid var(--cz-border); background: var(--cz-surface); }
.cz-body .conversations-header { padding: 32px 24px 12px; border: 0; background: var(--cz-surface); }
.cz-body .conversations-header h2 { font-size: 20px; font-weight: 700; border: 0; padding: 0; margin: 0; }
.cz-body .conversations-header h2::after { display: none; }
.cz-body .conversations-header .btn { border: 0; background: none; font-size: 20px; color: var(--cz-text); }
.cz-body .conversations-search { padding: 4px 24px 12px; border: 0; background: var(--cz-surface); }
.cz-body .conversations-search input { height: 40px; border-radius: 8px; border: 0; background: var(--cz-fill); padding: 0 16px; font-size: 14px; width: 100%; }
.cz-body .conversation-item { gap: 12px; padding: 8px 24px; border: 0; background: none; transition: background .12s ease; }
.cz-body .conversation-item:hover { background: var(--cz-hover); }
.cz-body .conversation-item.active { background: var(--cz-fill); border: 0; box-shadow: none; }
.cz-body .conversation-item.active::before { display: none; }
.cz-body .conversation-avatar { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; border: 0; }
.cz-body .conversation-name { font-size: 14px; font-weight: 600; color: var(--cz-text); }
.cz-body .conversation-preview { font-size: 13px; color: var(--cz-muted); }
.cz-body .conversation-time { font-size: 12px; color: var(--cz-muted); }
.cz-body .chatroomWrapper { background: var(--cz-surface); }
.cz-body .chatroomHeader {
    min-height: 74px; padding: 0 20px; background: var(--cz-surface) !important; color: var(--cz-text) !important;
    border-bottom: 1px solid var(--cz-border); font-size: 16px; font-weight: 700; box-shadow: none;
}
.cz-body .chatroomHeader * { color: var(--cz-text) !important; }
.cz-body .chatroomHeader .participants-toggle { border: 1px solid var(--cz-border); background: none; border-radius: 8px; padding: 6px 12px; font-size: 13px; font-weight: 600; }
.cz-body .chatroomContent { background: var(--cz-surface); padding: 16px 20px; }
.cz-body .chatMessage { margin: 2px 0; }
.cz-body .chatroomContainer .chatroomContent .chatMessage .messageBubble {
    padding: 8px 14px; border-radius: 22px; border: 0;
    background: var(--cz-fill); color: var(--cz-text); box-shadow: none; font-size: 15px;
}
.cz-body .chatroomContainer .chatroomContent .chatMessageOwn .messageBubble { background: var(--cz-accent); color: #fff; }
.cz-body .chatroomContainer .chatroomContent .chatMessageOwn .messageBubble * { color: #fff !important; }
.cz-body .messageHeader { font-size: 11px; opacity: .75; margin-bottom: 2px; }
.cz-body .messageAuthor { font-weight: 700; }
.cz-body .messageAvatar img, .cz-body .messageAvatar .avatar { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; }
.cz-body .chatroomContainer .chatroomContent .chatMessageOther .messageBubble.privateBubble { background: var(--cz-fill); }
.cz-body .chatroomFooter { padding: 14px 20px 18px; background: var(--cz-surface); border: 0; box-shadow: none; }
.cz-body .chatroomMessage {
    display: flex; align-items: center; gap: 6px; padding: 4px 6px 4px 12px;
    border: 1px solid var(--cz-border); border-radius: 24px; background: var(--cz-surface);
}
.cz-body .chatroomMessage #line, .cz-body .chatroomMessage .form-control {
    flex: 1; border: 0 !important; background: none !important; box-shadow: none !important; height: 38px; padding: 0 4px; font-size: 15px;
}
.cz-body .chatroomMessage #btnAttachImage { border: 0; background: none; font-size: 20px; color: var(--cz-text); padding: 4px 8px; }
.cz-body .chatroomMessage #btnSend { border: 0; background: none; color: var(--cz-accent); font-weight: 700; font-size: 14px; padding: 6px 10px; }
.cz-body .chatroomMessage #btnSend:hover { color: var(--cz-accent-hover); }
.cz-body #loadOlder { display: block; margin: 0 auto 12px; border-radius: 999px; }
.cz-body .chatroomUsers { background: var(--cz-surface); border-left: 1px solid var(--cz-border); }
.cz-body .empty-state i { color: var(--cz-muted); }

/* ---------- Forms of the older pages (register, edit, settings) ---------- */

.cz-body fieldset, .cz-body .well {
    background: var(--cz-surface); border: 1px solid var(--cz-border); border-radius: var(--cz-radius);
    padding: 20px 24px; margin-bottom: 16px; box-shadow: none;
}
.cz-body legend {
    float: none; width: auto; margin: 0 0 12px; padding: 0;
    font-size: 16px; font-weight: 700; color: var(--cz-text);
    background: none !important; border: 0 !important; box-shadow: none !important;
}
.cz-body .form-group, .cz-body .control-group { margin-bottom: 14px; }
.cz-body .help-block, .cz-body .form-text { font-size: 12px; color: var(--cz-muted); }
.cz-body .row-fluid { display: flex; flex-wrap: wrap; gap: 24px; }
.cz-body .row-fluid > [class*="span"] { flex: 1 1 320px; min-width: 0; }
.cz-body .thumbnails { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.cz-body .thumbnails > li { width: auto !important; margin: 0 !important; }

/* Page title the older templates print as <h2> */
.cz-page > h2:first-child, .cz-page > .page-header h1 { font-size: 22px; font-weight: 800; margin-bottom: 16px; }

/* ---------- Utilities ---------- */

.cz-card { background: var(--cz-surface); border: 1px solid var(--cz-border); border-radius: var(--cz-radius); }
.cz-divider { height: 1px; background: var(--cz-border); margin: 16px 0; }
.cz-sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
@media (prefers-reduced-motion: reduce) {
    .cz-body *, .cz-body *::before, .cz-body *::after { animation: none !important; transition: none !important; }
}

/* ---------- Leftovers of the older layouts ---------- */

.cz-body .chatroomWrapper { min-width: 0; }
.cz-body .list-group-item { border-color: var(--cz-border-soft); }
.cz-body .list-group-item.active, .cz-body .list-group-item-action.active {
    background: var(--cz-hover); border-color: var(--cz-border-soft); color: var(--cz-text); font-weight: 700;
}
.cz-body .list-group-item.active * { color: var(--cz-text) !important; }

/* Chat bubbles: a quiet header (time only for own lines, name for others) */
.cz-chat-partner { display: flex; align-items: center; gap: 12px; color: var(--cz-text) !important; }
.cz-chat-partner span { display: flex; flex-direction: column; line-height: 1.2; font-weight: 700; }
.cz-chat-partner small { font-weight: 400; font-size: 12px; color: var(--cz-muted) !important; }
.cz-body .chatroomContent .messageHeader { display: flex; align-items: baseline; gap: 6px; flex-wrap: nowrap; white-space: nowrap; }
.cz-body .chatroomContent .chatMessageOwn .messageAuthor { display: none; }
.cz-body .chatroomContent .privateIndicator { font-size: 0; }
.cz-body .chatroomContent .privateIndicator i { font-size: 10px; }
.cz-body .chatroomContent .messageTime { font-size: 10px; opacity: .8; }
.cz-body .blockUI.blockMsg { max-width: calc(100vw - 32px); }

/* Chat rooms list */
.cz-rooms { display: grid; gap: 10px; }
.cz-room {
    display: flex; align-items: center; gap: 14px; padding: 14px 16px;
    background: var(--cz-surface); border: 1px solid var(--cz-border); border-radius: var(--cz-radius); color: var(--cz-text) !important;
    transition: background .12s ease;
}
.cz-room:hover { background: var(--cz-hover); }
.cz-room-icon { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; background: var(--cz-brand); color: #fff; font-size: 20px; flex: none; }
.cz-room-body { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.cz-room-desc, .cz-room-meta { color: var(--cz-muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cz-tile-delete {
    position: absolute; right: 8px; bottom: 8px; display: grid; place-items: center; width: 34px; height: 34px;
    border-radius: 50%; background: rgba(0, 0, 0, .55); color: #fff !important; font-size: 15px; opacity: 0; transition: opacity .15s ease;
}
.cz-tile:hover .cz-tile-delete, .cz-tile-delete:focus { opacity: 1; }
@media (hover: none) { .cz-tile-delete { opacity: 1; } }

/* ---------- Meldingen, lists, search bar, post page ---------- */

.cz-page-title { font-size: 24px; font-weight: 800; margin: 0 0 20px; }
.cz-activity, .cz-people-page { max-width: 640px; margin: 0 auto; }
.cz-activity-section + .cz-activity-section { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--cz-border); }
.cz-activity-section h2 { font-size: 16px; font-weight: 700; margin: 0 0 8px; display: flex; align-items: center; gap: 8px; }
.cz-activity-list, .cz-list { list-style: none; margin: 0; padding: 0; }
.cz-activity-row { display: flex; align-items: center; gap: 12px; padding: 8px 10px; margin: 0 -10px; border-radius: 10px; }
.cz-activity-row.is-fresh { background: var(--cz-accent-soft); }
.cz-activity-text { flex: 1; min-width: 0; font-size: 14px; color: var(--cz-text); line-height: 1.35; overflow-wrap: anywhere; }
.cz-activity-quote { color: var(--cz-text-2); }
.cz-activity-ago { color: var(--cz-muted); white-space: nowrap; }
.cz-activity-side { display: flex; gap: 6px; flex: none; align-items: center; }
.cz-activity-side form { margin: 0; }
.cz-activity-thumb { display: block; width: 44px; height: 44px; border-radius: 6px; overflow: hidden; background: var(--cz-brand); }
.cz-activity-thumb img { width: 100%; height: 100%; object-fit: cover; }
.cz-activity-thumb-text { display: grid; place-items: center; height: 100%; color: #fff; font-size: 20px; }
.cz-done { color: var(--cz-muted); font-size: 13px; font-weight: 600; }
.cz-count { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--cz-fill); color: var(--cz-text); font-size: 12px; font-weight: 700; }
.cz-count.is-hot { background: var(--cz-like); color: #fff; }

.cz-list .cz-row-user { padding: 10px 0; border-bottom: 1px solid var(--cz-border-soft); }
.cz-list .cz-row-user:last-child { border-bottom: 0; }
.cz-list .cz-row-who a { font-size: 15px; }
.cz-list form { margin: 0; }
.cz-tabs-left { justify-content: flex-start; gap: 28px; margin-bottom: 8px; }
.cz-tabs-left .cz-tab { letter-spacing: 0; text-transform: none; font-size: 15px; gap: 8px; }
.cz-tabs-left .cz-tab span:first-child { display: inline !important; }
@media (max-width: 735.98px) { .cz-tabs-left { justify-content: space-around; gap: 0; } }

.cz-searchbar { position: relative; margin: 0 0 14px; }
.cz-searchbar .bi { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--cz-muted); }
.cz-searchbar input {
    width: 100%; height: 44px; padding: 0 16px 0 40px; border: 0; border-radius: 10px;
    background: var(--cz-fill); font: 15px var(--cz-font); color: var(--cz-text);
}
.cz-searchbar input:focus { outline: 2px solid #c4b5fd; background: var(--cz-surface); }

.cz-post-page { margin: 0 auto; }
.cz-back { display: inline-flex; align-items: center; gap: 6px; margin: 0 0 8px; color: var(--cz-text) !important; font-weight: 600; font-size: 14px; }
@media (max-width: 767.98px) { .cz-back { margin: 12px 12px 4px; } }

.cz-tile-label {
    position: absolute; left: 8px; top: 8px; padding: 4px 10px; border-radius: 999px;
    background: rgba(255, 255, 255, .92); color: var(--cz-text); font-size: 12px; font-weight: 700;
}
.cz-tile-main { position: absolute; left: 8px; bottom: 8px; margin: 0; opacity: 0; transition: opacity .15s ease; }
.cz-tile-main button { border: 0; border-radius: 999px; padding: 6px 12px; background: rgba(255, 255, 255, .92); color: var(--cz-text); font-size: 12px; font-weight: 700; }
.cz-tile:hover .cz-tile-main, .cz-tile-main:focus-within { opacity: 1; }
@media (hover: none) { .cz-tile-main { opacity: 1; } }
.cz-tabs-left .cz-tab .cz-count { display: inline-grid !important; }

/* Iteration 2 fixes */
.cz-body a.cz-post-meta { color: var(--cz-muted); }
.cz-body a.cz-post-meta:hover { color: var(--cz-text); }
.cz-post-media { background: var(--cz-surface-2); }
.cz-story .cz-online-dot::after { right: 4px; bottom: 4px; width: 14px; height: 14px; }
.cz-explore-tabs { margin: 0 0 14px; }

/* Checkbox lists of core's forms (interests, characteristics, wanted relations) as chips */
.cz-body .checkbox-group-container { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.cz-body .checkbox-group-item { margin: 0; padding: 0; }
.cz-body .checkbox-group-item label {
    display: inline-flex; align-items: center; gap: 6px; margin: 0; padding: 6px 12px;
    border: 1px solid var(--cz-border); border-radius: 999px; background: var(--cz-surface);
    font-size: 13px; font-weight: 500; color: var(--cz-text); cursor: pointer; user-select: none;
    transition: background .12s ease, border-color .12s ease;
}
.cz-body .checkbox-group-item label:hover { border-color: var(--cz-border-strong); }
.cz-body .checkbox-group-item input[type=checkbox] { position: absolute; opacity: 0; width: 1px; height: 1px; }
.cz-body .checkbox-group-item label:has(input:checked) { background: var(--cz-accent); border-color: var(--cz-accent); color: #fff; }
.cz-body .checkbox-group-item label:has(input:focus-visible) { outline: 2px solid #c4b5fd; outline-offset: 2px; }
.cz-body .toggle-all { display: none; }

/* Text-only tiles: the same four colours as the feed */
.cz-tile-text.v1 { background: linear-gradient(135deg, #f97316, #ec4899); }
.cz-tile-text.v2 { background: linear-gradient(135deg, #0ea5e9, #6366f1); }
.cz-tile-text.v3 { background: linear-gradient(135deg, #10b981, #0ea5e9); }
.cz-comment { position: relative; padding-right: 26px; }
.cz-comment-delete { position: absolute; right: 0; top: -2px; margin: 0; opacity: 0; transition: opacity .12s ease; }
.cz-comment-delete button { border: 0; background: none; padding: 2px 4px; color: var(--cz-muted); font-size: 16px; line-height: 1; }
.cz-comment-delete button:hover { color: var(--cz-danger); }
.cz-comment:hover .cz-comment-delete, .cz-comment-delete:focus-within { opacity: 1; }
@media (hover: none) { .cz-comment-delete { opacity: .7; } }
.cz-tile form.js-confirm { margin: 0; } button.cz-tile-delete { border: 0; cursor: pointer; }

/* Report dialog */
.cz-report { padding: 16px 20px 20px; display: flex; flex-direction: column; gap: 4px; }
.cz-report-option { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--cz-border-soft); font-weight: 500 !important; font-size: 15px !important; cursor: pointer; }
.cz-report-option input { accent-color: var(--cz-accent); width: 18px; height: 18px; }
.cz-report textarea { height: auto; margin-top: 10px; }
.cz-report-done { text-align: center; padding: 28px 24px; }
.cz-modal-head { grid-template-columns: minmax(64px, auto) 1fr minmax(64px, auto); padding: 0 6px; }
.cz-modal-head-primary { padding: 0 10px; white-space: nowrap; }
@media (max-width: 735.98px) {
    .cz-profile-top { position: relative; }
    .cz-profile-top .cz-profile-name { padding-right: 36px; }
    .cz-profile-top > .dropdown { position: absolute; top: 0; right: -6px; }
}

/* Profiel bewerken, the short form */
.cz-edit { max-width: 680px; margin: 0 auto; }
.cz-edit-photo { display: flex; align-items: center; gap: 14px; padding: 16px; margin-bottom: 24px; background: var(--cz-fill); border: 0; }
.cz-edit-form { display: flex; flex-direction: column; gap: 18px; }
.cz-edit-row { display: grid; grid-template-columns: 160px 1fr; gap: 16px; align-items: start; }
.cz-edit-row > label { padding-top: 9px; font-size: 15px !important; font-weight: 700 !important; }
.cz-edit-row .control-label { display: none; }
.cz-edit-row .control-group, .cz-edit-row .form-group { margin: 0; }
.cz-edit-row small { display: block; margin-top: 6px; }
.cz-edit-actions { display: flex; align-items: center; gap: 8px; padding-left: 176px; }
@media (max-width: 600px) {
    .cz-edit-row { grid-template-columns: 1fr; gap: 6px; }
    .cz-edit-row > label { padding-top: 0; }
    .cz-edit-actions { padding-left: 0; }
}
.cz-body .input-group.date .datepicker-inline, .cz-body .input-group.date > .datepicker { display: none !important; }

/* ---------- Several photos per post (media.js) ---------- */
.cz-carousel-track {
    display: flex; width: 100%; height: 100%; overflow-x: auto; overflow-y: hidden;
    scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain;
}
.cz-carousel-track::-webkit-scrollbar { display: none; }
.cz-carousel-track > img { flex: 0 0 100%; width: 100%; height: 100%; object-fit: cover; scroll-snap-align: center; scroll-snap-stop: always; }
.cz-carousel-count {
    position: absolute; top: 12px; right: 12px; padding: 3px 9px; border-radius: 12px;
    background: rgba(18, 18, 18, .7); color: #fff; font-size: 12px; font-weight: 600; pointer-events: none;
}
.cz-carousel-btn {
    position: absolute; top: 50%; transform: translateY(-50%); width: 30px; height: 30px; border-radius: 50%;
    border: 0; display: grid; place-items: center; padding: 0;
    background: rgba(255, 255, 255, .85); color: #262626; font-size: 14px; box-shadow: 0 1px 4px rgba(0, 0, 0, .25);
}
.cz-carousel-btn.is-prev { left: 10px; }
.cz-carousel-btn.is-next { right: 10px; }
.cz-carousel-btn[hidden] { display: none; }
@media (hover: none) { .cz-carousel-btn { display: none; } }
.cz-carousel-dots { display: flex; justify-content: center; gap: 4px; height: 0; position: relative; top: 14px; }
.cz-carousel-dots span { width: 6px; height: 6px; border-radius: 50%; background: var(--cz-faint); transition: background .2s; }
.cz-carousel-dots span.is-on { background: var(--cz-accent); }
.cz-tile-multi { position: absolute; top: 8px; right: 8px; color: #fff; font-size: 17px; filter: drop-shadow(0 1px 3px rgba(0, 0, 0, .5)); }
.cz-tile-badge + .cz-tile-multi { right: 34px; }

.cz-create-media { flex: 1 1 60%; display: flex; flex-direction: column; min-width: 0; border-right: 1px solid var(--cz-border); }
.cz-create-media .cz-create-drop { flex: 1; border-right: 0; min-height: 360px; }
.cz-create-strip { display: flex; align-items: center; gap: 8px; padding: 10px 12px; overflow-x: auto; border-top: 1px solid var(--cz-border); }
.cz-create-strip[hidden] { display: none; }
.cz-strip-thumb, .cz-strip-add {
    flex: none; width: 56px; height: 56px; border-radius: 6px; overflow: hidden; padding: 0; margin: 0;
    border: 2px solid transparent; background: var(--cz-surface-2); cursor: pointer;
}
.cz-strip-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cz-strip-thumb.is-on { border-color: var(--cz-accent); }
.cz-strip-add { display: grid; place-items: center; font-size: 20px; color: var(--cz-text); border: 1px dashed var(--cz-border); }
.cz-strip-count { margin-left: auto; font-size: 12px; color: var(--cz-muted); padding-left: 8px; }
.cz-create-status { margin-top: 10px; font-size: 13px; color: var(--cz-muted); }
.cz-create-status.is-error { color: var(--cz-danger); }
.cz-create-status[hidden] { display: none; }
@media (max-width: 767.98px) {
    .cz-create-media { flex: none; border-right: 0; border-bottom: 1px solid var(--cz-border); }
    .cz-create-media .cz-create-drop { aspect-ratio: 1 / 1; min-height: 0; border-bottom: 0; }
}

/* ---------- Stories: the bar, the new-story dialog and the viewer (media.js) ---------- */
.cz-story-open { border: 0; background: none; padding: 0; cursor: pointer; }
button.cz-story { border: 0; background: none; padding: 0; }
.cz-story-add .cz-plus { border: 2px solid var(--cz-surface); padding: 0; cursor: pointer; }
.cz-ring.is-none { background: transparent; }
.cz-profile-photo .cz-story-open { display: inline-block; border-radius: 50%; }

.cz-modal-story { max-width: 420px; }
.cz-story-pick {
    position: relative; display: grid; place-items: center; margin: 0; cursor: pointer;
    aspect-ratio: 9 / 16; max-height: 68vh; width: 100%; background: var(--cz-surface-2); overflow: hidden;
}
.cz-story-pick .cz-create-empty { font-size: 16px; text-align: center; padding: 16px; }
.cz-story-pick .cz-create-empty .bi { font-size: 56px; }
.cz-story-pick.has-image .cz-create-empty { display: none; }
.cz-story-pick img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #000; }
.cz-story-caption { padding: 12px 16px 16px; }
#storyForm .cz-create-status { margin: 0; padding: 0 16px 12px; }

body.cz-sv-open { overflow: hidden; }
.cz-sv { position: fixed; inset: 0; z-index: 2000; background: #1a1a1a; display: grid; place-items: center; }
.cz-sv-frame {
    position: relative; height: 100vh; height: 100dvh; max-height: 900px; aspect-ratio: 9 / 16; max-width: 100vw;
    background: #000; overflow: hidden; color: #fff; user-select: none; touch-action: manipulation;
}
@media (min-width: 600px) { .cz-sv-frame { height: calc(100vh - 32px); border-radius: 10px; } }
.cz-sv-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; transition: opacity .2s; }
.cz-sv-img.is-loading { opacity: .3; }
.cz-sv-bars { position: absolute; top: 8px; left: 8px; right: 8px; display: flex; gap: 3px; z-index: 3; }
.cz-sv-bar { flex: 1; height: 2px; border-radius: 2px; background: rgba(255, 255, 255, .35); overflow: hidden; }
.cz-sv-bar i { display: block; height: 100%; width: 0; background: #fff; }
.cz-sv-bar.is-done i { width: 100% !important; }
.cz-sv-head {
    position: absolute; top: 14px; left: 0; right: 0; z-index: 3; display: flex; align-items: center; gap: 4px;
    padding: 6px 8px 16px 12px; background: linear-gradient(rgba(0, 0, 0, .35), transparent);
}
.cz-sv-who { flex: 1; display: flex; align-items: center; gap: 8px; color: #fff !important; min-width: 0; font-size: 14px; }
.cz-sv-who strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cz-sv-ago { color: rgba(255, 255, 255, .7); white-space: nowrap; }
.cz-sv-btn { border: 0; background: none; color: #fff; font-size: 20px; padding: 6px; line-height: 1; }
.cz-sv-btn[hidden] { display: none; }
.cz-sv-tap { position: absolute; top: 70px; bottom: 76px; z-index: 2; border: 0; background: transparent; padding: 0; }
.cz-sv-tap.is-prev { left: 0; width: 33%; }
.cz-sv-tap.is-next { right: 0; width: 67%; }
.cz-sv-caption {
    position: absolute; left: 16px; right: 16px; bottom: 84px; z-index: 3; text-align: center; pointer-events: none;
    font-size: 17px; font-weight: 600; line-height: 1.35; text-shadow: 0 1px 4px rgba(0, 0, 0, .7); overflow-wrap: anywhere;
}
.cz-sv-caption[hidden] { display: none; }
.cz-sv-foot {
    position: absolute; left: 0; right: 0; bottom: 0; z-index: 3; display: flex; justify-content: center; padding: 14px 16px 18px;
    background: linear-gradient(transparent, rgba(0, 0, 0, .45));
}
.cz-sv-reply, .cz-sv-views {
    display: inline-flex; align-items: center; gap: 8px; padding: 9px 18px; border-radius: 22px;
    border: 1px solid rgba(255, 255, 255, .7); background: transparent; color: #fff !important; font-size: 14px;
}
.cz-sv-reply[hidden], .cz-sv-views[hidden] { display: none; }
.cz-sv-sheet {
    position: absolute; left: 0; right: 0; bottom: 0; z-index: 4; max-height: 60%; overflow: auto;
    background: var(--cz-surface); color: var(--cz-text); border-radius: 14px 14px 0 0; padding: 8px 16px 16px;
}
.cz-sv-sheet[hidden] { display: none; }
.cz-sv-sheet-head { display: flex; align-items: center; justify-content: space-between; padding: 6px 0 10px; border-bottom: 1px solid var(--cz-border-soft); }
.cz-sv-sheet .cz-sv-btn { color: var(--cz-text); font-size: 16px; }
.cz-sv-sheet ul { list-style: none; margin: 0; padding: 0; }
.cz-sv-sheet li { display: flex; align-items: center; justify-content: space-between; padding: 8px 0; font-size: 14px; }
.cz-sv-sheet li a { display: flex; align-items: center; gap: 10px; color: var(--cz-text) !important; }

/* ---------- Berichten and chat (templates/ui/conversations.vm, chat/room.vm, chat.js) ---------- */
body.cz-ctl-chat.cz-act-room .cz-page, body.cz-ctl-message.cz-act-messenger .cz-page { max-width: none; padding: 0; }
body.cz-ctl-chat.cz-act-room .cz-footer, body.cz-ctl-message.cz-act-messenger .cz-footer { display: none; }
.cz-dm { display: flex; height: 100vh; height: 100dvh; background: var(--cz-surface); }
.cz-dm-list { width: 360px; flex: none; display: flex; flex-direction: column; border-right: 1px solid var(--cz-border); min-height: 0; }
.cz-dm-list-head { display: flex; align-items: center; justify-content: space-between; padding: 30px 24px 10px; }
.cz-dm-list-head h1 { font-size: 20px; font-weight: 700; margin: 0; overflow: hidden; text-overflow: ellipsis; }
.cz-dm-list-title { padding: 12px 24px 8px; font-weight: 700; font-size: 16px; }
.cz-dm-items { overflow-y: auto; flex: 1; padding-bottom: 12px; }
.cz-dm-item { display: flex; align-items: center; gap: 12px; padding: 8px 24px; color: var(--cz-text) !important; }
.cz-dm-item:hover { background: var(--cz-surface-2); }
.cz-dm-item.is-active { background: var(--cz-border-soft); }
.cz-dm-item .cz-avatar { width: 56px; height: 56px; flex: none; }
.cz-dm-item-text { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.cz-dm-item-name { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cz-dm-item-preview { font-size: 12px; color: var(--cz-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cz-dm-item.is-unread .cz-dm-item-name, .cz-dm-item.is-unread .cz-dm-item-preview { font-weight: 700; color: var(--cz-text); }
.cz-dm-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--cz-accent); flex: none; visibility: hidden; }
.cz-dm-item.is-unread .cz-dm-dot { visibility: visible; }
.cz-dm-none { padding: 24px; text-align: center; color: var(--cz-muted); }

.cz-dm-empty { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; text-align: center; padding: 24px; }
.cz-dm-empty h2 { font-size: 20px; font-weight: 400; margin: 6px 0 0; }
.cz-dm-empty-icon { width: 96px; height: 96px; border-radius: 50%; border: 2px solid var(--cz-text); display: grid; place-items: center; font-size: 44px; }

.cz-dm-thread { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.cz-dm-head { display: flex; align-items: center; gap: 8px; height: 75px; padding: 0 16px; border-bottom: 1px solid var(--cz-border); flex: none; }
.cz-dm-back { display: none; }
.cz-dm-who { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; color: var(--cz-text) !important; }
.cz-dm-who strong { display: block; font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cz-dm-who small { display: block; font-size: 12px; color: var(--cz-muted); }
.cz-dm-avatar { position: relative; display: inline-block; }
.cz-dm-avatar .cz-avatar { width: 44px; height: 44px; }
.cz-dm-room-icon { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--cz-ring); color: #fff; font-size: 20px; flex: none; }
.cz-dm-body { flex: 1; min-height: 0; display: flex; position: relative; }
.cz-dm-scroll { flex: 1; overflow-y: auto; padding: 16px 16px 8px; display: flex; flex-direction: column; }
.cz-dm-scroll > .js-dm-lines { margin-top: auto; }
.cz-dm-older { align-self: center; border: 0; background: var(--cz-surface-2); border-radius: 16px; padding: 6px 14px; font-size: 13px; font-weight: 600; margin-bottom: 12px; }
.cz-dm-older[hidden] { display: none; }
.cz-dm-intro { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 24px 0 32px; }
.cz-dm-intro strong { font-size: 18px; }
.cz-btn-light { background: var(--cz-surface-2); color: var(--cz-text) !important; }

.cz-msg { display: flex; align-items: flex-end; gap: 8px; margin-top: 2px; }
.cz-msg.is-first { margin-top: 10px; }
.cz-msg.is-own { justify-content: flex-end; }
.cz-msg-avatar { width: 28px; flex: none; visibility: hidden; }
.cz-msg-avatar .cz-avatar { width: 28px; height: 28px; }
.cz-msg.is-last .cz-msg-avatar { visibility: visible; }
.cz-msg-col { display: flex; flex-direction: column; max-width: min(70%, 520px); gap: 2px; }
.cz-msg.is-own .cz-msg-col { align-items: flex-end; }
.cz-msg-name { font-size: 12px; color: var(--cz-muted); padding: 0 12px 2px; }
.cz-msg:not(.is-first) .cz-msg-name { display: none; }
.cz-msg-bubble {
    padding: 8px 12px; border-radius: 20px; font-size: 15px; line-height: 1.35;
    background: var(--cz-surface-2); color: var(--cz-text); overflow-wrap: anywhere; white-space: pre-wrap;
}
.cz-msg.is-own .cz-msg-bubble { background: var(--cz-accent); color: #fff; }
.cz-msg.is-other:not(.is-first) .cz-msg-bubble { border-top-left-radius: 6px; }
.cz-msg.is-other:not(.is-last) .cz-msg-bubble { border-bottom-left-radius: 6px; }
.cz-msg.is-own:not(.is-first) .cz-msg-bubble { border-top-right-radius: 6px; }
.cz-msg.is-own:not(.is-last) .cz-msg-bubble { border-bottom-right-radius: 6px; }
.cz-msg-photo img { display: block; max-width: 260px; max-height: 340px; border-radius: 18px; object-fit: cover; background: var(--cz-surface-2); }
.cz-msg.is-pending { opacity: .55; }
.cz-msg.is-failed .cz-msg-bubble { background: var(--cz-danger); }
.cz-msg-time { text-align: center; font-size: 12px; color: var(--cz-muted); margin: 18px 0 6px; }
.cz-msg-seen { text-align: right; font-size: 12px; color: var(--cz-muted); padding: 3px 4px 0; }
.cz-dm-typing { display: flex; align-items: center; gap: 8px; padding: 10px 0 0 36px; font-size: 12px; color: var(--cz-muted); }
.cz-dm-typing[hidden] { display: none; }
.cz-dm-dots { display: inline-flex; gap: 3px; padding: 10px 12px; border-radius: 18px; background: var(--cz-surface-2); }
.cz-dm-dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--cz-muted); animation: cz-dot 1.2s infinite ease-in-out; }
.cz-dm-dots i:nth-child(2) { animation-delay: .15s; }
.cz-dm-dots i:nth-child(3) { animation-delay: .3s; }
@keyframes cz-dot { 0%, 60%, 100% { transform: translateY(0); opacity: .5; } 30% { transform: translateY(-4px); opacity: 1; } }

.cz-dm-people { width: 280px; flex: none; border-left: 1px solid var(--cz-border); overflow-y: auto; background: var(--cz-surface); }
.cz-dm-people[hidden] { display: none; }
.cz-dm-people-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid var(--cz-border-soft); }
.cz-dm-people ul { list-style: none; margin: 0; padding: 6px 0; }
.cz-dm-people li { display: flex; align-items: center; gap: 6px; padding: 6px 12px 6px 16px; }
.cz-dm-people li > a:first-child { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; color: var(--cz-text) !important; }
.cz-dm-people li strong { display: block; font-size: 14px; }
.cz-dm-people li small { display: block; font-size: 12px; color: var(--cz-muted); }

.cz-dm-compose { flex: none; padding: 12px 16px 16px; }
.cz-dm-compose-row { display: flex; align-items: center; gap: 4px; border: 1px solid var(--cz-border); border-radius: 22px; padding: 4px 6px 4px 8px; min-height: 44px; }
.cz-dm-compose-row label { margin: 0; cursor: pointer; }
.cz-dm-compose-row input[type=text] { flex: 1; border: 0; outline: none; font-size: 15px; padding: 6px 4px; background: transparent; min-width: 0; color: var(--cz-text); }
.cz-dm-send { border: 0; background: none; color: var(--cz-accent); font-weight: 700; font-size: 14px; padding: 6px 10px; }
.cz-dm-send:disabled { opacity: 0; pointer-events: none; }
.cz-dm-attached { position: relative; display: inline-block; margin: 0 0 8px 8px; }
.cz-dm-attached[hidden] { display: none; }
.cz-dm-attached img { height: 72px; border-radius: 10px; display: block; }
.cz-dm-attached button { position: absolute; top: -8px; right: -8px; width: 24px; height: 24px; border-radius: 50%; border: 0; background: #262626; color: #fff; display: grid; place-items: center; padding: 0; }
.cz-dm-state { font-size: 12px; color: var(--cz-muted); padding: 6px 12px 0; }
.cz-dm-state.is-error { color: var(--cz-danger); }
.cz-dm-state[hidden] { display: none; }

@media (max-width: 1263.98px) { .cz-dm-list { width: 300px; } }
@media (max-width: 991.98px) {
    /* Beside a conversation the list shrinks to avatars */
    .cz-dm:not(.cz-dm-home) .cz-dm-list { width: 88px; }
    .cz-dm:not(.cz-dm-home) .cz-dm-list-head h1, .cz-dm:not(.cz-dm-home) .cz-dm-list-head .cz-icon-btn, .cz-dm:not(.cz-dm-home) .cz-dm-list-title,
    .cz-dm:not(.cz-dm-home) .cz-dm-item-text, .cz-dm:not(.cz-dm-home) .cz-dm-dot, .cz-dm:not(.cz-dm-home) .cz-dm-none p { display: none; }
    .cz-dm:not(.cz-dm-home) .cz-dm-list-head { padding: 24px 0 8px; justify-content: center; }
    .cz-dm:not(.cz-dm-home) .cz-dm-item { justify-content: center; padding: 8px 0; position: relative; }
    .cz-dm:not(.cz-dm-home) .cz-dm-item.is-unread::after { content: ""; position: absolute; top: 10px; right: 14px; width: 10px; height: 10px; border-radius: 50%; background: var(--cz-accent); border: 2px solid var(--cz-surface); }
}
@media (max-width: 767.98px) {
    .cz-dm { height: calc(100dvh - 60px - 52px - env(safe-area-inset-bottom)); }
    .cz-dm-home .cz-dm-list { width: 100%; border-right: 0; }
    .cz-dm-home .cz-dm-list-head { padding: 16px 16px 4px; }
    .cz-dm-home .cz-dm-item { padding: 8px 16px; }
    .cz-dm-home .cz-dm-empty { display: none; }
    /* A conversation fills the screen, like the apps: no top bar, no tab bar */
    body.cz-ctl-chat.cz-act-room .cz-topbar, body.cz-ctl-chat.cz-act-room .cz-tabbar { display: none !important; }
    body.cz-ctl-chat.cz-act-room .cz-main { padding-bottom: 0 !important; }
    body.cz-ctl-chat.cz-act-room .cz-dm { height: 100dvh; }
    .cz-dm-thread .cz-dm-back { display: grid; }
    body.cz-ctl-chat.cz-act-room .cz-dm-list { display: none; }
    .cz-dm-head { height: 60px; padding: 0 8px; }
    .cz-dm-people { position: absolute; inset: 0; width: auto; z-index: 3; border-left: 0; }
    .cz-msg-col { max-width: 78%; }
}


/* ---------- Dark mode: [data-theme="dark"] on <html>, set before the page paints (header.vm) ---------- */
.cz-logo-dark { display: none !important; }
[data-theme="dark"] .cz-logo-light { display: none !important; }
[data-theme="dark"] .cz-logo-dark { display: block !important; }
:root[data-theme="dark"] {
    color-scheme: dark;
    --cz-bg: #000000;
    --cz-surface: #000000;
    --cz-surface-2: #1c1c1e;
    --cz-hover: #1a1a1a;
    --cz-border: #262626;
    --cz-border-soft: #1f1f1f;
    --cz-text: #f5f5f5;
    --cz-text-2: #e5e5e5;
    --cz-muted: #a8a8a8;
    --cz-accent: #8b5cf6;
    --cz-accent-hover: #a78bfa;
    --cz-accent-soft: #2a1f47;
    --cz-link: #c4b5fd;
    --cz-fill: #262626;
    --cz-fill-hover: #363636;
    --cz-faint: #737373;
    --cz-border-strong: #555555;
    --cz-glass: rgba(0, 0, 0, .9);
    --cz-shadow: 0 4px 24px rgba(0, 0, 0, .6);
    --cz-shadow-lg: 0 12px 40px rgba(0, 0, 0, .7);
    --bs-body-bg: #000000;
    --bs-body-color: #f5f5f5;
    --bs-emphasis-color: #ffffff;
    --bs-secondary-bg: #1c1c1e;
    --bs-tertiary-bg: #121212;
    --bs-secondary-color: #a8a8a8;
    --bs-border-color: #262626;
    --bs-primary: #8b5cf6;
    --bs-primary-rgb: 139, 92, 246;
    --bs-link-color: #c4b5fd;
    --bs-link-color-rgb: 196, 181, 253;
    --bs-link-hover-color: #ddd6fe;
}
[data-theme="dark"] body { background: var(--cz-bg); color: var(--cz-text); }
[data-theme="dark"] .modal-content, [data-theme="dark"] .dropdown-menu { background: #262626; color: var(--cz-text); border-color: #363636; }
[data-theme="dark"] .dropdown-item { color: var(--cz-text); }
[data-theme="dark"] .dropdown-item:hover, [data-theme="dark"] .dropdown-item:focus { background: #363636; color: var(--cz-text); }
[data-theme="dark"] .form-control, [data-theme="dark"] .form-select, [data-theme="dark"] .cz-body input[type=text], [data-theme="dark"] .cz-body input[type=email],
[data-theme="dark"] .cz-body input[type=password], [data-theme="dark"] .cz-body input[type=date], [data-theme="dark"] .cz-body textarea, [data-theme="dark"] .cz-body select {
    background-color: #121212; color: var(--cz-text); border-color: #363636;
}
[data-theme="dark"] .form-control::placeholder, [data-theme="dark"] .cz-body textarea::placeholder, [data-theme="dark"] .cz-body input::placeholder { color: #737373; }
[data-theme="dark"] .alert-success { background: #0f2a1b; color: #86efac; border-color: #14532d; }
[data-theme="dark"] .alert-danger { background: #2a0f12; color: #fca5a5; border-color: #7f1d1d; }
[data-theme="dark"] .cz-carousel-btn { background: rgba(38, 38, 38, .9); color: #f5f5f5; }
[data-theme="dark"] .cz-post-text { filter: saturate(.9) brightness(.9); }
[data-theme="dark"] .cz-dm-attached button, [data-theme="dark"] .cz-plus { border-color: #000; }
[data-theme="dark"] .cz-msg.is-other .cz-msg-bubble { background: #262626; }

/* The theme switch in the Meer menu */
.cz-theme { display: flex; gap: 4px; padding: 6px 12px 8px; }
.cz-theme button { flex: 1; border: 1px solid var(--cz-border); background: transparent; color: var(--cz-text); border-radius: 8px; padding: 6px 4px; font-size: 12px; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.cz-theme button .bi { font-size: 16px; }
.cz-theme button[aria-pressed="true"] { border-color: var(--cz-accent); color: var(--cz-accent); background: var(--cz-accent-soft); }
.cz-menu-label { padding: 6px 16px 0; font-size: 12px; color: var(--cz-muted); }
[data-theme="dark"] .cz-body .cz-dm-compose-row input[type=text], [data-theme="dark"] .cz-body .cz-create-caption, [data-theme="dark"] .cz-body .cz-comment-form input, [data-theme="dark"] .cz-body .cz-comment-form textarea { background: transparent; border-color: transparent; }

/* Push notifications on this device (templates/ui/push.vm) */
.cz-push { display: flex; align-items: center; gap: 12px; padding: 14px 16px; margin: 0 0 20px; border: 1px solid var(--cz-border); border-radius: var(--cz-radius); background: var(--cz-surface); }
.cz-push[hidden] { display: none; }
.cz-push-icon { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--cz-accent-soft); color: var(--cz-accent); font-size: 18px; flex: none; }
.cz-push-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.cz-push-text strong { font-size: 14px; }
.cz-push-text small { font-size: 13px; }

/* Account pages: wachtwoord vergeten, nieuw wachtwoord, bevestigen (controllers/register) */
.cz-auth-page { max-width: 380px; margin: 32px auto; display: flex; flex-direction: column; gap: 10px; }
.cz-auth-page .cz-auth-card { border: 1px solid var(--cz-border); border-radius: var(--cz-radius); background: var(--cz-surface); }
.cz-auth-page .cz-auth-switch { border: 1px solid var(--cz-border); border-radius: var(--cz-radius); background: var(--cz-surface); }
.cz-auth-icon { width: 88px; height: 88px; border-radius: 50%; border: 2px solid var(--cz-text); display: inline-grid; place-items: center; font-size: 40px; margin-bottom: 14px; }
.cz-auth-title { font-size: 17px; font-weight: 700; margin: 0 0 8px; }
.cz-auth-page p { font-size: 14px; margin-bottom: 18px; }

/* The menu of a chat line (chat.js): take back, report, moderate */
.cz-msg { position: relative; }
.cz-msg-more { align-self: center; border: 0; background: none; color: var(--cz-muted); padding: 2px 6px; font-size: 16px; opacity: 0; transition: opacity .15s; }
.cz-msg:hover .cz-msg-more, .cz-msg-more:focus-visible { opacity: 1; }
@media (hover: none) { .cz-msg-more { opacity: .6; } }
.cz-msg.is-own .cz-msg-more { order: -1; }
.cz-msg-menu { position: absolute; z-index: 5; top: 100%; min-width: 180px; padding: 6px 0; border-radius: 12px; background: var(--cz-surface); border: 1px solid var(--cz-border); box-shadow: var(--cz-shadow-lg); }
.cz-msg-menu.is-up { top: auto; bottom: 100%; }
.cz-msg.is-own .cz-msg-menu { right: 0; }
.cz-msg.is-other .cz-msg-menu { left: 36px; }
.cz-msg-menu-item { display: block; width: 100%; border: 0; background: none; text-align: left; padding: 9px 16px; font-size: 14px; color: var(--cz-text); }
.cz-msg-menu-item:hover { background: var(--cz-hover); }
.cz-msg-menu-item.is-danger { color: var(--cz-danger); }

/* ---------- Public pages for search: landing sections, /daten (controllers/seo, knowledge/web/seo.md) ---------- */
.cz-landing-title { font-size: 20px; font-weight: 700; line-height: 1.3; margin: 0 0 8px; color: var(--cz-text); }
.cz-landing-more { max-width: 760px; margin: 56px auto 24px; padding: 0 20px; }
.cz-landing-more h2, .cz-region h2 { font-size: 20px; font-weight: 700; margin: 36px 0 14px; }
.cz-landing-intro p, .cz-region-lead { font-size: 16px; line-height: 1.6; color: var(--cz-text-2); }
.cz-steps { list-style: none; counter-reset: step; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.cz-steps li { counter-increment: step; display: flex; flex-direction: column; gap: 6px; padding: 18px; border: 1px solid var(--cz-border); border-radius: var(--cz-radius); background: var(--cz-surface); }
.cz-steps li::before { content: counter(step); width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--cz-accent); color: #fff; font-weight: 700; font-size: 14px; }
.cz-steps span { color: var(--cz-muted); font-size: 14px; line-height: 1.5; }
.cz-faq { border-top: 1px solid var(--cz-border); }
.cz-faq details { border-bottom: 1px solid var(--cz-border); padding: 4px 0; }
.cz-faq summary { cursor: pointer; list-style: none; padding: 12px 28px 12px 0; font-weight: 600; font-size: 15px; position: relative; }
.cz-faq summary::-webkit-details-marker { display: none; }
.cz-faq summary::after { content: "+"; position: absolute; right: 4px; top: 8px; font-size: 22px; font-weight: 400; color: var(--cz-muted); }
.cz-faq details[open] summary::after { content: "\2212"; }
.cz-faq p { margin: 0 0 14px; color: var(--cz-text-2); line-height: 1.6; font-size: 15px; }
.cz-regions { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.cz-regions a { display: inline-block; padding: 7px 14px; border-radius: 999px; background: var(--cz-fill); color: var(--cz-text) !important; font-size: 14px; font-weight: 600; }
.cz-regions a:hover { background: var(--cz-fill-hover); }
.cz-region { max-width: 760px; margin: 0 auto; }
.cz-region h1 { font-size: 28px; font-weight: 800; margin: 6px 0 12px; }
.cz-crumbs { font-size: 13px; color: var(--cz-muted); }
.cz-crumbs a { color: var(--cz-muted) !important; }
.cz-crumbs span { margin: 0 2px; }
.cz-region-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 22px 0; }
.cz-region-stats div { padding: 14px; border: 1px solid var(--cz-border); border-radius: var(--cz-radius); background: var(--cz-surface); text-align: center; }
.cz-region-stats dt { font-size: 12px; font-weight: 600; color: var(--cz-muted); text-transform: uppercase; letter-spacing: .04em; }
.cz-region-stats dd { margin: 4px 0 0; font-size: 26px; font-weight: 800; }
.cz-region-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; }
.cz-region-list a { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 12px 14px; border: 1px solid var(--cz-border); border-radius: var(--cz-radius-sm); background: var(--cz-surface); color: var(--cz-text) !important; }
.cz-region-list a:hover { border-color: var(--cz-accent); }
.cz-region-cta { margin: 28px 0 8px; padding: 22px; text-align: center; border: 1px solid var(--cz-border); border-radius: var(--cz-radius); background: var(--cz-accent-soft); }
.cz-region-cta h2 { margin: 0 0 6px !important; }
.cz-region-more { margin: 28px 0; text-align: center; }
@media (max-width: 640px) {
    .cz-steps { grid-template-columns: 1fr; }
    .cz-region-stats { grid-template-columns: repeat(3, 1fr); }
    .cz-region h1 { font-size: 24px; }
}

/* Photo management: the photo opens full size; delete and "profielfoto maken" stay on top */
.cz-tile-view { position: absolute; inset: 0; display: block; z-index: 1; }
.cz-tile-view img { width: 100%; height: 100%; object-fit: cover; }
.cz-tile .cz-tile-delete, .cz-tile .cz-tile-main, .cz-tile .cz-tile-label { z-index: 2; }

/* Meldingen: two faces for a group of likes */
.cz-activity-avatar { flex: none; }
.cz-activity-avatar.is-stack { position: relative; width: 44px; height: 44px; display: block; }
.cz-activity-avatar.is-stack .cz-avatar { position: absolute; width: 32px; height: 32px; border: 2px solid var(--cz-bg); }
.cz-activity-avatar.is-stack .cz-avatar:first-child { top: 0; right: 0; }
.cz-activity-avatar.is-stack .cz-avatar:last-child { bottom: 0; left: 0; }
.cz-activity-row.is-fresh .cz-activity-avatar.is-stack .cz-avatar { border-color: var(--cz-accent-soft); }

/* Labels on photos are always light pills with dark text, also in dark mode (the photo is the background) */
.cz-tile-label, .cz-tile-main button { color: #262626 !important; }

/* Zeg hallo: openers in an empty private chat (chat.js) */
.cz-dm-openers { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px; margin: 4px auto 18px; max-width: 520px; }
.cz-dm-openers[hidden] { display: none; }
.cz-dm-openers > span { flex-basis: 100%; text-align: center; font-size: 13px; }
.cz-dm-openers .cz-chip { border: 1px solid var(--cz-border); background: var(--cz-surface); color: var(--cz-text); border-radius: 999px; padding: 7px 14px; font-size: 14px; font-weight: 400; cursor: pointer; }
.cz-dm-openers .cz-chip:hover { background: var(--cz-hover); }

/* Friends you haven't talked to in a while: the line under the name stands out a little */
.cz-row-user.is-quiet .cz-row-who small { color: var(--cz-accent); }

/* Several blocks beside the feed (Jarig vandaag, Even bijpraten?, Mensen die je misschien kent) */
.cz-feed-aside .cz-suggest + .cz-suggest { margin-top: 22px; }
