/* =========================
   ZUNO DESIGN SYSTEM
   ========================= */

:root {
    --bg: #333333;
    --surface: #3d3d3d;
    --surface-hover: #474747;
    --border: #4f4f4f;

    --text: #fafafa;
    --muted: #bdbdbd;

    --accent: #00ff00;
    --accent-hover: #00d900;

    --radius: 12px;
    --radius-lg: 18px;

    --header-height: 72px;
    --footer-height: 64px;

    --content-width: 1400px;
}

/* =========================
   RESET
   ========================= */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;

    min-height: 100vh;

    background: var(--bg);
    color: var(--text);

    font-family: Arial, Helvetica, sans-serif;
}

body {
    display: flex;
    flex-direction: column;
}

.muted {
    background: var(--muted);
    color: var(--text);
}

.grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.hover-red:hover {
    color: red;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;

    padding: 4px 10px;

    color: var(--text);

    border-radius: 999px;

    font-size: .85rem;
    font-weight: 600;

    border: 1px solid var(--border);
}
/* Tables */

table {
    width: 100%;
    border-collapse: collapse;
    margin: 16px 0;
    overflow: hidden;

    border: 1px solid rgba(128, 128, 128, 0.2);
    border-radius: 12px;
}

table th,
table td {
    padding: 12px 16px;
    text-align: left;
}

table th {
    font-weight: 600;
    border-bottom: 1px solid rgba(128, 128, 128, 0.2);
}

table tbody tr:not(:last-child) td {
    border-bottom: 1px solid rgba(128, 128, 128, 0.15);
}

table tbody tr:hover {
    background: rgba(128, 128, 128, 0.06);
}
table.table-responsive {
    width: 100%;
    overflow-x: auto;
}
/* =========================
   LINKS
   ========================= */

a {
    color: var(--text);
    text-decoration: underline;
}

a:hover {
    color: var(--accent);
}

/* =========================
   LOGO
   ========================= */

#logo {
    display: inline-flex;
    align-items: center;
    font-size: 1.6rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    color: var(--accent);
    text-decoration: none;
    user-select: none;
}

#logo:hover,
#logo:focus-visible {
    color: var(--accent-hover);
    text-decoration: none;
}

/* =========================
   HEADER
   ========================= */

header {
    display: flex;
    position: relative;
    align-items: center;
    text-align: center;
    padding: 12px 16px;
    background: var(--surface);
    border-bottom: 8px solid var(--surface-hover);
    color: var(--text);
    width: 100%;
    min-height: var(--header-height);
    z-index: 1000;
}
/* =========================
   NAVIGATION
   ========================= */

nav {
    display: flex;
    gap: 10px;
}

nav a {
    font-weight: 500;
}

#burger {
    font-size: 24px;
    margin-left: auto;
    margin-bottom: auto;
    background: none;
    border: none;

    cursor: pointer;
}

#nav-menu {
    display: none;
    position: absolute;
    background: var(--bg);
    top: 100%;
    right: 16px;
    width: 280px;
}

#nav-menu.open {
    display: flex;
    flex-direction: column;
}

#nav-menu a {
    padding: 14px 18px;

    text-decoration: none;

    border-bottom: 1px solid #444;
}

#nav-menu a:last-child {
    border-bottom: none;
}

/* =========================
   MAIN
   ========================= */

main {
    flex: 1;

    width: 100%;
    max-width: var(--content-width);

    margin: 0 auto;
    padding: 24px;
}

/* =========================
   FOOTER
   ========================= */

footer {
    width: 100%;
    min-height: var(--footer-height);

    border-top: 4px solid var(--border);

    background: var(--surface);

    display: flex;
    justify-content: center;
    align-items: center;

    color: var(--muted);

    padding: 12px 24px;
}

/* =========================
   CARDS
   ========================= */

.card {
    background: var(--surface);

    border: 1px solid var(--border);

    border-radius: var(--radius-lg);

    padding: 20px;

    transition:
        background 0.2s ease,
        transform 0.2s ease;
}

.card:hover {
    background: var(--surface-hover);
}
/* =========================
   INPUTS
   ========================= */

input,
textarea,
select {
    width: 100%;

    background: #2b2b2b;
    color: var(--text);

    border: 1px solid var(--border);
    border-radius: var(--radius);

    padding: 12px 14px;

    font: inherit;

    outline: none;

    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

input:focus,
textarea:focus,
select:focus {
    border-color: var(--accent);

    box-shadow: 0 0 0 3px rgba(0, 255, 0, 0.15);
}

input::placeholder,
textarea::placeholder {
    color: var(--muted);
}

input[type="checkbox"] {
    accent-color: var(--accent);
    transform: scale(1.1);
}

div.checkbox-row {
    display: flex;
    flex-direction: row;
    align-items: center;
}
/* =========================
   TEXTAREA
   ========================= */

textarea {
    resize: vertical;
    min-height: 140px;
    background: none;
}

/* =========================
   BUTTONS
   ========================= */

button {
    border: none;

    cursor: pointer;

    border-radius: var(--radius);

    padding: 12px 18px;

    font: inherit;
    font-weight: 600;

    background: var(--accent);
    color: var(--text);

    transition:
        transform 0.15s ease,
        background 0.2s ease;
}

button:hover {
    background: var(--accent-hover);
}

button:active {
    transform: scale(0.98);
}

/* =========================
   BURGER MENU
   ========================= */

#burger {
    width: 42px;
    height: 42px;

    margin-left: auto;

    display: flex;

    flex-direction: column;
    justify-content: center;
    gap: 6px;

    cursor: pointer;
}

/* =========================
   SETTINGS
   ========================= */

.settings-tabs {
    display: flex;
    gap: 8px;

    overflow-x: auto;
    -webkit-overflow-scrolling: touch;

    padding-bottom: 8px;
    margin-bottom: 20px;
}

.settings-tabs a {
    flex-shrink: 0;
}

.settings-tabs button {
    width: auto;
    white-space: nowrap;
}

.settings-section {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.settings-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* =========================
   ANALYTICS
   ========================= */

.analytics {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.analytics-range {
    display: flex;
    gap: 8px;

    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.analytics-range a {
    flex-shrink: 0;
}

.analytics-range button {
    width: auto;
    white-space: nowrap;
}

/* =========================
   TABLETS
   ========================= */

@media (max-width: 1024px) {
    main {
        padding: 20px;
    }

    .desktop-only {
        display: none;
    }
}

/* =========================
   MOBILE
   ========================= */

@media (max-width: 768px) {
    header {
        padding: 0 16px;
    }

    form#search {
        right: 40%;
    }

    #nav-menu.open {
        display: flex;
    }

    #burger {
        display: block;
        font-size: 28px;
        background: none;
        border: none;
        color: white;
    }

    main {
        padding: 16px;
    }

    .card {
        padding: 16px;
    }

    button {
        width: 100%;
    }
}

/* =========================
   SMALL PHONES
   ========================= */

@media (max-width: 480px) {
    #logo {
        font-size: 1.3rem;
    }

    main {
        padding: 12px;
    }

    .card {
        padding: 14px;
    }

    input,
    textarea,
    button {
        font-size: 16px;
    }
}

/* =========================
   ROLE BADGES
   ========================= */

.role-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.role-owner {
    background: #ff6b35;
    color: #fff;
}

.role-admin {
    background: #9c27b0;
    color: #fff;
}

.role-moderator {
    background: #2196f3;
    color: #fff;
}

.role-editor {
    background: #4caf50;
    color: #fff;
}

.role-member {
    background: #607d8b;
    color: #fff;
}

.member-actions {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}


/* =========================
   MOBILE APP SHELL
   ========================= */
.feed-topline {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    min-height: 34px;
    margin: 0 0 12px;
}
.feed-username {
    color: var(--text);
    font-weight: 700;
    text-decoration: none;
}
.feed-username:hover {
    color: var(--accent);
}
.mobile-tabbar {
    display: none;
}
.mobile-more {
    position: relative;
}
.mobile-more > summary {
    list-style: none;
    cursor: pointer;
}
.mobile-more > summary::-webkit-details-marker {
    display: none;
}
.mobile-more-menu {
    position: absolute;
    right: 0;
    bottom: calc(100% + 14px);
    display: flex;
    flex-direction: column;
    min-width: 220px;
    padding: 8px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: 0 12px 36px rgba(0,0,0,.35);
    z-index: 1200;
}
.mobile-more-menu a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    color: var(--text);
    text-decoration: none;
    border-radius: 10px;
}
.mobile-more-menu a:hover {
    background: var(--surface-hover);
    color: var(--accent);
}
.mobile-more-menu a span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 22px;
    width: 22px;
}
.mobile-menu-icon svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.mobile-tab svg {
    width: 23px;
    height: 23px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.mobile-tab-create svg {
    width: 27px;
    height: 27px;
    stroke-width: 2.2;
}
@media (max-width: 768px) {
    body:has(.mobile-tabbar) {
        padding-bottom: calc(76px + env(safe-area-inset-bottom));
    }
    body:has(.mobile-tabbar) > header.site-header {
        min-height: 56px;
        height: 56px;
        padding: 0 16px;
        justify-content: flex-start;
        border-bottom-width: 1px;
    }
    body:has(.mobile-tabbar) > header.site-header #search,
    body:has(.mobile-tabbar) > header.site-header #burger,
    body:has(.mobile-tabbar) > header.site-header #nav-menu {
        display: none !important;
    }
    body:has(.mobile-tabbar) > header.site-header #logo {
        font-size: 1.45rem;
    }
    body:has(.mobile-tabbar) > footer.site-footer {
        padding-bottom: 12px;
    }
    .mobile-tabbar {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 1100;
        display: grid;
        grid-template-columns: repeat(5, minmax(0, 1fr));
        align-items: center;
        min-height: 64px;
        padding: 7px 8px calc(7px + env(safe-area-inset-bottom));
        background: rgba(45,45,45,.97);
        border-top: 1px solid var(--border);
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
    }
    .mobile-tab {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 3px;
        min-width: 0;
        min-height: 48px;
        padding: 4px 2px;
        color: var(--muted);
        text-decoration: none;
        font-size: 10px;
        line-height: 1.15;
        font-weight: 600;
        background: transparent;
        border: 0;
    }
    .mobile-tab:hover,
    .mobile-tab:focus-visible,
    .mobile-more[open] > summary {
        color: var(--accent);
        outline-color: var(--accent);
    }
    .mobile-tab-create {
        color: var(--accent);
    }
    .mobile-more-menu {
        bottom: calc(100% + 12px);
    }
}
@media (max-width: 380px) {
    .mobile-tab {
        font-size: 9px;
    }
}


/* =========================
   FRIENDS PAGE
   ========================= */
.friends-container {
    max-width: 900px;
}
.friends-heading,
.friends-section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}
.friends-heading {
    margin-bottom: 28px;
}
.friends-heading h1 {
    margin: 4px 0 0;
}
.friends-eyebrow {
    margin: 0;
    color: var(--muted);
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}
.friends-find-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 9px 14px;
    border: 1px solid var(--border);
    border-radius: 999px;
    text-decoration: none;
    white-space: nowrap;
}
.friends-section {
    margin: 0 0 26px;
}
.friends-section-heading {
    margin-bottom: 12px;
}
.friends-section-heading h2 {
    margin: 0;
    font-size: 1.15rem;
}
.friends-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 28px;
    padding: 0 8px;
    border-radius: 999px;
    background: var(--surface-hover);
    color: var(--muted);
    font-size: .82rem;
    font-weight: 700;
}
.friends-list {
    display: grid;
    gap: 10px;
}
.friend-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-width: 0;
    padding: 14px 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
}
.friend-person {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    color: var(--text);
    text-decoration: none;
}
.friend-avatar {
    display: block;
    flex: 0 0 48px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    background: var(--surface-hover);
}
.friend-avatar-fallback {
    display: grid;
    place-items: center;
    color: var(--accent);
    font-size: 1.1rem;
    font-weight: 800;
}
.friend-person-copy {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}
.friend-person-copy strong,
.friend-person-copy span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.friend-person-copy span {
    color: var(--muted);
    font-size: .9rem;
}
.friend-actions {
    display: flex;
    flex: 0 0 auto;
    gap: 8px;
    margin: 0;
}
.friend-actions form {
    margin: 0;
}
.friend-button {
    width: auto;
    min-height: 40px;
    padding: 9px 14px;
    background: var(--accent);
    color: #202020;
    white-space: nowrap;
}
.friend-button-muted {
    background: var(--surface-hover);
    color: var(--text);
    border: 1px solid var(--border);
}
.friend-button-muted:hover {
    background: var(--border);
}
.friend-pending {
    flex: 0 0 auto;
    color: var(--muted);
    font-size: .88rem;
}
.friends-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 28px 18px;
    text-align: center;
    background: var(--surface);
    border: 1px dashed var(--border);
    border-radius: var(--radius-lg);
    color: var(--muted);
}
.friends-empty p {
    margin: 0;
}
.friends-empty a {
    color: var(--accent);
}
.friends-empty-icon {
    color: var(--muted);
    font-size: 2rem;
}
.friends-empty-compact {
    padding: 18px;
}
@media (max-width: 768px) {
    /* The mobile app has a bottom tab bar, not the desktop legal/copyright footer. */
    body:has(.mobile-tabbar) > footer.site-footer {
        display: none !important;
    }
    body:has(.mobile-tabbar) {
        padding-bottom: calc(76px + env(safe-area-inset-bottom));
    }
    .friends-container {
        padding: 18px 14px 24px;
    }
    .friends-heading {
        margin-bottom: 22px;
    }
    .friends-heading h1 {
        font-size: 1.65rem;
    }
    .friends-section {
        margin-bottom: 22px;
    }
    .friends-section-heading h2 {
        font-size: 1.05rem;
    }
    .friend-card {
        align-items: flex-start;
        flex-wrap: wrap;
        gap: 12px;
        padding: 13px;
    }
    .friend-person {
        flex: 1 1 100%;
    }
    .friend-actions {
        width: 100%;
    }
    .friend-actions form {
        flex: 1 1 0;
    }
    .friend-button {
        width: 100%;
        min-height: 42px;
        padding: 9px 10px;
        font-size: .9rem;
    }
    .friend-pending {
        padding: 7px 0 2px 60px;
    }
}
@media (max-width: 380px) {
    .friends-heading {
        align-items: flex-start;
    }
    .friends-find-link {
        padding: 8px 11px;
        font-size: .9rem;
    }
    .friend-avatar {
        flex-basis: 42px;
        width: 42px;
        height: 42px;
    }
    .friend-pending {
        padding-left: 54px;
    }
}


/* =========================
   SEARCH PAGE — RESPONSIVE
   ========================= */
.search-page {
    width: 100%;
    max-width: 900px;
    min-width: 0;
}
.search-heading {
    margin: 0 0 20px;
}
.search-heading h1 {
    margin: 0;
    font-size: clamp(1.5rem, 4vw, 2rem);
    line-height: 1.2;
}
.search-form {
    display: flex;
    align-items: stretch;
    gap: 10px;
    width: 100%;
    margin: 0 0 28px;
}
.search-form input {
    flex: 1 1 auto;
    min-width: 0;
    min-height: 48px;
}
.search-form button {
    flex: 0 0 auto;
    width: auto;
    min-width: 112px;
    min-height: 48px;
    white-space: nowrap;
}
.search-page h2,
.search-page h3 {
    overflow-wrap: anywhere;
}
.search-page h2 {
    margin: 24px 0 12px;
}
.search-page h3 {
    margin: 22px 0 10px;
}
.search-result-card {
    min-width: 0;
    margin: 0 0 10px;
    overflow-wrap: anywhere;
}
.search-result-card p,
.search-result-card div {
    max-width: 100%;
    overflow-wrap: anywhere;
}
.search-result-card img,
.search-result-card video,
.search-result-card iframe {
    max-width: 100%;
}
.search-empty-state {
    margin: 18px 0;
    padding: 18px;
    color: var(--muted);
    background: var(--surface);
    border: 1px dashed var(--border);
    border-radius: var(--radius-lg);
}
@media (max-width: 768px) {
    .search-page {
        padding: 18px 14px 24px;
    }
    .search-heading {
        margin-bottom: 16px;
    }
    .search-form {
        gap: 8px;
        margin-bottom: 22px;
    }
    .search-form input {
        min-height: 46px;
        padding: 11px 12px;
    }
    .search-form button {
        min-width: 96px;
        padding: 10px 13px;
        font-size: .95rem;
    }
    .search-result-card {
        padding: 14px;
        border-radius: 14px;
    }
    .search-page h2 {
        font-size: 1.2rem;
    }
    .search-page h3 {
        font-size: 1.05rem;
    }
}
@media (max-width: 420px) {
    .search-form {
        flex-direction: column;
    }
    .search-form button {
        width: 100%;
    }
}


/* Hide the legacy site footer on every mobile page, including guest/auth pages. */
@media (max-width: 768px) {
  body > footer.site-footer { display: none !important; }
}

/* Realtime notification toast */
.zuno-notification-stack { position: fixed; top: 16px; right: 16px; z-index: 3000; display: grid; gap: 10px; width: min(360px, calc(100vw - 32px)); pointer-events: none; }
.zuno-notification { padding: 14px 16px; color: var(--text); background: var(--surface); border: 1px solid var(--border); border-left: 3px solid var(--accent); border-radius: 14px; box-shadow: 0 12px 32px rgba(0,0,0,.35); text-decoration: none; pointer-events: auto; animation: zuno-notification-in .2s ease-out; }
.zuno-notification strong { display:block; margin-bottom:4px; }
.zuno-notification span { display:block; color:var(--muted); font-size:.9rem; overflow-wrap:anywhere; }
@keyframes zuno-notification-in { from { opacity:0; transform:translateY(-8px); } to { opacity:1; transform:translateY(0); } }
@media (max-width:768px) { .zuno-notification-stack { top: calc(66px + env(safe-area-inset-top)); left: 12px; right: 12px; width:auto; } }


.zuno-push-optin { position:fixed; z-index:3100; left:16px; right:16px; bottom:calc(84px + env(safe-area-inset-bottom)); max-width:520px; margin:0 auto; display:flex; align-items:center; gap:12px; padding:14px; color:var(--text); background:var(--surface); border:1px solid var(--border); border-radius:14px; box-shadow:0 12px 32px rgba(0,0,0,.3); }
.zuno-push-optin span { flex:1; font-size:.92rem; }
.zuno-push-optin button { border:0; border-radius:9px; padding:9px 12px; cursor:pointer; }
@media(max-width:420px) { .zuno-push-optin { left:10px; right:10px; gap:8px; padding:11px; } .zuno-push-optin span { font-size:.82rem; } }


/* Mobile horizontal scrolling for wide data tables */
@media (max-width: 768px) {
  table {
    display: block;
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
  }

  table th,
  table td {
    white-space: nowrap;
  }

  /* Keep long text readable without forcing the whole page wider. */
  table td:has(p),
  table th:has(p) {
    white-space: normal;
    min-width: 140px;
  }
}

/* =========================
   NOTIFICATIONS CENTER
   ========================= */
.zuno-notifications { position: relative; display: flex; align-items: center; margin-left: auto; }
.zuno-notifications-toggle { position: relative; display: grid; place-items: center; width: 42px; height: 42px; padding: 9px; margin: 0 8px 0 0; color: var(--text); background: transparent; border: 0; border-radius: 50%; }
.zuno-notifications-toggle:hover { background: var(--surface-hover); }
.zuno-notifications-toggle svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.zuno-notifications-count { position: absolute; top: 0; right: 0; min-width: 18px; height: 18px; padding: 0 4px; display: grid; place-items: center; border-radius: 99px; background: #e5484d; color: white; font-size: 10px; font-weight: 700; }
.zuno-notifications-count[hidden], .zuno-notifications-panel[hidden] { display: none !important; }
.zuno-notifications-panel { position: absolute; top: calc(100% + 12px); right: 8px; width: min(370px, calc(100vw - 24px)); max-height: min(70vh, 520px); overflow: auto; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; box-shadow: 0 16px 40px rgba(0,0,0,.38); z-index: 1500; text-align: left; }
.zuno-notifications-heading { position: sticky; top: 0; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 16px; background: var(--surface); border-bottom: 1px solid var(--border); }
.zuno-notifications-heading button { width: auto; padding: 5px 0; color: var(--accent); background: transparent; font-size: .82rem; }
.zuno-notification-item { display: flex; flex-direction: column; gap: 4px; padding: 13px 16px; color: var(--text); text-decoration: none; border-bottom: 1px solid var(--border); }
.zuno-notification-item:hover { background: var(--surface-hover); }
.zuno-notification-item.is-unread { background: rgba(0,255,0,.055); }
.zuno-notification-item strong { font-size: .93rem; }
.zuno-notification-item span { color: var(--muted); font-size: .88rem; overflow-wrap: anywhere; }
.zuno-notification-item small { color: var(--muted); font-size: .75rem; }
.zuno-notifications-empty { padding: 20px 16px; margin: 0; color: var(--muted); text-align: center; }
@media (max-width: 768px) {
  .zuno-notifications { margin-left: auto; }
  .zuno-notifications-toggle { margin-right: 2px; }
  .zuno-notifications-panel { position: fixed; top: calc(62px + env(safe-area-inset-top)); right: 10px; width: min(370px, calc(100vw - 20px)); max-height: min(70vh, 520px); }
}

header:has(.zuno-notifications) #burger { margin-left: 0; }


/* Community members — responsive layout */
.community-members-page { min-width: 0; }
.community-members-page h1 { overflow-wrap: anywhere; line-height: 1.2; }
.members-list { display: grid; gap: 12px; }
.member-card {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 18px; min-width: 0;
}
.member-identity { min-width: 0; overflow-wrap: anywhere; }
.member-actions {
  display: flex; flex: 1 1 420px; flex-wrap: wrap; justify-content: flex-end;
  gap: 10px; min-width: 0; margin: 0;
}
.member-actions form {
  display: flex; flex: 1 1 190px; align-items: center; gap: 8px;
  min-width: 0; margin: 0;
}
.member-actions label { flex: 0 0 auto; }
.member-actions select { flex: 1 1 130px; min-width: 0; }
.member-actions button { flex: 0 0 auto; width: auto; white-space: nowrap; }
@media (max-width: 768px) {
  .community-members-page { padding: 16px 12px 24px; }
  .community-members-page h1 { font-size: clamp(1.35rem, 5vw, 1.8rem); }
  .member-card { flex-direction: column; gap: 14px; padding: 14px; }
  .member-identity { width: 100%; }
  .member-actions { width: 100%; flex: 1 1 auto; flex-direction: column; align-items: stretch; }
  .member-actions form { width: 100%; flex: 1 1 auto; flex-wrap: wrap; align-items: stretch; }
  .member-actions label { width: 100%; }
  .member-actions select { width: 100%; min-height: 44px; }
  .member-actions button { width: 100%; min-height: 44px; }
}


/* Community members page: true mobile layout (requires viewport meta tag). */
.community-members-page {
  box-sizing: border-box;
  width: min(100% - 32px, 1040px);
  max-width: 1040px;
  margin: 28px auto;
  min-width: 0;
}
.community-members-page *,
.community-members-page *::before,
.community-members-page *::after { box-sizing: border-box; }
.community-members-page h1 { font-size: clamp(1.45rem, 3vw, 2rem); line-height: 1.2; overflow-wrap: anywhere; }
.community-members-page .members-list { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; width: 100%; }
.community-members-page .member-card {
  display: flex; align-items: center; justify-content: space-between;
  gap: 18px; width: 100%; min-width: 0; padding: 16px;
}
.community-members-page .member-identity { flex: 0 1 220px; min-width: 0; overflow-wrap: anywhere; }
.community-members-page .member-actions {
  display: flex; flex: 1 1 520px; flex-wrap: wrap; justify-content: flex-end;
  align-items: center; gap: 10px; min-width: 0; margin: 0;
}
.community-members-page .member-actions form {
  display: flex; flex: 1 1 220px; flex-wrap: wrap; align-items: center;
  gap: 8px; min-width: 0; margin: 0;
}
.community-members-page .member-actions label { flex: 0 0 100%; }
.community-members-page .member-actions select { flex: 1 1 120px; width: 100%; min-width: 0; min-height: 42px; }
.community-members-page .member-actions button { flex: 0 0 auto; width: auto; min-height: 42px; white-space: nowrap; }
@media screen and (max-width: 768px) {
  .community-members-page {
    width: 100%; max-width: none; margin: 0 auto;
    padding: 18px 14px calc(92px + env(safe-area-inset-bottom));
  }
  .community-members-page h1 { font-size: 1.45rem; margin: 8px 0 12px; }
  .community-members-page .members-list { gap: 10px; }
  .community-members-page .member-card {
    display: flex; flex-direction: column; align-items: stretch;
    gap: 14px; padding: 14px; border-radius: 14px;
  }
  .community-members-page .member-identity { flex: none; width: 100%; }
  .community-members-page .member-actions {
    display: flex; flex: none; flex-direction: column; align-items: stretch;
    justify-content: flex-start; width: 100%; gap: 12px;
  }
  .community-members-page .member-actions form {
    display: grid; grid-template-columns: minmax(0, 1fr);
    width: 100%; flex: none; gap: 7px;
  }
  .community-members-page .member-actions label { width: 100%; }
  .community-members-page .member-actions select,
  .community-members-page .member-actions button {
    width: 100%; min-width: 0; min-height: 46px;
  }
  .community-members-page .member-actions button { white-space: normal; }
}
@media screen and (max-width: 380px) {
  .community-members-page { padding-left: 10px; padding-right: 10px; }
  .community-members-page .member-card { padding: 12px; }
}


/* Compact mobile header: search lives behind its own icon. */
#mobile-search-toggle {
  display: none;
  flex: 0 0 42px;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  margin: 0 4px 0 0;
  padding: 9px;
  color: var(--text);
  background: transparent;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
}
#mobile-search-toggle svg {
  width: 23px;
  height: 23px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
#mobile-search-toggle:hover { background: var(--surface-hover); }
@media (max-width: 768px) {
  header:has(#mobile-search-toggle) {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 4px;
    min-width: 0;
    padding: 0 10px;
  }
  header:has(#mobile-search-toggle) #logo {
    flex: 0 1 auto;
    min-width: 0;
    margin-right: auto;
    white-space: nowrap;
  }
  header:has(#mobile-search-toggle) #search { display: none; }
  header:has(#mobile-search-toggle) #mobile-search-toggle { display: inline-flex; }
  header:has(#mobile-search-toggle) .zuno-notifications {
    flex: 0 0 42px;
    margin: 0;
  }
  header:has(#mobile-search-toggle) .zuno-notifications-toggle {
    width: 42px;
    height: 42px;
    margin: 0;
  }
  header:has(#mobile-search-toggle) #burger {
    display: flex;
    flex: 0 0 42px;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    margin: 0;
    padding: 0;
    font-size: 25px;
    line-height: 1;
  }
  header:has(#mobile-search-toggle).mobile-search-open #search {
    position: absolute;
    z-index: 1600;
    display: block;
    top: calc(100% + 8px);
    left: 10px;
    right: 10px;
    width: auto;
    margin: 0;
    padding: 10px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: 0 12px 30px rgba(0,0,0,.3);
  }
  header:has(#mobile-search-toggle).mobile-search-open #search input {
    display: block;
    width: 100%;
    min-width: 0;
    min-height: 44px;
    margin: 0;
  }
  body:has(.mobile-tabbar) > header.site-header #mobile-search-toggle { display: inline-flex; }
}
@media (max-width: 380px) {
  header:has(#mobile-search-toggle) { gap: 2px; padding-left: 8px; padding-right: 8px; }
  header:has(#mobile-search-toggle) #logo { font-size: 1.2rem; }
}


/* =========================
   ZUNO MOBILE APP NAVIGATION
   ========================= */
@media (max-width: 768px) {
  body:has(.mobile-tabbar) { padding-bottom: calc(78px + env(safe-area-inset-bottom)); }
  body:has(.mobile-tabbar) > footer { display: none !important; }
  body:has(.mobile-tabbar) > header.site-header {
    height: calc(58px + env(safe-area-inset-top));
    min-height: calc(58px + env(safe-area-inset-top));
    padding: env(safe-area-inset-top) 18px 0;
    justify-content: center;
    background: rgba(39,39,39,.96);
    border-bottom: 1px solid rgba(255,255,255,.07);
  }
  body:has(.mobile-tabbar) > header.site-header #logo {
    margin: 0;
    font-size: 1.55rem;
    letter-spacing: .055em;
  }
  body:has(.mobile-tabbar) > header.site-header #search,
  body:has(.mobile-tabbar) > header.site-header #mobile-search-toggle,
  body:has(.mobile-tabbar) > header.site-header #burger,
  body:has(.mobile-tabbar) > header.site-header #nav-menu,
  body:has(.mobile-tabbar) > header.site-header .zuno-notifications { display: none !important; }
  body:has(.mobile-tabbar) > main { padding-top: 18px; }
  .mobile-tabbar {
    position: fixed;
    left: 0; right: 0; bottom: 0; z-index: 2200;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    align-items: center;
    min-height: calc(66px + env(safe-area-inset-bottom));
    padding: 6px 10px calc(6px + env(safe-area-inset-bottom));
    background: rgba(35,35,35,.94);
    border-top: 1px solid rgba(255,255,255,.09);
    box-shadow: 0 -8px 28px rgba(0,0,0,.18);
    backdrop-filter: blur(22px);
    -webkit-backdrop-filter: blur(22px);
  }
  .mobile-tabbar .mobile-tab {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 4px; width: 100%; min-width: 0; min-height: 48px;
    padding: 4px 1px; margin: 0;
    color: #a8a8a8; background: transparent; border: 0;
    text-decoration: none; font-size: 10px; line-height: 1.1; font-weight: 600;
    white-space: nowrap;
  }
  .mobile-tabbar .mobile-tab svg {
    display: block; width: 22px; height: 22px; fill: none;
    stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
  }
  .mobile-tabbar .mobile-tab-create svg { width: 27px; height: 27px; stroke-width: 2; }
  .mobile-tabbar .mobile-tab-create { color: var(--accent); }
  .mobile-tabbar .mobile-tab[aria-current="page"] { color: var(--accent); }
  .mobile-tabbar .mobile-tab:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; border-radius: 12px; }
}
@media (max-width: 360px) {
  .mobile-tabbar { padding-left: 5px; padding-right: 5px; }
  .mobile-tabbar .mobile-tab { font-size: 9px; }
}

/* More page: calm, uncluttered mobile-first destination */
.more-page { max-width: 760px; padding-top: 28px; }
.more-hero { padding: 24px; margin-bottom: 18px; border: 1px solid rgba(255,255,255,.07); border-radius: 22px; background: radial-gradient(circle at 90% 0%, rgba(0,255,0,.10), transparent 42%), linear-gradient(145deg,#414141,#363636); }
.more-kicker { margin: 0 0 8px; color: var(--accent); font-size: .76rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.more-hero h1 { margin: 0 0 8px; font-size: clamp(1.7rem,5vw,2.2rem); }
.more-hero p:last-child { margin: 0; color: #c4c4c4; line-height: 1.55; }
.more-section-title { margin: 24px 2px 12px; font-size: 1rem; color: #c7c7c7; }
.more-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
.more-card { display: flex; align-items: center; gap: 13px; min-width: 0; min-height: 76px; padding: 14px; border: 1px solid rgba(255,255,255,.07); border-radius: 17px; background: #3b3b3b; color: var(--text); text-decoration: none; transition: background .18s ease, transform .18s ease; }
.more-card:hover { background: #484848; color: var(--text); transform: translateY(-1px); }
.more-card-icon { display: grid; place-items: center; flex: 0 0 42px; width: 42px; height: 42px; border-radius: 14px; background: rgba(0,255,0,.09); color: var(--accent); }
.more-card-icon svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.more-card-copy { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.more-card-copy strong { font-size: .94rem; }
.more-card-copy small { color: #aaa; font-size: .78rem; line-height: 1.3; }
.more-card-arrow { margin-left: auto; color: #888; font-size: 1.2rem; }
.more-quiet-note { margin: 18px 2px 0; color: #999; font-size: .82rem; line-height: 1.5; }
@media (max-width: 480px) {
  .more-page { padding: 18px 14px 28px; }
  .more-hero { padding: 21px 19px; border-radius: 19px; }
  .more-grid { gap: 9px; }
  .more-card { min-height: 74px; gap: 10px; padding: 11px 10px; border-radius: 15px; }
  .more-card-icon { flex-basis: 36px; width: 36px; height: 36px; border-radius: 12px; }
  .more-card-copy strong { font-size: .88rem; }
  .more-card-copy small { font-size: .72rem; }
  .more-card-arrow { display: none; }
}


.more-notifications { margin-top: 18px; padding: 16px; border: 1px solid rgba(255,255,255,.08); border-radius: 18px; background: #393939; scroll-margin-top: 16px; }
.more-notifications[hidden] { display: none; }
.more-notifications-heading { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:10px; }
.more-notifications-heading h2 { margin:0; font-size:1rem; }
.more-notifications-heading button { width:auto; padding:7px 10px; color:var(--muted); background:transparent; font-size:.82rem; }
.more-notification-item { display:flex; flex-direction:column; gap:5px; padding:12px 4px; color:var(--text); text-decoration:none; border-top:1px solid rgba(255,255,255,.07); }
.more-notification-item span,.more-notifications-empty { color:#aaa; font-size:.88rem; line-height:1.4; }
.more-notification-item.is-unread strong { color:var(--accent); }


/* =========================
   SEASONAL HOLIDAY GARLAND
   ========================= */
.zuno-holiday-garland {
    position: relative;
    z-index: 1001;
    width: 100%;
    height: clamp(30px, 5vw, 58px);
    overflow: hidden;
    pointer-events: none;
    background: linear-gradient(180deg, rgba(20,20,20,.16), transparent);
}
.zuno-garland-art {
    display: block;
    width: 100%;
    height: 100%;
    overflow: visible;
}
.zuno-garland-wire {
    fill: none;
    stroke: #202020;
    stroke-width: 2.4;
    stroke-linecap: round;
    filter: drop-shadow(0 1px 1px rgba(0,0,0,.45));
}
.zuno-bulb {
    stroke: #222;
    stroke-width: 1.5;
    stroke-linejoin: round;
    transform-box: fill-box;
    transform-origin: center top;
    animation: zuno-garland-glow 2.8s ease-in-out infinite;
}
.zuno-bulb path { fill: currentColor; }
.zuno-bulb rect { fill: #333; stroke: #222; }
.zuno-bulb.bulb-red { color: #ff4545; filter: drop-shadow(0 0 5px rgba(255,69,69,.65)); }
.zuno-bulb.bulb-green { color: #38df75; filter: drop-shadow(0 0 5px rgba(56,223,117,.65)); animation-delay: .45s; }
.zuno-bulb.bulb-yellow { color: #ffd84a; filter: drop-shadow(0 0 5px rgba(255,216,74,.65)); animation-delay: .9s; }
.zuno-bulb.bulb-blue { color: #4aa9ff; filter: drop-shadow(0 0 5px rgba(74,169,255,.65)); animation-delay: 1.35s; }
@keyframes zuno-garland-glow {
    0%, 100% { opacity: .78; }
    50% { opacity: 1; }
}
@media (max-width: 768px) {
    .zuno-holiday-garland { height: 34px; }
    .zuno-bulb { stroke-width: 2; }
}
@media (prefers-reduced-motion: reduce) {
    .zuno-bulb { animation: none; }
}
