:root {
    --bg: #f0f2f5;
    --surface: #ffffff;
    --surface-soft: #f5f7f9;
    --text: #241c12;
    --muted: #65676b;
    --line: #dadde1;
    --primary: #ff6400;
    --primary-dark: #c84a00;
    --green: #5ab700;
    --green-dark: #3f8b00;
    --accent: #ffc400;
    --danger: #b43d3d;
    --shadow: 0 2px 8px rgba(15, 20, 26, 0.08);
    --nav-hover: #e9edf2;
    --soft-orange: #fff3e8;
    --soft-green: #eef7ea;
    --card-radius: 12px;
}

:root[data-theme="dark"] {
    --bg: #18191a;
    --surface: #242526;
    --surface-soft: #303134;
    --text: #e4e6eb;
    --muted: #b0b3b8;
    --line: #3a3b3c;
    --primary: #ff7a1a;
    --primary-dark: #ff9a45;
    --green: #75d336;
    --green-dark: #a6ea80;
    --accent: #ffd76a;
    --danger: #ff7575;
    --shadow: 0 2px 12px rgba(0, 0, 0, 0.28);
    --nav-hover: #303134;
    --soft-orange: rgba(255, 122, 26, 0.14);
    --soft-green: rgba(117, 211, 54, 0.14);
}

* {
    box-sizing: border-box;
}

html {
    overflow-x: hidden;
}

body {
    margin: 0;
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: var(--bg);
    color: var(--text);
    overflow-x: hidden;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
textarea {
    font: inherit;
}

button {
    border: 0;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--primary), #f89c2e);
    color: white;
    cursor: pointer;
    font-weight: 700;
    padding: 10px 14px;
    transition: background 140ms ease, border-color 140ms ease, color 140ms ease, transform 140ms ease;
}

button:hover {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
}

.danger-button {
    background: #b43d3d;
}

.danger-button:hover {
    background: #8d2f2f;
}

.secondary-button {
    background: #eef7ea;
    color: var(--green-dark);
}

.secondary-button:hover {
    background: #d9efe0;
    color: var(--primary-dark);
}

input,
select,
textarea {
    background: var(--surface);
    width: 100%;
    border: 1px solid var(--line);
    border-radius: var(--card-radius);
    color: var(--text);
    padding: 11px 12px;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(255, 100, 0, 0.14);
    outline: 0;
}

textarea {
    resize: vertical;
}

input[type="hidden"] {
    display: none;
}

label {
    color: var(--muted);
    display: grid;
    font-size: 0.92rem;
    font-weight: 700;
    gap: 8px;
}

.page {
    margin: 0;
    max-width: none;
    padding: 14px 18px;
    width: 100%;
}

.has-app-header .page {
    padding-top: 76px;
}

.app-topbar {
    align-items: center;
    background: color-mix(in srgb, var(--surface) 94%, transparent);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 1px 2px rgba(15, 20, 26, 0.08);
    display: grid;
    gap: 16px;
    grid-template-columns: 156px minmax(220px, 1fr) auto;
    height: 58px;
    left: 0;
    padding: 0 14px;
    position: fixed;
    right: 0;
    top: 0;
    z-index: 120;
}

.topbar-actions {
    align-items: center;
    display: flex;
}

.topbar-brand {
    align-items: center;
    background: var(--surface);
    border-radius: 10px;
    display: inline-flex;
    flex: 0 0 auto;
    height: 50px;
    justify-content: center;
    overflow: hidden;
    width: 146px;
}

.topbar-brand img {
    display: block;
    height: 44px;
    object-fit: contain;
    width: 134px;
}

.topbar-search {
    align-items: center;
    background: var(--surface-soft);
    border: 1px solid transparent;
    border-radius: 999px;
    display: flex;
    gap: 8px;
    height: 42px;
    min-width: 0;
    padding: 0 12px;
    width: 100%;
}

.topbar-search:focus-within {
    background: var(--surface);
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(255, 100, 0, 0.12);
}

.topbar-search .nav-icon,
.topbar-search .nav-icon svg {
    color: var(--muted);
    height: 18px;
    width: 18px;
}

.topbar-search input {
    background: transparent;
    border: 0;
    box-shadow: none;
    min-width: 0;
    padding: 0;
}

.topbar-action:hover {
    background: var(--nav-hover);
}

.topbar-actions {
    gap: 8px;
    justify-content: flex-end;
}

.topbar-notification-wrap {
    position: relative;
}

.topbar-action {
    align-items: center;
    background: var(--surface-soft);
    border: 0;
    border-radius: 999px;
    color: var(--text);
    display: inline-flex;
    height: 42px;
    justify-content: center;
    padding: 0;
    position: relative;
    width: 42px;
}

.topbar-action .avatar {
    height: 38px;
    width: 38px;
}

.topbar-action .nav-icon,
.topbar-action .nav-icon svg {
    height: 21px;
    width: 21px;
}

.topbar-badge {
    align-items: center;
    background: var(--danger);
    border: 2px solid var(--surface);
    border-radius: 999px;
    color: #ffffff;
    display: inline-flex;
    font-size: 0.7rem;
    font-weight: 900;
    height: 20px;
    justify-content: center;
    min-width: 20px;
    padding: 0 5px;
    position: absolute;
    right: -3px;
    top: -4px;
}

.topbar-theme {
    color: var(--primary);
}

.topbar-notification-dropdown {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 14px;
    box-shadow: 0 18px 40px rgba(15, 20, 26, 0.2);
    max-height: min(520px, calc(100vh - 82px));
    overflow: auto;
    padding: 14px;
    position: absolute;
    right: 0;
    top: calc(100% + 10px);
    width: min(390px, calc(100vw - 28px));
    z-index: 160;
}

.topbar-notification-dropdown[hidden] {
    display: none;
}

.topbar-notification-dropdown .notifications-panel {
    border-bottom: 0;
    margin: 0;
    padding: 0;
}

.topbar-notification-dropdown .notification-list {
    max-height: 360px;
    overflow: auto;
    padding-right: 2px;
}

.topbar-notification-dropdown .secondary-button {
    margin-top: 10px;
    width: 100%;
}

.mobile-sidebar-toggle {
    align-items: center;
    background: var(--surface);
    border: 1px solid var(--line);
    color: var(--green-dark);
    display: none;
    gap: 10px;
    margin-bottom: 12px;
    padding: 10px 12px;
}

.mobile-sidebar-toggle:hover {
    background: #fff7e8;
    color: var(--primary-dark);
}

.hamburger-lines {
    display: grid;
    gap: 4px;
}

.hamburger-lines span {
    background: var(--primary);
    border-radius: 999px;
    display: block;
    height: 2px;
    width: 18px;
}

.sidebar-backdrop {
    background: rgba(36, 28, 18, 0.42);
    display: none;
    inset: 0;
    position: fixed;
    z-index: 80;
}

.sr-only {
    clip: rect(0, 0, 0, 0);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    position: absolute;
    white-space: nowrap;
    width: 1px;
}

.toast-stack {
    bottom: 18px;
    display: grid;
    gap: 10px;
    max-width: min(380px, calc(100vw - 28px));
    position: fixed;
    right: 18px;
    width: 380px;
    z-index: 2200;
}

.toast-notification {
    align-items: flex-start;
    animation: toast-slide-in 180ms ease-out;
    background: var(--surface);
    border: 1px solid var(--line);
    border-left: 5px solid var(--green);
    border-radius: 12px;
    box-shadow: 0 16px 42px rgba(20, 24, 31, 0.16);
    display: flex;
    gap: 10px;
    padding: 12px;
}

.toast-notification.error {
    border-left-color: var(--danger);
}

.toast-notification.is-hiding {
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 160ms ease, transform 160ms ease;
}

.toast-icon {
    align-items: center;
    background: var(--soft-green);
    border-radius: 999px;
    color: var(--green-dark);
    display: inline-flex;
    flex: 0 0 auto;
    font-weight: 900;
    height: 30px;
    justify-content: center;
    width: 30px;
}

.toast-notification.error .toast-icon {
    background: #f9dfdf;
    color: var(--danger);
}

.toast-copy {
    display: grid;
    flex: 1;
    gap: 2px;
    min-width: 0;
}

.toast-copy strong {
    color: var(--text);
    font-size: 0.9rem;
}

.toast-copy small {
    color: var(--muted);
    font-size: 0.84rem;
    line-height: 1.35;
}

.toast-close {
    align-items: center;
    background: transparent;
    color: var(--muted);
    display: inline-flex;
    flex: 0 0 auto;
    height: 28px;
    justify-content: center;
    padding: 0;
    width: 28px;
}

.toast-close:hover {
    background: var(--nav-hover);
    color: var(--primary-dark);
}

@keyframes toast-slide-in {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.auth-shell {
    align-items: stretch;
    display: grid;
    gap: 24px;
    grid-template-columns: minmax(0, 1.05fr) minmax(360px, 0.95fr);
    min-height: calc(100vh - 124px);
}

.auth-stack,
.layout {
    display: grid;
    gap: 22px;
}

.auth-stack {
    align-content: center;
}

.layout {
    align-items: start;
    gap: 22px;
    grid-template-columns: minmax(250px, 300px) minmax(0, 1fr);
}

.dashboard-layout {
    grid-template-columns: minmax(250px, 300px) minmax(460px, 760px) minmax(280px, 360px);
    justify-content: center;
}

.auth-panel,
.composer,
.post,
.sidebar,
.profile-hero,
.empty-state {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--card-radius);
    box-shadow: var(--shadow);
}

.auth-panel,
.composer,
.post,
.sidebar,
.profile-hero,
.empty-state {
    padding: 18px;
}

.auth-brand-panel {
    align-content: center;
    background:
        radial-gradient(circle at top right, rgba(255, 196, 0, 0.5), transparent 34%),
        radial-gradient(circle at bottom left, rgba(90, 183, 0, 0.3), transparent 35%),
        linear-gradient(135deg, #fffaf0 0%, #fff2cf 48%, #ffefe2 100%);
    border-radius: 8px;
    box-shadow: var(--shadow);
    color: var(--text);
    display: grid;
    gap: 18px;
    overflow: hidden;
    padding: clamp(28px, 6vw, 56px);
    position: relative;
}

.auth-brand-panel::after {
    background: rgba(255, 100, 0, 0.1);
    content: "";
    height: 180px;
    position: absolute;
    right: -70px;
    top: -70px;
    transform: rotate(18deg);
    width: 260px;
}

.brand-mark,
.section-icon {
    align-items: center;
    background: #ffffff;
    border: 1px solid rgba(255, 100, 0, 0.14);
    border-radius: 8px;
    display: inline-flex;
    justify-content: center;
}

.brand-mark {
    box-shadow: 0 12px 30px rgba(255, 100, 0, 0.14);
    height: 112px;
    padding: 12px;
    width: min(420px, 100%);
}

.brand-mark img {
    display: block;
    height: 100%;
    object-fit: contain;
    width: 100%;
}

.auth-brand-panel h1 {
    font-size: clamp(2.4rem, 5vw, 4.7rem);
    line-height: 1;
    margin: 0;
    max-width: 680px;
}

.auth-brand-panel p {
    font-size: 1.05rem;
    line-height: 1.6;
    margin: 0;
    max-width: 620px;
}

.verify-shell {
    align-items: center;
}

.verify-shell .auth-brand-panel {
    min-height: min(720px, calc(100vh - 150px));
}

.verify-steps {
    display: grid;
    gap: 10px;
    margin-top: 10px;
}

.verify-steps span {
    align-items: center;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(255, 100, 0, 0.16);
    border-radius: 10px;
    display: flex;
    font-weight: 850;
    gap: 10px;
    padding: 11px 13px;
}

.verify-steps svg {
    color: var(--primary);
    flex: 0 0 auto;
    height: 19px;
    width: 19px;
}

.verify-card-stack {
    display: grid;
    gap: 12px;
}

.verify-card {
    border-radius: 16px;
    gap: 20px;
    padding: clamp(24px, 4vw, 34px);
}

.verify-card .auth-heading {
    align-items: flex-start;
}

.verify-card .auth-heading h2 {
    font-size: clamp(2rem, 4vw, 2.65rem);
    line-height: 1;
}

.verify-card .auth-heading small,
.verify-help {
    color: var(--muted);
    font-weight: 750;
}

.otp-label {
    display: grid;
    gap: 10px;
}

.otp-shell {
    border-radius: 14px;
    min-height: 76px;
}

.otp-input {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 900;
    letter-spacing: 0.32em;
    line-height: 1;
    text-align: center;
}

.otp-input::placeholder {
    color: color-mix(in srgb, var(--muted) 48%, transparent);
}

.verify-help {
    margin: -6px 0 0;
}

.verify-secondary-actions {
    display: grid;
    gap: 10px;
    grid-template-columns: 1fr 1fr;
}

.verify-secondary-actions form {
    display: grid;
}

.verify-secondary-actions .back-to-login {
    min-height: 52px;
}

.eyebrow {
    color: var(--primary);
    font-weight: 900;
    letter-spacing: 0;
}

.auth-panel {
    display: grid;
    gap: 16px;
}

.auth-panel h2,
.sidebar h2,
.composer label {
    margin: 0;
}

.auth-heading {
    align-items: center;
    display: flex;
    gap: 12px;
}

.auth-heading .eyebrow {
    color: var(--green);
    font-size: 0.76rem;
    margin: 0 0 2px;
}

.section-icon {
    background: #fff2e8;
    color: var(--primary);
    flex: 0 0 auto;
    height: 46px;
    width: 46px;
}

.auth-points {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 12px;
}

.auth-points span {
    align-items: center;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(255, 100, 0, 0.16);
    border-radius: 8px;
    display: inline-flex;
    font-weight: 800;
    gap: 8px;
    padding: 9px 11px;
}

.input-shell {
    align-items: center;
    background: #fffaf4;
    border: 1px solid var(--line);
    border-radius: 8px;
    display: flex;
    gap: 10px;
    padding: 0 12px;
}

.input-shell:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(255, 100, 0, 0.14);
}

.input-shell svg {
    color: var(--green);
    flex: 0 0 auto;
    height: 18px;
    width: 18px;
}

.input-shell input {
    background: transparent;
    border: 0;
    box-shadow: none;
    padding-left: 0;
}

.button-with-icon,
.register-link,
.back-to-login {
    align-items: center;
    display: inline-flex;
    gap: 9px;
    justify-content: center;
}

.register-link,
.back-to-login {
    background: #f8fbf3;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--green);
    font-weight: 900;
    padding: 10px 14px;
}

.register-card {
    display: none;
}

.auth-stack:has(.register-card:target) .login-card {
    /* The register target turns the stacked cards into a simple login/register switcher. */
    display: none;
}

.register-card:target {
    display: grid;
}

.content-nav {
    display: grid;
    gap: 8px;
}

.content-brand {
    align-items: center;
    background: transparent;
    border: 0;
    border-radius: 0;
    display: inline-flex;
    height: 96px;
    justify-content: center;
    overflow: hidden;
    padding: 4px 0 10px;
    width: 100%;
}

.content-brand img {
    display: block;
    height: auto;
    max-height: 100%;
    object-fit: contain;
    width: 100%;
}

.content-nav-links {
    display: grid;
    gap: 2px;
    grid-template-columns: 1fr;
}

.content-nav-links a,
.sidebar-user-card,
.theme-toggle {
    align-items: center;
    background: transparent;
    border: 0;
    border-radius: 10px;
    color: var(--text);
    display: inline-flex;
    font-size: 0.94rem;
    font-weight: 800;
    gap: 10px;
    justify-content: flex-start;
    min-height: 44px;
    padding: 9px 10px;
    text-align: left;
    width: 100%;
}

.content-nav-links a {
    position: relative;
}

.content-nav-links a > span:not(.nav-icon):not(.nav-request-badge) {
    min-width: 0;
}

.content-nav-links a:hover,
.sidebar-user-card:hover,
.theme-toggle:hover {
    background: var(--nav-hover);
    color: var(--text);
}

.content-nav-links a.is-active {
    background: var(--soft-orange);
    color: var(--primary-dark);
}

.nav-icon {
    align-items: center;
    color: var(--primary);
    display: inline-flex;
    flex: 0 0 auto;
    height: 17px;
    justify-content: center;
    width: 17px;
}

.nav-icon svg {
    display: block;
    height: 17px;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.9;
    width: 17px;
}

.content-nav-links a.is-active .nav-icon {
    color: var(--primary);
}

.nav-request-badge {
    align-items: center;
    background: #d43f3a;
    border: 2px solid var(--surface);
    border-radius: 999px;
    color: #fff;
    display: inline-flex;
    font-size: 0.72rem;
    font-weight: 900;
    height: 22px;
    justify-content: center;
    margin-left: auto;
    min-width: 22px;
    padding: 0 6px;
}

.sidebar-user-card {
    margin: 0 0 6px;
}

.sidebar-user-card .avatar {
    height: 36px;
    width: 36px;
}

.sidebar-user-card span,
.sidebar-user-card small {
    display: block;
    min-width: 0;
}

.sidebar-user-card strong,
.sidebar-user-card small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sidebar-user-card small {
    color: var(--muted);
    font-size: 0.8rem;
}

.sidebar-user-stats {
    align-items: center;
    color: var(--muted);
    display: flex;
    flex-wrap: wrap;
    font-size: 0.78rem;
    font-weight: 800;
    gap: 8px;
    margin-top: 5px;
}

.sidebar-user-stats span {
    align-items: baseline;
    display: inline-flex;
    gap: 3px;
}

.sidebar-user-stats b {
    color: var(--text);
    font-size: 0.88rem;
}

.theme-toggle {
    color: var(--muted);
    margin-top: 8px;
}

.theme-toggle-icon {
    color: var(--primary);
    display: inline-flex;
}

.profile-hero .content-nav {
    align-items: center;
    display: flex;
    justify-content: space-between;
}

.library-page {
    display: grid;
    gap: 18px;
}

.profile-content {
    display: grid;
    gap: 16px;
    min-width: 0;
}

.layout:has(.profile-content) {
    grid-template-columns: minmax(250px, 300px) minmax(0, 1040px);
    justify-content: center;
}

.management-page {
    display: grid;
    gap: 18px;
    min-width: 0;
}

.management-tabs {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    padding: 10px;
}

.management-tabs a {
    background: #fffaf4;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--green-dark);
    font-weight: 900;
    padding: 12px;
    text-align: center;
}

.management-tabs a.is-active {
    background: #fff2c7;
    color: var(--primary-dark);
}

.management-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
    padding: 16px;
}

.user-create-form {
    display: grid;
    gap: 14px;
}

.user-create-form h2 {
    margin: 0;
}

.management-form-grid,
.user-management-form {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.management-list {
    display: grid;
    gap: 12px;
}

.user-row-card {
    display: grid;
    gap: 14px;
}

.user-row-main {
    align-items: center;
    display: flex;
    gap: 12px;
    min-width: 0;
}

.user-row-main div {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.user-row-main span {
    color: var(--muted);
    overflow-wrap: anywhere;
}

.quick-user-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.library-hero,
.library-tabs,
.library-item {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.library-hero {
    align-items: center;
    display: flex;
    justify-content: space-between;
    padding: 22px;
}

.library-hero h1 {
    margin: 0 0 6px;
}

.library-hero p {
    color: var(--muted);
    margin: 0;
}

.library-tabs {
    display: grid;
    gap: 8px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    padding: 10px;
}

.library-tabs a {
    align-items: center;
    background: #fffaf4;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--green);
    display: flex;
    font-weight: 900;
    gap: 8px;
    justify-content: space-between;
    padding: 11px 12px;
}

.library-tabs a.is-active {
    background: #fff2c7;
    color: var(--primary-dark);
}

.library-tabs span {
    background: #eef7ea;
    border-radius: 50%;
    color: var(--green);
    display: inline-flex;
    font-size: 0.78rem;
    height: 24px;
    justify-content: center;
    min-width: 24px;
    padding: 4px;
}

.library-grid {
    display: grid;
    gap: 16px;
}

.media-grid {
    gap: 10px;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
}

.files-grid,
.links-grid {
    grid-template-columns: minmax(0, 1fr);
}

.library-item {
    display: grid;
    gap: 12px;
    min-width: 0;
    overflow: hidden;
    padding: 14px;
    width: 100%;
}

.library-item-head {
    align-items: center;
    display: flex;
    gap: 10px;
    min-width: 0;
}

.library-item-head div,
.library-item-body {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.library-item small {
    color: var(--muted);
    font-weight: 800;
}

.library-url {
    background: #fffaf4;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--primary-dark);
    font-weight: 900;
    overflow-wrap: anywhere;
    padding: 12px;
}

.source-link,
.library-actions a {
    color: var(--green);
    font-size: 0.86rem;
    font-weight: 900;
}

.library-preview {
    background: #111111;
    border-radius: 8px;
    overflow: hidden;
}

.library-preview img,
.library-preview video {
    aspect-ratio: 16 / 10;
    display: block;
    height: 100%;
    object-fit: cover;
    width: 100%;
}

.gallery-library-item {
    border-radius: 8px;
    gap: 7px;
    padding: 0;
}

.gallery-library-item .library-preview {
    border-radius: 8px;
}

.gallery-library-item .library-preview img,
.gallery-library-item .library-preview video {
    aspect-ratio: 1 / 1;
}

.gallery-library-item .library-item-body {
    padding: 0 2px 4px;
}

.gallery-library-item .library-item-body small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.videos-preview video {
    object-fit: contain;
}

.file-library-preview {
    align-items: center;
    background: #fffaf4;
    color: var(--primary-dark);
    display: flex;
    gap: 12px;
    min-height: 150px;
    padding: 18px;
}

.library-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.feed,
.profile-feed {
    display: grid;
    gap: 16px;
    min-width: 0;
}

.composer {
    display: grid;
    gap: 12px;
}

.composer-launcher {
    align-items: center;
    display: flex;
    gap: 12px;
    padding: 12px 14px;
}

.composer-prompt {
    background: var(--surface-soft);
    border: 0;
    border-radius: 999px;
    color: var(--muted);
    flex: 1;
    font-weight: 800;
    min-height: 46px;
    text-align: left;
}

.composer-prompt:hover {
    background: var(--nav-hover);
    color: var(--primary-dark);
}

.modal-backdrop {
    align-items: center;
    background: rgba(36, 28, 18, 0.48);
    display: none;
    inset: 0;
    justify-content: center;
    padding: 76px 18px 20px;
    position: fixed;
    z-index: 300;
}

.modal-backdrop.is-open {
    display: flex;
}

.modal-panel {
    border-radius: 16px;
    max-height: calc(100vh - 96px);
    max-width: 680px;
    overflow: auto;
    scrollbar-gutter: stable;
    width: min(680px, calc(100vw - 36px));
}

.modal-composer {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 16px;
    box-shadow: 0 24px 70px rgba(15, 20, 26, 0.28);
    display: grid;
    gap: 14px;
    min-width: 0;
    overflow: hidden;
    padding: 0;
}

.modal-head {
    align-items: center;
    border-bottom: 1px solid var(--line);
    display: flex;
    justify-content: space-between;
    padding: 18px 20px 14px;
}

.modal-head h2,
.modal-head p {
    margin: 0;
}

.modal-close {
    align-items: center;
    background: #fff7e8;
    color: var(--primary-dark);
    display: inline-flex;
    height: 38px;
    justify-content: center;
    padding: 0;
    width: 38px;
}

.modal-composer > label,
.modal-composer > .post-upload,
.modal-composer > .composer-addons,
.modal-composer > .selected-tags-summary,
.modal-composer > .member-picker {
    margin-left: 20px;
    margin-right: 20px;
}

.rich-editor {
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 8px;
    display: grid;
    overflow: hidden;
}

.editor-toolbar {
    align-items: center;
    background: #fffaf4;
    border-bottom: 1px solid var(--line);
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 8px;
}

.editor-toolbar button {
    align-items: center;
    background: #ffffff;
    border: 1px solid var(--line);
    color: var(--primary-dark);
    display: inline-flex;
    font-weight: 900;
    height: 34px;
    justify-content: center;
    padding: 0;
    min-width: 38px;
}

.editor-toolbar button.is-active {
    background: #ffe8c8;
    border-color: var(--primary);
    color: var(--primary-dark);
}

.editor-toolbar button[data-editor-link],
.editor-toolbar button[data-editor-command="removeFormat"] {
    padding: 0;
    width: 38px;
}

.editor-toolbar button svg {
    display: block;
    height: 17px;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.9;
    width: 17px;
}

.editor-toolbar input[type="color"] {
    border: 1px solid var(--line);
    cursor: pointer;
    height: 34px;
    padding: 2px;
    width: 44px;
}

.editor-surface {
    line-height: 1.55;
    min-height: 118px;
    outline: 0;
    padding: 13px;
}

.compact-editor .editor-surface {
    min-height: 46px;
}

.editor-surface:empty::before {
    color: var(--muted);
    content: attr(data-placeholder);
    pointer-events: none;
}

.rich-content {
    line-height: 1.55;
    overflow-wrap: anywhere;
}

.rich-content p,
.rich-content div {
    margin: 0 0 8px;
}

.rich-content p:last-child,
.rich-content div:last-child {
    margin-bottom: 0;
}

.composer-toolbar {
    align-items: center;
    display: flex;
    gap: 12px;
    justify-content: space-between;
}

.composer-toolbar input[type="file"] {
    color: var(--muted);
    flex: 1;
    min-width: 0;
    padding: 9px;
}

.post-upload {
    display: grid;
    gap: 12px;
}

.post-upload-title {
    color: #1c3463;
    font-size: 0.92rem;
    font-weight: 900;
}

.post-upload-dropzone {
    align-items: center;
    background: #ffffff;
    border: 2px dashed #cbd5e6;
    border-radius: 14px;
    color: #56627a;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    font-size: 0.96rem;
    gap: 4px;
    justify-content: center;
    min-height: 108px;
    padding: 18px;
    text-align: center;
    transition: background 140ms ease, border-color 140ms ease, color 140ms ease;
}

.post-upload-dropzone svg {
    height: 32px;
    margin-bottom: 6px;
    stroke: #4d46f5;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 3;
    width: 32px;
}

.post-upload-dropzone span {
    color: #334064;
    font-weight: 800;
}

.post-upload-dropzone small {
    color: #667085;
    font-weight: 700;
}

.post-upload.is-dragging .post-upload-dropzone {
    background: #f6f8ff;
    border-color: #4d46f5;
    color: #3129c7;
}

.post-upload-input {
    display: none;
}

.post-upload-list {
    background: #ffffff;
    border: 1px solid #dfe5ef;
    border-radius: 12px;
    display: grid;
    gap: 8px;
    padding: 10px;
}

.post-upload-list[hidden] {
    display: none;
}

.post-upload-list-head,
.post-upload-row {
    align-items: center;
    display: flex;
    gap: 12px;
}

.post-upload-list-head {
    justify-content: space-between;
}

.post-upload-list-head strong {
    color: #1c3463;
    font-weight: 900;
}

.post-upload-status {
    background: #ffc400;
    border-radius: 6px;
    color: #241c12;
    font-size: 0.78rem;
    font-weight: 900;
    padding: 4px 8px;
}

.post-upload-row {
    background: #f8fafc;
    border-radius: 8px;
    padding: 7px 9px;
}

.post-upload-file-icon {
    align-items: center;
    border-radius: 7px;
    color: #ffffff;
    display: inline-flex;
    flex: 0 0 auto;
    font-size: 0.68rem;
    font-weight: 900;
    height: 28px;
    justify-content: center;
    width: 28px;
}

.post-upload-file-icon.image {
    background: #a855f7;
}

.post-upload-file-icon.video {
    background: #ff6400;
}

.post-upload-file-icon.pdf {
    background: #e03131;
}

.post-upload-file-icon.sheet {
    background: #10b981;
}

.post-upload-file-icon.doc {
    background: #2f6fed;
}

.post-upload-file-icon.zip,
.post-upload-file-icon.file {
    background: #667085;
}

.post-upload-file-name {
    background: #ffffff;
    border: 1px solid #cbd5e6;
    border-radius: 5px;
    color: var(--text);
    flex: 1;
    min-width: 0;
    overflow: hidden;
    padding: 7px 10px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.post-upload-file-size {
    color: #667085;
    flex: 0 0 auto;
    font-size: 0.8rem;
    font-weight: 700;
}

.post-upload-remove {
    align-items: center;
    background: transparent;
    color: #9a3412;
    display: inline-flex;
    flex: 0 0 auto;
    height: 30px;
    justify-content: center;
    padding: 0;
    width: 30px;
}

.post-upload-remove:hover {
    background: #fff1e8;
    color: var(--primary-dark);
}

.edit-attachments {
    display: grid;
    gap: 10px;
}

.edit-attachments-head {
    display: grid;
    gap: 2px;
}

.edit-attachments-head strong {
    color: var(--text);
    font-size: 0.98rem;
    font-weight: 900;
}

.edit-attachments-head small {
    color: var(--muted);
    font-weight: 700;
}

.edit-attachment-list {
    display: grid;
    gap: 8px;
}

.edit-attachment-option {
    align-items: center;
    background: #fffaf4;
    border: 1px solid var(--line);
    border-radius: 8px;
    display: grid;
    gap: 10px;
    grid-template-columns: 56px minmax(0, 1fr) auto;
    padding: 10px;
}

.edit-attachment-option.is-removing {
    display: none;
}

.edit-attachment-preview {
    align-items: center;
    background: #eef7ea;
    border-radius: 8px;
    display: inline-flex;
    height: 52px;
    justify-content: center;
    overflow: hidden;
    width: 52px;
}

.edit-attachment-preview img {
    height: 100%;
    object-fit: cover;
    width: 100%;
}

.edit-attachment-copy {
    min-width: 0;
}

.edit-attachment-copy strong,
.edit-attachment-copy small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.edit-attachment-copy strong {
    color: var(--text);
    font-weight: 900;
}

.edit-attachment-copy small {
    color: var(--muted);
    font-weight: 800;
}

.edit-attachment-remove {
    background: transparent;
    border: 0;
    color: var(--primary-dark);
    cursor: pointer;
    font-size: 0.84rem;
    font-weight: 900;
    padding: 8px;
}

.edit-attachment-remove:hover {
    background: #fff1e8;
}

.attachment-picker {
    align-items: center;
    background: #fff7e8;
    border: 1px dashed rgba(242, 106, 33, 0.55);
    border-radius: 8px;
    color: var(--text);
    display: inline-flex;
    flex: 0 0 230px;
    gap: 10px;
    padding: 10px 12px;
}

.attachment-picker small {
    color: var(--muted);
    font-weight: 700;
}

.attachment-icon {
    align-items: center;
    background: var(--primary);
    border-radius: 50%;
    color: #ffffff;
    display: inline-flex;
    flex: 0 0 auto;
    font-size: 1.1rem;
    font-weight: 900;
    height: 28px;
    justify-content: center;
    width: 28px;
}

.composer button {
    justify-self: end;
}

.composer-submit-row {
    background: color-mix(in srgb, var(--surface) 95%, transparent);
    border-top: 1px solid var(--line);
    bottom: 0;
    justify-content: flex-end;
    padding: 14px 20px;
    position: sticky;
    z-index: 2;
}

.tag-picker {
    background: #fffaf4;
    border: 1px dashed rgba(47, 143, 78, 0.38);
    border-radius: 8px;
    display: grid;
    gap: 10px;
    padding: 12px;
}

.tag-picker > span {
    color: var(--green);
    font-size: 0.86rem;
    font-weight: 900;
}

.tag-picker-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag-picker-list label {
    align-items: center;
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 8px;
    display: flex;
    flex: 0 1 210px;
    flex-direction: row;
    gap: 8px;
    min-width: 0;
    padding: 8px;
}

.tag-picker-list input {
    flex: 0 0 auto;
    width: auto;
}

.tag-picker-list .avatar {
    height: 32px;
    width: 32px;
}

.tag-picker-list span {
    min-width: 0;
}

.tag-picker-list small {
    color: var(--muted);
    display: block;
}

.composer-addons {
    align-items: center;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 14px;
    display: flex;
    gap: 12px;
    justify-content: space-between;
    padding: 12px 14px;
}

.composer-addons strong {
    font-size: 0.98rem;
}

.composer-addon-button {
    align-items: center;
    background: transparent;
    color: #1877f2;
    display: inline-flex;
    height: 44px;
    justify-content: center;
    padding: 0;
    position: relative;
    width: 44px;
}

.composer-addon-button:hover {
    background: var(--nav-hover);
}

.composer-addon-button svg {
    display: block;
    height: 30px;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.9;
    width: 30px;
}

.composer-addon-button [data-tag-count] {
    align-items: center;
    background: var(--primary);
    border: 2px solid var(--surface);
    border-radius: 999px;
    color: #fff;
    display: inline-flex;
    font-size: 0.68rem;
    font-weight: 900;
    height: 20px;
    justify-content: center;
    min-width: 20px;
    padding: 0 5px;
    position: absolute;
    right: -2px;
    top: 0;
}

.selected-tags-summary {
    align-items: center;
    color: var(--muted);
    display: flex;
    flex-wrap: wrap;
    font-size: 0.88rem;
    font-weight: 800;
    gap: 6px;
}

.selected-tags-summary span {
    background: var(--soft-green);
    border-radius: 999px;
    color: var(--green-dark);
    padding: 5px 9px;
}

.tag-people-backdrop {
    z-index: 340;
}

.tag-people-panel {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 18px;
    box-shadow: 0 18px 50px rgba(15, 20, 26, 0.28);
    display: grid;
    max-width: 680px;
    overflow: hidden;
    width: min(680px, 100%);
}

.tag-people-head {
    align-items: center;
    border-bottom: 1px solid var(--line);
    display: grid;
    gap: 12px;
    grid-template-columns: 48px 1fr auto;
    padding: 14px 18px;
}

.tag-people-head h2 {
    font-size: 1.45rem;
    line-height: 1;
    margin: 0;
    text-align: center;
}

.tag-people-back {
    background: var(--surface-soft);
    color: var(--muted);
    height: 42px;
    width: 42px;
}

.tag-people-back svg {
    display: block;
    height: 23px;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2.4;
    width: 23px;
}

.tag-people-done {
    background: transparent;
    color: #1877f2;
    font-weight: 900;
    padding: 8px 0 8px 12px;
}

.tag-people-search {
    align-items: center;
    background: var(--surface-soft);
    border-radius: 999px;
    display: flex;
    gap: 8px;
    margin: 16px 18px 8px;
    padding: 0 14px;
}

.tag-people-search svg {
    color: var(--muted);
    flex: 0 0 auto;
    height: 21px;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2.1;
    width: 21px;
}

.tag-people-search input {
    background: transparent;
    border: 0;
    box-shadow: none;
    min-height: 44px;
    padding: 0;
}

.tag-people-body {
    display: grid;
    gap: 8px;
    max-height: min(540px, calc(100vh - 230px));
    overflow: auto;
    padding: 8px 18px 18px;
}

.tag-people-body h3 {
    color: var(--muted);
    font-size: 0.95rem;
    margin: 0;
}

.tag-people-list {
    display: grid;
    gap: 4px;
}

.tag-people-option {
    align-items: center;
    border-radius: 12px;
    cursor: pointer;
    display: grid;
    gap: 12px;
    grid-template-columns: 44px minmax(0, 1fr) auto;
    padding: 10px 12px;
}

.tag-people-option:hover,
.tag-people-option:has(input:checked) {
    background: var(--nav-hover);
}

.tag-people-option input {
    height: 1px;
    opacity: 0;
    position: absolute;
    width: 1px;
}

.tag-people-option .avatar {
    height: 44px;
    width: 44px;
}

.tag-people-option span:not(.avatar):not(.tag-people-check) {
    display: grid;
    min-width: 0;
}

.tag-people-option small {
    color: var(--muted);
}

.tag-people-check {
    align-items: center;
    background: #1877f2;
    border-radius: 999px;
    color: #fff;
    display: none;
    height: 24px;
    justify-content: center;
    width: 24px;
}

.tag-people-option input:checked ~ .tag-people-check {
    display: inline-flex;
}

.tag-people-check svg {
    height: 16px;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2.5;
    width: 16px;
}

.tag-people-empty {
    color: var(--muted);
    font-weight: 800;
    padding: 16px 0;
}

.profile-summary {
    background: transparent;
    border: 0;
    box-shadow: none;
    position: sticky;
    padding: 6px 0 12px;
    top: 14px;
}

.sidebar-tools {
    border-top: 1px solid var(--line);
    display: grid;
    gap: 18px;
    margin-top: 18px;
    padding-top: 18px;
}

.dashboard-right-rail {
    display: grid;
    gap: 16px;
    position: sticky;
    top: 14px;
}

.dashboard-right-rail .notifications-panel,
.dashboard-right-rail .people-panel {
    background: transparent;
    border-bottom: 1px solid var(--line);
    padding: 4px 0 16px;
}

.profile-summary h1 {
    font-size: 1.55rem;
    line-height: 1.1;
    margin: 14px 0 4px;
}

.avatar {
    align-items: center;
    background: #d9efe0;
    border: 2px solid #c8e3d0;
    border-radius: 50%;
    color: var(--primary-dark);
    display: inline-flex;
    flex: 0 0 auto;
    font-weight: 900;
    height: 42px;
    justify-content: center;
    overflow: hidden;
    position: relative;
    width: 42px;
}

.avatar img {
    display: block;
    height: 100%;
    object-fit: cover;
    position: relative;
    z-index: 1;
    width: 100%;
}

.avatar-photo {
    background: #d9efe0;
}

.avatar-fallback {
    align-items: center;
    display: inline-flex;
    inset: 0;
    justify-content: center;
    position: absolute;
}

.profile-summary > .avatar,
.profile-main > .avatar,
.profile-photo-viewer-link .avatar {
    font-size: 1.8rem;
    height: 76px;
    width: 76px;
}

.identity,
.post-head,
.person-row,
.comment,
.profile-main,
.profile-actions,
.mini-actions,
.post-actions,
.comment-form {
    align-items: center;
    display: flex;
}

.identity {
    gap: 10px;
    min-width: 0;
}

.identity span,
.person-row {
    min-width: 0;
}

.identity small,
.post-actions,
.profile-summary p,
.profile-main p {
    color: var(--muted);
}

.profile-contact {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.profile-contact span {
    background: #fff7e8;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--green);
    font-size: 0.86rem;
    font-weight: 900;
    padding: 7px 9px;
}

.post {
    display: grid;
    gap: 16px;
    padding: 16px;
}

.post-head {
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.post-head-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}

.status-badges {
    align-items: center;
    display: inline-flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: flex-end;
}

.icon-button {
    align-items: center;
    background: var(--surface-soft);
    border: 0;
    color: var(--primary-dark);
    display: inline-flex;
    height: 36px;
    justify-content: center;
    padding: 0;
    width: 36px;
}

.icon-button:hover,
.icon-button.is-active {
    background: var(--soft-orange);
    color: var(--primary-dark);
}

.dots-button span {
    font-size: 1.2rem;
    font-weight: 900;
    line-height: 0.5;
    transform: translateY(-2px);
}

.post-menu {
    position: relative;
}

.post-menu-dropdown {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--card-radius);
    box-shadow: var(--shadow);
    display: none;
    min-width: 170px;
    padding: 6px;
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    z-index: 30;
}

.post-menu.is-open .post-menu-dropdown {
    display: grid;
    gap: 4px;
}

.post-menu-dropdown button {
    background: transparent;
    border-radius: 8px;
    color: var(--text);
    display: block;
    font-weight: 800;
    padding: 9px 10px;
    text-align: left;
    width: 100%;
}

.post-menu-dropdown button:hover {
    background: var(--nav-hover);
    color: var(--primary-dark);
}

.post-menu-dropdown .danger-menu-item {
    color: var(--danger);
}

.pin-badge {
    background: var(--soft-orange);
    border: 1px solid rgba(247, 201, 72, 0.85);
    border-radius: 8px;
    color: var(--primary-dark);
    flex: 0 0 auto;
    font-size: 0.78rem;
    font-weight: 900;
    padding: 6px 9px;
}

.tagged-users {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tagged-users span,
.tagged-users a {
    border-radius: 8px;
    font-size: 0.82rem;
    font-weight: 900;
    padding: 7px 9px;
}

.tagged-users span {
    background: var(--soft-green);
    color: var(--green);
}

.tagged-users a {
    background: var(--soft-orange);
    border: 1px solid var(--line);
    color: var(--primary-dark);
}

.post-body {
    font-size: 1.03rem;
    line-height: 1.55;
    margin: 6px 0 0;
    white-space: normal;
}

.rich-content a {
    color: var(--primary-dark);
    font-weight: 800;
    overflow-wrap: anywhere;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.post-attachment {
    background: var(--surface-soft);
    border: 1px solid var(--line);
    border-radius: 8px;
    overflow: hidden;
}

.attachment-group {
    display: grid;
    gap: 10px;
}

.post-attachments {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.image-attachment-grid {
    display: grid;
    gap: 8px;
    grid-column: 1 / -1;
}

.image-attachment-grid.multi-image {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.image-attachment-grid.single-image {
    grid-template-columns: minmax(0, 1fr);
}

.image-attachment-preview {
    background: #111111;
    min-height: 260px;
    position: relative;
}

.image-attachment-preview a {
    display: block;
    height: 100%;
    position: relative;
}

.image-attachment-preview img {
    height: 100%;
    min-height: 260px;
}

.image-attachment-preview.is-gallery-hidden {
    display: none;
}

.image-more-overlay {
    align-items: center;
    background: rgba(0, 0, 0, 0.58);
    color: #ffffff;
    display: flex;
    font-size: clamp(2rem, 5vw, 3.4rem);
    font-weight: 900;
    inset: 0;
    justify-content: center;
    letter-spacing: 0;
    position: absolute;
}

.post-attachment img,
.post-attachment video {
    background: #111111;
    display: block;
    max-height: 520px;
    object-fit: contain;
    width: 100%;
}

.post-attachment.image-attachment-preview img {
    max-height: none;
    object-fit: cover;
}

.post-attachment a[data-image-viewer],
.library-preview a[data-image-viewer] {
    cursor: zoom-in;
    display: block;
}

.image-viewer-open {
    overflow: hidden;
}

.image-gallery-viewer {
    align-items: center;
    background: rgba(28, 22, 15, 0.92);
    display: flex;
    inset: 0;
    justify-content: center;
    padding: 28px 82px;
    position: fixed;
    z-index: 2000;
}

.image-gallery-viewer figure {
    display: grid;
    gap: 14px;
    margin: 0;
    max-height: 92vh;
    max-width: min(1120px, 100%);
    place-items: center;
}

.image-gallery-viewer img {
    background: #111111;
    border-radius: 8px;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.34);
    max-height: calc(92vh - 58px);
    max-width: 100%;
    object-fit: contain;
}

.image-gallery-viewer figcaption {
    align-items: center;
    color: #ffffff;
    display: flex;
    flex-wrap: wrap;
    font-weight: 900;
    gap: 10px;
    justify-content: center;
    text-align: center;
}

.image-gallery-viewer figcaption small {
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.82rem;
}

.image-viewer-close,
.image-viewer-nav {
    align-items: center;
    background: #fff7e8;
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 999px;
    color: var(--primary-dark);
    cursor: pointer;
    display: inline-flex;
    font-weight: 900;
    justify-content: center;
    position: fixed;
}

.image-viewer-close {
    height: 44px;
    right: 24px;
    top: 22px;
    width: 44px;
}

.image-viewer-nav {
    height: 54px;
    top: 50%;
    transform: translateY(-50%);
    width: 54px;
}

.image-viewer-nav svg {
    height: 28px;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2.4;
    width: 28px;
}

.image-viewer-nav.previous {
    left: 22px;
}

.image-viewer-nav.next {
    right: 22px;
}

.file-attachment {
    align-items: center;
    display: flex;
    gap: 12px;
    padding: 14px;
}

.file-attachment small {
    color: var(--muted);
    display: block;
    font-weight: 800;
    margin-top: 3px;
}

.file-icon {
    align-items: center;
    background: #eef7ea;
    border-radius: 8px;
    color: var(--green);
    display: inline-flex;
    flex: 0 0 auto;
    font-size: 0.72rem;
    font-weight: 900;
    height: 42px;
    justify-content: center;
    width: 42px;
}

.file-icon svg {
    display: block;
    height: 34px;
    width: 34px;
}

.file-icon svg path:first-child {
    fill: #ffffff;
    stroke: currentColor;
    stroke-width: 2;
}

.file-icon svg path:nth-child(2) {
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
}

.file-icon svg text {
    fill: currentColor;
    font-size: 10px;
    font-weight: 900;
}

.file-icon-pdf {
    background: #fff1ef;
    color: #d93025;
}

.post-actions {
    border-top: 1px solid var(--line);
    flex-wrap: wrap;
    gap: 12px;
    padding-top: 14px;
}

.like-summary {
    position: relative;
}

.likes-popover {
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
    display: grid;
    gap: 8px;
    left: 0;
    min-width: 230px;
    opacity: 0;
    padding: 10px;
    pointer-events: none;
    position: absolute;
    top: calc(100% + 8px);
    transform: translateY(-4px);
    transition: opacity 140ms ease, transform 140ms ease;
    z-index: 20;
}

.like-summary:hover .likes-popover,
.like-summary:focus-within .likes-popover {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.like-person {
    align-items: center;
    border-radius: 8px;
    display: flex;
    gap: 9px;
    padding: 6px;
}

.like-person:hover {
    background: #fff7e8;
}

.like-person .avatar {
    height: 32px;
    width: 32px;
}

.like-person span {
    display: grid;
    min-width: 0;
}

.like-person small {
    color: var(--muted);
    font-weight: 800;
}

.action-button {
    background: #eef5ef;
    color: var(--primary);
    padding: 8px 11px;
}

.action-button.is-active {
    background: #d9efe0;
    color: var(--primary-dark);
}

.pin-button.is-active {
    background: #fff2c7;
    color: var(--primary-dark);
}

.comments {
    display: grid;
    gap: 10px;
}

.comment {
    align-items: flex-start;
    background: #f8fbf6;
    border-radius: 8px;
    gap: 10px;
    padding: 12px;
}

.comment-content {
    display: grid;
    flex: 1;
    gap: 8px;
    min-width: 0;
}

.comment p {
    margin: 0;
}

.comment-text {
    display: grid;
    gap: 4px;
}

.comment-line {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.comment-form {
    align-items: flex-start;
    background: transparent;
    border: 0;
    border-radius: 0;
    display: flex;
    gap: 10px;
    padding: 0;
}

.comment-form > .avatar {
    flex: 0 0 auto;
    height: 40px;
    width: 40px;
}

.comment-composer {
    background: #f6f3ed;
    border: 1px solid var(--line);
    border-radius: 22px;
    display: grid;
    flex: 1;
    gap: 8px;
    min-width: 0;
    padding: 12px 14px 10px;
}

.comment-input {
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    color: var(--text);
    min-height: 32px;
    min-width: 0;
    padding: 0;
    resize: vertical;
}

.comment-input:focus {
    border-color: transparent;
    box-shadow: none;
}

.comment-input::placeholder {
    color: #8a8170;
}

.comment-composer-tools {
    align-items: center;
    display: flex;
    gap: 8px;
}

.comment-photo-indicator {
    align-items: center;
    background: var(--surface-soft);
    border: 1px solid var(--line);
    border-radius: 12px;
    display: flex;
    gap: 10px;
    padding: 8px 10px;
}

.comment-photo-indicator[hidden] {
    display: none;
}

.comment-photo-icon {
    align-items: center;
    background: var(--soft-green);
    border-radius: 10px;
    color: var(--green-dark);
    display: inline-flex;
    flex: 0 0 auto;
    height: 34px;
    justify-content: center;
    width: 34px;
}

.comment-photo-icon svg {
    height: 18px;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.9;
    width: 18px;
}

.comment-photo-copy {
    display: grid;
    flex: 1;
    min-width: 0;
}

.comment-photo-copy strong,
.comment-photo-copy small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.comment-photo-copy strong {
    color: var(--text);
    font-size: 0.86rem;
}

.comment-photo-copy small {
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 700;
}

.comment-photo-clear {
    align-items: center;
    background: transparent;
    color: var(--muted);
    display: inline-flex;
    flex: 0 0 auto;
    height: 30px;
    justify-content: center;
    padding: 0;
    width: 30px;
}

.comment-photo-clear:hover {
    background: var(--nav-hover);
    color: var(--primary-dark);
}

/*
 * Legacy rich comment selectors stay harmless for old cached markup, while the
 * active comment form now uses a plain textarea plus photo-only picker.
 */
.comment-form .rich-editor {
    flex: 1;
    min-width: 0;
}

.comment-form .compact-editor {
    align-items: stretch;
    display: grid;
}

.comment-form .compact-editor .editor-toolbar {
    border-bottom: 0;
    padding: 6px;
}

.comment-form .compact-editor .editor-toolbar button {
    height: 32px;
    width: 32px;
}

.comment-form .compact-editor .editor-toolbar input[type="color"] {
    height: 32px;
    width: 34px;
}

.comment-form .compact-editor .editor-surface {
    min-height: 44px;
    padding: 11px 12px;
}

.comment-attachment-picker {
    align-items: center;
    background: transparent;
    border: 0;
    border-radius: 50%;
    color: #857b6a;
    cursor: pointer;
    display: inline-flex;
    flex: 0 0 auto;
    height: 34px;
    justify-content: center;
    padding: 0;
    width: 34px;
}

.comment-attachment-picker:hover,
.comment-send-button:hover {
    background: #fff3e8;
    color: var(--primary);
}

.comment-attachment-picker svg,
.comment-send-button svg {
    display: block;
    height: 21px;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.9;
    width: 21px;
}

.comment-send-button {
    align-items: center;
    background: transparent;
    border-radius: 50%;
    color: var(--primary);
    display: inline-flex;
    height: 34px;
    justify-content: center;
    margin-left: auto;
    padding: 0;
    width: 34px;
}

.comment-attachment-picker input {
    height: 1px;
    opacity: 0;
    overflow: hidden;
    position: absolute;
    width: 1px;
}

.comment-attachments {
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    max-width: 420px;
}

.comment-attachments .post-attachment img,
.comment-attachments .post-attachment video {
    max-height: 260px;
}

.comment-form button:not(.comment-send-button) {
    flex: 0 0 auto;
    align-self: stretch;
}

.groups-panel {
    border-bottom: 1px solid var(--line);
    display: grid;
    gap: 16px;
    margin-bottom: 0;
    padding-bottom: 18px;
}

.notifications-panel {
    border-bottom: 1px solid var(--line);
    display: grid;
    gap: 12px;
    margin-bottom: 0;
    padding-bottom: 18px;
}

.people-panel {
    display: grid;
    gap: 14px;
}

.people-panel h2 {
    color: var(--muted);
    font-size: 1rem;
    margin: 0;
}

.panel-heading {
    align-items: center;
    display: flex;
    gap: 10px;
    justify-content: space-between;
}

.panel-heading h2 {
    color: var(--muted);
    font-size: 1rem;
    margin: 0;
}

.panel-heading span {
    background: #fff2c7;
    border: 1px solid rgba(247, 201, 72, 0.85);
    border-radius: 8px;
    color: var(--primary-dark);
    font-size: 0.78rem;
    font-weight: 900;
    padding: 6px 9px;
}

.notification-list {
    display: grid;
    gap: 10px;
}

.notification-item {
    align-items: flex-start;
    background: transparent;
    border: 0;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    gap: 10px;
    padding: 10px;
}

.notification-item:hover {
    background: var(--nav-hover);
}

.notification-item.is-unread {
    background: var(--soft-orange);
}

.notification-item.is-unread:hover {
    background: var(--soft-orange);
}

.notification-item.is-preview,
.person-row.is-preview {
    opacity: 0.92;
}

.notification-item .avatar {
    height: 34px;
    width: 34px;
}

.notification-item span {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.notification-item strong {
    font-weight: 500;
}

.notification-item.is-unread strong {
    font-weight: 900;
}

.notification-item small {
    color: var(--muted);
    font-weight: 500;
}

.notification-item.is-unread small {
    font-weight: 800;
}

.group-form,
.group-list {
    display: grid;
    gap: 10px;
}

.group-required-notice {
    background: var(--soft-orange);
    border: 1px solid color-mix(in srgb, var(--primary) 28%, var(--line));
    border-radius: 14px;
    color: var(--muted);
    display: grid;
    gap: 4px;
    margin-bottom: 12px;
    padding: 14px 16px;
}

.group-required-notice strong {
    color: var(--primary-dark);
    font-size: 1rem;
}

.group-hero-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
    display: grid;
    gap: 14px;
    padding: 18px;
}

.group-page-banner {
    aspect-ratio: 16 / 5;
    border-radius: 8px;
    object-fit: cover;
    width: 100%;
}

.group-hero-card h1,
.group-admin-tools h2 {
    margin: 0;
}

.group-page-tabs {
    align-items: center;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding: 0 12px;
}

.group-page-tabs a {
    align-items: center;
    border-bottom: 3px solid transparent;
    color: var(--muted);
    display: inline-flex;
    font-weight: 900;
    gap: 8px;
    min-height: 52px;
    padding: 0 14px;
    white-space: nowrap;
}

.group-page-tabs a.is-active {
    border-bottom-color: var(--green);
    color: var(--green);
}

.group-page-tabs span {
    align-items: center;
    background: var(--surface-soft);
    border-radius: 999px;
    color: var(--primary);
    display: inline-flex;
    font-size: 0.76rem;
    justify-content: center;
    min-width: 22px;
    padding: 3px 7px;
}

.group-resource-section {
    display: grid;
    gap: 14px;
}

.focused-post-page {
    max-width: 900px;
}

.focused-post-head {
    align-items: center;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
    display: flex;
    gap: 16px;
    justify-content: space-between;
    padding: 18px;
}

.focused-post-head h1,
.focused-post-head p {
    margin: 0;
}

.focused-post-head > div {
    display: grid;
    gap: 4px;
}

.group-members-grid {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}

.group-member-card {
    align-items: center;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 14px;
    box-shadow: var(--shadow);
    color: var(--text);
    display: flex;
    gap: 12px;
    min-width: 0;
    padding: 14px;
    transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.group-member-card:hover {
    border-color: color-mix(in srgb, var(--primary) 45%, var(--line));
    box-shadow: 0 12px 28px rgba(15, 20, 26, 0.12);
    transform: translateY(-1px);
}

.group-member-card .avatar {
    height: 46px;
    width: 46px;
}

.group-member-card > span {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.group-member-card strong,
.group-member-card small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.group-member-card small {
    color: var(--muted);
    font-size: 0.86rem;
    font-weight: 800;
}

.group-title-row {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.group-title-copy {
    position: static;
}

.join-link-box,
.join-link-mini {
    display: grid;
    gap: 6px;
}

.join-link-mini {
    margin-top: 6px;
}

.join-link-box input,
.join-link-mini input {
    background: #fffaf4;
    color: var(--muted);
    font-size: 0.82rem;
}

.group-open-link {
    align-items: center;
    border-radius: 8px;
    display: inline-flex;
    font-weight: 900;
    padding: 9px 10px;
}

.group-admin-tools {
    display: grid;
    gap: 14px;
}

.group-form {
    gap: 12px;
}

.group-form .modal-head h2 {
    line-height: 1.05;
}

.group-field {
    gap: 7px;
}

.group-banner-upload {
    position: relative;
}

.group-form textarea {
    min-height: 84px;
    resize: vertical;
}

.group-form .composer-submit-row button {
    min-width: 180px;
}

.group-upload-card {
    align-items: center;
    background: linear-gradient(135deg, #fff7e8, #f4fff0);
    border: 1px dashed color-mix(in srgb, var(--primary) 42%, var(--line));
    border-radius: 14px;
    cursor: pointer;
    display: flex;
    gap: 12px;
    padding: 14px;
    transition: border-color 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}

.group-upload-card:hover {
    border-color: var(--primary);
    box-shadow: 0 10px 24px rgba(255, 100, 0, 0.12);
    transform: translateY(-1px);
}

.group-upload-card > span:last-child {
    display: grid;
    gap: 2px;
}

.group-upload-card strong {
    color: var(--text);
}

.group-upload-card small {
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 700;
}

.group-upload-icon {
    align-items: center;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 12px;
    color: var(--primary);
    display: inline-flex;
    flex: 0 0 auto;
    height: 46px;
    justify-content: center;
    width: 46px;
}

.group-upload-icon .nav-icon,
.group-upload-icon svg {
    height: 22px;
    width: 22px;
}

.group-banner-upload input[type="file"] {
    height: 1px;
    opacity: 0;
    overflow: hidden;
    position: absolute;
    width: 1px;
}

.group-upload-file {
    align-items: center;
    background: var(--surface-soft);
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--muted);
    display: inline-flex;
    font-size: 0.82rem;
    font-weight: 800;
    max-width: 100%;
    overflow: hidden;
    padding: 8px 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.member-picker {
    border: 1px solid var(--line);
    border-radius: 14px;
    display: grid;
    gap: 10px;
    max-height: 220px;
    overflow: auto;
    padding: 12px;
}

.member-picker-head {
    display: grid;
    gap: 2px;
}

.member-picker-head strong {
    color: var(--text);
    font-size: 0.94rem;
}

.member-picker-head small {
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 700;
}

.member-option {
    align-items: center;
    background: var(--surface-soft);
    border: 1px solid transparent;
    border-radius: 12px;
    display: flex;
    flex-direction: row;
    font-size: 0.86rem;
    font-weight: 800;
    gap: 10px;
    padding: 9px 10px;
    transition: background 140ms ease, border-color 140ms ease;
}

.member-option:has(input:checked) {
    background: var(--soft-green);
    border-color: color-mix(in srgb, var(--green) 28%, var(--line));
}

.member-option .avatar {
    height: 34px;
    width: 34px;
}

.member-option > span:last-child {
    display: grid;
    gap: 1px;
    min-width: 0;
}

.member-option strong,
.member-option small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.member-picker input {
    flex: 0 0 auto;
    height: 16px;
    width: auto;
}

.member-picker small {
    color: var(--muted);
}

.group-item {
    background: var(--surface-soft);
    border: 1px solid var(--line);
    border-radius: 8px;
    cursor: pointer;
    display: grid;
    gap: 12px;
    grid-template-columns: 64px minmax(0, 1fr) auto;
    min-height: 84px;
    overflow: hidden;
    padding: 12px 56px 12px 14px;
    position: relative;
    transition: background 160ms ease, border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.group-item:hover {
    background: #fffaf4;
    border-color: rgba(255, 100, 0, 0.32);
    box-shadow: 0 10px 24px rgba(62, 43, 20, 0.08);
    transform: translateY(-1px);
}

.group-card-link {
    border-radius: inherit;
    inset: 0;
    position: absolute;
    z-index: 1;
}

.group-row-media,
.group-row-copy {
    pointer-events: none;
    position: relative;
    z-index: 2;
}

.copy-link-button {
    align-items: center;
    background: #fff7eb;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--orange-dark);
    cursor: pointer;
    display: inline-flex;
    height: 36px;
    justify-content: center;
    padding: 0;
    position: absolute;
    right: 12px;
    top: 12px;
    width: 36px;
    z-index: 3;
}

.copy-link-button:hover,
.copy-link-button.is-copied {
    background: #eef7ea;
    border-color: #c8e3d0;
    color: var(--green-dark);
}

.copy-link-button svg {
    height: 17px;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2;
    width: 17px;
}

.group-row-media {
    align-self: start;
    display: block;
    height: 60px;
    width: 60px;
}

.group-banner {
    background: linear-gradient(135deg, rgba(255, 100, 0, 0.16), rgba(90, 183, 0, 0.18));
    border-radius: 8px;
    display: block;
    height: 60px;
    object-fit: cover;
    width: 100%;
}

.group-banner-fallback {
    border: 1px dashed rgba(255, 100, 0, 0.24);
}

.group-row-copy {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.group-title {
    color: var(--text);
    display: block;
    font-weight: 900;
    line-height: 1.22;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.group-item p,
.muted-copy {
    color: var(--muted);
    margin: 0;
}

.group-item p {
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 1;
    display: -webkit-box;
    font-size: 0.9rem;
    line-height: 1.32;
    overflow: hidden;
}

.group-item small {
    color: var(--green);
    display: block;
    font-size: 0.84rem;
    font-weight: 800;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.group-actions,
.pending-request-row {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.group-actions {
    align-self: center;
    justify-content: flex-end;
    min-width: 118px;
    position: relative;
    z-index: 2;
}

.group-actions button,
.pending-request-row button {
    padding: 7px 9px;
}

.group-state {
    background: #eef7ea;
    border: 1px solid #c8e3d0;
    border-radius: 8px;
    color: var(--green-dark);
    font-size: 0.82rem;
    font-weight: 900;
    padding: 7px 9px;
}

.groups-page .join-link-mini {
    align-items: center;
    display: flex;
    gap: 8px;
    margin-top: 4px;
}

.groups-page .join-link-mini input {
    font-size: 0.76rem;
    height: 30px;
    min-height: 0;
    padding: 5px 8px;
}

.pending-requests {
    border-top: 1px solid var(--line);
    display: grid;
    gap: 8px;
    margin-top: 4px;
    padding-top: 10px;
    position: relative;
    z-index: 2;
}

.pending-requests > span {
    color: var(--primary-dark);
    font-size: 0.82rem;
    font-weight: 900;
}

.pending-request-row {
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 8px;
}

.pending-request-row .avatar {
    height: 30px;
    width: 30px;
}

.people-list {
    display: grid;
    gap: 12px;
}

.person-row {
    align-items: flex-start;
    border-top: 1px solid var(--line);
    gap: 12px;
    justify-content: space-between;
    padding-top: 12px;
}

.person-row:first-child {
    border-top: 0;
    padding-top: 0;
}

.person-row.is-preview button:disabled {
    cursor: default;
    opacity: 0.72;
}

.mini-actions {
    align-items: stretch;
    flex-direction: column;
    gap: 8px;
}

.mini-actions button,
.profile-actions button {
    min-width: 104px;
    padding: 8px 10px;
}

.profile-hero {
    display: grid;
    gap: 22px;
    margin-bottom: 20px;
}

.account-profile-card {
    background:
        linear-gradient(180deg, color-mix(in srgb, var(--soft-orange) 58%, transparent) 0, transparent 170px),
        var(--surface);
    border-radius: 18px;
    overflow: hidden;
    padding: clamp(22px, 3vw, 34px);
}

.profile-main {
    align-items: flex-start;
    gap: 16px;
}

.profile-photo-viewer-link {
    border-radius: 50%;
    cursor: zoom-in;
    display: inline-flex;
    flex: 0 0 auto;
}

.profile-main h1 {
    font-size: clamp(2rem, 3vw, 3rem);
    line-height: 1;
    margin: 0 0 4px;
}

.profile-actions {
    gap: 10px;
}

.profile-settings {
    background: color-mix(in srgb, var(--surface-soft) 72%, var(--surface));
    border: 1px solid var(--line);
    border-radius: 14px;
    display: grid;
    gap: 20px;
    padding: clamp(18px, 2.4vw, 26px);
}

.profile-settings-head,
.profile-photo-field {
    align-items: center;
    display: flex;
    gap: 12px;
}

.profile-settings-head strong {
    display: block;
    font-size: 1.02rem;
}

.profile-settings-head small {
    color: var(--muted);
    font-weight: 800;
}

.profile-photo-field {
    align-items: flex-start;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 14px;
}

.profile-photo-field .avatar {
    height: 72px;
    width: 72px;
}

.profile-photo-field label {
    flex: 1;
}

.remove-profile-photo-button {
    flex: 0 0 auto;
}

.profile-form-grid {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.profile-settings button {
    justify-self: end;
}

.profile-section-head {
    align-items: center;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 14px;
    box-shadow: var(--shadow);
    display: flex;
    justify-content: space-between;
    padding: 16px 18px;
}

.profile-section-head h2 {
    margin: 0;
}

.profile-section-head span {
    background: #fff2c7;
    border: 1px solid rgba(247, 201, 72, 0.85);
    border-radius: 8px;
    color: var(--primary-dark);
    font-weight: 900;
    padding: 6px 10px;
}

.profile-section-list {
    display: grid;
    gap: 18px;
}

.profile-comment {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 14px;
    box-shadow: var(--shadow);
    display: grid;
    gap: 12px;
    padding: 18px;
}

.profile-comment-head {
    align-items: center;
    display: flex;
    gap: 10px;
    min-width: 0;
}

.profile-comment-head div {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.profile-comment-head small,
.profile-comment p {
    color: var(--muted);
}

.profile-comment p {
    line-height: 1.5;
    margin: 0;
}

.empty-state {
    color: var(--muted);
    font-weight: 800;
    text-align: center;
}

.search-page {
    display: grid;
    gap: 18px;
    min-width: 0;
}

.search-page-form {
    align-items: center;
    display: grid;
    gap: 10px;
    grid-template-columns: minmax(0, 1fr) auto;
    margin-top: 8px;
    max-width: 720px;
}

.search-summary {
    color: var(--muted);
    font-weight: 800;
}

.search-summary strong {
    color: var(--text);
}

.search-results-section {
    display: grid;
    gap: 10px;
}

.search-results-section h2 {
    font-size: 1.05rem;
    margin: 0;
}

.search-results-grid,
.search-results-list {
    display: grid;
    gap: 10px;
}

.search-results-grid {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.search-result-card {
    align-items: center;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--card-radius);
    box-shadow: var(--shadow);
    display: flex;
    gap: 12px;
    min-width: 0;
    padding: 13px;
}

.search-result-card:hover {
    background: var(--surface-soft);
}

.search-result-card span:not(.avatar):not(.nav-icon):not(.search-result-icon) {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.search-result-card strong,
.search-result-card small {
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-result-card strong {
    color: var(--text);
}

.search-result-card small {
    color: var(--muted);
    line-height: 1.35;
}

.search-result-icon {
    align-items: center;
    background: var(--soft-orange);
    border-radius: 999px;
    color: var(--primary);
    display: inline-flex;
    flex: 0 0 auto;
    height: 42px;
    justify-content: center;
    width: 42px;
}

:root[data-theme="dark"] .auth-panel,
:root[data-theme="dark"] .composer,
:root[data-theme="dark"] .post,
:root[data-theme="dark"] .sidebar,
:root[data-theme="dark"] .profile-hero,
:root[data-theme="dark"] .empty-state,
:root[data-theme="dark"] .library-hero,
:root[data-theme="dark"] .library-tabs,
:root[data-theme="dark"] .library-item,
:root[data-theme="dark"] .management-card,
:root[data-theme="dark"] .modal-composer,
:root[data-theme="dark"] .groups-page-panel,
:root[data-theme="dark"] .group-hero-card,
:root[data-theme="dark"] .group-admin-tools,
:root[data-theme="dark"] .profile-settings,
:root[data-theme="dark"] .profile-section-head,
:root[data-theme="dark"] .profile-comment {
    background: var(--surface);
}

:root[data-theme="dark"] .content-brand img,
:root[data-theme="dark"] .brand-mark img {
    filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.28));
}

:root[data-theme="dark"] .editor-toolbar,
:root[data-theme="dark"] .file-library-preview,
:root[data-theme="dark"] .comment-composer,
:root[data-theme="dark"] .post-upload-row,
:root[data-theme="dark"] .post-upload-dropzone,
:root[data-theme="dark"] .edit-attachment-option,
:root[data-theme="dark"] .group-item,
:root[data-theme="dark"] .pending-request-row,
:root[data-theme="dark"] .library-url,
:root[data-theme="dark"] .profile-contact span,
:root[data-theme="dark"] .comment,
:root[data-theme="dark"] .file-attachment {
    background: var(--surface-soft);
}

:root[data-theme="dark"] .rich-editor,
:root[data-theme="dark"] .editor-surface,
:root[data-theme="dark"] .post-menu-dropdown {
    background: var(--surface);
}

:root[data-theme="dark"] .modal-backdrop {
    background: rgba(0, 0, 0, 0.62);
}

:root[data-theme="dark"] input[type="color"] {
    background: var(--surface-soft);
}

@media (max-width: 1180px) {
    .app-topbar {
        grid-template-columns: 120px minmax(200px, 1fr) auto;
    }

    .dashboard-layout {
        grid-template-columns: minmax(230px, 290px) minmax(0, 760px);
    }

    .dashboard-right-rail {
        display: none;
    }
}

@media (max-width: 980px) {
    .has-app-header .page {
        padding-top: 74px;
    }

    .app-topbar {
        grid-template-columns: 104px minmax(0, 1fr) auto;
        height: 58px;
        padding: 8px 12px;
    }

    .topbar-actions {
        align-self: center;
    }

    .auth-shell {
        grid-template-columns: 1fr;
    }

    body.sidebar-open {
        overflow: hidden;
    }

    .mobile-sidebar-toggle {
        box-shadow: var(--shadow);
        display: inline-flex;
        left: 14px;
        position: fixed;
        top: 68px;
        z-index: 140;
    }

    body.sidebar-open .mobile-sidebar-toggle {
        background: var(--soft-orange);
        border-color: rgba(255, 100, 0, 0.35);
        color: var(--primary-dark);
    }

    body.sidebar-open .sidebar-backdrop {
        display: block;
        z-index: 110;
    }

    .layout {
        grid-template-columns: 1fr;
        justify-content: stretch;
    }

    .profile-summary {
        background: var(--surface);
        border: 0;
        border-radius: 0 18px 18px 0;
        bottom: 0;
        box-shadow: 18px 0 42px rgba(15, 20, 26, 0.24);
        left: 0;
        margin: 0;
        max-width: 360px;
        max-height: calc(100vh - 58px);
        max-height: calc(100dvh - 58px);
        overflow-y: auto;
        overscroll-behavior: contain;
        padding: 78px 16px calc(18px + env(safe-area-inset-bottom, 0));
        position: fixed;
        top: 58px;
        transform: translateX(-105%);
        transition: transform 180ms ease;
        width: min(84vw, 360px);
        z-index: 115;
    }

    .profile-summary .content-nav {
        gap: 14px;
    }

    .profile-summary .content-nav-links {
        gap: 4px;
    }

    .profile-summary .content-nav-links a,
    .profile-summary .sidebar-user-card,
    .profile-summary .theme-toggle {
        background: var(--surface);
        border: 1px solid var(--line);
        border-radius: 12px;
        min-height: 48px;
        padding: 11px 12px;
    }

    .profile-summary .sidebar-user-card {
        background: var(--surface-soft);
    }

    .profile-summary .content-nav-links a.is-active {
        background: var(--soft-orange);
        border-color: rgba(255, 100, 0, 0.28);
    }

    .profile-summary .nav-request-badge {
        margin-left: auto;
    }

    body.sidebar-open .profile-summary {
        transform: translateX(0);
    }
}

@media (max-width: 720px) {
    .has-app-header .page {
        padding-top: 70px;
    }

    .app-topbar {
        gap: 8px;
        grid-template-columns: 108px minmax(0, 1fr) auto;
    }

    .topbar-brand {
        height: 42px;
        width: 104px;
    }

    .topbar-brand img {
        height: 36px;
        width: 96px;
    }

    .topbar-search {
        height: 38px;
    }

    .topbar-action {
        height: 38px;
        width: 38px;
    }

    .topbar-action .avatar {
        height: 34px;
        width: 34px;
    }

    .topbar-theme {
        display: none;
    }

    .verify-secondary-actions {
        grid-template-columns: 1fr;
    }

    .otp-input {
        letter-spacing: 0.18em;
        text-align: left;
    }

    .search-page-form {
        grid-template-columns: 1fr;
    }

    .page {
        padding: 16px;
    }

    .profile-hero .content-nav {
        align-items: stretch;
        flex-direction: column;
    }

    .library-tabs,
    .media-grid,
    .files-grid,
    .links-grid,
    .management-tabs,
    .management-form-grid,
    .user-management-form {
        grid-template-columns: 1fr;
    }

    .auth-brand-panel {
        padding: 28px;
    }

    .composer-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .composer-launcher {
        grid-template-columns: 1fr;
    }

    .attachment-picker {
        flex-basis: auto;
        width: 100%;
    }

    .composer-toolbar input[type="file"],
    .composer-toolbar button {
        width: 100%;
    }

    .modal-backdrop {
        align-items: stretch;
        padding: 70px 10px 12px;
    }

    .modal-panel {
        max-height: calc(100vh - 82px);
        width: 100%;
    }

    .modal-head {
        padding: 14px 16px 12px;
    }

    .modal-composer > label,
    .modal-composer > .post-upload,
    .modal-composer > .composer-addons,
    .modal-composer > .selected-tags-summary,
    .modal-composer > .member-picker {
        margin-left: 16px;
        margin-right: 16px;
    }

    .composer-submit-row {
        padding: 12px 16px;
    }

    .post-upload-dropzone {
        min-height: 104px;
        padding: 16px;
    }

    .post-upload-row {
        align-items: stretch;
        display: grid;
        grid-template-columns: auto minmax(0, 1fr) auto;
    }

    .post-upload-file-size {
        grid-column: 2;
    }

    .post-upload-remove {
        grid-column: 3;
        grid-row: 1 / span 2;
    }

    .group-item {
        grid-template-columns: 52px minmax(0, 1fr);
        padding-right: 50px;
    }

    .group-row-media,
    .group-banner {
        height: 48px;
        width: 48px;
    }

    .group-actions {
        grid-column: 1 / -1;
        justify-content: flex-start;
        min-width: 0;
    }

    .tag-picker-list {
        display: grid;
    }

    .tag-picker-list label {
        flex-basis: auto;
    }

    .comment-form {
        align-items: flex-start;
        flex-direction: row;
    }

    .comment-composer {
        border-radius: 18px;
    }

    .comment-send-button,
    .comment-attachment-picker {
        height: 34px;
        min-height: 0;
        width: 34px;
    }

    .person-row {
        align-items: stretch;
        flex-direction: column;
    }

    .comment-form button:not(.comment-send-button) {
        width: 100%;
    }

    .image-gallery-viewer {
        padding: 62px 14px 28px;
    }

    .image-attachment-preview,
    .image-attachment-preview img {
        min-height: 190px;
    }

    .image-gallery-viewer img {
        max-height: calc(86vh - 72px);
    }

    .image-viewer-close {
        right: 14px;
        top: 14px;
    }

    .image-viewer-nav {
        bottom: 18px;
        height: 46px;
        top: auto;
        transform: none;
        width: 46px;
    }

    .image-viewer-nav.previous {
        left: 18px;
    }

    .image-viewer-nav.next {
        right: 18px;
    }

    .profile-settings-head,
    .profile-photo-field {
        align-items: stretch;
        flex-direction: column;
    }

    .profile-form-grid {
        grid-template-columns: 1fr;
    }

    .profile-settings button {
        justify-self: stretch;
    }
}
