/*
 * Wii Menu-inspired readability layer.
 * The palette uses pale striped panels, grey rails, and neutral grayscale accents.
 */
:root {
    color-scheme: light;
    --surface: #ffffff;
    --surface-soft: #f7f7f7;
    --surface-panel: rgb(255 255 255 / 0.96);
    --ink: #333333;
    --ink-muted: #777777;
    --line: #d8d8d8;
    --line-strong: #aaaaaa;
    --accent: #000000;
    --accent-strong: #000000;
    --accent-soft: #eeeeee;
    --shadow-soft: 0 12px 28px rgb(0 0 0 / 0.12);
    --shadow-control: 0 3px 8px rgb(0 0 0 / 0.14);
    --radius-panel: 1.55rem;
    --radius-control: 999px;
}

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

html {
    min-height: 100%;
    background: #f0f0f0;
    font-size: 15px;
    text-rendering: optimizeLegibility;
}

html[data-theme="mono"] {
    --page-bg: #f0f0f0;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--ink);
    font-family: "WiiSans", "Rodin", "Avenir Next", "Segoe UI", "Helvetica Neue", system-ui, sans-serif;
    font-weight: 500;
    letter-spacing: 0;
    overflow-y: auto;
}

a {
    color: var(--accent-strong);
    text-underline-offset: 0.18em;
}

.app-body {
    display: flex;
    justify-content: center;
    min-height: 100vh;
    color: var(--ink) !important;
    background:
        linear-gradient(to bottom, #f0f0f0 25%, transparent 25%, transparent 50%, #f0f0f0 50%, #f0f0f0 75%, transparent 75%, transparent),
        linear-gradient(180deg, #ffffff 0%, #eeeeee 54%, #dddddd 100%) !important;
    background-size: 12px 12px, auto !important;
    background-attachment: fixed;
    overflow-x: hidden;
}

.site-frame {
    position: relative;
    display: flex;
    min-height: 100vh;
    flex-direction: column;
    width: min(100%, 72rem);
    flex: 1 1 auto;
    padding-top: 0.1rem;
}

.site-main {
    display: flex;
    flex: 1 0 auto;
    justify-content: center;
    width: 100%;
    max-width: 99vw;
    min-height: calc(100vh - 11rem);
    align-items: flex-start;
    padding: 0.25rem 0.5rem 1.25rem;
    overflow: visible;
}

.site-nav {
    position: sticky;
    top: 0;
    z-index: 30;
    display: flex;
    justify-content: center;
    margin-bottom: 0.8rem;
    padding-block: 0.65rem 0.5rem;
    padding-top: 0;
    pointer-events: none;
}

.site-nav ul {
    display: flex;
    pointer-events: auto;
    align-items: center;
    margin: 0;
    gap: 0.5rem;
    list-style: none;
    border: 1px solid #d9d9d9 !important;
    border-bottom: 5px solid var(--accent) !important;
    border-radius: 0 0 2.25rem 2.25rem !important;
    background: linear-gradient(180deg, rgb(255 255 255 / 0.76) 0%, rgb(246 246 246 / 0.76) 70%, rgb(232 232 232 / 0.76) 100%) !important;
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-soft), inset 0 1px 0 #ffffff !important;
    padding: 0.35rem 0.55rem 0.45rem;
}

.onboarding-title {
    margin: 0;
    padding: 1.25rem;
    text-align: center;
    font-size: 1.25rem;
    font-weight: 700;
}

.nav-label-short {
    display: none;
}

.site-nav a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2rem;
    border: 1px solid transparent !important;
    border-radius: var(--radius-control) !important;
    background: transparent !important;
    color: var(--ink-muted) !important;
    font-size: 0.88rem;
    font-weight: 650;
    line-height: 1;
    padding-inline: 0.75rem;
    text-decoration: none;
    white-space: nowrap;
}

.site-nav a:hover {
    border-color: #d6d6d6 !important;
    background: #ffffff !important;
    color: var(--accent-strong) !important;
    box-shadow: inset 0 1px 0 #ffffff, 0 3px 8px rgb(0 0 0 / 0.1) !important;
}

.site-nav a[href$="/register/"],
.site-nav a[href*="/post"] {
    border-color: #000000 !important;
    background: linear-gradient(180deg, #ffffff 0%, #f1f1f1 52%, #d0d0d0 100%) !important;
    color: #333333 !important;
    box-shadow: var(--shadow-control), inset 0 1px 0 #ffffff !important;
}

.site-nav-brand {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
}

.site-nav-brand-link {
    width: 3.25rem;
    height: 3.25rem;
    min-height: 3.25rem !important;
    border-color: #dddddd !important;
    background: #f4f4f4 !important;
    box-shadow: 0 5px 14px rgb(0 0 0 / 0.12), inset 0 1px 0 #ffffff !important;
    padding: 0 !important;
}

.site-nav-brand-link:hover {
    border-color: #000000 !important;
    background: #ffffff !important;
}

.site-nav-logo {
    display: none;
    width: 2.45rem;
    height: 2.45rem;
    object-fit: contain;
}

.site-nav-logo-compact {
    display: block;
}

.site-nav-logo-full {
    display: none;
}

@media (min-width: 720px) {
    .site-nav-brand-link {
        width: 9.4rem;
        height: 3.75rem;
        min-height: 3.75rem !important;
        border-radius: 1.75rem !important;
    }

    .site-nav-logo-compact {
        display: none;
    }

    .site-nav-logo-full {
        display: block;
        width: 7.9rem;
        height: auto;
        max-height: 3.1rem;
    }
}

input[type="submit"],
button,
.comment-action,
.comments-panel a[href="#"] {
    min-height: 1.9rem;
    border: 1px solid #000000 !important;
    border-radius: var(--radius-control) !important;
    background: linear-gradient(180deg, #ffffff 0%, #f2f2f2 50%, #d7d7d7 100%) !important;
    color: #333333 !important;
    box-shadow: var(--shadow-control), inset 0 1px 0 #ffffff !important;
    cursor: pointer;
    font-size: 0.82rem !important;
    font-weight: 700 !important;
    line-height: 1;
    padding-inline: 0.75rem !important;
    text-decoration: none !important;
    text-transform: none;
}

.feed-grid,
.dashboard-grid {
    display: flex;
    flex-wrap: wrap;
    width: min(100%, 66rem);
    align-items: flex-start;
    justify-content: center;
    gap: 0.85rem;
}

.dashboard-grid {
    display: grid;
    width: min(100%, 90rem);
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
        "main"
        "left"
        "right";
    gap: 0.75rem;
}

.dashboard-post-columns {
    display: grid;
    min-width: 0;
    grid-area: main;
    gap: 0.75rem;
}

.dashboard-column {
    display: grid;
    min-width: 0;
    align-content: start;
    gap: 0.75rem;
}

.dashboard-column-left {
    grid-area: left;
}

.dashboard-column-main {
    grid-area: auto;
}

.dashboard-column-right {
    grid-area: auto;
}

.feed-panel,
.dashboard-module,
.window-shell,
.post-shell,
.comments-panel,
.profile-shell,
.news-shell,
.auth-shell,
.form-shell,
.message-shell,
.editor-shell {
    border: 1px solid var(--line) !important;
    border-bottom: 5px solid var(--accent) !important;
    border-radius: var(--radius-panel) !important;
    background: #f4f4f4 !important;
    box-shadow: var(--shadow-soft), inset 0 1px 0 #ffffff !important;
    color: var(--ink) !important;
    margin: auto;
    overflow: hidden;
}

.feed-panel {
    width: min(100%, 31rem);
    min-height: 11rem;
    margin: 0.85rem;
    background: #f4f4f4 !important;
    overflow: hidden;
}

.dashboard-module {
    width: 100%;
    min-width: 0;
    min-height: 0;
    margin: 0;
    overflow: hidden;
}

.dashboard-module.feed-panel {
    width: 100%;
    margin: 0;
}

.feed-panel-title,
.dashboard-module-title,
.window-shell-title,
.comments-title,
.profile-title,
.news-title,
.auth-title,
.form-title,
.message-title {
    border-bottom: 1px solid var(--line) !important;
    background: #eeeeee !important;
    color: var(--accent-strong) !important;
    font-size: 0.84rem;
    font-weight: 700;
    letter-spacing: 0;
    padding: 0.62rem 0.85rem;
    text-align: center;
    text-transform: none;
}

.window-shell-title,
.dashboard-module-title,
.feed-panel-title,
.comments-title,
.profile-title,
.news-title,
.auth-title,
.form-title,
.message-title {
    border-top-left-radius: inherit;
    border-top-right-radius: inherit;
}

.window-shell > summary.window-shell-title {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 2.45rem;
    cursor: pointer;
    list-style: none;
    user-select: none;
}

.window-shell > summary.window-shell-title::-webkit-details-marker {
    display: none;
}

.window-shell > summary.window-shell-title::after {
    position: absolute;
    right: 1rem;
    color: var(--accent-strong);
    content: "+";
    font-size: 1rem;
    font-weight: 800;
}

.window-shell[open] > summary.window-shell-title::after {
    content: "-";
}

.dashboard-module-title {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 2.45rem;
    cursor: pointer;
    list-style: none;
    user-select: none;
}

.dashboard-module-title::-webkit-details-marker {
    display: none;
}

.dashboard-module-title::after {
    position: absolute;
    right: 1rem;
    color: var(--accent-strong);
    content: "+";
    font-size: 1rem;
    font-weight: 800;
}

.dashboard-module[open] > .dashboard-module-title::after {
    content: "-";
}

.dashboard-profile {
    display: grid;
    gap: 0.65rem;
    justify-items: center;
    text-align: center;
}

.dashboard-profile-avatar {
    width: 6rem;
    height: 6rem;
    border: 2px solid #ffffff !important;
    border-radius: 1.2rem !important;
    background: var(--accent-soft) !important;
    box-shadow: 0 6px 16px rgb(0 0 0 / 0.16);
    object-fit: cover;
}

.dashboard-profile-copy {
    min-width: 0;
}

.dashboard-profile-copy h2 {
    display: -webkit-box;
    margin: 0;
    overflow: hidden;
    color: var(--accent-strong);
    font-size: 1rem;
    line-height: 1.25;
    overflow-wrap: anywhere;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
}

.dashboard-profile-copy p,
.dashboard-login p {
    display: -webkit-box;
    margin: 0.65rem 0 0;
    overflow: hidden;
    color: var(--ink-muted);
    font-size: 0.92rem;
    line-height: 1.45;
    overflow-wrap: anywhere;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 5;
    line-clamp: 5;
}

.dashboard-actions {
    display: grid;
    gap: 0.5rem;
    margin-top: 0.7rem;
}

.dashboard-actions .profile-action {
    width: 100%;
    padding-inline: 0.9rem;
}

.dashboard-post-editor {
    display: flex;
    flex-direction: column;
}

.dashboard-post-editor .panel-body {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.dashboard-post-editor .dashboard-post-form {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.dashboard-post-editor .dashboard-post-form .form-stack {
    flex: 1;
    grid-template-rows: 1fr;
}

.dashboard-post-editor .dashboard-post-form .markdownx {
    height: 100%;
}

.dashboard-post-editor .dashboard-post-form .markdownx-editor {
    min-height: 3rem;
}

.dashboard-actions-row {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 0.7rem;
}

.search-bar-center {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.search-bar-center .field-shell {
    width: auto;
    flex: 1 1 16rem;
    max-width: 24rem;
}

.search-bar-center input[type="submit"] {
    flex: 0 0 auto;
    min-width: 3.5rem;
}

.about-faq {
    padding: 0.7rem 0.85rem 0.85rem;
    color: var(--ink-muted);
    font-size: 0.88rem;
    line-height: 1.6;
}

.about-heading {
    margin: 0.9rem 0 0.35rem;
    color: var(--accent-strong);
    font-size: 0.9rem;
    font-weight: 700;
}

.about-heading:first-child {
    margin-top: 0;
}

.about-copy {
    margin: 0 0 0.45rem;
}

.about-faq-list {
    margin: 0;
}

.about-faq-item {
    border-bottom: 1px solid var(--line);
}

.about-faq-item:last-child {
    border-bottom: none;
}

.about-faq-item summary {
    cursor: pointer;
    padding: 0.5rem 0;
    color: var(--ink);
    font-weight: 650;
    user-select: none;
}

.about-faq-item summary::-webkit-details-marker {
    display: none;
}

.about-faq-item summary::marker {
    display: none;
    content: "";
}

.about-faq-item summary::before {
    content: "▶";
    display: inline-block;
    width: 1rem;
    margin-right: 0.35rem;
    font-size: 0.7rem;
    color: var(--ink-muted);
    transition: transform 0.15s;
}

.about-faq-item[open] summary::before {
    transform: rotate(90deg);
}

.about-faq-answer {
    padding: 0 0 0.5rem 1.35rem;
    color: var(--ink-muted);
    font-size: 0.88rem;
    line-height: 1.6;
}

.about-faq-list a {
    color: var(--accent-strong);
    font-weight: 650;
}

.about-faq-list code {
    font-size: 0.82rem;
}

.dashboard-post-form .form-stack {
    padding-top: 0.35rem;
}

.dashboard-post-form .field-shell {
    width: 100%;
}

.dashboard-post-form .markdownx {
    align-items: stretch;
}

.dashboard-post-form .markdownx-editor-pane,
.dashboard-post-form .markdownx-output {
    flex: 1 1 0;
    min-width: 0;
}

.dashboard-post-form .markdownx-editor {
    min-height: 12rem;
}

.dashboard-post-form .markdownx-preview {
    overflow: auto;
}

.post-stats-copy {
    margin: 0 0 0.55rem;
    color: var(--ink) !important;
    font-size: 0.82rem;
    font-weight: 650;
    line-height: 1.35;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.dashboard-profile-form .form-stack {
    gap: 0.55rem;
}

.dashboard-profile-form .field-shell {
    margin: 0;
}

.dashboard-profile-form .form-label {
    font-size: 0.78rem;
}

.dashboard-profile-form input:not([type="submit"]):not([type="hidden"]):not([type="checkbox"]),
.dashboard-profile-form textarea {
    width: 100%;
    min-width: 0;
}

.dashboard-profile-form textarea {
    min-height: 5.5rem;
    resize: vertical;
}

.dashboard-profile-form .profile-upload-preview {
    width: min(100%, 8rem);
}

@media (min-width: 48rem) {
    .site-frame {
        width: min(100%, 82rem);
    }

    .dashboard-grid {
        grid-template-columns: minmax(16rem, 0.82fr) minmax(0, 1.55fr);
        grid-template-areas: "left main";
    }
}

@media (min-width: 80rem) {
    .site-frame {
        width: min(100%, 96rem);
    }

    .dashboard-grid {
        grid-template-columns: minmax(18rem, 1fr) minmax(0, 2.25fr) minmax(18rem, 1fr);
        grid-template-areas: "left main right";
        gap: 0.85rem;
    }

    .dashboard-post-columns {
        display: contents;
    }

    .dashboard-column-main {
        grid-area: main;
    }

    .dashboard-column-right {
        grid-area: right;
    }

    .dashboard-column-left {
        grid-area: left;
    }
}

.news-page {
    width: min(100%, 24rem);
}

.news-shell {
    width: min(100%, 34rem);
    margin: 0.85rem;
    overflow: hidden;
}

.news-item {
    border-bottom: 1px solid var(--line) !important;
    color: var(--ink) !important;
    margin: 0.35rem;
    padding: 0.7rem;
}

.news-item:hover {
    background: #ffffff !important;
}

.news-item a {
    color: var(--accent-strong) !important;
}

.news-item td {
    color: var(--ink) !important;
}

.auth-shell {
    width: min(calc(100% - 2rem), 50rem);
    margin: 0.85rem auto;
    max-width: 50rem !important;
    padding-bottom: 0.85rem;
}

.form-shell {
    width: min(calc(100% - 2rem), 50rem);
    margin: 0.85rem auto;
    max-width: 50rem !important;
    padding-bottom: 0.85rem;
}

.form-shell form,
.auth-shell form {
    width: 100%;
}

.form-stack {
    display: grid;
    gap: 0.7rem;
    justify-items: center;
    width: 100%;
    padding: 1rem clamp(0.75rem, 3vw, 1rem) 0;
}

.field-shell {
    width: min(100%, 38rem);
    max-width: 100%;
}

.auth-shell form,
.auth-shell p,
.auth-shell a,
.auth-shell table,
.form-shell form,
.form-shell p,
.form-shell a,
.form-shell table,
.form-shell label,
.editor-shell form,
.editor-shell p,
.editor-shell a {
    color: var(--ink) !important;
}

.field-shell > input:not([type="submit"]):not([type="hidden"]):not([type="checkbox"]),
.field-shell > textarea,
.form-shell input:not([type="submit"]):not([type="hidden"]):not([type="checkbox"]),
.form-shell textarea,
.auth-shell input:not([type="submit"]):not([type="hidden"]):not([type="checkbox"]),
.auth-shell textarea,
.editor-shell input:not([type="submit"]):not([type="hidden"]):not([type="checkbox"]),
.editor-shell textarea,
.comments-panel input:not([type="submit"]):not([type="hidden"]):not([type="checkbox"]),
.comments-panel textarea {
    width: 100%;
    max-width: 100%;
    border: 1px solid var(--line-strong) !important;
    border-radius: 1rem !important;
    background: #ffffff !important;
    color: var(--ink) !important;
    box-shadow: inset 0 1px 3px rgb(0 0 0 / 0.1);
}

.field-shell > input:not([type="submit"]):not([type="hidden"]):not([type="checkbox"]),
.form-shell input:not([type="submit"]):not([type="hidden"]):not([type="checkbox"]),
.auth-shell input:not([type="submit"]):not([type="hidden"]):not([type="checkbox"]),
.editor-shell input:not([type="submit"]):not([type="hidden"]):not([type="checkbox"]),
.comments-panel input:not([type="submit"]):not([type="hidden"]):not([type="checkbox"]) {
    min-height: 2.4rem;
    padding-inline: 0.7rem;
}

.field-shell > textarea,
.form-shell textarea,
.auth-shell textarea,
.editor-shell textarea,
.comments-panel textarea {
    min-height: 5rem;
    padding: 0.7rem;
    line-height: 1.5;
    resize: vertical;
}

.comments-panel textarea {
    min-height: 5rem;
}

.form-table {
    width: min(100%, 38rem);
}

.auth-label,
.form-label {
    display: block;
    margin: 0 0 0.25rem;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    color: var(--ink) !important;
    font-size: 0.78rem;
    font-weight: 700;
    line-height: 1.25;
    padding: 0;
    text-align: left;
}

.field-errors,
.form-errors {
    color: #555555 !important;
    font-size: 0.85rem;
    line-height: 1.45;
}

.field-errors {
    display: block;
    margin-top: 0.45rem;
    text-align: center;
}

.field-hint {
    display: block;
    margin-top: 0.35rem;
    font-size: 0.8rem;
    color: #777;
    text-align: center;
}

.form-errors {
    display: grid;
    gap: 0.35rem;
    margin: 0.25rem auto 0;
    width: min(100%, 38rem);
    text-align: center;
}

.auth-action,
.form-action,
.danger-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.35rem !important;
    margin-top: 1rem;
    border: 1px solid #000000 !important;
    border-radius: var(--radius-control) !important;
    background: linear-gradient(180deg, #ffffff 0%, #f2f2f2 50%, #d7d7d7 100%) !important;
    color: #333333 !important;
    box-shadow: var(--shadow-control), inset 0 1px 0 #ffffff !important;
    font-size: 0.95rem !important;
    font-weight: 700 !important;
    line-height: 1 !important;
    padding: 0.6rem 1.25rem !important;
    text-decoration: none !important;
}

.form-link {
    color: var(--accent-strong) !important;
    font-weight: 650;
    text-decoration: none;
}

.form-link:hover {
    color: var(--accent) !important;
    text-decoration: underline;
}

.form-note,
.message-copy {
    color: var(--ink-muted) !important;
    font-size: 0.96rem;
    line-height: 1.65;
}

.form-note {
    margin-inline: auto;
    max-width: 38rem;
    text-align: center;
}

.form-body {
    padding: 0.5rem;
}

.form-copy {
    margin: 0;
    text-align: center;
}

.form-actions {
    display: grid;
    gap: 0.75rem;
    justify-items: center;
    padding: 0.75rem 1.5rem 0;
}

.form-actions > * {
    width: min(100%, 18rem);
}

.danger-action {
    border-color: var(--line-strong) !important;
}

.message-shell {
    width: min(100%, 42rem);
    padding: 1.5rem 1.5rem 1.75rem;
    text-align: center;
}

.message-shell p,
.message-shell a {
    color: var(--ink) !important;
}

.message-title {
    margin: 0;
    line-height: 1.25;
    font-size: clamp(1.2rem, 2.5vw, 1.9rem);
}

.editor-shell {
    width: min(100%, 68rem);
    min-height: calc(100vh - 9rem);
    padding: 1rem;
}

.editor-shell form {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    width: 100%;
}

.editor-shell .form-stack,
.editor-shell .field-shell,
.editor-shell .markdownx {
    flex: 1 1 auto;
}

.editor-shell .field-shell {
    width: 100%;
}

.editor-shell .markdownx {
    align-items: stretch;
    min-height: calc(100vh - 15rem);
}

.editor-shell .markdownx-editor-pane,
.editor-shell .markdownx-output {
    flex: 1 1 0;
    min-width: 0;
}

.editor-shell .markdownx-editor {
    min-height: calc(100vh - 16rem);
    resize: vertical;
}

.editor-shell .markdownx-preview {
    max-height: calc(100vh - 16rem);
    overflow: auto;
}

.post-editor-body {
    display: flex;
    flex-direction: column;
}

.post-editor-body form {
    display: flex !important;
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
    width: 100%;
}

.post-editor-body .form-stack,
.post-editor-body .field-shell,
.post-editor-body .markdownx {
    flex: 1 1 auto;
}

.post-editor-body .field-shell {
    width: 100%;
}

.post-editor-body .markdownx {
    align-items: stretch;
    min-height: calc(100vh - 20rem);
}

.post-editor-body .markdownx-editor {
    min-height: calc(100vh - 22rem);
    resize: vertical;
}

.post-editor-body .markdownx-preview {
    max-height: calc(100vh - 22rem);
    overflow: auto;
}

.editor-actions {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    margin-bottom: 0.75rem;
}

.editor-label {
    display: inline-flex;
    margin-left: 1rem;
    transform: translateY(0.45rem);
}

.profile-shell {
    width: min(100%, 32rem);
    margin: 0.85rem;
    max-width: 50rem !important;
    padding-bottom: 0.85rem;
}

.profile-shell table,
.profile-shell p,
.profile-shell a {
    color: var(--ink) !important;
}

.profile-shell img {
    border: 2px solid #ffffff !important;
    border-radius: 1rem !important;
    background: var(--accent-soft) !important;
    box-shadow: 0 6px 16px rgb(0 0 0 / 0.16);
}

.profile-picture-wrap {
    display: flex;
    justify-content: center;
    padding-bottom: 0.85rem;
}

.profile-picture {
    width: min(80%, 18rem);
    height: auto;
    aspect-ratio: 1 / 1;
    object-fit: cover;
}

.profile-stats {
    display: flex;
    justify-content: space-between;
    gap: 0.7rem;
    padding: 0 0.75rem 0.75rem;
}

.profile-description-wrap {
    padding: 0 0.75rem 0.85rem;
}

.profile-description {
    display: flex;
    justify-content: center;
    width: 100%;
    border: 1px solid var(--line) !important;
    border-radius: 1rem !important;
    background: #ffffff !important;
    color: var(--ink) !important;
    padding: 0.75rem;
    box-shadow: inset 0 1px 0 #ffffff;
}

.profile-title,
.profile-description p,
.post-author span,
.news-item .item-copy {
    overflow-wrap: anywhere;
    word-break: break-word;
}

.profile-title,
.profile-description p {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
}

.profile-title {
    -webkit-line-clamp: 2;
    line-clamp: 2;
}

.profile-description p {
    -webkit-line-clamp: 5;
    line-clamp: 5;
}

.profile-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 4.75rem;
    min-height: 2.05rem !important;
    border: 1px solid #000000 !important;
    border-radius: var(--radius-control) !important;
    background: linear-gradient(180deg, #ffffff 0%, #f2f2f2 50%, #d7d7d7 100%) !important;
    color: #333333 !important;
    box-shadow: var(--shadow-control), inset 0 1px 0 #ffffff !important;
    font-size: 0.82rem !important;
    font-weight: 700 !important;
    line-height: 1;
    padding: 0.42rem 0.8rem !important;
    text-decoration: none !important;
    white-space: nowrap;
}

.profile-action-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 4.75rem;
    min-height: 2.05rem !important;
    border: 1px solid transparent !important;
    border-radius: var(--radius-control) !important;
    background: transparent !important;
    color: var(--ink-muted) !important;
    box-shadow: none !important;
    font-size: 0.82rem !important;
    font-weight: 700 !important;
    line-height: 1;
    padding: 0.42rem 0.8rem !important;
    text-decoration: none !important;
    white-space: nowrap;
}

.profile-action-secondary:hover {
    border-color: var(--line) !important;
    background: var(--surface-panel) !important;
    color: var(--accent-strong) !important;
    box-shadow: none !important;
}

.profile-actions {
    display: grid;
    gap: 0.6rem;
    justify-items: center;
    padding-inline: 0.75rem;
}

.profile-actions > * {
    width: min(100%, 38rem);
}

.profile-actions form {
    display: block;
}

.profile-actions input[type="submit"] {
    width: 100%;
}

.profile-actions > .profile-action {
    width: min(100%, 38rem);
}

.profile-upload-preview {
    display: block;
    width: min(100%, 18rem);
    height: auto;
    aspect-ratio: 1 / 1;
    margin-inline: auto;
    border: 2px solid #ffffff !important;
    border-radius: 1rem !important;
    background: var(--accent-soft) !important;
    box-shadow: 0 6px 16px rgb(0 0 0 / 0.16);
    object-fit: cover;
}

.profile-upload-input {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
}

.profile-upload-control {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    width: 100%;
    margin-top: 0.7rem;
}

.profile-upload-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.35rem;
    border: 1px solid #000000 !important;
    border-radius: var(--radius-control) !important;
    background: linear-gradient(180deg, #ffffff 0%, #f2f2f2 50%, #d7d7d7 100%) !important;
    color: #333333 !important;
    box-shadow: var(--shadow-control), inset 0 1px 0 #ffffff !important;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 700;
    line-height: 1;
    padding: 0.6rem 1.1rem;
    text-decoration: none;
}

.profile-upload-input:focus-visible + .profile-upload-button,
.profile-upload-button:hover {
    border-color: var(--accent-strong) !important;
    background: #ffffff !important;
}

.profile-upload-filename {
    max-width: min(100%, 18rem);
    color: var(--ink-muted);
    font-size: 0.88rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.post-card {
    border: 1px solid transparent !important;
    border-radius: 1rem !important;
    cursor: pointer;
    margin: 0.35rem;
    padding: 0.7rem;
}

.post-card:hover {
    border-color: #d8d8d8 !important;
    background: #ffffff !important;
    box-shadow: 0 7px 16px rgb(0 0 0 / 0.1);
    transform: translateY(-1px);
}

.site-footer {
    flex: 0 0 auto;
    margin-top: auto;
    border-top: 1px solid #d9d9d9 !important;
    background: linear-gradient(180deg, #ffffff 0%, #eeeeee 100%) !important;
    color: var(--ink-muted) !important;
    font-size: 0.8rem;
    padding: 0.45rem 0.75rem;
}

.site-footer-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.55rem 0.75rem;
    margin-inline: auto;
    width: min(100%, 72rem);
}

.site-footer p {
    margin: 0;
}

.site-footer a,
a.mention,
.markdownx-preview a.mention {
    color: var(--accent-strong) !important;
    font-weight: 700;
}

.theme-switcher {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    align-items: center;
}

.theme-switcher-button {
    min-height: 1.7rem;
    border: 1px solid #000000 !important;
    border-radius: var(--radius-control) !important;
    background: #ffffff !important;
    color: #000000 !important;
    box-shadow: none !important;
    cursor: pointer;
    font-size: 0.72rem !important;
    font-weight: 700 !important;
    line-height: 1;
    padding: 0.2rem 0.55rem !important;
    text-decoration: none !important;
    text-transform: none;
}

.theme-switcher-button[aria-pressed="true"] {
    background: #000000 !important;
    color: #ffffff !important;
}

.theme-switcher-button.theme-mode-button {
    min-width: 1.9rem;
    padding-inline: 0.35rem !important;
}

.theme-mode-icon {
    display: inline-block;
    font-size: 0.86rem;
    line-height: 1;
}

.theme-mode-icon-dark {
    display: none;
}

html[data-appearance="dark"] .theme-mode-icon-light {
    display: none;
}

html[data-appearance="dark"] .theme-mode-icon-dark {
    display: inline-block;
}

.theme-switcher-button.theme-mode-button[aria-pressed="true"] {
    background: #ffffff !important;
    color: #000000 !important;
}

html[data-theme="blue"] {
    color-scheme: light;
    background-color: #f0f8fb;
    --page-bg: #edf8fb;
    --surface-soft: #f7fbfd;
    --surface-panel: rgb(255 255 255 / 0.96);
    --ink: #2d3d45;
    --ink-muted: #6b7f88;
    --line: #d2dade;
    --line-strong: #aab8bf;
    --accent: #00c4ff;
    --accent-strong: #008fc5;
    --accent-soft: #d8f7ff;
    --shadow-soft: 0 12px 28px rgb(63 92 105 / 0.12);
    --shadow-control: 0 3px 8px rgb(0 145 200 / 0.14);
}

html[data-theme="blue"] .app-body {
    background: linear-gradient(180deg, #ffffff 0%, #eff9fc 54%, #d9eef5 100%) !important;
    background-attachment: fixed;
}

html[data-theme="blue"] .site-nav ul {
    border: 1px solid #d8eef5 !important;
    border-bottom: 5px solid var(--accent) !important;
    background: linear-gradient(180deg, rgb(255 255 255 / 0.74) 0%, rgb(245 253 255 / 0.74) 70%, rgb(234 250 255 / 0.74) 100%) !important;
    backdrop-filter: blur(10px);
}

html[data-theme="blue"] .site-nav a[href$="/register/"],
html[data-theme="blue"] .site-nav a[href*="/post"],
html[data-theme="blue"] input[type="submit"],
html[data-theme="blue"] button,
html[data-theme="blue"] .comment-action,
html[data-theme="blue"] .comments-panel a[href="#"],
html[data-theme="blue"] .form-action,
html[data-theme="blue"] .danger-action,
html[data-theme="blue"] .profile-action,
html[data-theme="blue"] .news-badge,
html[data-theme="blue"] .site-nav-brand-link {
    border-color: #9fdff2 !important;
}

html[data-theme="blue"] .site-nav a[href$="/register/"],
html[data-theme="blue"] .site-nav a[href*="/post"],
html[data-theme="blue"] input[type="submit"],
html[data-theme="blue"] button,
html[data-theme="blue"] .comment-action,
html[data-theme="blue"] .comments-panel a[href="#"],
html[data-theme="blue"] .form-action,
html[data-theme="blue"] .danger-action,
html[data-theme="blue"] .profile-action {
    background: linear-gradient(180deg, #ffffff 0%, #effdff 50%, #b8efff 100%) !important;
    color: #24505f !important;
    box-shadow: var(--shadow-control), inset 0 1px 0 #ffffff !important;
}

html[data-theme="blue"] .site-nav a:hover,
html[data-theme="blue"] .site-nav-brand-link:hover,
html[data-theme="blue"] .post-card:hover {
    border-color: #d8eef5 !important;
    background: #ffffff !important;
    box-shadow: 0 7px 16px rgb(63 92 105 / 0.1);
}

html[data-theme="blue"] .feed-panel-title,
html[data-theme="blue"] .dashboard-module-title,
html[data-theme="blue"] .post-title,
html[data-theme="blue"] .comments-title,
html[data-theme="blue"] .profile-title,
html[data-theme="blue"] .news-title,
html[data-theme="blue"] .auth-title,
html[data-theme="blue"] .form-title,
html[data-theme="blue"] .message-title {
    background: #eef8fb !important;
    color: var(--accent-strong) !important;
}

html[data-theme="blue"] .site-footer {
    border-top: 1px solid #d8dee1 !important;
    background: linear-gradient(180deg, #ffffff 0%, #eef3f5 100%) !important;
}

html[data-theme="blue"] .site-footer a,
html[data-theme="blue"] .theme-switcher-button {
    color: var(--accent-strong) !important;
}

html[data-theme="blue"] .theme-switcher-button {
    border-color: #9fdff2 !important;
}

html[data-theme="blue"] .theme-switcher-button[aria-pressed="true"] {
    background: linear-gradient(180deg, #ffffff 0%, #effdff 50%, #b8efff 100%) !important;
    color: #24505f !important;
}

html[data-theme="mint"] {
    color-scheme: light;
    background-color: #effbf7;
    --page-bg: #f3fcf8;
    --surface-soft: #f4fbf8;
    --surface-panel: rgb(255 255 255 / 0.98);
    --ink: #1f3d36;
    --ink-muted: #5b746c;
    --line: #c9e3d8;
    --line-strong: #94bbae;
    --accent: #159a74;
    --accent-strong: #0b6f51;
    --accent-soft: #e4f8f1;
    --shadow-soft: 0 12px 28px rgb(20 68 53 / 0.12);
    --shadow-control: 0 3px 8px rgb(21 154 116 / 0.14);
}

html[data-theme="mint"] .app-body {
    background: linear-gradient(180deg, #ffffff 0%, #f4fcf8 54%, #dcf3e8 100%) !important;
    background-attachment: fixed;
}

html[data-theme="mint"] .site-nav ul {
    border: 1px solid #c9e3d8 !important;
    border-bottom: 5px solid var(--accent) !important;
    background: linear-gradient(180deg, rgb(255 255 255 / 0.74) 0%, rgb(246 253 249 / 0.74) 70%, rgb(230 247 239 / 0.74) 100%) !important;
    backdrop-filter: blur(10px);
}

html[data-theme="mint"] .site-nav a[href$="/register/"],
html[data-theme="mint"] .site-nav a[href*="/post"],
html[data-theme="mint"] input[type="submit"],
html[data-theme="mint"] button,
html[data-theme="mint"] .comment-action,
html[data-theme="mint"] .comments-panel a[href="#"],
html[data-theme="mint"] .form-action,
html[data-theme="mint"] .danger-action,
html[data-theme="mint"] .profile-action,
html[data-theme="mint"] .news-badge,
html[data-theme="mint"] .site-nav-brand-link {
    border-color: #9fd8c4 !important;
}

html[data-theme="mint"] .site-nav a[href$="/register/"],
html[data-theme="mint"] .site-nav a[href*="/post"],
html[data-theme="mint"] input[type="submit"],
html[data-theme="mint"] button,
html[data-theme="mint"] .comment-action,
html[data-theme="mint"] .comments-panel a[href="#"],
html[data-theme="mint"] .form-action,
html[data-theme="mint"] .danger-action,
html[data-theme="mint"] .profile-action {
    background: linear-gradient(180deg, #ffffff 0%, #effcf6 50%, #d4f1e7 100%) !important;
    color: #0b6f51 !important;
    box-shadow: var(--shadow-control), inset 0 1px 0 #ffffff !important;
}

html[data-theme="mint"] .site-nav a:hover,
html[data-theme="mint"] .site-nav-brand-link:hover,
html[data-theme="mint"] .post-card:hover {
    border-color: #bfe7d9 !important;
    background: #ffffff !important;
    box-shadow: 0 7px 16px rgb(20 68 53 / 0.1);
}

html[data-theme="mint"] .feed-panel-title,
html[data-theme="mint"] .dashboard-module-title,
html[data-theme="mint"] .post-title,
html[data-theme="mint"] .comments-title,
html[data-theme="mint"] .profile-title,
html[data-theme="mint"] .news-title,
html[data-theme="mint"] .auth-title,
html[data-theme="mint"] .form-title,
html[data-theme="mint"] .message-title {
    background: #eaf7f0 !important;
    color: var(--accent-strong) !important;
}

html[data-theme="mint"] .site-footer {
    border-top: 1px solid #c9e3d8 !important;
    background: linear-gradient(180deg, #ffffff 0%, #eef8f3 100%) !important;
}

html[data-theme="mint"] .site-footer a,
html[data-theme="mint"] .theme-switcher-button {
    color: var(--accent-strong) !important;
}

html[data-theme="mint"] .theme-switcher-button {
    border-color: #9fd8c4 !important;
}

html[data-theme="mint"] .theme-switcher-button[aria-pressed="true"] {
    background: linear-gradient(180deg, #ffffff 0%, #effcf6 50%, #d4f1e7 100%) !important;
    color: #0b6f51 !important;
}

html[data-theme="contrast"] {
    color-scheme: light;
    background: #ffffff;
    background-color: #ffffff;
    --page-bg: #ffffff;
    --surface-soft: #ffffff;
    --surface-panel: rgb(255 255 255 / 0.99);
    --ink: #000000;
    --ink-muted: #111111;
    --line: #000000;
    --line-strong: #000000;
    --accent: #000000;
    --accent-strong: #000000;
    --accent-soft: #ffffff;
    --shadow-soft: 0 0 0 rgb(0 0 0 / 0);
    --shadow-control: 0 0 0 rgb(0 0 0 / 0);
}

html[data-theme="contrast"] .app-body {
    background:
        linear-gradient(to bottom, #ffffff 25%, transparent 25%, transparent 50%, #ffffff 50%, #ffffff 75%, transparent 75%, transparent),
        linear-gradient(180deg, #ffffff 0%, #ffffff 54%, #ffffff 100%) !important;
    background-attachment: fixed;
}

html[data-theme="contrast"] .site-nav ul,
html[data-theme="contrast"] .site-footer {
    border-color: #000000 !important;
    background: rgb(255 255 255 / 0.92) !important;
    backdrop-filter: blur(10px);
}

html[data-theme="contrast"] .site-nav a,
html[data-theme="contrast"] .site-footer,
html[data-theme="contrast"] .site-footer a {
    color: #000000 !important;
}

html[data-theme="contrast"] .feed-panel,
html[data-theme="contrast"] .dashboard-module,
html[data-theme="contrast"] .post-shell,
html[data-theme="contrast"] .comments-panel,
html[data-theme="contrast"] .profile-shell,
html[data-theme="contrast"] .news-shell,
html[data-theme="contrast"] .auth-shell,
html[data-theme="contrast"] .form-shell,
html[data-theme="contrast"] .message-shell,
html[data-theme="contrast"] .editor-shell {
    border-color: #000000 !important;
    background: #ffffff !important;
    box-shadow: none !important;
    color: #000000 !important;
}

html[data-theme="contrast"] .feed-panel-title,
html[data-theme="contrast"] .dashboard-module-title,
html[data-theme="contrast"] .post-title,
html[data-theme="contrast"] .comments-title,
html[data-theme="contrast"] .profile-title,
html[data-theme="contrast"] .news-title,
html[data-theme="contrast"] .auth-title,
html[data-theme="contrast"] .form-title,
html[data-theme="contrast"] .message-title {
    background: #000000 !important;
    color: #ffffff !important;
}

html[data-theme="contrast"] .site-nav a[href$="/register/"],
html[data-theme="contrast"] .site-nav a[href*="/post"],
html[data-theme="contrast"] input[type="submit"],
html[data-theme="contrast"] button,
html[data-theme="contrast"] .comment-action,
html[data-theme="contrast"] .comments-panel a[href="#"],
html[data-theme="contrast"] .form-action,
html[data-theme="contrast"] .danger-action,
html[data-theme="contrast"] .profile-action,
html[data-theme="contrast"] .news-badge,
html[data-theme="contrast"] .site-nav-brand-link {
    border-color: #000000 !important;
    background: #ffffff !important;
    color: #000000 !important;
    box-shadow: none !important;
}

html[data-theme="contrast"] .site-nav a[href$="/register/"],
html[data-theme="contrast"] .site-nav a[href*="/post"],
html[data-theme="contrast"] input[type="submit"],
html[data-theme="contrast"] button,
html[data-theme="contrast"] .comment-action,
html[data-theme="contrast"] .comments-panel a[href="#"],
html[data-theme="contrast"] .form-action,
html[data-theme="contrast"] .danger-action,
html[data-theme="contrast"] .profile-action {
    background: #ffffff !important;
}

html[data-theme="contrast"] .theme-switcher-button {
    border-color: #000000 !important;
    background: #ffffff !important;
    color: #000000 !important;
}

html[data-theme="contrast"] .theme-switcher-button[aria-pressed="true"] {
    background: #000000 !important;
    color: #ffffff !important;
}

html[data-theme="contrast"] .window-shell > summary.window-shell-title,
html[data-theme="contrast"] .feed-panel-title,
html[data-theme="contrast"] .dashboard-module-title,
html[data-theme="contrast"] .post-title,
html[data-theme="contrast"] .comments-title,
html[data-theme="contrast"] .profile-title,
html[data-theme="contrast"] .news-title,
html[data-theme="contrast"] .auth-title,
html[data-theme="contrast"] .form-title,
html[data-theme="contrast"] .message-title {
    background: #000000 !important;
    color: #ffffff !important;
}

html[data-theme="contrast"] .window-shell > summary.window-shell-title::after,
html[data-theme="contrast"] .dashboard-module-title::after {
    color: #ffffff !important;
}

.site-nav .site-nav-list {
    display: grid;
    grid-template-columns: auto auto auto;
    align-items: center;
    width: fit-content;
    max-width: calc(100% - 1rem);
    margin-inline: auto;
    gap: 1rem 1.1rem;
}

.site-nav-side {
    display: flex;
    min-width: 0;
    gap: 0.5rem;
}

.site-nav-side-left {
    justify-content: flex-start;
}

.site-nav-side-right {
    justify-content: flex-end;
}

.site-nav-brand {
    justify-content: center;
}

html[data-theme="dos"] {
    color-scheme: dark;
    background-color: #0a2d63;
    --page-bg: #0d377a;
    --surface-soft: #0f3a7d;
    --surface-panel: rgb(12 35 80 / 0.96);
    --ink: #e8f2ff;
    --ink-muted: #c5d8f2;
    --line: #7da2d5;
    --line-strong: #bfd3eb;
    --accent: #8bd8ff;
    --accent-strong: #dff6ff;
    --accent-soft: #1d4f9f;
    --shadow-soft: 0 14px 28px rgb(0 0 0 / 0.28);
    --shadow-control: 0 3px 8px rgb(0 0 0 / 0.28);
}

html[data-theme="dos"] .app-body {
    background: linear-gradient(180deg, #0a2d63 0%, #0d377a 54%, #123f88 100%) !important;
    background-attachment: fixed;
}

html[data-theme="dos"] .site-nav ul,
html[data-theme="dos"] .site-footer {
    border-color: #5d86c3 !important;
    background: linear-gradient(180deg, rgb(13 58 128 / 0.86) 0%, rgb(18 62 138 / 0.86) 70%, rgb(12 47 104 / 0.86) 100%) !important;
    backdrop-filter: blur(10px);
}

html[data-theme="dos"] .feed-panel,
html[data-theme="dos"] .dashboard-module,
html[data-theme="dos"] .post-shell,
html[data-theme="dos"] .comments-panel,
html[data-theme="dos"] .profile-shell,
html[data-theme="dos"] .news-shell,
html[data-theme="dos"] .auth-shell,
html[data-theme="dos"] .form-shell,
html[data-theme="dos"] .message-shell,
html[data-theme="dos"] .editor-shell {
    border-color: #5d86c3 !important;
    background: linear-gradient(180deg, #123e87 0%, #0f346f 100%) !important;
    color: #e8f2ff !important;
    box-shadow: 0 12px 28px rgb(0 0 0 / 0.28), inset 0 1px 0 rgb(255 255 255 / 0.08) !important;
}

html[data-theme="dos"] .feed-panel-title,
html[data-theme="dos"] .dashboard-module-title,
html[data-theme="dos"] .post-title,
html[data-theme="dos"] .comments-title,
html[data-theme="dos"] .profile-title,
html[data-theme="dos"] .news-title,
html[data-theme="dos"] .auth-title,
html[data-theme="dos"] .form-title,
html[data-theme="dos"] .message-title {
    background: #0c2f68 !important;
    color: #dff6ff !important;
}

html[data-theme="dos"] .site-nav a,
html[data-theme="dos"] .site-footer,
html[data-theme="dos"] .site-footer a,
html[data-theme="dos"] .item-title,
html[data-theme="dos"] .item-meta,
html[data-theme="dos"] .item-date,
html[data-theme="dos"] .post-author,
html[data-theme="dos"] .post-author span,
html[data-theme="dos"] .profile-description p {
    color: #e8f2ff !important;
}

html[data-theme="dos"] .site-nav a[href$="/register/"],
html[data-theme="dos"] .site-nav a[href*="/post"],
html[data-theme="dos"] input[type="submit"],
html[data-theme="dos"] button,
html[data-theme="dos"] .comment-action,
html[data-theme="dos"] .comments-panel a[href="#"],
html[data-theme="dos"] .form-action,
html[data-theme="dos"] .danger-action,
html[data-theme="dos"] .profile-action,
html[data-theme="dos"] .news-badge,
html[data-theme="dos"] .site-nav-brand-link {
    border-color: #8bd8ff !important;
    background: linear-gradient(180deg, #123e87 0%, #1c4d9e 50%, #2b67c3 100%) !important;
    color: #dff6ff !important;
    box-shadow: 0 3px 8px rgb(0 0 0 / 0.28), inset 0 1px 0 rgb(255 255 255 / 0.08) !important;
}

html[data-theme="dos"] .site-nav a:hover,
html[data-theme="dos"] .site-nav-brand-link:hover,
html[data-theme="dos"] .post-card:hover {
    border-color: #a9ccff !important;
    background: #17448e !important;
    box-shadow: 0 7px 16px rgb(0 0 0 / 0.22);
}

html[data-theme="dos"] .theme-switcher-button {
    border-color: #8bd8ff !important;
    background: #0c2f68 !important;
    color: #dff6ff !important;
}

html[data-theme="dos"] .theme-switcher-button[aria-pressed="true"] {
    background: linear-gradient(180deg, #123e87 0%, #1c4d9e 50%, #2b67c3 100%) !important;
    color: #ffffff !important;
}

html[data-theme="chrome"] {
    color-scheme: light;
    background-color: #f0f2f4;
    --page-bg: #f0f3f6;
    --surface-soft: #f4f6f8;
    --surface-panel: rgb(255 255 255 / 0.97);
    --ink: #28333d;
    --ink-muted: #63707b;
    --line: #c3ccd4;
    --line-strong: #9ca9b5;
    --accent: #708191;
    --accent-strong: #44525f;
    --accent-soft: #eef2f5;
    --shadow-soft: 0 12px 28px rgb(41 53 66 / 0.12);
    --shadow-control: 0 3px 8px rgb(78 94 109 / 0.14);
}

html[data-theme="chrome"] .app-body {
    background: linear-gradient(180deg, #ffffff 0%, #f3f6f8 54%, #dfe6ec 100%) !important;
    background-attachment: fixed;
}

html[data-theme="chrome"] .site-nav ul,
html[data-theme="chrome"] .site-footer {
    border-color: #c3ccd4 !important;
    background: linear-gradient(180deg, rgb(255 255 255 / 0.74) 0%, rgb(241 244 247 / 0.74) 70%, rgb(227 233 238 / 0.74) 100%) !important;
    backdrop-filter: blur(10px);
}

html[data-theme="chrome"] .feed-panel,
html[data-theme="chrome"] .dashboard-module,
html[data-theme="chrome"] .post-shell,
html[data-theme="chrome"] .comments-panel,
html[data-theme="chrome"] .profile-shell,
html[data-theme="chrome"] .news-shell,
html[data-theme="chrome"] .auth-shell,
html[data-theme="chrome"] .form-shell,
html[data-theme="chrome"] .message-shell,
html[data-theme="chrome"] .editor-shell {
    border-color: #c3ccd4 !important;
    background: linear-gradient(180deg, #ffffff 0%, #f7f9fb 100%) !important;
}

html[data-theme="chrome"] .feed-panel-title,
html[data-theme="chrome"] .dashboard-module-title,
html[data-theme="chrome"] .post-title,
html[data-theme="chrome"] .comments-title,
html[data-theme="chrome"] .profile-title,
html[data-theme="chrome"] .news-title,
html[data-theme="chrome"] .auth-title,
html[data-theme="chrome"] .form-title,
html[data-theme="chrome"] .message-title {
    background: #e9eff3 !important;
    color: var(--accent-strong) !important;
}

html[data-theme="chrome"] .site-nav a[href$="/register/"],
html[data-theme="chrome"] .site-nav a[href*="/post"],
html[data-theme="chrome"] input[type="submit"],
html[data-theme="chrome"] button,
html[data-theme="chrome"] .comment-action,
html[data-theme="chrome"] .comments-panel a[href="#"],
html[data-theme="chrome"] .form-action,
html[data-theme="chrome"] .danger-action,
html[data-theme="chrome"] .profile-action,
html[data-theme="chrome"] .news-badge,
html[data-theme="chrome"] .site-nav-brand-link {
    border-color: #9ca9b5 !important;
    background: linear-gradient(180deg, #ffffff 0%, #f2f5f7 50%, #dfe6ec 100%) !important;
    color: #44525f !important;
    box-shadow: var(--shadow-control), inset 0 1px 0 #ffffff !important;
}

html[data-theme="chrome"] .site-nav a:hover,
html[data-theme="chrome"] .site-nav-brand-link:hover,
html[data-theme="chrome"] .post-card:hover {
    border-color: #c9d1d8 !important;
    background: #ffffff !important;
    box-shadow: 0 7px 16px rgb(41 53 66 / 0.1);
}

html[data-theme="chrome"] .theme-switcher-button {
    border-color: #9ca9b5 !important;
}

html[data-theme="chrome"] .theme-switcher-button[aria-pressed="true"] {
    background: linear-gradient(180deg, #ffffff 0%, #f2f5f7 50%, #dfe6ec 100%) !important;
    color: #44525f !important;
}

html[data-theme="bubblegum"] {
    color-scheme: light;
    background-color: #fff1f6;
    --page-bg: #fff5f8;
    --surface-soft: #fff4f8;
    --surface-panel: rgb(255 255 255 / 0.98);
    --ink: #4a2c3d;
    --ink-muted: #7c5b6d;
    --line: #e0cad4;
    --line-strong: #ba9caf;
    --accent: #c03c77;
    --accent-strong: #8f1f4b;
    --accent-soft: #ffe4ef;
    --shadow-soft: 0 12px 28px rgb(122 58 88 / 0.12);
    --shadow-control: 0 3px 8px rgb(192 60 119 / 0.14);
}

html[data-theme="bubblegum"] .app-body {
    background: linear-gradient(180deg, #ffffff 0%, #fff5f8 54%, #fde7ef 100%) !important;
    background-attachment: fixed;
}

html[data-theme="bubblegum"] {
    color-scheme: light;
}

html[data-theme="bubblegum"] .theme-mode-button {
    display: none !important;
}

html[data-appearance="dark"] {
    color-scheme: dark;
    background: var(--page-bg, #101010);
    --surface-soft: #171717;
    --surface-panel: rgb(18 18 18 / 0.96);
    --ink: #f3f3f3;
    --ink-muted: #d5d5d5;
    --line: #505050;
    --line-strong: #767676;
    --accent-soft: #232323;
    --shadow-soft: 0 12px 28px rgb(0 0 0 / 0.48);
    --shadow-control: 0 3px 8px rgb(0 0 0 / 0.38);
}

html[data-appearance="dark"][data-theme="mono"] {
    --page-bg: #0f0f0f;
    --page-bg-mid: #151515;
    --page-bg-end: #1b1b1b;
    --accent: #ffffff;
    --accent-strong: #ffffff;
    --accent-soft: #1f1f1f;
}

html[data-appearance="dark"][data-theme="blue"] {
    --page-bg: #0d1822;
    --page-bg-mid: #13202b;
    --page-bg-end: #1a2a36;
    --surface-soft: #131d26;
    --surface-panel: rgb(17 26 35 / 0.96);
    --ink: #eef7fc;
    --ink-muted: #c2d1dc;
    --line: #415261;
    --line-strong: #6a8191;
    --accent: #8bd8ff;
    --accent-strong: #dff6ff;
    --accent-soft: #1a3141;
}

html[data-appearance="dark"][data-theme="mint"] {
    --page-bg: #0a1713;
    --page-bg-mid: #10211b;
    --page-bg-end: #173028;
    --surface-soft: #14231d;
    --surface-panel: rgb(14 24 20 / 0.96);
    --ink: #effcf7;
    --ink-muted: #bed5cc;
    --line: #375149;
    --line-strong: #5c756c;
    --accent: #7fe0bf;
    --accent-strong: #d6fbec;
    --accent-soft: #18352c;
}

html[data-appearance="dark"][data-theme="contrast"] {
    --page-bg: #000000;
    --page-bg-mid: #050505;
    --page-bg-end: #0c0c0c;
    --surface-soft: #080808;
    --surface-panel: rgb(0 0 0 / 0.98);
    --ink: #ffffff;
    --ink-muted: #e0e0e0;
    --line: #ffffff;
    --line-strong: #ffffff;
    --accent: #ffffff;
    --accent-strong: #ffffff;
    --accent-soft: #101010;
}

html[data-appearance="dark"][data-theme="chrome"] {
    --page-bg: #11161b;
    --page-bg-mid: #171d23;
    --page-bg-end: #202830;
    --surface-soft: #161d23;
    --surface-panel: rgb(16 22 28 / 0.96);
    --ink: #f1f5f8;
    --ink-muted: #c2cad1;
    --line: #3f4a55;
    --line-strong: #65717b;
    --accent: #9fb0be;
    --accent-strong: #e4edf4;
    --accent-soft: #1d2730;
}

html[data-appearance="dark"][data-theme="bubblegum"] {
    --page-bg: #2b1d24;
    --page-bg-mid: #34242d;
    --page-bg-end: #40313a;
    --surface-soft: #34212a;
    --surface-panel: rgb(42 28 35 / 0.96);
    --ink: #fff2f7;
    --ink-muted: #e2cad4;
    --line: #6d4a59;
    --line-strong: #927281;
    --accent: #efabc9;
    --accent-strong: #ffddea;
    --accent-soft: #4a2937;
}

html[data-appearance="dark"] .app-body {
    background: linear-gradient(180deg, var(--page-bg) 0%, var(--page-bg-mid) 54%, var(--page-bg-end) 100%) !important;
    background-attachment: fixed;
}

html[data-appearance="dark"] .site-nav ul,
html[data-appearance="dark"] .site-footer {
    border-color: var(--line) !important;
    background: rgb(0 0 0 / 0.78) !important;
    backdrop-filter: blur(10px);
}

html[data-appearance="dark"] .site-nav a,
html[data-appearance="dark"] .site-footer,
html[data-appearance="dark"] .site-footer a {
    color: var(--ink) !important;
}

html[data-appearance="dark"] .feed-panel,
html[data-appearance="dark"] .dashboard-module,
html[data-appearance="dark"] .post-shell,
html[data-appearance="dark"] .comments-panel,
html[data-appearance="dark"] .profile-shell,
html[data-appearance="dark"] .news-shell,
html[data-appearance="dark"] .auth-shell,
html[data-appearance="dark"] .form-shell,
html[data-appearance="dark"] .message-shell,
html[data-appearance="dark"] .editor-shell {
    border-color: var(--line) !important;
    background: var(--surface-panel) !important;
    box-shadow: var(--shadow-soft), inset 0 1px 0 rgb(255 255 255 / 0.04) !important;
    color: var(--ink) !important;
}

html[data-appearance="dark"] .feed-panel-title,
html[data-appearance="dark"] .dashboard-module-title,
html[data-appearance="dark"] .post-title,
html[data-appearance="dark"] .comments-title,
html[data-appearance="dark"] .profile-title,
html[data-appearance="dark"] .news-title,
html[data-appearance="dark"] .auth-title,
html[data-appearance="dark"] .form-title,
html[data-appearance="dark"] .message-title {
    background: linear-gradient(180deg, var(--surface-soft) 0%, var(--surface-panel) 100%) !important;
    color: var(--accent-strong) !important;
    border-bottom-color: var(--line) !important;
}

html[data-appearance="dark"] .window-shell > summary.window-shell-title::after,
html[data-appearance="dark"] .dashboard-module-title::after {
    color: var(--accent-strong) !important;
}

html[data-appearance="dark"] .site-nav a[href$="/register/"],
html[data-appearance="dark"] .site-nav a[href*="/post"],
html[data-appearance="dark"] input[type="submit"],
html[data-appearance="dark"] button,
html[data-appearance="dark"] .comment-action,
html[data-appearance="dark"] .comments-panel a[href="#"],
html[data-appearance="dark"] .form-action,
html[data-appearance="dark"] .danger-action,
html[data-appearance="dark"] .profile-action,
html[data-appearance="dark"] .news-badge,
html[data-appearance="dark"] .site-nav-brand-link {
    border-color: var(--line-strong) !important;
    background: var(--surface-soft) !important;
    color: var(--ink) !important;
    box-shadow: none !important;
}

html[data-appearance="dark"] .site-nav a[href$="/register/"],
html[data-appearance="dark"] .site-nav a[href*="/post"],
html[data-appearance="dark"] input[type="submit"],
html[data-appearance="dark"] button,
html[data-appearance="dark"] .comment-action,
html[data-appearance="dark"] .comments-panel a[href="#"],
html[data-appearance="dark"] .form-action,
html[data-appearance="dark"] .danger-action,
html[data-appearance="dark"] .profile-action {
    background: var(--surface-soft) !important;
}

html[data-appearance="dark"] .site-nav a:hover,
html[data-appearance="dark"] .site-nav-brand-link:hover,
html[data-appearance="dark"] .news-item:hover,
html[data-appearance="dark"] .post-card:hover {
    border-color: var(--accent-strong) !important;
    background: var(--surface-panel) !important;
    box-shadow: none !important;
}

html[data-appearance="dark"] .theme-switcher-button {
    border-color: var(--line-strong) !important;
    background: var(--surface-soft) !important;
    color: var(--ink) !important;
}

html[data-appearance="dark"] .theme-switcher-button[aria-pressed="true"] {
    background: var(--accent-soft) !important;
    color: var(--accent-strong) !important;
}

html[data-appearance="dark"] .theme-switcher-button.theme-mode-button {
    background: var(--surface-panel) !important;
    color: var(--ink) !important;
}

html[data-appearance="dark"] .theme-switcher-button.theme-mode-button[aria-pressed="true"] {
    background: var(--surface-panel) !important;
    color: var(--ink) !important;
}

html[data-appearance="dark"] .profile-picture,
html[data-appearance="dark"] .dashboard-profile-avatar,
html[data-appearance="dark"] .item-avatar,
html[data-appearance="dark"] .profile-shell img,
html[data-appearance="dark"] .profile-upload-preview {
    background: #ffffff !important;
    border-color: #ffffff !important;
}

html[data-appearance="dark"] .field-shell > input:not([type="submit"]):not([type="hidden"]):not([type="checkbox"]),
html[data-appearance="dark"] .field-shell > textarea,
html[data-appearance="dark"] .form-shell input:not([type="submit"]):not([type="hidden"]):not([type="checkbox"]),
html[data-appearance="dark"] .form-shell textarea,
html[data-appearance="dark"] .auth-shell input:not([type="submit"]):not([type="hidden"]):not([type="checkbox"]),
html[data-appearance="dark"] .auth-shell textarea,
html[data-appearance="dark"] .editor-shell input:not([type="submit"]):not([type="hidden"]):not([type="checkbox"]),
html[data-appearance="dark"] .editor-shell textarea,
html[data-appearance="dark"] .comments-panel input:not([type="submit"]):not([type="hidden"]):not([type="checkbox"]),
html[data-appearance="dark"] .comments-panel textarea {
    border-color: var(--line-strong) !important;
    background: #111111 !important;
    color: var(--ink) !important;
    box-shadow: inset 0 1px 3px rgb(0 0 0 / 0.35);
}

html[data-appearance="dark"] .auth-label,
html[data-appearance="dark"] .form-label {
    color: var(--ink) !important;
    background: transparent !important;
}

html[data-appearance="dark"] .field-errors,
html[data-appearance="dark"] .form-errors,
html[data-appearance="dark"] .form-note,
html[data-appearance="dark"] .message-copy,
html[data-appearance="dark"] .item-meta,
html[data-appearance="dark"] .item-date,
html[data-appearance="dark"] .item-title,
html[data-appearance="dark"] .post-toolbar span,
html[data-appearance="dark"] .profile-description p,
html[data-appearance="dark"] .comment-body {
    color: var(--ink) !important;
}

html[data-appearance="dark"] .item-title,
html[data-appearance="dark"] .item-title a {
    color: var(--accent-strong) !important;
}

html[data-appearance="dark"] .item-title {
    color: var(--accent-strong) !important;
}

html[data-appearance="dark"] .profile-description {
    border-color: var(--line-strong) !important;
    background: #ffffff !important;
    color: #1f1f1f !important;
}

html[data-appearance="dark"] .profile-description p {
    color: #1f1f1f !important;
}

html[data-appearance="dark"] .comment-body,
html[data-appearance="dark"] .comment-old {
    color: var(--ink) !important;
    opacity: 1;
}

html[data-appearance="dark"] .comment-meta {
    color: var(--ink-muted) !important;
}

html[data-appearance="dark"] .comment-thread {
    border-left-color: var(--line-strong) !important;
}

html[data-appearance="dark"] .comment-link {
    color: var(--accent-strong) !important;
}

html[data-appearance="dark"] .markdownx-preview {
    color: var(--ink) !important;
}

html[data-appearance="dark"] .markdownx-preview blockquote,
html[data-appearance="dark"] .markdownx-preview code,
html[data-appearance="dark"] .markdownx-preview pre {
    border-color: var(--line-strong) !important;
    background: var(--surface-soft) !important;
    color: var(--ink) !important;
}

html[data-appearance="dark"] .dashboard-profile-form input[type="file"]::file-selector-button,
html[data-appearance="dark"] .form-shell input[type="file"]::file-selector-button,
html[data-appearance="dark"] .auth-shell input[type="file"]::file-selector-button,
html[data-appearance="dark"] .editor-shell input[type="file"]::file-selector-button,
html[data-appearance="dark"] .comments-panel input[type="file"]::file-selector-button {
    border: 1px solid var(--line-strong) !important;
    background: var(--surface-soft) !important;
    color: var(--ink) !important;
}

@media (max-width: 79.999rem) {
    html[data-theme="mono"],
    html[data-theme="mono"] body,
    html[data-theme="mono"] .app-body,
    html[data-theme="mono"] .site-frame,
    html[data-theme="mono"] .site-main,
    html[data-theme="blue"] .app-body,
    html[data-theme="blue"] body,
    html[data-theme="blue"] .site-frame,
    html[data-theme="blue"] .site-main,
    html[data-theme="mint"] .app-body,
    html[data-theme="mint"] body,
    html[data-theme="mint"] .site-frame,
    html[data-theme="mint"] .site-main,
    html[data-theme="contrast"] .app-body,
    html[data-theme="contrast"] body,
    html[data-theme="contrast"] .site-frame,
    html[data-theme="contrast"] .site-main,
    html[data-theme="dos"] .app-body,
    html[data-theme="dos"] body,
    html[data-theme="dos"] .site-frame,
    html[data-theme="dos"] .site-main,
    html[data-theme="chrome"] .app-body,
    html[data-theme="chrome"] body,
    html[data-theme="chrome"] .site-frame,
    html[data-theme="chrome"] .site-main,
    html[data-theme="bubblegum"] .app-body {
        background: var(--page-bg, #ffffff) !important;
        background-image: none !important;
        background-attachment: scroll !important;
    }

    html[data-theme="bubblegum"] body,
    html[data-theme="bubblegum"] .site-frame,
    html[data-theme="bubblegum"] .site-main {
        background: var(--page-bg, #ffffff) !important;
        background-image: none !important;
        background-attachment: scroll !important;
    }
}

html[data-theme="bubblegum"] .site-nav ul,
html[data-theme="bubblegum"] .site-footer {
    border-color: #e0cad4 !important;
    background: linear-gradient(180deg, rgb(255 255 255 / 0.74) 0%, rgb(255 244 248 / 0.74) 70%, rgb(253 234 241 / 0.74) 100%) !important;
    backdrop-filter: blur(10px);
}

html[data-theme="bubblegum"] .feed-panel,
html[data-theme="bubblegum"] .dashboard-module,
html[data-theme="bubblegum"] .post-shell,
html[data-theme="bubblegum"] .comments-panel,
html[data-theme="bubblegum"] .profile-shell,
html[data-theme="bubblegum"] .news-shell,
html[data-theme="bubblegum"] .auth-shell,
html[data-theme="bubblegum"] .form-shell,
html[data-theme="bubblegum"] .message-shell,
html[data-theme="bubblegum"] .editor-shell {
    border-color: #e0cad4 !important;
    background: linear-gradient(180deg, #ffffff 0%, #fff8fb 100%) !important;
}

html[data-theme="bubblegum"] .feed-panel-title,
html[data-theme="bubblegum"] .dashboard-module-title,
html[data-theme="bubblegum"] .post-title,
html[data-theme="bubblegum"] .comments-title,
html[data-theme="bubblegum"] .profile-title,
html[data-theme="bubblegum"] .news-title,
html[data-theme="bubblegum"] .auth-title,
html[data-theme="bubblegum"] .form-title,
html[data-theme="bubblegum"] .message-title {
    background: #fbe3ee !important;
    color: var(--accent-strong) !important;
}

html[data-theme="bubblegum"] .site-nav a[href$="/register/"],
html[data-theme="bubblegum"] .site-nav a[href*="/post"],
html[data-theme="bubblegum"] input[type="submit"],
html[data-theme="bubblegum"] button,
html[data-theme="bubblegum"] .comment-action,
html[data-theme="bubblegum"] .comments-panel a[href="#"],
html[data-theme="bubblegum"] .form-action,
html[data-theme="bubblegum"] .danger-action,
html[data-theme="bubblegum"] .profile-action,
html[data-theme="bubblegum"] .news-badge,
html[data-theme="bubblegum"] .site-nav-brand-link {
    border-color: #d9a3bc !important;
    background: linear-gradient(180deg, #ffffff 0%, #fff1f6 50%, #f6cadb 100%) !important;
    color: #8f1f4b !important;
    box-shadow: var(--shadow-control), inset 0 1px 0 #ffffff !important;
}

html[data-theme="bubblegum"] .site-nav a:hover,
html[data-theme="bubblegum"] .site-nav-brand-link:hover,
html[data-theme="bubblegum"] .post-card:hover {
    border-color: #e8c7d6 !important;
    background: #ffffff !important;
    box-shadow: 0 7px 16px rgb(122 58 88 / 0.1);
}

html[data-theme="bubblegum"] .theme-switcher-button {
    border-color: #d9a3bc !important;
}

html[data-theme="bubblegum"] .theme-switcher-button[aria-pressed="true"] {
    background: linear-gradient(180deg, #ffffff 0%, #fff1f6 50%, #f6cadb 100%) !important;
    color: #8f1f4b !important;
}

.panel-body {
    padding: 0.7rem 0.85rem 0.85rem;
}

.item-row {
    display: flex;
    gap: 0.7rem;
    align-items: flex-start;
}

.item-avatar {
    flex: 0 0 42px;
    width: 42px;
    height: 42px;
    align-self: center;
    border: 2px solid #ffffff !important;
    border-radius: 999px !important;
    background: var(--accent-soft) !important;
    object-fit: cover;
}

.item-copy {
    min-width: 0;
    flex: 1;
}

.item-title {
    color: #333333 !important;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.22;
    min-width: 0;
}

.item-title a {
    z-index: 10;
    display: -webkit-box;
    max-width: 100%;
    overflow: hidden;
    overflow-wrap: anywhere;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    color: inherit !important;
    text-decoration: underline;
    text-decoration-thickness: 0.06em;
    word-break: break-word;
}

.item-meta,
.item-date {
    display: -webkit-box;
    overflow: hidden;
    color: var(--ink-muted) !important;
    font-size: 0.82rem;
    line-height: 1.35;
    overflow-wrap: anywhere;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    word-break: break-word;
}

.item-meta a,
.item-date a {
    color: var(--accent-strong) !important;
    font-weight: 650;
}

.item-date {
    display: block;
    margin-top: 0.2rem;
}

.text-link,
.comment-meta a,
.comment-body a,
.post-author,
.post-author span,
.inline-link {
    color: var(--accent-strong) !important;
    font-weight: 650;
}

.text-link:hover,
.comment-meta a:hover,
.comment-body a:hover,
.post-author:hover,
.inline-link:hover {
    color: var(--accent) !important;
}

.news-badge {
    margin-left: auto;
    align-self: flex-start;
    border: 1px solid #000000 !important;
    border-radius: 999px !important;
    background: #ffffff !important;
    color: var(--accent-strong) !important;
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1;
    padding: 0.3rem 0.5rem;
}

.post-shell {
    position: relative;
    z-index: 10;
    width: min(100%, 50rem);
    max-width: 50rem;
    margin: 0.85rem auto;
    background: #f4f4f4 !important;
}

.post-layout {
    width: min(100%, 64rem);
}

.post-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.65rem;
    margin-bottom: 1rem;
    padding-top: 0;
}

.post-author {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    color: var(--ink) !important;
    font-size: 0.9rem;
    text-decoration: none;
}

.post-toolbar {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.5rem 0.7rem;
    margin-left: auto;
    margin-bottom: 0 !important;
    padding-top: 0;
}

.post-toolbar form {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    margin: 0;
}

.post-toolbar span {
    color: var(--ink-muted);
    font-size: 0.82rem;
}

.post-shell form {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    margin: 0;
}

.comments-rail {
    border: 0 !important;
    display: flex;
    justify-content: center;
    width: 100%;
    margin-top: 0;
    padding: 0;
    overflow: visible;
    scroll-behavior: smooth;
}

.comments-panel {
    width: min(100%, 50rem);
    margin: 0.85rem auto 0;
}

.post-shell img,
.comments-panel img,
.post-card img {
    border: 2px solid #ffffff !important;
    box-shadow: 0 4px 10px rgb(0 0 0 / 0.15);
}

.comment-thread {
    width: 100%;
    margin-top: 0.7rem;
    border-left: 4px solid var(--accent) !important;
    padding: 0.35rem 0 0.65rem 0.8rem;
    text-align: left;
}

.comment-body {
    display: block;
    max-height: none;
    margin: 0;
    overflow: visible;
    color: #222222 !important;
    line-height: 1.5;
    overflow-wrap: anywhere;
    white-space: normal;
    word-break: break-word;
}

.comment-body-collapsed {
    max-height: 8.1rem;
    overflow: hidden;
}



.comment-old {
    color: #222222 !important;
    opacity: 1;
}

.comment-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    align-items: center;
    margin-top: 0.55rem;
    margin-bottom: 0.4rem;
    color: var(--ink-muted) !important;
    font-size: 0.78rem;
}

.comment-permalink {
    visibility: hidden;
}

.comment-meta:hover .comment-permalink {
    visibility: visible;
}

.comment-link {
    min-height: auto !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    color: var(--accent-strong) !important;
    font-size: 0.82rem !important;
    font-weight: 650 !important;
    padding: 0 !important;
    text-decoration: none !important;
}

.comment-link:hover {
    color: var(--accent) !important;
    text-decoration: underline !important;
    transform: none !important;
}

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

.comment-action {
    width: auto;
}

.comment-action-secondary {
    border-color: transparent !important;
    background: transparent !important;
    color: var(--ink-muted) !important;
    box-shadow: none !important;
}

.comment-action-secondary:hover {
    border-color: var(--line) !important;
    background: var(--surface-panel) !important;
    color: var(--accent-strong) !important;
    box-shadow: none !important;
}

.comment-read-more {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 4.75rem;
    min-height: 2.05rem !important;
    border: 1px solid #000000 !important;
    border-radius: var(--radius-control) !important;
    background: linear-gradient(180deg, #ffffff 0%, #f2f2f2 50%, #d7d7d7 100%) !important;
    box-shadow: var(--shadow-control), inset 0 1px 0 #ffffff !important;
    color: var(--ink-muted) !important;
    font-size: 0.82rem !important;
    font-weight: 650 !important;
    line-height: 1;
    padding: 0.42rem 0.8rem !important;
    text-decoration: none !important;
    white-space: nowrap;
    cursor: pointer;
}

.comment-form-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.hidden {
    display: none !important;
}

.pagination-block {
    padding-top: 0.75rem;
}

.markdownx {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    width: 100%;
    gap: 0.7rem;
}

.markdownx-editor-pane {
    display: flex;
    justify-content: center;
    padding: 0.35rem;
}

.markdownx-output {
    flex: 1 1 auto;
    max-width: 56rem;
    margin-block: -0.75rem;
    padding-inline: 1.6rem;
}

.markdownx-preview {
    max-width: 70ch;
    overflow-x: auto;
    color: var(--ink) !important;
    font-size: 0.95rem;
    font-weight: 500;
    line-height: 1.62;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.markdownx-preview > * + * {
    margin-top: 0.7rem;
}

.markdownx-preview h1,
.markdownx-preview h2,
.markdownx-preview h3,
.markdownx-preview h4,
.markdownx-preview h5,
.markdownx-preview h6 {
    color: #333333 !important;
    font-weight: 700;
    line-height: 1.2;
    text-transform: none;
}

.markdownx-preview h1 {
    margin-top: 0.25rem;
    font-size: clamp(1.45rem, 3vw, 2.1rem);
}

.markdownx-preview h2 {
    border-bottom: 1px solid #cccccc !important;
    padding-bottom: 0.3rem;
    font-size: clamp(1.1rem, 2vw, 1.45rem);
}

html[data-appearance="dark"] .markdownx-preview h1,
html[data-appearance="dark"] .markdownx-preview h2,
html[data-appearance="dark"] .markdownx-preview h3,
html[data-appearance="dark"] .markdownx-preview h4,
html[data-appearance="dark"] .markdownx-preview h5,
html[data-appearance="dark"] .markdownx-preview h6 {
    color: var(--accent-strong) !important;
}

html[data-appearance="dark"] .markdownx-preview h2 {
    border-bottom-color: var(--line-strong) !important;
}

.markdownx-preview a {
    color: var(--accent-strong) !important;
    font-weight: 650;
    text-decoration: underline;
    text-decoration-color: rgb(0 0 0 / 0.32);
    text-decoration-thickness: 0.08em;
}

.markdownx-preview blockquote {
    border-left: 0.35rem solid var(--accent) !important;
    border-radius: 0.9rem;
    background: var(--accent-soft) !important;
    color: var(--ink) !important;
    margin-inline: 0;
    padding: 0.75rem 1rem;
}

.markdownx-preview code,
.markdownx-preview pre {
    border: 1px solid var(--line) !important;
    background: var(--surface-soft) !important;
    color: var(--ink) !important;
}

.markdownx-preview code {
    border-radius: 0.45rem;
    padding: 0.08rem 0.3rem;
    font-size: 0.92em;
}

.markdownx-preview pre {
    border-radius: 1rem;
    overflow-x: auto;
    padding: 1rem;
}

.markdownx-preview ul,
.markdownx-preview ol {
    padding-left: 1.5rem;
}

.markdownx-preview ul {
    list-style: disc;
}

.markdownx-preview ol {
    list-style: decimal;
}

.step-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    color: var(--ink-muted);
    font-size: 0.9rem;
    font-weight: 500;
    padding: 0 1rem 1rem;
}

.step-links a {
    border: 1px solid var(--line) !important;
    border-radius: var(--radius-control) !important;
    background: #ffffff !important;
    color: var(--accent-strong) !important;
    padding: 0.28rem 0.75rem;
    text-decoration: none;
}

@media (max-width: 640px) {
    .site-frame {
        padding-inline: 0.75rem;
    }

    .site-main {
        padding-inline: 0;
    }

    .site-nav {
        padding-block: 1rem 1.4rem;
        padding-top: 0;
    }

    .site-nav .site-nav-list {
        max-width: 100%;
        overflow-x: auto;
    }

    .nav-label-short {
        display: inline;
    }

    .nav-label-full {
        display: none;
    }

    .feed-panel {
        width: min(100%, 24rem);
        margin-inline: 0;
    }

    .dashboard-grid {
        gap: 0.75rem;
    }

    .dashboard-module,
    .dashboard-module.feed-panel {
        width: 100%;
        margin-inline: 0;
    }

    .dashboard-module-title {
        min-height: 2.75rem;
        padding-inline: 2.5rem;
    }

    .dashboard-module:not([open]) {
        min-height: 0;
    }

    .post-shell {
        margin-inline: 0;
        padding: 1.15rem !important;
        margin: auto;
    }

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

    .post-toolbar {
        width: 100%;
        justify-content: flex-start;
        margin-left: 0;
    }

    .markdownx {
        display: block;
    }

    .markdownx-output {
        margin-block: 1rem 0;
        padding-inline: 0;
    }
}

@media (min-width: 48rem) {
    .editor-shell {
        display: flex;
    }
}

@media (min-width: 96rem) {
    .post-layout {
        display: grid;
        width: min(100%, 92rem);
        grid-template-columns: minmax(22rem, 0.95fr) minmax(0, 1.55fr);
        grid-template-areas: "comments post";
        gap: 0.85rem;
        align-items: start;
    }

    .post-shell {
        grid-area: post;
        width: 100%;
        max-width: none;
        margin: 0;
    }

    .comments-rail {
        grid-area: comments;
        position: static;
        width: 100%;
        height: auto;
        padding: 0;
    }

    .comments-panel {
        width: 100%;
        margin: 0;
    }
}

@media (min-width: 80rem) and (min-height: 42rem) {
    .dashboard-grid {
        max-height: calc(100vh - 10.5rem);
    }

    .dashboard-column {
        max-height: calc(100vh - 10.5rem);
        overflow-y: auto;
        padding-bottom: 0.25rem;
    }

    .dashboard-column::-webkit-scrollbar,
    .dashboard-module .panel-body::-webkit-scrollbar {
        width: 0.55rem;
    }

    .dashboard-column::-webkit-scrollbar-thumb,
    .dashboard-module .panel-body::-webkit-scrollbar-thumb {
        border-radius: 999px;
        background: #b5b5b5;
    }
}
