
:root {
    color-scheme: dark;
    --bg: #0b0d12;
    --surface: #12151d;
    --surface-soft: #1a1e28;
    --text: #f5f7fb;
    --muted: #949aaa;
    --border: #282d39;
    --accent: #8067ff;
    --accent-dark: #6c4cff;
    --accent-soft: rgba(128, 103, 255, 0.16);
    --danger: #ff667d;
    --success: #48c88b;
    --shadow: 0 18px 55px rgba(0, 0, 0, 0.32);
    --radius: 22px;
    --icon-filter: invert(1) brightness(1.8);
}

html[data-theme="light"] {
    color-scheme: light;
    --bg: #f6f7fb;
    --surface: #ffffff;
    --surface-soft: #f0f2f7;
    --text: #15161a;
    --muted: #737783;
    --border: #e3e5ec;
    --accent: #6c4cff;
    --accent-dark: #5535ec;
    --accent-soft: #eeeaff;
    --danger: #dd3f56;
    --success: #17865b;
    --shadow: 0 18px 55px rgba(22, 24, 35, 0.08);
    --icon-filter: none;
}
* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 15px;
    line-height: 1.5;
}

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

button,
input,
textarea {
    font: inherit;
}

button,
a,
label[for] {
    -webkit-tap-highlight-color: transparent;
}

button {
    color: inherit;
}

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

.app-shell {
    min-height: 100vh;
}

.sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 50;
    display: flex;
    width: 252px;
    flex-direction: column;
    padding: 28px 18px 20px;
    background: rgba(255, 255, 255, 0.92);
    border-right: 1px solid var(--border);
    backdrop-filter: blur(20px);
}

.brand,
.auth-brand {
    display: inline-flex;
    align-items: center;
    gap: 11px;
    font-size: 25px;
    font-weight: 820;
    letter-spacing: -1.3px;
}

.brand {
    margin: 0 13px 34px;
}

.brand img,
.auth-brand img {
    width: 38px;
    height: 38px;
    object-fit: contain;
}

.main-nav {
    display: grid;
    gap: 7px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 13px 15px;
    border-radius: 14px;
    color: #343640;
    font-weight: 650;
    transition: background 160ms ease, transform 160ms ease;
}

.nav-item:hover {
    background: var(--surface-soft);
    transform: translateX(2px);
}

.nav-item img,
.mobile-nav img {
    width: 23px;
    height: 23px;
    object-fit: contain;
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: auto;
    padding: 13px;
    border: 1px solid var(--border);
    border-radius: 17px;
    background: var(--surface);
}

.sidebar-user-copy {
    display: grid;
    min-width: 0;
    flex: 1;
}

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

.sidebar-user-copy strong {
    font-size: 13px;
}

.sidebar-user-copy span {
    color: var(--muted);
    font-size: 12px;
}

.main-content {
    min-height: 100vh;
    margin-left: 252px;
    padding: 34px 38px 80px;
}

.guest-shell .main-content {
    margin-left: 0;
    padding: 0;
}

.page-grid {
    display: grid;
    grid-template-columns: minmax(0, 680px) minmax(250px, 340px);
    justify-content: center;
    gap: 34px;
    max-width: 1100px;
    margin: 0 auto;
}

.feed-column,
.narrow-page,
.settings-page {
    min-width: 0;
}

.narrow-page {
    width: min(720px, 100%);
    margin: 0 auto;
}

.settings-page {
    width: min(1020px, 100%);
    margin: 0 auto;
}

.page-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 27px;
}

.compact-heading {
    align-items: center;
}

.page-heading h1 {
    margin: 0;
    font-size: clamp(29px, 4vw, 42px);
    line-height: 1.08;
    letter-spacing: -1.8px;
}

.page-heading p:not(.eyebrow) {
    max-width: 610px;
    margin: 8px 0 0;
    color: var(--muted);
}

.eyebrow {
    margin: 0 0 5px;
    color: var(--accent);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 1.6px;
    text-transform: uppercase;
}

.primary-button,
.secondary-button {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    padding: 0 19px;
    border-radius: 13px;
    cursor: pointer;
    font-weight: 750;
    transition: transform 150ms ease, background 150ms ease, box-shadow 150ms ease;
}

.primary-button {
    border: 1px solid var(--accent);
    background: var(--accent);
    color: #fff;
    box-shadow: 0 10px 25px rgba(108, 76, 255, 0.2);
}

.primary-button:hover {
    background: var(--accent-dark);
    transform: translateY(-1px);
}

.secondary-button {
    border: 1px solid var(--border);
    background: var(--surface);
}

.secondary-button:hover {
    background: var(--surface-soft);
}

.full-button {
    width: 100%;
}

.post-list {
    display: grid;
    gap: 22px;
}

.post-card {
    overflow: hidden;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: 0 8px 35px rgba(28, 30, 39, 0.035);
}

.post-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 17px 18px 14px;
}

.user-line {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 11px;
}

.user-line > span {
    display: grid;
    min-width: 0;
}

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

.user-line strong {
    font-size: 14px;
}

.user-line small {
    color: var(--muted);
    font-size: 12px;
}

.avatar {
    width: 42px;
    height: 42px;
    flex: 0 0 auto;
    border: 1px solid var(--border);
    border-radius: 50%;
    background: var(--surface-soft);
    object-fit: cover;
}

.avatar-sm {
    width: 34px;
    height: 34px;
}

.avatar-lg {
    width: 50px;
    height: 50px;
}

.icon-button {
    display: inline-grid;
    width: 38px;
    height: 38px;
    flex: 0 0 auto;
    place-items: center;
    border: 0;
    border-radius: 11px;
    background: transparent;
    cursor: pointer;
}

.icon-button:hover {
    background: var(--surface-soft);
}

.icon-button img {
    width: 20px;
    height: 20px;
    object-fit: contain;
}

.post-body {
    padding: 0 18px 16px;
    overflow-wrap: anywhere;
}

.media-carousel {
    position: relative;
    overflow: hidden;
    background: #0f1013;
}

.media-track {
    display: flex;
    overflow-x: auto;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
}

.media-track::-webkit-scrollbar {
    display: none;
}

.media-slide {
    display: grid;
    min-width: 100%;
    aspect-ratio: 1 / 1;
    place-items: center;
    scroll-snap-align: start;
}

.media-slide img,
.media-slide video {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.carousel-button {
    position: absolute;
    top: 50%;
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.17);
    cursor: pointer;
    font-size: 28px;
    line-height: 1;
    transform: translateY(-50%);
}

.carousel-prev {
    left: 12px;
}

.carousel-next {
    right: 12px;
}

.carousel-dots {
    position: absolute;
    bottom: 12px;
    left: 50%;
    display: flex;
    gap: 6px;
    padding: 6px 9px;
    border-radius: 99px;
    background: rgba(0, 0, 0, 0.32);
    transform: translateX(-50%);
}

.carousel-dots span {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.45);
}

.carousel-dots span.active {
    background: #fff;
}

.post-actions {
    display: flex;
    gap: 8px;
    padding: 13px 15px 15px;
}

.action-button {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 10px;
    border: 0;
    border-radius: 11px;
    background: transparent;
    cursor: pointer;
    color: #4c4f59;
    font-weight: 700;
}

.action-button:hover {
    background: var(--surface-soft);
}

.action-button img {
    width: 23px;
    height: 23px;
    object-fit: contain;
}

.action-button.active {
    color: #e23d57;
}

.right-rail {
    position: sticky;
    top: 34px;
    align-self: start;
    display: grid;
    gap: 16px;
}

.rail-card {
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.72);
}

.current-user-card {
    display: flex;
    align-items: center;
    gap: 11px;
}

.current-user-card > div {
    display: grid;
    min-width: 0;
    flex: 1;
}

.current-user-card span,
.muted-copy,
.rail-footer {
    color: var(--muted);
}

.current-user-card > a,
.link-button {
    border: 0;
    background: transparent;
    color: var(--accent);
    cursor: pointer;
    font-size: 13px;
    font-weight: 800;
}

.rail-heading h2 {
    margin: 0 0 14px;
    font-size: 15px;
}

.suggestion-list {
    display: grid;
    gap: 13px;
}

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

.rail-footer {
    margin: 0 5px;
    font-size: 11px;
    line-height: 1.6;
}

.empty-state {
    display: grid;
    min-height: 360px;
    place-items: center;
    align-content: center;
    padding: 48px 30px;
    border: 1px dashed #ccd0da;
    border-radius: var(--radius);
    text-align: center;
}

.empty-state img {
    width: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-state h1,
.empty-state h2 {
    margin: 0;
}

.empty-state p {
    max-width: 450px;
    margin: 8px 0 20px;
    color: var(--muted);
}

.small-empty {
    min-height: 260px;
}

.search-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 25px;
    padding: 9px;
    border: 1px solid var(--border);
    border-radius: 17px;
    background: var(--surface);
    box-shadow: 0 10px 30px rgba(28, 30, 39, 0.04);
}

.search-bar > img {
    width: 23px;
    margin-left: 8px;
    opacity: 0.55;
}

.search-bar input {
    min-width: 0;
    flex: 1;
    border: 0;
    outline: 0;
    background: transparent;
}

.results-heading {
    margin: 0 0 15px 3px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.form-errors,
.flash {
    border-radius: 14px;
    font-weight: 650;
}

.form-errors {
    margin-bottom: 18px;
    padding: 12px 15px;
    border: 1px solid #f4c6cf;
    background: #fff0f3;
    color: #9d263a;
}

.form-errors p {
    margin: 3px 0;
}

.flash-stack {
    position: fixed;
    top: 18px;
    right: 20px;
    z-index: 100;
    display: grid;
    gap: 8px;
    width: min(390px, calc(100vw - 40px));
}

.flash {
    padding: 13px 16px;
    border: 1px solid var(--border);
    background: var(--surface);
    box-shadow: var(--shadow);
}

.flash-success {
    border-color: #bfe7d6;
    color: var(--success);
}

.flash-error {
    border-color: #f4c6cf;
    color: #9d263a;
}

.composer-card,
.settings-card,
.comments-card,
.profile-header-card {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: 0 10px 35px rgba(28, 30, 39, 0.04);
}

.composer-card {
    padding: 22px;
}

.composer-user {
    display: flex;
    align-items: center;
    gap: 11px;
    margin-bottom: 15px;
}

.composer-user > div {
    display: grid;
}

.composer-user span {
    color: var(--muted);
    font-size: 13px;
}

.composer-card > textarea {
    width: 100%;
    min-height: 140px;
    resize: vertical;
    border: 0;
    outline: 0;
    font-size: 18px;
    line-height: 1.55;
}

.upload-dropzone {
    position: relative;
    margin-top: 10px;
    border: 1px dashed #c8cad4;
    border-radius: 17px;
    background: var(--surface-soft);
    transition: border 150ms ease, background 150ms ease;
}

.upload-dropzone.dragging {
    border-color: var(--accent);
    background: var(--accent-soft);
}

.upload-dropzone label {
    display: grid;
    min-height: 170px;
    place-items: center;
    align-content: center;
    cursor: pointer;
    text-align: center;
}

.upload-dropzone img {
    width: 38px;
    margin-bottom: 9px;
    opacity: 0.65;
}

.upload-dropzone span {
    margin-top: 3px;
    color: var(--muted);
    font-size: 13px;
}

.upload-preview {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin-top: 12px;
}

.preview-item {
    position: relative;
    overflow: hidden;
    aspect-ratio: 1;
    border-radius: 13px;
    background: #101114;
}

.preview-item img,
.preview-item video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.preview-type {
    position: absolute;
    right: 7px;
    bottom: 7px;
    padding: 4px 7px;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.62);
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
}

.composer-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    margin-top: 18px;
}

.composer-footer > span {
    color: var(--muted);
    font-size: 12px;
}

.profile-header-card {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 28px;
    padding: 30px;
}

.profile-avatar {
    width: 128px;
    height: 128px;
    border: 5px solid #fff;
    border-radius: 50%;
    background: var(--surface-soft);
    box-shadow: 0 0 0 1px var(--border), 0 12px 30px rgba(22, 24, 35, 0.12);
    object-fit: cover;
}

.profile-title-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 15px;
}

.profile-title-row h1 {
    margin: 0;
    font-size: 30px;
    letter-spacing: -1px;
}

.profile-title-row p {
    margin: 2px 0 0;
    color: var(--muted);
}

.profile-bio {
    max-width: 560px;
    margin: 19px 0;
}

.profile-stats {
    display: flex;
    gap: 30px;
    margin-top: 20px;
}

.profile-stats > div {
    display: grid;
}

.profile-stats strong {
    font-size: 18px;
}

.profile-stats span,
.profile-joined {
    color: var(--muted);
    font-size: 12px;
}

.profile-joined {
    margin: 17px 0 0;
}

.following-button {
    border-color: var(--border);
    background: var(--surface-soft);
    box-shadow: none;
    color: var(--text);
}

.section-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 30px 0 17px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 1.4px;
    text-transform: uppercase;
}

.section-divider::before,
.section-divider::after {
    height: 1px;
    flex: 1;
    background: var(--border);
    content: "";
}

.back-row {
    margin-bottom: 14px;
    color: var(--muted);
    font-weight: 650;
}

.owner-actions {
    display: flex;
    justify-content: flex-end;
    margin: 9px 4px 18px;
}

.danger-link {
    border: 0;
    background: transparent;
    color: var(--danger);
    cursor: pointer;
    font-size: 13px;
    font-weight: 750;
}

.comments-card {
    margin-top: 22px;
    padding: 22px;
}

.comments-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
}

.comments-heading h2 {
    margin: 0;
    font-size: 20px;
}

.comments-heading span {
    color: var(--muted);
    font-size: 12px;
}

.comment-form {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
}

.comment-input-wrap {
    min-width: 0;
    flex: 1;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--surface-soft);
}

.comment-form textarea {
    width: 100%;
    min-height: 43px;
    max-height: 160px;
    padding: 11px 13px;
    resize: vertical;
    border: 0;
    outline: 0;
    background: transparent;
}

.replying-banner {
    padding: 8px 12px;
    border-bottom: 1px solid var(--border);
    color: var(--muted);
    font-size: 11px;
}

.replying-banner button {
    float: right;
    border: 0;
    background: transparent;
    color: var(--accent);
    cursor: pointer;
    font-weight: 750;
}

.comment-list {
    display: grid;
    gap: 18px;
    margin-top: 22px;
}

.comment {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.comment-content {
    min-width: 0;
    flex: 1;
}

.comment-bubble {
    padding: 11px 13px;
    border-radius: 14px;
    background: var(--surface-soft);
}

.comment-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 6px;
}

.comment-meta strong {
    font-size: 13px;
}

.comment-meta span {
    color: var(--muted);
    font-size: 11px;
}

.comment-bubble p {
    margin: 5px 0 0;
    overflow-wrap: anywhere;
}

.comment-actions {
    display: flex;
    gap: 12px;
    padding: 4px 8px 0;
}

.text-action {
    border: 0;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    font-size: 11px;
    font-weight: 750;
}

.text-action.active {
    color: #e23d57;
}

.comment-reply {
    margin-top: 14px;
    margin-left: 9px;
    padding-left: 12px;
    border-left: 2px solid var(--border);
}

.empty-comments {
    padding: 30px 10px;
    color: var(--muted);
    text-align: center;
}

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

.settings-card {
    padding: 22px;
}

.settings-card-heading {
    margin-bottom: 20px;
}

.settings-card-heading h2 {
    margin: 0;
    font-size: 19px;
}

.settings-card-heading p {
    margin: 5px 0 0;
    color: var(--muted);
    font-size: 13px;
}

.stack-form {
    display: grid;
    gap: 15px;
}

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

.stack-form label > span {
    color: #40424b;
    font-size: 12px;
    font-weight: 750;
}

.stack-form input,
.stack-form textarea,
.input-prefix {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #fafbfc;
    outline: none;
    transition: border 150ms ease, box-shadow 150ms ease;
}

.stack-form input {
    height: 46px;
    padding: 0 13px;
}

.stack-form textarea {
    padding: 11px 13px;
    resize: vertical;
}

.stack-form input:focus,
.stack-form textarea:focus,
.input-prefix:focus-within {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px var(--accent-soft);
}

.input-prefix {
    display: flex;
    align-items: center;
    overflow: hidden;
}

.input-prefix > span {
    padding-left: 13px;
    color: var(--muted);
}

.input-prefix input {
    border: 0;
    background: transparent;
    box-shadow: none !important;
}

.avatar-editor {
    display: flex;
    align-items: center;
    gap: 16px;
}

.small-profile-avatar {
    width: 78px;
    height: 78px;
    border-width: 3px;
}

.auth-page {
    position: relative;
    display: grid;
    min-height: 100vh;
    place-items: center;
    overflow: hidden;
    padding: 40px 18px;
    background:
        radial-gradient(circle at 16% 20%, rgba(108, 76, 255, 0.18), transparent 34%),
        radial-gradient(circle at 85% 75%, rgba(244, 87, 122, 0.13), transparent 32%),
        #f7f7fb;
}

.auth-page::before,
.auth-page::after {
    position: absolute;
    width: 240px;
    height: 240px;
    border: 1px solid rgba(108, 76, 255, 0.18);
    border-radius: 54px;
    content: "";
    transform: rotate(24deg);
}

.auth-page::before {
    top: -110px;
    right: -65px;
}

.auth-page::after {
    bottom: -120px;
    left: -75px;
}

.auth-card {
    position: relative;
    z-index: 1;
    width: min(455px, 100%);
    padding: 34px;
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.86);
    box-shadow: 0 30px 90px rgba(42, 37, 77, 0.13);
    backdrop-filter: blur(24px);
}

.auth-brand {
    margin-bottom: 30px;
}

.auth-heading {
    margin-bottom: 24px;
}

.auth-heading h1 {
    margin: 0;
    font-size: 31px;
    letter-spacing: -1.2px;
}

.auth-heading p {
    margin: 7px 0 0;
    color: var(--muted);
}

.auth-switch {
    margin: 22px 0 0;
    color: var(--muted);
    text-align: center;
}

.auth-switch a {
    color: var(--accent);
    font-weight: 800;
}

.step-badge {
    display: inline-block;
    margin-bottom: 8px;
    padding: 5px 9px;
    border-radius: 99px;
    background: var(--accent-soft);
    color: var(--accent);
    font-size: 10px;
    font-weight: 850;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.field-help {
    margin: -7px 0 0;
    color: var(--muted);
    font-size: 11px;
}

.mobile-nav {
    display: none;
}

@media (max-width: 1050px) {
    .sidebar {
        width: 88px;
        align-items: center;
        padding-inline: 12px;
    }

    .brand {
        margin-inline: 0;
    }

    .brand span,
    .nav-item span,
    .sidebar-user-copy {
        display: none;
    }

    .nav-item {
        justify-content: center;
        padding-inline: 13px;
    }

    .sidebar-user {
        flex-direction: column;
        padding: 10px;
    }

    .main-content {
        margin-left: 88px;
    }
}

@media (max-width: 900px) {
    .page-grid {
        grid-template-columns: minmax(0, 680px);
    }

    .right-rail {
        display: none;
    }

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

@media (max-width: 680px) {
    body {
        background: #fff;
    }

    .sidebar {
        display: none;
    }

    .main-content {
        margin-left: 0;
        padding: 22px 0 90px;
    }

    .guest-shell .main-content {
        padding: 0;
    }

    .page-heading,
    .search-bar,
    .results-heading,
    .back-row,
    .owner-actions {
        margin-right: 16px;
        margin-left: 16px;
    }

    .page-heading {
        align-items: flex-start;
    }

    .compact-heading .primary-button {
        display: none;
    }

    .post-list {
        gap: 8px;
    }

    .post-card,
    .comments-card,
    .profile-header-card,
    .composer-card,
    .settings-card {
        border-right: 0;
        border-left: 0;
        border-radius: 0;
        box-shadow: none;
    }

    .media-slide {
        max-height: 100vw;
    }

    .mobile-nav {
        position: fixed;
        right: 0;
        bottom: 0;
        left: 0;
        z-index: 60;
        display: flex;
        height: 66px;
        align-items: center;
        justify-content: space-around;
        border-top: 1px solid var(--border);
        background: rgba(255, 255, 255, 0.94);
        backdrop-filter: blur(18px);
    }

    .mobile-nav a {
        display: grid;
        width: 48px;
        height: 48px;
        place-items: center;
        border-radius: 14px;
    }

    .mobile-create {
        background: var(--accent-soft);
    }

    .profile-header-card {
        grid-template-columns: 1fr;
        justify-items: center;
        text-align: center;
    }

    .profile-title-row {
        align-items: center;
        flex-direction: column;
    }

    .profile-stats {
        justify-content: center;
    }

    .profile-bio {
        margin-inline: auto;
    }

    .settings-page .page-heading,
    .create-page .page-heading {
        padding-top: 5px;
    }

    .upload-preview {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .comment-form {
        align-items: stretch;
        flex-wrap: wrap;
    }

    .comment-form .comment-input-wrap {
        flex-basis: calc(100% - 45px);
    }

    .comment-form .primary-button {
        margin-left: 44px;
    }

    .comment-reply {
        margin-left: 2px;
        padding-left: 8px;
    }

    .auth-card {
        padding: 28px 22px;
    }
}

@media (max-width: 430px) {
    .page-heading h1 {
        font-size: 30px;
    }

    .page-heading {
        display: block;
    }

    .search-bar {
        flex-wrap: wrap;
    }

    .search-bar input {
        min-width: calc(100% - 45px);
    }

    .search-bar button {
        width: 100%;
    }

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

    .profile-stats {
        gap: 18px;
    }
}

.setup-list {
    display: grid;
    gap: 9px;
    margin-bottom: 20px;
}

.setup-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 12px 13px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #fafbfc;
}

.setup-row strong {
    max-width: 58%;
    text-align: right;
}

.check-pass {
    color: var(--success);
}

.check-fail {
    color: var(--danger);
}

.setup-note {
    margin: 0 0 18px;
}

/* Theme, verification, sharing, FAQ, and public-page additions */
html,
body,
.sidebar,
.mobile-nav,
.post-card,
.rail-card,
.settings-card,
.comments-card,
.profile-header-card,
.auth-card,
.comment-bubble,
.comment-input-wrap,
.search-bar,
.stack-form input,
.stack-form textarea,
.setup-row {
    transition: background-color 180ms ease, border-color 180ms ease, color 180ms ease;
}

.sidebar {
    background: rgba(18, 21, 29, 0.92);
}

.nav-item,
.action-button,
.stack-form label > span {
    color: var(--text);
}

.rail-card {
    background: rgba(18, 21, 29, 0.78);
}

.auth-page {
    background:
        radial-gradient(circle at 16% 20%, rgba(108, 76, 255, 0.23), transparent 34%),
        radial-gradient(circle at 85% 75%, rgba(244, 87, 122, 0.12), transparent 32%),
        var(--bg);
}

.auth-card {
    border-color: var(--border);
    background: rgba(18, 21, 29, 0.9);
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.35);
}

.stack-form input,
.stack-form textarea,
.input-prefix,
.setup-row {
    background: var(--surface-soft);
    color: var(--text);
}

.stack-form input::placeholder,
.stack-form textarea::placeholder,
.search-bar input::placeholder,
.comment-form textarea::placeholder,
.composer-card textarea::placeholder {
    color: var(--muted);
}

.form-errors {
    border-color: rgba(255, 102, 125, 0.35);
    background: rgba(255, 102, 125, 0.1);
    color: #ff9aaa;
}

.flash-success {
    border-color: rgba(72, 200, 139, 0.36);
}

.flash-error {
    border-color: rgba(255, 102, 125, 0.36);
    color: #ff9aaa;
}

.empty-state {
    border-color: var(--border);
}

.profile-avatar {
    border-color: var(--surface);
}

.mobile-nav {
    background: rgba(18, 21, 29, 0.95);
}

.sidebar .nav-item img,
.sidebar .icon-button img,
.mobile-nav img,
.post-header .icon-button img,
.action-button img:not([src*="heartfilledicon"]),
.search-bar > img,
.empty-state > img,
.upload-dropzone img {
    filter: var(--icon-filter);
}

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

html[data-theme="light"] .rail-card {
    background: rgba(255, 255, 255, 0.72);
}

html[data-theme="light"] .auth-card {
    border-color: rgba(255, 255, 255, 0.8);
    background: rgba(255, 255, 255, 0.88);
    box-shadow: 0 30px 90px rgba(42, 37, 77, 0.13);
}

html[data-theme="light"] .mobile-nav {
    background: rgba(255, 255, 255, 0.94);
}

html[data-theme="light"] .auth-page {
    background:
        radial-gradient(circle at 16% 20%, rgba(108, 76, 255, 0.18), transparent 34%),
        radial-gradient(circle at 85% 75%, rgba(244, 87, 122, 0.13), transparent 32%),
        #f7f7fb;
}

.theme-toggle {
    display: inline-flex;
    min-height: 42px;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border: 1px solid var(--border);
    border-radius: 13px;
    background: var(--surface);
    color: var(--text);
    cursor: pointer;
    font-weight: 750;
}

.theme-toggle:hover {
    background: var(--surface-soft);
}

.sidebar-theme-toggle {
    width: 100%;
    margin: auto 0 12px;
}

.sidebar-user + .sidebar-theme-toggle {
    margin-top: 0;
}

.compact-theme-toggle {
    width: 42px;
    padding: 0;
    font-size: 18px;
}

.appearance-button {
    width: 100%;
    gap: 10px;
}

.guest-topbar {
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    z-index: 80;
    display: flex;
    min-height: 70px;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 12px max(20px, calc((100vw - 1120px) / 2));
    border-bottom: 1px solid var(--border);
    background: rgba(11, 13, 18, 0.88);
    backdrop-filter: blur(20px);
}

html[data-theme="light"] .guest-topbar {
    background: rgba(255, 255, 255, 0.9);
}

.guest-brand {
    margin: 0;
}

.guest-topbar nav {
    display: flex;
    align-items: center;
    gap: 18px;
    font-weight: 700;
}

.guest-topbar nav > a:hover {
    color: var(--accent);
}

.guest-register {
    padding: 9px 14px;
    border-radius: 11px;
    background: var(--accent);
    color: #fff !important;
}

.guest-shell:not(.guest-full-bleed) .main-content {
    min-height: 100vh;
    margin-left: 0;
    padding: 106px 38px 80px;
}

.guest-full-bleed .main-content {
    margin-left: 0;
    padding: 0;
}

.name-with-badge {
    display: inline-flex !important;
    min-width: 0;
    align-items: center;
    gap: 5px;
}

.verification-badge {
    width: 17px;
    height: 17px;
    flex: 0 0 auto;
    object-fit: contain;
    filter: none !important;
}

.profile-name .verification-badge {
    width: 24px;
    height: 24px;
}

.passive-action {
    cursor: default;
    color: var(--muted);
}

.share-button.copied {
    color: var(--success);
}

.post-actions {
    flex-wrap: wrap;
}

.guest-interaction-callout {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    margin-bottom: 20px;
    padding: 14px 15px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--surface-soft);
}

.guest-interaction-callout p {
    margin: 0;
    color: var(--muted);
}

.verification-status {
    display: grid;
    gap: 9px;
}

.verification-state {
    display: flex;
    align-items: center;
    gap: 13px;
    margin-bottom: 8px;
    padding: 13px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--surface-soft);
}

.verification-state img,
.verification-placeholder {
    width: 42px;
    height: 42px;
    flex: 0 0 auto;
}

.verification-placeholder {
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--border);
    color: var(--muted);
    font-size: 21px;
    font-weight: 900;
}

.verification-state > div:last-child {
    display: grid;
}

.verification-state span {
    color: var(--muted);
    font-size: 12px;
}

.eligibility-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: var(--muted);
    font-size: 12px;
}

.eligibility-row strong {
    color: var(--text);
}

.eligibility-progress {
    height: 7px;
    overflow: hidden;
    border-radius: 99px;
    background: var(--surface-soft);
}

.eligibility-progress span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: var(--accent);
}

.verification-form {
    margin-top: 18px;
}

.primary-button:disabled {
    cursor: not-allowed;
    opacity: 0.55;
    transform: none;
}

.faq-list {
    display: grid;
    gap: 13px;
}

.faq-list details {
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 17px;
    background: var(--surface);
}

.faq-list summary {
    padding: 18px 20px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 800;
}

.faq-list details[open] summary {
    border-bottom: 1px solid var(--border);
}

.faq-list p {
    margin: 0;
    padding: 18px 20px 20px;
    color: var(--muted);
    line-height: 1.75;
}

@media (max-width: 1050px) {
    .sidebar-theme-toggle {
        width: 54px;
    }

    .theme-toggle-label {
        display: none;
    }
}

@media (max-width: 680px) {
    body {
        background: var(--bg);
    }

    .guest-shell:not(.guest-full-bleed) .main-content {
        padding: 92px 0 50px;
    }

    .guest-topbar {
        min-height: 64px;
        padding: 9px 14px;
    }

    .guest-topbar .brand span,
    .guest-topbar nav > a:first-child {
        display: none;
    }

    .guest-topbar nav {
        gap: 10px;
        font-size: 13px;
    }

    .faq-page .page-heading {
        margin-inline: 16px;
    }

    .faq-list details {
        border-right: 0;
        border-left: 0;
        border-radius: 0;
    }
}

.guest-full-bleed .guest-topbar {
    display: none;
}

input,
textarea,
.composer-card > textarea {
    color: var(--text);
}

.composer-card > textarea {
    background: transparent;
}
