/* retoor <retoor@molodetz.nl> */

.error-page {
    text-align: center;
    padding: 4rem 1rem;
}
.error-code {
    font-size: 5rem;
    font-weight: 800;
    color: var(--accent);
    line-height: 1;
    margin-bottom: 0.5rem;
}
.error-message {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.line-clamp-4 {
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

[data-overflow-tabs] {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    width: 100%;
    max-width: 100%;
    min-width: 0;
}

.overflow-tabs-strip {
    display: flex;
    flex: 1;
    min-width: 0;
    align-items: center;
    flex-wrap: nowrap;
    gap: inherit;
    overflow: hidden;
}

.overflow-tabs-strip > * {
    flex-shrink: 0;
    white-space: nowrap;
}

[data-overflow-tabs] .overflow-tabs-more {
    flex-shrink: 0;
}

.modal-card {
    width: 100%;
    max-width: 560px;
    margin: 1rem;
    max-height: 90vh;
    overflow-y: auto;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
}
.modal-card-wide {
    max-width: 700px;
}
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}
.modal-header h3 {
    font-size: 1.125rem;
    font-weight: 700;
}
.modal-close-btn {
    font-size: 1.25rem;
}
.modal-footer {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
}
.form-row {
    display: flex;
    gap: 0.375rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}
.topic-label {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.375rem 0.75rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    background: var(--bg-card-hover);
}
.topic-radio {
    width: auto;
    accent-color: var(--accent);
}
.inline-form {
    display: inline;
}
.empty-state-borderless {
    border: none;
}
.meta-muted {
    font-size: 0.75rem;
    color: var(--text-muted);
}
.meta-muted-spaced {
    margin-left: 0.5rem;
}
.hidden {
    display: none !important;
}
.text-muted {
    color: var(--text-muted);
}
.text-secondary {
    color: var(--text-secondary);
}
.text-primary {
    color: var(--text-primary);
}
.auth-field-gap {
    margin-bottom: 0.75rem;
}
.load-more-wrap {
    text-align: center;
    margin-top: 1rem;
}
.top-authors-section {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border);
}
.top-authors-title {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}
.no-authors-msg {
    font-size: 0.75rem;
    color: var(--text-muted);
    padding: 0.5rem 0;
}
.top-authors-link {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--accent);
    text-align: center;
}
.no-comments-msg {
    color: var(--text-muted);
    font-size: 0.875rem;
    text-align: center;
    padding: 2rem 0;
}
.topic-wrap {
    margin-bottom: 0.75rem;
}
.related-section {
    margin-top: 1.5rem;
}
.related-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.related-link {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
    padding: 0.75rem;
    width: 100%;
    border-radius: var(--radius);
}
.related-link:hover {
    background: var(--bg-card);
}
.related-title {
    color: var(--text-primary);
    font-size: 0.875rem;
}
.related-meta {
    color: var(--text-muted);
    font-size: 0.75rem;
}
.v-align-middle {
    vertical-align: middle;
}
.mr-0-375 {
    margin-right: 0.375rem;
}
.flex-center {
    display: flex;
    align-items: center;
}
.flex-center-gap {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.flex-col-gap {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.full-width {
    width: 100%;
}
.justify-center {
    justify-content: center;
}
.grid-2col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}
.section-divider {
    border: none;
    border-top: 1px solid var(--border);
    margin: 1.5rem 0;
}
.section-label {
    font-size: 0.875rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--text-secondary);
}
.inline-flex {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
}
.input-sm {
    font-size: 0.8125rem;
}
.min-h-100 {
    min-height: 100px;
}
.min-h-120 {
    min-height: 120px;
}
.min-h-200 {
    min-height: 200px;
}
.flex-between {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.flex-wrap-gap {
    display: flex;
    gap: 0.375rem;
    flex-wrap: wrap;
}
.flex-wrap-gap-bottom {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
    margin-bottom: 0.5rem;
}
.badge-type {
    background: var(--border);
    color: var(--text-muted);
    text-transform: capitalize;
}
.empty-state-full {
    grid-column: 1 / -1;
}
.projects-settings-btn {
    margin-left: auto;
}
.auth-field-gap-last {
    margin-bottom: 1rem;
}
.platform-presets-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    margin-top: 0.5rem;
}
.profile-actions {
    margin-top: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.input-edit-field {
    margin-bottom: 0.5rem;
}
.save-btn-top {
    margin-top: 0.5rem;
}
.post-action-static {
    cursor: default;
}
.activity-card {
    padding: 0.75rem 1rem;
}
.activity-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8125rem;
}
.activity-icon {
    color: var(--text-muted);
}
.activity-type {
    color: var(--text-secondary);
}
.activity-time {
    color: var(--text-muted);
}
.activity-content {
    font-size: 0.8125rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}
.project-card {
    display: block;
    text-decoration: none;
    color: inherit;
}
.gist-card {
    display: block;
    text-decoration: none;
    color: inherit;
}
.platform-preset {
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.6875rem;
    font-weight: 600;
    background: var(--border);
    color: var(--text-muted);
    cursor: pointer;
    border: none;
}

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.5;
    padding-top: var(--nav-height);
}

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

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

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
    color: inherit;
}

input, textarea, select {
    font-family: inherit;
    font-size: 0.875rem;
    color: var(--text-primary);
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-input);
    padding: 0.625rem 0.875rem;
    outline: none;
    width: 100%;
}

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

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

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

* {
    scrollbar-width: none;
}

*::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    border-radius: var(--radius);
    font-size: 0.875rem;
    font-weight: 600;
    white-space: nowrap;
}

.btn-primary {
    background: var(--accent);
    color: var(--on-accent);
}

.btn-primary:hover {
    background: var(--accent-hover);
    color: var(--white);
}

.btn-secondary {
    background: var(--bg-card);
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-light);
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
}

.btn-ghost:hover {
    color: var(--text-primary);
    background: var(--bg-card);
}

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.8125rem;
}

.secret-value {
    display: block;
    font-family: var(--font-mono);
    font-size: 0.8125rem;
    word-break: break-all;
    padding: var(--space-sm);
    margin-bottom: var(--space-sm);
    background: var(--bg-input);
    color: var(--text-primary);
    border-radius: var(--radius);
}

.btn-icon {
    padding: 0.5rem;
    border-radius: var(--radius);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

@keyframes btn-spin {
    to { transform: rotate(360deg); }
}

.btn-spinner {
    display: none;
    width: 0.85em;
    height: 0.85em;
    margin-right: 0.4em;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    vertical-align: -0.15em;
    animation: btn-spin 0.6s linear infinite;
}

.btn.is-loading {
    pointer-events: none;
}

.btn.is-loading .btn-spinner {
    display: inline-block;
}

.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.125rem 0.5rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.badge-devlog { background: var(--topic-devlog); color: var(--white); }
.badge-showcase { background: var(--topic-showcase); color: var(--white); }
.badge-question { background: var(--topic-question); color: var(--white); }
.badge-rant { background: var(--topic-rant); color: var(--white); }
.badge-fun { background: var(--topic-fun); color: #000; }
.badge-random { background: var(--border-light); color: var(--text-secondary); }
.badge-politics { background: var(--topic-politics); color: var(--white); }

.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--accent);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
    color: var(--on-accent);
    flex-shrink: 0;
    overflow: hidden;
}

.avatar-24 { width: 24px; height: 24px; }
.avatar-xs { width: 20px; height: 20px; font-size: 0.6875rem; }
.avatar-sm { width: 32px; height: 32px; font-size: 0.8125rem; }
.avatar-lg { width: 80px; height: 80px; font-size: 2rem; }
.avatar-img { border-radius: 50%; object-fit: cover; flex-shrink: 0; }

.user-avatar-link,
.avatar-badge {
    position: relative;
    display: inline-flex;
    flex-shrink: 0;
}

.presence-dot {
    position: absolute;
    right: 0;
    bottom: 0;
    width: 30%;
    height: 30%;
    min-width: 8px;
    min-height: 8px;
    max-width: 14px;
    max-height: 14px;
    border-radius: 50%;
    background: var(--text-muted);
    border: 2px solid var(--bg-card);
    box-sizing: border-box;
    pointer-events: none;
}

.presence-dot.online { background: var(--success); }

.award-badge {
    position: absolute;
    left: 0;
    bottom: 0;
    width: 25%;
    height: 25%;
    object-fit: contain;
    pointer-events: none;
}

.topnav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--nav-height);
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
    z-index: var(--z-nav);
    display: flex;
    align-items: center;
}
.topnav-inner {
    max-width: var(--max-content);
    margin: 0 auto;
    padding: 0 1rem;
    width: 100%;
    display: flex;
    align-items: center;
    gap: 2rem;
}
.topnav-logo {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.02em;
    flex-shrink: 0;
}
.topnav-logo span { color: var(--accent); }
.topnav-links { display: flex; gap: 0.25rem; }
.topnav-link {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
}
.topnav-link:hover { color: var(--text-primary); background: var(--bg-card); }
.topnav-link.active { color: var(--accent); background: var(--accent-light); }
.topnav-right { margin-left: auto; display: flex; align-items: center; gap: 1rem; flex-shrink: 0; }
.topnav-icon { position: relative; padding: 0.375rem; color: var(--text-secondary); font-size: 1.25rem; background: none; border: none; cursor: pointer; font-family: inherit; line-height: 1; }
.topnav-icon:hover { color: var(--text-primary); }
.topnav-icon.active { color: var(--accent); }
.nav-bell { position: relative; display: inline-flex; align-items: center; justify-content: center; line-height: 1; }
.nav-badge {
    position: absolute; top: -6px; right: -8px; z-index: 1; min-width: 16px; height: 16px;
    padding: 0 0.25rem; border-radius: 8px; background: var(--accent); color: var(--on-accent);
    font-size: 0.6875rem; font-weight: 700;
    display: flex; align-items: center; justify-content: center;
}
.nav-badge-inline {
    position: static; margin-left: 0.375rem;
    display: inline-flex; vertical-align: middle;
}
.nav-badge[hidden] { display: none; }
.topnav-user { display: flex; align-items: center; gap: 0.5rem; padding: 0.375rem; border-radius: var(--radius); }
.topnav-user:hover { background: var(--bg-card); }
.topnav-user-info { display: flex; flex-direction: column; line-height: 1.2; }
.topnav-user-name { font-size: 0.8125rem; font-weight: 600; color: var(--text-primary); }
.topnav-user-level { font-size: 0.6875rem; color: var(--text-muted); }
.topnav-user-dropdown { position: relative; }
.topnav-user-dropdown .dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    min-width: 140px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 0.25rem 0;
    z-index: var(--z-nav-drop);
}
.topnav-user-dropdown:hover .dropdown-menu,
.topnav-user-dropdown.open .dropdown-menu { display: block; }

.topnav-tools-dropdown { position: relative; }
.topnav-tools-toggle { display: inline-flex; align-items: center; }
.topnav-tools-dropdown.active .topnav-tools-toggle { color: var(--accent); }
.topnav-tools-dropdown .dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    min-width: 180px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 0.25rem 0;
    z-index: var(--z-nav-drop);
}
.topnav-tools-dropdown:hover .dropdown-menu,
.topnav-tools-dropdown.open .dropdown-menu { display: block; }
.dropdown-item {
    display: block;
    padding: 0.5rem 0.875rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
    white-space: nowrap;
}
.dropdown-item:hover { background: var(--bg-card); color: var(--text-primary); }

.topnav-hamburger {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.5rem;
    padding: 0.375rem;
    cursor: pointer;
    line-height: 1;
}

.app-store-nav-link {
    display: inline-flex;
    align-items: center;
    line-height: 0;
}

.app-store-nav-badge {
    width: 90px;
    height: auto;
}

.topnav-mobile-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: var(--z-nav-overlay);
}

.topnav-mobile-panel {
    position: fixed;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
    z-index: var(--z-nav-panel);
    max-height: 0;
    overflow: hidden;
}

.topnav-mobile-panel.open {
    max-height: 500px;
    overflow-y: auto;
}

.topnav-mobile-links {
    display: flex;
    flex-direction: column;
    padding: 0.5rem;
    gap: 0.125rem;
}

.topnav-mobile-link {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.75rem;
    border-radius: var(--radius);
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.topnav-mobile-link:hover {
    background: var(--bg-card);
    color: var(--text-primary);
    text-decoration: none;
}

.topnav-mobile-link.active {
    color: var(--accent);
    background: var(--accent-light);
}

.app-store-mobile-link {
    justify-content: flex-start;
}

.app-store-mobile-badge {
    width: 120px;
    height: auto;
}

.topnav-mobile-divider {
    height: 1px;
    background: var(--border);
    margin: 0.375rem 0.75rem;
}

.topnav-mobile-user {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    border-radius: var(--radius);
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.875rem;
}

.topnav-mobile-user:hover {
    background: var(--bg-card);
    text-decoration: none;
}

.topnav-mobile-user-info {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.topnav-mobile-user-level {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 400;
}

.topnav-mobile-section-label {
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    padding: 0.5rem 0.75rem 0.25rem;
}

.user-avatar-link { display: inline-flex; flex-shrink: 0; line-height: 0; }
.user-avatar-link:hover { opacity: 0.85; }
.user-link { display: inline-flex; align-items: center; gap: 0.5rem; color: var(--text-primary); }
.user-link:hover { color: var(--accent); text-decoration: none; }
.user-link-name { font-weight: 600; font-size: 0.875rem; }
.user-link-role { font-size: 0.75rem; color: var(--text-muted); font-weight: 400; }
.post-author-link { font-weight: 600; font-size: 0.875rem; color: var(--text-primary); }
.post-author-link:hover { color: var(--accent); }
.post-detail-author { font-weight: 600; font-size: 0.9375rem; color: var(--text-primary); }
.post-detail-author:hover { color: var(--accent); }
.comment-author { font-size: 0.8125rem; font-weight: 600; color: var(--text-primary); }
.comment-author:hover { color: var(--accent); }

.comment-form {
    display: flex;
    gap: 0.75rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
    align-items: center;
}

.comment-reply-form {
    margin-top: 0.75rem;
}

.comment-form > a {
    flex-shrink: 0;
    line-height: 0;
}

.comment-form .mention-wrapper {
    flex: 1;
    min-width: 0;
    width: auto;
}

.comment-form textarea {
    width: 100%;
    min-height: 44px;
    max-height: 120px;
}

.comment-form-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    flex-shrink: 0;
}

.comment-form-actions button {
    padding: 0.375rem 0.5rem;
    font-size: 1rem;
    line-height: 1;
    color: var(--text-muted);
    background: none;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
}

.comment-form-actions button:hover {
    color: var(--text-primary);
}

button.comment-form-submit {
    padding: 0.375rem 0.5rem;
    background: var(--accent);
    color: var(--on-accent);
    font-weight: 600;
    font-size: 0.8125rem;
    line-height: 1.4;
}

button.comment-form-submit:hover {
    background: var(--accent-hover);
}

@media (max-width: 768px) {
    .comment-action-btn .label,
    .comment-form-actions .label,
    .comment-actions .reaction-add-label {
        display: none;
    }

    .comment-action-btn,
    .comment-form-actions button {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .comment-action-btn .icon,
    .comment-form-actions .icon {
        margin: 0;
    }
}

@media (max-width: 768px) {
    .post-detail-actions .label,
    .post-detail-actions .bookmark-label,
    .post-detail-actions .reaction-add-label,
    .gist-detail-actions .label,
    .gist-detail-actions .bookmark-label,
    .gist-detail-actions .reaction-add-label,
    .project-detail-actions .label,
    .project-detail-actions .bookmark-label,
    .project-detail-actions .reaction-add-label {
        display: none;
    }
}

@media (max-width: 360px) {
    .comment-form {
        flex-wrap: wrap;
    }
    .comment-form > a {
        display: none;
    }
    .comment-form .mention-wrapper {
        flex: 1 1 100%;
    }
}

.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 1rem;
}

.page {
    max-width: var(--max-content);
    margin: 0 auto;
    padding: 1rem;
}

.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-muted);
    font-size: 0.9375rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
}

.icon {
    font-size: 1rem;
    width: 20px;
    text-align: center;
    flex-shrink: 0;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.back-link:hover {
    color: var(--text-primary);
}

.hint-text {
    color: var(--text-muted);
    font-size: 0.75rem;
}

.avatar-md { width: 40px; height: 40px; font-size: 1rem; }

.emoji-toggle-btn {
    padding: 0.5rem;
    color: var(--text-muted);
    font-size: 1.125rem;
    background: none;
    border: none;
    cursor: pointer;
}

.emoji-toggle-btn:hover {
    color: var(--text-primary);
}

body:has(.page-messages) {
    display: flex;
    flex-direction: column;
    height: 100dvh;
    overflow: hidden;
}

.page:has(.page-messages) {
    padding-top: 0.5rem;
    padding-bottom: 0;
    flex: 1 1 auto;
    min-height: 0;
    width: 100%;
    display: flex;
}


.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: var(--z-modal);
    align-items: center;
    justify-content: center;
}

.modal-overlay.visible {
    display: flex;
}

.topnav,
.topnav-mobile-overlay,
.topnav-mobile-panel,
.modal-overlay,
.dialog-overlay,
.context-menu,
.dp-toast-host,
.feed-fab,
.lightbox-overlay {
    will-change: transform;
}

@media (max-width: 480px) {
    .modal-card {
        margin: 0.5rem;
    }
}

@media (max-width: 360px) {
    .page {
        padding: 0.5rem;
    }

    .card {
        padding: 0.75rem;
    }
}

.breadcrumb {
    max-width: var(--max-content);
    margin: 0 auto;
    padding: 0.5rem 1rem;
    font-size: 0.8125rem;
}

.breadcrumb ol {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
}

.breadcrumb li {
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.breadcrumb li + li::before {
    content: "/";
    color: var(--text-muted);
    font-size: 0.75rem;
}

.breadcrumb a {
    color: var(--text-secondary);
}

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

.breadcrumb [aria-current="page"] {
    color: var(--text-muted);
}

.site-footer {
    border-top: 1px solid var(--border);
    margin-top: 2rem;
    padding: 1rem;
}
.footer-inner {
    max-width: var(--max-content);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8125rem;
}
.footer-copy {
    color: var(--text-muted);
}
.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
}
.footer-links a {
    color: var(--text-muted);
}
.footer-links a:hover {
    color: var(--text-primary);
}

.app-store-link {
    display: inline-flex;
    align-items: center;
    line-height: 0;
}

.app-store-badge {
    width: 120px;
    height: auto;
}

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

.skip-link {
    position: absolute;
    top: 0;
    left: 0;
    z-index: var(--z-modal);
    transform: translateY(-150%);
    padding: 0.75rem 1.25rem;
    background: var(--accent);
    color: var(--white);
    border-radius: 0 0 var(--radius-input) 0;
    font-weight: 600;
    text-decoration: none;
    transition: transform 0.15s ease;
}

.skip-link:focus {
    transform: translateY(0);
    outline: 2px solid var(--white);
    outline-offset: 2px;
}

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

[inert] {
    pointer-events: none;
}


@media (max-width: 1024px) {
    .topnav-links {
        display: none;
    }

    .topnav-tools-dropdown,
    .topnav-icon[href="/leaderboard"],
    .app-store-nav-link {
        display: none;
    }

    .topnav-hamburger {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .topnav-user-info {
        display: none;
    }

    .topnav-inner {
        gap: 0.5rem;
    }
}


@media (max-width: 1024px) {
    .breadcrumb {
        padding: 0.375rem 0.5rem;
        font-size: 0.75rem;
    }
}


@media (max-width: 1024px) {
    .page {
        padding: 0.5rem;
    }
}

@media (max-width: 480px) {
    .topnav-inner {
        padding: 0 0.5rem;
        gap: 0.25rem;
    }

    .topnav-logo {
        font-size: 1.125rem;
    }

    .topnav-right {
        gap: 0.375rem;
    }
}

@media (max-width: 360px) {
    .topnav-logo {
        font-size: 1rem;
    }

    .topnav-icon {
        font-size: 1.125rem;
        padding: 0.25rem;
    }
}

@media (hover: none) and (pointer: coarse) {
    .post-action-btn,
    .feed-nav-btn,
    .profile-tab,
    .sidebar-link,
    .topnav-link,
    .topnav-mobile-link,
    .dropdown-item,
    .btn,
    .comment-form-submit {
        min-height: 44px;
    }

    .topnav-icon,
    .emoji-toggle-btn {
        min-width: 44px;
        min-height: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .dropdown-item {
        display: flex;
        align-items: center;
    }

    .modal-card input,
    .modal-card textarea,
    .modal-card select {
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .post-detail-title {
        font-size: 1.25rem;
    }

    .post-detail-content {
        font-size: 0.875rem;
    }

    .comment-text {
        font-size: 0.8125rem;
    }

    .grid-2col {
        grid-template-columns: 1fr;
    }
}

.card-link-host {
    position: relative;
}

.card-link {
    position: absolute;
    inset: 0;
    z-index: 1;
}

.card-link-host a:not(.card-link),
.card-link-host button,
.card-link-host form,
.card-link-host label,
.card-link-host input,
.card-link-host select,
.card-link-host textarea,
.card-link-host summary {
    position: relative;
    z-index: 2;
}

.vote-star {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.vote-star::before {
    content: "\2606";
}

.vote-star.voted::before {
    content: "\2605";
}

.vote-star.voted {
    color: var(--warning);
    font-weight: 700;
}

[aria-disabled="true"],
.login-required {
    cursor: not-allowed;
    opacity: 0.55;
}

.response-time-indicator {
    position: fixed;
    left: 0.5rem;
    bottom: 0.5rem;
    z-index: 50;
    padding: 0.15rem 0.45rem;
    font-family: var(--font-mono);
    font-size: 0.6875rem;
    line-height: 1;
    color: var(--text-secondary);
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-input);
    opacity: 0.85;
    pointer-events: none;
    user-select: none;
}

.response-time-indicator:hover {
    opacity: 0.9;
}

@media (max-width: 768px) {
    .response-time-indicator {
        display: none;
    }
}

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


.maturity-gate {
    padding: var(--space-2xl);
    text-align: center;
    border: 1px dashed var(--border-light);
    border-radius: var(--radius);
    background: var(--bg-card);
    margin: var(--space-lg) 0;
}

.maturity-gate h3 {
    margin: 0 0 var(--space-md);
}

.maturity-gate p {
    color: var(--text-secondary);
    margin: 0 0 var(--space-lg);
}
