:root {
    --bg: #000103;
    --bg-soft: rgba(3, 6, 12, 0.94);
    --surface: rgba(4, 7, 14, 0.74);
    --surface-soft: rgba(255, 255, 255, 0.05);
    --surface-hover: rgba(255, 255, 255, 0.08);
    --border: rgba(255, 255, 255, 0.12);
    --border-strong: rgba(255, 255, 255, 0.34);
    --text: #f7f8fc;
    --muted: rgba(235, 239, 247, 0.58);
    --muted-strong: rgba(245, 247, 252, 0.78);
    --accent: #ff3f6c;
    --accent-hover: #ff5a82;
    --accent-soft: rgba(255, 63, 108, 0.16);
    --accent-glow: rgba(255, 82, 124, 0.34);
    --danger: #ff8b8b;
    --success: #44d69e;
    --shadow: 0 28px 80px rgba(0, 0, 0, 0.38);
    --glass-shadow: 0 18px 44px rgba(0, 0, 0, 0.28);
    --radius: 22px;
    --radius-sm: 16px;
    --radius-xs: 12px;
    --font-body: "Manrope", "Segoe UI", sans-serif;
    color-scheme: dark;
}

html[data-theme="light"] {
    --bg: #f5f7fb;
    --bg-soft: rgba(255, 255, 255, 0.96);
    --surface: rgba(255, 255, 255, 0.88);
    --surface-soft: rgba(15, 23, 42, 0.05);
    --surface-hover: rgba(15, 23, 42, 0.08);
    --border: rgba(15, 23, 42, 0.12);
    --border-strong: rgba(15, 23, 42, 0.22);
    --text: #172033;
    --muted: rgba(23, 32, 51, 0.62);
    --muted-strong: rgba(23, 32, 51, 0.82);
    --accent-soft: rgba(255, 63, 108, 0.12);
    --shadow: 0 28px 80px rgba(15, 23, 42, 0.12);
    --glass-shadow: 0 18px 44px rgba(15, 23, 42, 0.1);
    color-scheme: light;
}

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

html,
body {
    height: 100%;
}

html {
    scroll-behavior: smooth;
}

body {
    position: relative;
    margin: 0;
    overflow-x: hidden;
    background:
        radial-gradient(circle at 18% 18%, rgba(255, 63, 108, 0.14), transparent 20%),
        radial-gradient(circle at 82% 12%, rgba(255, 46, 92, 0.1), transparent 18%),
        radial-gradient(circle at 54% 72%, rgba(255, 255, 255, 0.02), transparent 24%),
        linear-gradient(180deg, #03050b 0%, #000103 54%, #000000 100%);
    color: var(--text);
    font-family: var(--font-body);
    line-height: 1.5;
    background-color: #000000;
    background-repeat: no-repeat;
}

body::before,
body::after {
    content: "";
    position: fixed;
    pointer-events: none;
    z-index: 0;
}

body::before {
    inset: -18% -12%;
    background:
        radial-gradient(circle at 18% 30%, rgba(255, 64, 108, 0.34), transparent 18%),
        radial-gradient(circle at 76% 22%, rgba(255, 38, 88, 0.24), transparent 16%),
        radial-gradient(circle at 62% 72%, rgba(255, 120, 160, 0.1), transparent 20%),
        conic-gradient(from 210deg at 55% 50%, rgba(255, 74, 116, 0.12), rgba(255, 22, 77, 0.08), rgba(255, 255, 255, 0.03), rgba(255, 74, 116, 0.12));
    filter: blur(12px);
    opacity: 0.22;
    animation: ambientDrift 24s ease-in-out infinite alternate;
}

body::after {
    inset: 0;
    background:
        linear-gradient(130deg, rgba(255, 255, 255, 0.06), transparent 42%),
        repeating-linear-gradient(115deg, rgba(255, 255, 255, 0.025) 0 1px, transparent 1px 42px);
    mix-blend-mode: screen;
    opacity: 0.24;
}

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

img {
    display: block;
    max-width: 100%;
}

button,
input,
textarea,
select {
    font: inherit;
}

button {
    cursor: pointer;
}

input,
textarea,
select {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: rgba(5, 10, 20, 0.5);
    color: var(--text);
    padding: 0.9rem 1rem;
    outline: none;
    backdrop-filter: blur(18px);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
    transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

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

input:focus,
textarea:focus,
select:focus {
    border-color: rgba(255, 255, 255, 0.72);
    background: rgba(9, 15, 28, 0.72);
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.1), 0 14px 34px rgba(255, 63, 108, 0.14);
    transform: translateY(-1px);
}

textarea {
    min-height: 120px;
    resize: vertical;
}

summary {
    list-style: none;
}

summary::-webkit-details-marker {
    display: none;
}

::selection {
    background: rgba(255, 63, 108, 0.28);
    color: #ffffff;
}

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

.layout-app {
    padding: 0 0 32px;
}

.page-messages.layout-app {
    height: 100vh;
    padding-bottom: 0;
    overflow: hidden;
}

.app-shell,
.guest-shell,
.mobile-nav {
    position: relative;
    z-index: 1;
}

.app-shell {
    width: min(1440px, calc(100% - 32px));
    margin: 0 auto;
    display: grid;
    gap: 24px;
}

.app-shell--with-rail {
    grid-template-columns: 248px minmax(0, 1fr) 320px;
}

.app-shell--no-rail {
    grid-template-columns: 248px minmax(0, 1fr);
}

.app-shell--messages {
    width: min(1560px, calc(100% - 24px));
}

.app-sidebar,
.app-main,
.app-rail {
    min-width: 0;
}

.app-sidebar__sticky,
.app-rail__sticky {
    position: sticky;
    top: 16px;
    display: grid;
    gap: 16px;
}

.app-sidebar {
    padding-top: 16px;
}

.app-main {
    border-left: 1px solid var(--border);
    border-right: 1px solid var(--border);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
    backdrop-filter: blur(22px);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
    min-height: 100vh;
}

.app-shell--no-rail .app-main {
    border-right: 0;
}

.page-admin .app-shell--with-rail {
    grid-template-columns: 248px minmax(0, 1fr);
}

.page-admin .app-main {
    border-right: 0;
}

.page-admin .app-rail {
    display: none;
}

.content-column {
    min-height: 100vh;
}

.page-messages {
    height: 100vh;
    overflow: hidden;
}

.page-messages .app-shell,
.page-messages .app-main,
.page-messages .content-column {
    height: 100vh;
}

.page-messages .app-main,
.page-messages .content-column {
    overflow: hidden;
}

.page-messages .content-column {
    display: flex;
    flex-direction: column;
}

.page-messages .content-stack--wide,
.page-messages .messages-layout,
.page-messages .conversations-panel,
.page-messages .chat-panel {
    height: 100%;
    min-height: 0;
}

.page-messages .content-stack--wide {
    padding-top: 16px;
    padding-bottom: 16px;
}

.page-messages .content-column > .flash {
    width: calc(100% - 32px);
    margin: 16px auto 0;
}

.content-column > .flash {
    width: min(720px, calc(100% - 24px));
    margin: 16px auto 0;
}

.app-rail {
    padding-top: 16px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-size: 1.15rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.brand--sidebar {
    padding: 10px 12px;
    border-radius: 999px;
    border: 1px solid transparent;
}

.brand--sidebar:hover {
    border-color: rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.05);
}

.brand--auth {
    padding: 14px 18px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(24px);
    box-shadow: var(--glass-shadow);
}

.brand--auth .brand__label {
    font-size: 1.08rem;
}

.brand__mark {
    width: 24px;
    height: 16px;
    flex: 0 0 24px;
    background: linear-gradient(90deg, #ffafc2 0%, #ff5a82 45%, #ff214f 100%);
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 32' fill='none'%3E%3Cpath d='M2 18H14L21 10L29 25L36 7L43 18H62' stroke='white' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 32' fill='none'%3E%3Cpath d='M2 18H14L21 10L29 25L36 7L43 18H62' stroke='white' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
    filter: drop-shadow(0 0 10px rgba(255, 82, 124, 0.55));
}

.brand__label {
    line-height: 1;
}

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

.app-nav__item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 999px;
    border: 1px solid transparent;
    background: rgba(255, 255, 255, 0.02);
    color: var(--text);
    font-size: 1rem;
    font-weight: 700;
    backdrop-filter: blur(16px);
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.app-nav__item:hover {
    border-color: rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.07);
}

.app-nav__item.is-active {
    border-color: rgba(255, 255, 255, 0.14);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.12), rgba(255, 63, 108, 0.12));
    color: #ffffff;
}

.app-sidebar__cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 18px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.78);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.99) 0%, rgba(255, 255, 255, 0.93) 34%, rgba(255, 232, 240, 0.96) 66%, rgba(255, 255, 255, 0.99) 100%);
    background-size: 220% 220%;
    color: #07101b;
    font-weight: 800;
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.26), 0 0 0 1px rgba(255, 255, 255, 0.16);
    animation: buttonGradient 7s ease infinite;
}

.app-sidebar__cta:hover {
    border-color: rgba(255, 255, 255, 0.92);
    background-position: 100% 50%;
}

.sidebar-profile,
.card,
.post-card,
.flash,
.metric-card {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.025));
    backdrop-filter: blur(24px);
    box-shadow: var(--glass-shadow), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.sidebar-profile,
.card,
.post-card {
    padding: 16px 18px;
}

.sidebar-profile {
    display: grid;
    gap: 12px;
}

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

.app-rail__sticky .card {
    padding: 16px;
}

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

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

.rail-card__header h3 {
    margin: 0;
    font-size: 1.02rem;
}

.rail-links {
    display: grid;
    gap: 8px;
}

.rail-links a {
    padding: 10px 12px;
    border-radius: var(--radius-xs);
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text);
    backdrop-filter: blur(16px);
}

.rail-links a:hover {
    background: rgba(255, 255, 255, 0.1);
}

.mobile-nav {
    display: none;
}

.guest-shell {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 32px 24px;
}

.guest-main {
    width: min(620px, 100%);
}

.guest-main > .flash {
    margin-bottom: 16px;
}

.auth-shell {
    display: grid;
    gap: 24px;
    justify-items: center;
    width: min(560px, 100%);
    margin: 0 auto;
    padding: clamp(20px, 6vw, 52px) 0;
}

.auth-form {
    width: min(440px, 100%);
    padding: 22px;
    border-color: rgba(255, 255, 255, 0.3);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.015));
    box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.auth-form--setup {
    width: min(560px, 100%);
}

.auth-form .stack-form {
    gap: 16px;
}

.auth-form .button {
    width: 100%;
}

.auth-form .checkbox {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 4px 2px 0;
    color: var(--muted-strong);
}

.auth-form .checkbox input {
    margin: 0;
}

.content-stack {
    display: grid;
    gap: 16px;
    padding-bottom: 32px;
}

.content-stack--narrow {
    max-width: 720px;
    margin: 0 auto;
    padding-top: 24px;
}

.content-stack--wide {
    padding: 24px 16px 32px;
}

.card {
    display: grid;
    gap: 16px;
}

.section-heading {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 16px;
}

.section-heading h1,
.section-heading h2,
.auth-form h2,
.auth-form h3 {
    margin: 4px 0 0;
    font-size: 1.3rem;
    letter-spacing: -0.03em;
}

.eyebrow {
    margin: 0;
    color: rgba(255, 255, 255, 0.74);
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}
.logout-card {
    margin-bottom: 96px;
}

.section-copy,
.card p,
.chat-empty p,
.empty-state p {
    color: var(--muted);
}

.stack,
.stack-form,
.feed,
.comment-list,
.conversation-stack,
.checkbox-list {
    display: grid;
    gap: 14px;
}

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

.stack-form label,
.form-grid label {
    display: grid;
    gap: 8px;
}

.stack-form label span,
.form-grid label span {
    color: var(--muted-strong);
    font-size: 0.92rem;
}

.button-group,
.form-row,
.action-row,
.hero-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    padding: 12px 18px;
    background: rgba(255, 255, 255, 0.06);
    color: var(--text);
    font-weight: 700;
    backdrop-filter: blur(18px);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.18);
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.button:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 34px rgba(0, 0, 0, 0.24);
}

.button--small {
    padding: 9px 14px;
    font-size: 0.92rem;
}

.button--primary {
    border-color: rgba(255, 255, 255, 0.78);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.99) 0%, rgba(255, 255, 255, 0.93) 34%, rgba(255, 232, 240, 0.96) 66%, rgba(255, 255, 255, 0.99) 100%);
    background-size: 220% 220%;
    color: #07101b;
    animation: buttonGradient 7s ease infinite;
}

.button--primary:hover {
    border-color: rgba(255, 255, 255, 0.92);
    background-position: 100% 50%;
}

.button--secondary {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.16);
    color: #ffffff;
}

.button--ghost {
    border-color: rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.02);
}

.button--ghost:hover {
    background: rgba(255, 255, 255, 0.08);
}

.button--danger {
    background: rgba(255, 139, 139, 0.14);
    border-color: rgba(255, 139, 139, 0.26);
    color: #ffe2e2;
}

.button.is-liked {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.12), rgba(255, 63, 108, 0.16));
    border-color: rgba(255, 116, 153, 0.38);
}

.button--icon {
    position: relative;
    width: 42px;
    height: 42px;
    min-width: 42px;
    padding: 0;
    gap: 0;
    border-radius: 16px;
    font-size: 0;
    color: transparent;
}

.button--small.button--icon {
    width: 40px;
    height: 40px;
    min-width: 40px;
}

.button--icon .ui-icon {
    color: var(--muted-strong);
}

.button.is-liked .ui-icon {
    color: var(--accent);
}

.button--icon [data-like-count],
.button--icon [data-comment-count] {
    position: absolute;
    right: -5px;
    bottom: -5px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.94);
    color: #07101b;
    font-size: 0.68rem;
    font-weight: 800;
    line-height: 1;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.2);
}

.ui-icon {
    display: block;
    width: 18px;
    height: 18px;
    background: currentColor;
    -webkit-mask-position: center;
    -webkit-mask-repeat: no-repeat;
    -webkit-mask-size: contain;
    mask-position: center;
    mask-repeat: no-repeat;
    mask-size: contain;
}

.ui-icon--clip {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M16.5 6.5 9 14a3 3 0 0 0 4.24 4.24l8.11-8.1a5 5 0 0 0-7.07-7.08L5.46 11.9a7 7 0 0 0 9.9 9.9l7.07-7.07' fill='none' stroke='%23000' stroke-linecap='round' stroke-linejoin='round' stroke-width='2'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M16.5 6.5 9 14a3 3 0 0 0 4.24 4.24l8.11-8.1a5 5 0 0 0-7.07-7.08L5.46 11.9a7 7 0 0 0 9.9 9.9l7.07-7.07' fill='none' stroke='%23000' stroke-linecap='round' stroke-linejoin='round' stroke-width='2'/%3E%3C/svg%3E");
}

.ui-icon--heart {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 21.35 10.55 20.03C5.4 15.36 2 12.28 2 8.5 2 5.42 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.09A6 6 0 0 1 16.5 3C19.58 3 22 5.42 22 8.5c0 3.78-3.4 6.86-8.55 11.54z'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 21.35 10.55 20.03C5.4 15.36 2 12.28 2 8.5 2 5.42 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.09A6 6 0 0 1 16.5 3C19.58 3 22 5.42 22 8.5c0 3.78-3.4 6.86-8.55 11.54z'/%3E%3C/svg%3E");
}

.ui-icon--comment {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 5.5A3.5 3.5 0 0 1 7.5 2h9A3.5 3.5 0 0 1 20 5.5v6A3.5 3.5 0 0 1 16.5 15H9l-4.5 4v-4.38A3.5 3.5 0 0 1 4 11.5z'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 5.5A3.5 3.5 0 0 1 7.5 2h9A3.5 3.5 0 0 1 20 5.5v6A3.5 3.5 0 0 1 16.5 15H9l-4.5 4v-4.38A3.5 3.5 0 0 1 4 11.5z'/%3E%3C/svg%3E");
}

.ui-icon--moon {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M20.4 14.6A8.5 8.5 0 0 1 9.4 3.6 8.5 8.5 0 1 0 20.4 14.6z'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M20.4 14.6A8.5 8.5 0 0 1 9.4 3.6 8.5 8.5 0 1 0 20.4 14.6z'/%3E%3C/svg%3E");
}

.ui-icon--sun {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 4a1 1 0 0 1 1 1v1.2a1 1 0 1 1-2 0V5a1 1 0 0 1 1-1zm0 12.6a1 1 0 0 1 1 1V19a1 1 0 1 1-2 0v-1.4a1 1 0 0 1 1-1zm8-5.6a1 1 0 0 1 0 2h-1.4a1 1 0 1 1 0-2zM6.4 11a1 1 0 1 1 0 2H5a1 1 0 1 1 0-2zm8.08-4.66a1 1 0 0 1 1.42 0l.99.99a1 1 0 1 1-1.42 1.42l-.99-.99a1 1 0 0 1 0-1.42zm-8.9 8.9a1 1 0 0 1 1.41 0l.99.98a1 1 0 0 1-1.41 1.42l-1-.99a1 1 0 0 1 0-1.41zm11.3.98.99-.99a1 1 0 1 1 1.42 1.41l-.99 1a1 1 0 1 1-1.42-1.42zm-9.88-9.88.99-.99A1 1 0 1 1 9.45 7l-.99.99A1 1 0 1 1 7.04 6.34zM12 8a4 4 0 1 1 0 8 4 4 0 0 1 0-8z'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 4a1 1 0 0 1 1 1v1.2a1 1 0 1 1-2 0V5a1 1 0 0 1 1-1zm0 12.6a1 1 0 0 1 1 1V19a1 1 0 1 1-2 0v-1.4a1 1 0 0 1 1-1zm8-5.6a1 1 0 0 1 0 2h-1.4a1 1 0 1 1 0-2zM6.4 11a1 1 0 1 1 0 2H5a1 1 0 1 1 0-2zm8.08-4.66a1 1 0 0 1 1.42 0l.99.99a1 1 0 1 1-1.42 1.42l-.99-.99a1 1 0 0 1 0-1.42zm-8.9 8.9a1 1 0 0 1 1.41 0l.99.98a1 1 0 0 1-1.41 1.42l-1-.99a1 1 0 0 1 0-1.41zm11.3.98.99-.99a1 1 0 1 1 1.42 1.41l-.99 1a1 1 0 1 1-1.42-1.42zm-9.88-9.88.99-.99A1 1 0 1 1 9.45 7l-.99.99A1 1 0 1 1 7.04 6.34zM12 8a4 4 0 1 1 0 8 4 4 0 0 1 0-8z'/%3E%3C/svg%3E");
}

.file-picker {
    position: relative;
    display: grid;
    align-content: center;
    gap: 4px;
    min-height: 62px;
    padding: 14px 18px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-sm);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03));
    color: var(--muted-strong);
    backdrop-filter: blur(16px);
    overflow: hidden;
    transition: border-color 0.2s ease, transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.file-picker::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 4px;
    background: linear-gradient(180deg, rgba(255, 165, 188, 0.9), rgba(255, 63, 108, 0.92));
    opacity: 0.9;
}

.file-picker:hover {
    border-color: rgba(255, 255, 255, 0.2);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.04));
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.22);
    transform: translateY(-1px);
}

.file-picker span {
    display: block;
    font-weight: 700;
    line-height: 1.1;
}

.file-picker small {
    display: block;
    color: var(--muted);
    font-size: 0.82rem;
    line-height: 1.3;
}

.file-picker input {
    position: absolute;
    inset: 0;
    width: 100%;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    opacity: 0;
    cursor: pointer;
}

.file-picker--compact {
    min-height: 58px;
    padding: 12px 16px;
}

.file-picker--icon {
    width: 54px;
    min-width: 54px;
    min-height: 54px;
    padding: 0;
    place-items: center;
    border-radius: 16px;
}

.file-picker--icon::before {
    display: none;
}

.file-picker--icon > span:not(.sr-only):not(.ui-icon),
.file-picker--icon small {
    display: none;
}

.file-picker--icon .ui-icon {
    width: 20px;
    height: 20px;
    color: rgba(255, 255, 255, 0.92);
}

.divider {
    height: 1px;
    background: var(--border);
}

.checkbox,
.checkbox-card {
    display: flex;
    align-items: center;
    gap: 10px;
}

.checkbox input,
.checkbox-card input {
    appearance: auto;
    width: 18px;
    min-width: 18px;
    height: 18px;
    margin: 0;
    padding: 0;
    border-radius: 5px;
    border: 1px solid rgba(255, 255, 255, 0.26);
    background: rgba(255, 255, 255, 0.04);
    box-shadow: none;
    backdrop-filter: none;
    accent-color: var(--accent);
    flex: 0 0 18px;
}

.checkbox-card {
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(16px);
}

.checkbox span,
.checkbox-card span {
    line-height: 1.35;
}

.user-line,
.mini-profile,
.result-card {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-line strong,
.mini-profile strong,
.comment-card__meta strong,
.conversation-card strong,
.activity-row strong,
.member-row strong {
    display: block;
}

.user-line span,
.mini-profile span,
.comment-card__meta span,
.conversation-card span,
.activity-row span,
.member-row span {
    color: var(--muted);
}

.user-line img,
.mini-profile img,
.conversation-card img,
.comment-card img,
.message-bubble > img,
.activity-row img,
.member-row img,
.profile-summary__avatar {
    width: 52px;
    height: 52px;
    border-radius: 999px;
    object-fit: cover;
    border: 1px solid var(--border);
}

.profile-summary {
    padding: 14px 18px;
}

.profile-summary__toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.theme-toggle {
    position: relative;
    min-width: 72px;
    padding: 8px 10px;
    border-radius: 999px;
    justify-content: space-between;
    isolation: isolate;
    overflow: hidden;
}

.theme-toggle__thumb {
    position: absolute;
    top: 6px;
    left: 6px;
    width: 28px;
    height: 28px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.22);
    transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
    z-index: 0;
}

.theme-toggle__icon {
    position: relative;
    z-index: 1;
    width: 16px;
    height: 16px;
    color: var(--muted);
    transition: color 0.2s ease, transform 0.2s ease;
}

.theme-toggle[data-theme-mode="dark"] .theme-toggle__icon--moon {
    color: #ffffff;
    transform: scale(1.05);
}

.theme-toggle[data-theme-mode="light"] .theme-toggle__thumb {
    transform: translateX(32px);
    background: rgba(255, 203, 70, 0.26);
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.16);
}

.theme-toggle[data-theme-mode="light"] .theme-toggle__icon--sun {
    color: #9a6700;
    transform: scale(1.05);
}

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

.appearance-panel__title {
    display: block;
    margin-bottom: 4px;
}

.composer-card textarea {
    min-height: 132px;
}

.post-card {
    padding: 22px 22px 20px;
    gap: 18px;
}

.post-card__header,
.post-card__footer {
    display: grid;
    gap: 14px;
}

.post-card__body {
    padding-block: 10px 14px;
    color: var(--text);
    font-size: 1.01rem;
    line-height: 1.9;
    white-space: normal;
}

.attachment-grid {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.attachment-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 120px;
    gap: 18px;
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.04));
    backdrop-filter: blur(18px);
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.attachment-card:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.2);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.11), rgba(255, 255, 255, 0.05));
}

.attachment-card span {
    display: inline-flex;
    align-self: start;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    color: var(--muted-strong);
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.attachment-card strong {
    font-size: 1rem;
    line-height: 1.45;
}

.attachment-card--image {
    padding: 0;
    overflow: hidden;
}

.attachment-card--image img {
    width: 100%;
    height: 240px;
    object-fit: cover;
}

.inline-editor {
    display: grid;
    gap: 12px;
}

.inline-editor summary {
    color: var(--accent);
    cursor: pointer;
    font-weight: 700;
}

.comments-shell {
    display: grid;
    gap: 14px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
}

.comments-shell.is-hidden {
    display: none;
}

.comment-card {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 12px;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(18px);
}

.comment-card p {
    margin: 4px 0 0;
    line-height: 1.65;
}

.comment-delete {
    border: 0;
    background: none;
    color: #ff9ab0;
    padding: 0;
}

.comment-form {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
}

.result-card {
    justify-content: space-between;
    padding: 14px 0;
    border-bottom: 1px solid var(--border);
}

.result-card:last-child {
    padding-bottom: 0;
    border-bottom: 0;
}

.compact-post {
    display: grid;
    gap: 12px;
    padding: 14px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(18px);
}

.compact-post p {
    margin: 0;
    padding-block: 6px 8px;
    line-height: 1.7;
}

.compact-post span {
    color: var(--muted);
}

.search-form {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
}

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

.mini-profile {
    align-items: center;
}

.profile-banner {
    padding: 22px;
    gap: 18px;
}

.profile-banner__cover {
    display: none;
}

.profile-banner__body {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    padding: 0;
    margin-top: 0;
}

.profile-banner__avatar {
    width: 88px;
    height: 88px;
    border-radius: 999px;
    border: 1px solid var(--border);
    object-fit: cover;
    flex-shrink: 0;
}

.profile-banner__content {
    flex: 1;
    min-width: 0;
    display: grid;
    gap: 14px;
}

.profile-banner__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.profile-banner__lead {
    margin: 0;
    font-size: 1rem;
}

.profile-banner__info {
    min-width: 0;
}

.profile-banner__info h1 {
    margin: 6px 0 8px;
    font-size: 1.9rem;
    letter-spacing: -0.04em;
    line-height: 1.12;
    overflow-wrap: anywhere;
}

.profile-banner__info p {
    margin: 0;
    color: var(--muted);
}

.profile-banner__actions {
    flex-shrink: 0;
    justify-content: flex-end;
}

.profile-banner__actions,
.profile-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

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

.profile-info-grid .details-card {
    height: 100%;
}

.profile-info-grid .details-card__content {
    padding: 14px;
}

.profile-info-grid h3 {
    margin: 0;
    font-size: 1rem;
}

.pill {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border: 1px solid var(--border);
    border-radius: 999px;
    color: var(--muted-strong);
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(14px);
    font-size: 0.84rem;
}

.details-list {
    display: grid;
    gap: 14px;
    margin: 0;
}

.details-list div {
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border);
}

.details-list div:last-child {
    padding-bottom: 0;
    border-bottom: 0;
}

.details-list dt {
    color: var(--muted);
    margin-bottom: 6px;
}

.details-list dd {
    margin: 0;
}

.details-list--compact {
    gap: 10px;
}

.metric-grid {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
}

.metric-card {
    padding: 14px 16px;
    display: grid;
    gap: 8px;
}

.metric-card span {
    color: var(--muted);
    font-size: 0.9rem;
}

.metric-card strong {
    font-size: 1.6rem;
    letter-spacing: -0.04em;
}

.activity-row,
.member-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}

.activity-row:last-child,
.member-row:last-child {
    padding-bottom: 0;
    border-bottom: 0;
}

.messages-layout {
    display: grid;
    grid-template-columns: 304px minmax(0, 1fr);
    gap: 24px;
    align-items: start;
    height: 100%;
}

.conversations-panel,
.chat-panel {
    min-height: 0;
}

.conversations-panel {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 20px;
    overflow: hidden;
}

.conversation-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-height: 0;
}

.conversation-section + .conversation-section {
    margin-top: 24px;
}

.conversation-section__title {
    margin: 0;
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.conversation-toolbar {
    display: grid;
    gap: 14px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.conversation-toolbar .button-group {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.conversation-toolbar .button {
    width: 100%;
    min-height: 42px;
}

.conversation-stack {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-height: 0;
    overflow-y: auto;
    padding-right: 4px;
}

.conversation-card {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(18px);
}

.conversation-card__body {
    min-width: 0;
    display: grid;
    gap: 4px;
}

.conversation-card:hover {
    background: rgba(255, 255, 255, 0.08);
}

.conversation-card.is-active {
    border-color: rgba(255, 255, 255, 0.16);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.12), rgba(255, 63, 108, 0.14));
}

.chat-panel {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 20px;
    height: 100%;
}

.chat-panel__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border);
}

.chat-empty,
.empty-state {
    display: grid;
    place-items: center;
    text-align: center;
    min-height: 220px;
    padding: 24px;
    border: 1px dashed var(--border);
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(18px);
}

.empty-state h2,
.chat-empty h2 {
    margin: 0 0 4px;
    font-size: 1.4rem;
    letter-spacing: -0.03em;
}

.empty-state--compact {
    min-height: auto;
    padding: 16px;
}

.messages-stream {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 4px 0;
    min-height: 0;
    overflow-y: auto;
}

.message-bubble {
    display: flex;
    align-items: end;
    gap: 12px;
    max-width: 60%;
}

.message-bubble--own {
    margin-left: auto;
    justify-content: end;
}

.message-bubble__content {
    padding: 14px 16px;
    border: 1px solid var(--border);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(18px);
}

.message-bubble--own .message-bubble__content {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.12), rgba(255, 63, 108, 0.14));
    border-color: rgba(255, 255, 255, 0.14);
}

.message-bubble__content strong {
    display: block;
    margin-bottom: 4px;
}

.message-bubble__content p {
    margin: 0;
    line-height: 1.7;
}

.message-bubble__content span {
    display: block;
    margin-top: 8px;
    color: var(--muted);
    font-size: 0.8rem;
}

.message-attachments {
    display: grid;
    gap: 10px;
    margin-top: 12px;
}

.message-attachment {
    display: block;
}

.message-attachment--image {
    border-radius: 4px !important;
}

.message-attachment--image img {
    width: 100%;
    max-width: 600px;
    border-radius: 4px !important;
    display: block;
}

.message-attachment--file {
    padding: 12px 14px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.05);
    color: #ff9ab0;
}

.message-attachments a {
    color: #ff9ab0;
}

.message-form {
    display: grid;
    grid-template-columns: 54px minmax(0, 1fr) auto;
    gap: 12px;
    align-items: stretch;
    padding-top: 16px;
    border-top: 1px solid var(--border);
    flex-shrink: 0;
}

.message-form > input[type="text"] {
    min-height: 58px;
}

.message-form .button {
    min-height: 58px;
    padding-inline: 20px;
}

.details-card {
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(18px);
}

.details-card summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 14px;
    cursor: pointer;
}

.details-card__content {
    display: grid;
    gap: 16px;
    padding: 0 14px 14px;
}

.table-wrap {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    padding: 14px 12px;
    border-bottom: 1px solid var(--border);
    text-align: left;
    vertical-align: top;
}

.data-table th {
    color: var(--muted);
    font-weight: 800;
    font-size: 0.88rem;
}

.flash {
    padding: 12px 14px;
}

.flash ul {
    margin: 0;
    padding-left: 16px;
}

.flash--error {
    border-color: rgba(255, 113, 113, 0.26);
    background: rgba(255, 139, 139, 0.12);
    color: #ffd0d0;
}

.flash--success {
    border-color: rgba(50, 213, 131, 0.26);
    background: rgba(68, 214, 158, 0.12);
    color: #dbffe9;
}

.nav-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 999px;
    background: linear-gradient(135deg, #ffffff, #ffe5ee);
    color: #07101b;
    font-size: 0.74rem;
    font-weight: 800;
}

.is-hidden {
    display: none !important;
}

.modal {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    z-index: 100;
}

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

.modal__dialog {
    width: min(720px, 100%);
    max-height: 88vh;
    overflow-y: auto;
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.035));
    backdrop-filter: blur(24px);
    box-shadow: var(--shadow);
}

.modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}

.modal__header h2 {
    margin: 0;
    font-size: 1.3rem;
}

.modal__header button {
    width: 36px;
    height: 36px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.03);
    color: var(--text);
}

.modal-search {
    display: block;
}

.modal-list {
    display: grid;
    gap: 14px;
    max-height: min(52vh, 560px);
    overflow-y: auto;
    padding-right: 4px;
}

html[data-theme="light"] body {
    background:
        radial-gradient(circle at 18% 18%, rgba(255, 112, 145, 0.16), transparent 20%),
        radial-gradient(circle at 82% 12%, rgba(255, 181, 199, 0.18), transparent 18%),
        radial-gradient(circle at 54% 72%, rgba(15, 23, 42, 0.04), transparent 24%),
        linear-gradient(180deg, #fff9fb 0%, #f5f7fb 54%, #eef2f8 100%);
}

html[data-theme="light"] body::before {
    background:
        radial-gradient(circle at 18% 30%, rgba(255, 111, 149, 0.2), transparent 18%),
        radial-gradient(circle at 76% 22%, rgba(255, 164, 188, 0.18), transparent 16%),
        radial-gradient(circle at 62% 72%, rgba(248, 113, 113, 0.1), transparent 20%),
        conic-gradient(from 210deg at 55% 50%, rgba(255, 111, 149, 0.12), rgba(255, 226, 235, 0.2), rgba(255, 255, 255, 0.15), rgba(255, 111, 149, 0.12));
    opacity: 0.5;
}

html[data-theme="light"] body::after {
    background:
        linear-gradient(130deg, rgba(255, 255, 255, 0.44), transparent 42%),
        repeating-linear-gradient(115deg, rgba(15, 23, 42, 0.02) 0 1px, transparent 1px 42px);
    mix-blend-mode: multiply;
    opacity: 0.1;
}

html[data-theme="light"] .app-main {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(255, 255, 255, 0.74));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.82);
}

html[data-theme="light"] .sidebar-profile,
html[data-theme="light"] .card,
html[data-theme="light"] .post-card,
html[data-theme="light"] .flash,
html[data-theme="light"] .metric-card,
html[data-theme="light"] .modal__dialog,
html[data-theme="light"] .file-picker,
html[data-theme="light"] .conversation-card,
html[data-theme="light"] .checkbox-card,
html[data-theme="light"] .comment-card,
html[data-theme="light"] .compact-post,
html[data-theme="light"] .empty-state,
html[data-theme="light"] .chat-empty,
html[data-theme="light"] .details-card,
html[data-theme="light"] .message-bubble__content {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(246, 248, 252, 0.88));
    box-shadow: var(--glass-shadow), inset 0 1px 0 rgba(255, 255, 255, 0.92);
}

html[data-theme="light"] input,
html[data-theme="light"] textarea,
html[data-theme="light"] select {
    background: rgba(255, 255, 255, 0.94);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.82);
}

html[data-theme="light"] input:focus,
html[data-theme="light"] textarea:focus,
html[data-theme="light"] select:focus {
    background: rgba(255, 255, 255, 1);
    box-shadow: 0 0 0 4px rgba(255, 63, 108, 0.12), 0 14px 34px rgba(255, 63, 108, 0.12);
}

html[data-theme="light"] .app-nav__item,
html[data-theme="light"] .brand--sidebar:hover,
html[data-theme="light"] .button--ghost,
html[data-theme="light"] .message-attachment--file {
    background: rgba(255, 255, 255, 0.72);
}

html[data-theme="light"] .app-nav__item.is-active,
html[data-theme="light"] .conversation-card.is-active,
html[data-theme="light"] .message-bubble--own .message-bubble__content {
    background: linear-gradient(135deg, rgba(255, 247, 250, 0.98), rgba(255, 226, 235, 0.98));
    color: #172033;
}

html[data-theme="light"] .mobile-nav {
    background: rgba(255, 255, 255, 0.86);
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.12);
}

html[data-theme="light"] .mobile-nav a.is-active {
    color: #172033;
}

html[data-theme="light"] .button {
    border-color: rgba(15, 23, 42, 0.12);
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.1);
}

html[data-theme="light"] .button--icon {
    background: rgba(255, 255, 255, 0.92);
}

html[data-theme="light"] .button--icon [data-like-count],
html[data-theme="light"] .button--icon [data-comment-count] {
    border: 1px solid rgba(15, 23, 42, 0.08);
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.14);
}

html[data-theme="light"] .button--secondary {
    color: #172033;
}

html[data-theme="light"] .button--danger {
    color: #8a1d34;
}

@keyframes ambientDrift {
    0% {
        transform: translate3d(-2%, 0, 0) scale(1);
    }

    50% {
        transform: translate3d(2%, -1%, 0) scale(1.04);
    }

    100% {
        transform: translate3d(0, 2%, 0) scale(0.98);
    }
}

@keyframes buttonGradient {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

@media (max-width: 1200px) {
    .app-shell {
        grid-template-columns: 224px minmax(0, 1fr);
    }

    .app-rail {
        display: none;
    }
}

@media (max-width: 980px) {
    .page-messages.layout-app {
        height: auto;
        padding-bottom: 32px;
        overflow: visible;
    }

    .page-messages .app-shell,
    .page-messages .app-main,
    .page-messages .content-column,
    .page-messages .content-stack--wide,
    .page-messages .messages-layout {
        height: auto;
        min-height: 0;
    }

    .page-messages .app-main,
    .page-messages .content-column {
        overflow: visible;
    }

    .messages-layout {
        grid-template-columns: 1fr;
    }

    .auth-shell {
        width: min(560px, 100%);
    }
}

@media (max-width: 860px) {
    .layout-app {
        padding-bottom: 84px;
    }

    .page-messages.layout-app {
        padding-bottom: 84px;
    }

    .app-shell {
        width: 100%;
        grid-template-columns: 1fr;
        gap: 0;
    }

    .app-sidebar {
        display: none;
    }

    .app-main {
        border-left: 0;
        border-right: 0;
    }

    .content-stack--wide,
    .content-stack--narrow {
        max-width: none;
        margin: 0;
        padding: 20px 0 24px;
    }

    .content-column > .flash {
        width: calc(100% - 24px);
    }

    .mobile-nav {
        position: fixed;
        left: 12px;
        right: 12px;
        bottom: 12px;
        z-index: 90;
        display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 8px;
        padding: 8px;
        border: 1px solid var(--border);
        border-radius: 20px;
        background: rgba(10, 16, 30, 0.72);
        backdrop-filter: blur(24px);
        box-shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
    }

    .mobile-nav a {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        padding: 12px 10px;
        border-radius: 14px;
        color: var(--muted);
        font-size: 0.88rem;
        font-weight: 700;
    }

    .mobile-nav a.is-active {
        background: var(--accent-soft);
        color: #ffffff;
    }

    .chat-panel__header,
    .section-heading,
    .comment-form,
    .message-form,
    .search-form,
    .result-card,
    .profile-banner__body,
    .profile-banner__header,
    .appearance-panel {
        grid-template-columns: 1fr;
        display: grid;
    }

    .chat-panel__header,
    .section-heading {
        align-items: start;
    }

    .profile-banner__actions {
        justify-content: flex-start;
    }

    .conversation-toolbar .button-group {
        grid-template-columns: 1fr;
    }

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

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

    .message-form {
        gap: 12px;
    }

    .message-bubble {
        max-width: 100%;
    }

    .button--small.button--icon,
    .file-picker--icon {
        width: 44px;
        min-width: 44px;
        height: 44px;
        min-height: 44px;
    }
}

@media (max-width: 640px) {
    .guest-shell {
        padding: 16px;
    }

    .card,
    .post-card,
    .sidebar-profile,
    .modal__dialog {
        padding: 14px;
        border-radius: 16px;
    }

    .auth-form {
        width: 100%;
        padding: 18px;
    }

    .post-card {
        padding: 18px;
    }

    .profile-banner {
        padding: 16px;
    }

    .profile-banner__avatar {
        width: 72px;
        height: 72px;
    }

    .profile-banner__info h1 {
        font-size: 1.6rem;
    }

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

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}
