/* CSS Variables — 1899 prairie palette (sand, terracotta, saddle) */
:root {
    --sand: #D9D7C7;
    --sand-warm: #C3976A;
    --terracotta: #AC714A;
    --rust: #924A36;
    --saddle: #5B3A29;
    --saddle-dark: #3f281d;
    --saddle-darker: #2f1e16;

    --bg-1: var(--saddle-darker);
    --bg-2: var(--saddle-dark);
    --bg-3: var(--saddle);
    --panel-1-start: var(--rust);
    --panel-1-end: var(--terracotta);
    --leather-start: var(--saddle-dark);
    --leather-end: var(--saddle);
    --rust-start: var(--rust);
    --rust-end: var(--terracotta);
    --brass-start: var(--sand-warm);
    --brass-end: var(--sand);
    --accent: var(--sand-warm);
    --accent-dark: var(--rust);
    --accent-hover: var(--sand);
    --text-1: var(--sand);
    --text-2: #c9c5b5;
    --text-3: #a89a7a;
    --muted: #8a7358;
    --nav-bg: var(--sand);
    --nav-bg-active: var(--sand-warm);
    --nav-text: var(--saddle-dark);
    --nav-text-active: var(--saddle-darker);
    --border-warm: #724a38;
    --border-radius: 0px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --shadow: 0 4px 20px rgba(47, 30, 22, 0.5);
    --shadow-hover: 0 8px 30px rgba(47, 30, 22, 0.65);
    --shadow-btn: 0 4px 15px rgba(91, 58, 41, 0.45);
    --shadow-btn-hover: 0 6px 20px rgba(146, 74, 54, 0.5);
    --gradient-btn: linear-gradient(135deg, var(--leather-start), var(--leather-end));
    --gradient-btn-hover: linear-gradient(135deg, var(--rust-start), var(--rust-end));
    --gradient-btn-active: linear-gradient(135deg, var(--brass-start), var(--brass-end));
    --gradient-hero: linear-gradient(135deg, var(--saddle), var(--rust));
    --gradient-panel: linear-gradient(135deg, rgba(91, 58, 41, 0.9), rgba(146, 74, 54, 0.88));
    --angle: 12deg;
    --nav-height: 56px;
    --hero-header-height: 56px;
    --hero-banner-height: 44px;
    --hero-banner-title: 1.75rem;
    --hero-banner-margin-x: 20px;
    --hero-header-gap: 12px;
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', Arial, sans-serif;
    background: var(--bg-1);
    color: var(--text-1);
    line-height: 1.6;
    overflow-x: hidden;
    background-image: url('../images/rvrp-background2.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(47, 30, 22, 0.72);
    z-index: -1;
    pointer-events: none;
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Top Navigation Bar — NoPixel-style layout */
.top-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--nav-height);
    background: var(--bg-1);
    border-bottom: 1px solid var(--border-warm);
    z-index: 1000;
    display: flex;
    align-items: center;
}

.nav-container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    gap: 32px;
    height: 100%;
}

.nav-brand {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    text-decoration: none;
}

.site-logo {
    height: 40px;
    width: auto;
    max-width: 200px;
    object-fit: contain;
    display: block;
}

.site-logo--footer {
    height: 44px;
    max-width: 180px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 0;
}

.nav-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.85rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    text-decoration: none;
    color: white;
    white-space: nowrap;
    padding: 6px 14px;
    height: 32px;
    border: none;
    border-radius: 4px;
    background: var(--gradient-btn);
    box-shadow: var(--shadow-btn);
    transition: var(--transition);
    line-height: 1;
    cursor: pointer;
}

.nav-link:hover {
    background: var(--gradient-btn-hover);
    color: white;
    transform: translateY(-1px);
    box-shadow: var(--shadow-btn-hover);
}

.nav-link.active {
    background: var(--gradient-btn-active);
    color: white;
    box-shadow: var(--shadow-btn-hover);
}

.nav-user {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    margin-left: auto;
}

.nav-guest {
    display: flex;
    align-items: center;
    gap: 20px;
}

.nav-guest[hidden],
.nav-account[hidden],
.auth-logged-in[hidden],
.auth-guest[hidden] {
    display: none !important;
}

/* Guest auth links — minimal icon + text (no button boxes) */
.nav-auth-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 4px 2px;
    background: none;
    border: none;
    border-radius: 0;
    box-shadow: none;
    text-decoration: none;
    color: #f0ece4;
    font-weight: 500;
    font-size: 0.95rem;
    letter-spacing: 0;
    text-transform: none;
    white-space: nowrap;
    line-height: 1;
    transition: color 0.2s ease, opacity 0.2s ease;
    cursor: pointer;
}

.nav-auth-btn svg {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    color: currentColor;
    stroke-width: 1.75;
}

.nav-auth-btn span {
    line-height: 1;
}

.nav-auth-btn:hover {
    color: #ffffff;
    background: none;
    border: none;
    box-shadow: none;
    transform: none;
    opacity: 1;
}

.nav-auth-btn:active {
    opacity: 0.85;
    background: none;
    transform: none;
}

.nav-account {
    display: flex;
    align-items: center;
    gap: 16px;
}

.nav-profile {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text-1);
    padding: 4px 8px 4px 4px;
    border-radius: 4px;
    transition: var(--transition);
    max-width: 200px;
}

.nav-profile:hover {
    background: rgba(91, 58, 41, 0.35);
}

.nav-avatar-wrap {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    position: relative;
    border-radius: 50%;
    overflow: hidden;
    background: var(--gradient-btn-active);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--border-warm);
}

.nav-avatar {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.nav-avatar-fallback {
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--saddle-darker);
    line-height: 1;
}

.nav-display-name {
    font-weight: 600;
    font-size: 0.85rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nav-icon-btn {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    color: var(--text-2);
    text-decoration: none;
    border-radius: 4px;
    transition: var(--transition);
}

.nav-icon-btn:hover {
    color: var(--accent);
    background: rgba(91, 58, 41, 0.35);
}

.nav-icon-btn.active {
    color: var(--accent);
    background: rgba(91, 58, 41, 0.45);
}

.nav-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    background: var(--accent);
    color: var(--saddle-darker);
    font-size: 0.65rem;
    font-weight: 800;
    line-height: 16px;
    text-align: center;
    border-radius: 8px;
    pointer-events: none;
}

/* Header — mobile responsive */
@media (max-width: 1024px) {
    .nav-container {
        gap: 16px;
        padding: 0 16px;
    }

    .nav-links {
        gap: 8px;
    }

    .nav-link {
        font-size: 0.72rem;
    }
}

@media (max-width: 768px) {
    :root {
        --nav-height: 52px;
    }

    .top-nav {
        height: var(--nav-height);
    }

    .nav-container {
        gap: 12px;
        padding: 0 12px;
        align-items: center;
    }

    .nav-brand,
    .nav-links,
    .nav-user,
    .nav-guest,
    .nav-account {
        align-items: center;
    }

    .nav-links {
        gap: 6px;
        overflow-x: auto;
        scrollbar-width: none;
        -ms-overflow-style: none;
        align-self: center;
    }

    .nav-links::-webkit-scrollbar {
        display: none;
    }

    .nav-link {
        font-size: 0.68rem;
        flex-shrink: 0;
        height: 30px;
        padding: 4px 10px;
    }

    .nav-display-name {
        display: none;
    }

    .nav-account {
        gap: 8px;
    }

    .site-logo {
        height: 34px;
        max-width: 140px;
    }

    .nav-auth-btn {
        font-size: 0.8rem;
        gap: 8px;
        padding: 4px 2px;
    }

    .nav-auth-btn svg {
        width: 18px;
        height: 18px;
    }

    /* Mobile: hide guest auth in header — log in via Forums page */
    .nav-user {
        display: none !important;
    }

    body[data-auth="member"] .nav-user {
        display: flex !important;
    }

    .nav-avatar-wrap {
        width: 32px;
        height: 32px;
    }

    .nav-icon-btn {
        width: 32px;
        height: 32px;
    }
}

@media (max-width: 480px) {
    .nav-links {
        gap: 5px;
    }

    .nav-link {
        font-size: 0.62rem;
        letter-spacing: 0.04em;
        height: 28px;
        padding: 4px 8px;
    }

    .nav-auth-btn {
        font-size: 0.75rem;
        gap: 6px;
    }

    .nav-auth-btn svg {
        width: 16px;
        height: 16px;
    }

    .nav-guest {
        gap: 10px;
    }

    .nav-avatar-wrap {
        width: 30px;
        height: 30px;
    }

    .nav-icon-btn {
        width: 30px;
        height: 30px;
    }

    .site-logo {
        height: 30px;
        max-width: 120px;
    }
}

/* Mobile Spacer Banner — deprecated; hero uses --nav-height offset instead */
.mobile-spacer-banner {
    display: none !important;
}

.mobile-spacer-content {
    width: 100%;
    height: 100%;
    background: transparent;
}

/* Hero Header — shared page banner sizing (home, rules, forums, store) */
.hero-header {
    position: relative;
    width: 100%;
    height: var(--hero-header-height);
    min-height: var(--hero-header-height);
    margin-top: calc(var(--nav-height) + var(--hero-header-gap));
    margin-bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    z-index: 10;
    background: transparent;
}

.hero-banner {
    background: var(--gradient-hero);
    width: calc(100% - (var(--hero-banner-margin-x) * 2));
    max-width: 1400px;
    height: var(--hero-banner-height);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    margin: 0 var(--hero-banner-margin-x);
    border-radius: 8px;
    backdrop-filter: blur(15px);
    border: 1px solid var(--border-warm);
    box-shadow: var(--shadow-btn-hover);
    clip-path: polygon(0 0, calc(100% - 20px) 0, 100% 50%, calc(100% - 20px) 100%, 0 100%);
    z-index: 11;
}

.hero-banner h1 {
    font-size: var(--hero-banner-title);
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-1);
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    margin: 0;
    line-height: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 95%;
}

@media (max-width: 1024px) {
    :root {
        --hero-header-height: 52px;
        --hero-banner-height: 40px;
        --hero-banner-title: 1.5rem;
        --hero-banner-margin-x: 15px;
    }
}

@media (max-width: 768px) {
    :root {
        --hero-header-height: 50px;
        --hero-banner-height: 40px;
        --hero-banner-title: 1.2rem;
        --hero-banner-margin-x: 10px;
        --hero-header-gap: 10px;
    }

    .hero-header {
        margin-bottom: 16px;
    }

    .hero-banner {
        border-radius: 8px;
        clip-path: none;
    }
}

@media (max-width: 480px) {
    :root {
        --hero-header-height: 44px;
        --hero-banner-height: 36px;
        --hero-banner-title: 1rem;
        --hero-banner-margin-x: 8px;
        --hero-header-gap: 8px;
    }
}

@media (max-width: 360px) {
    :root {
        --hero-header-height: 40px;
        --hero-banner-height: 32px;
        --hero-banner-title: 0.9rem;
        --hero-banner-margin-x: 6px;
    }
}


/* Main Container */
.main-container {
    display: flex;
    flex: 1;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    margin-top: 5px;
    flex-direction: column;
}

/* Rules page specific layout */
.main-container.rules-page {
    flex-direction: row;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
}

/* Left Navigation */
.left-nav {
    width: 350px;
    padding: 40px 0;
    position: sticky;
    top: 130px;
    height: fit-content;
    z-index: 50;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 16px 20px;
    margin-bottom: 8px;
    background: var(--gradient-btn);
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    clip-path: polygon(0 0, calc(100% - 30px) 0, 100% 50%, calc(100% - 30px) 100%, 0 100%);
    border-left: 6px solid transparent;
    box-shadow: var(--shadow-btn);
    height: 80px;
    min-height: 80px;
    max-height: 80px;
}

.nav-item:hover {
    background: var(--gradient-btn-hover);
    transform: translateX(8px);
    box-shadow: var(--shadow-btn-hover);
    border-left-color: var(--rust-end);
}

.nav-item.active {
    background: var(--gradient-btn-active);
    border-left-color: var(--accent);
    box-shadow: var(--shadow-btn-hover);
    transform: translateX(10px);
}

.nav-icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(91, 58, 41, 0.35);
    border-radius: 6px;
    margin-right: 16px;
    flex-shrink: 0;
}

.nav-icon svg {
    color: var(--nav-text);
    transition: var(--transition);
}

.nav-item.active .nav-icon svg {
    color: var(--nav-text-active);
}

.nav-content h3 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 2px;
    color: white;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
}

.nav-content p {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
}

.nav-item.active .nav-content h3 {
    color: white;
    font-weight: 800;
}

.nav-item.active .nav-content p {
    color: rgba(255, 255, 255, 0.9);
    opacity: 1;
}

.nav-item:hover .nav-content h3 {
    color: white;
    font-weight: 800;
}

.nav-item:hover .nav-content p {
    color: rgba(255, 255, 255, 0.9);
    opacity: 1;
}

/* Content Area */
.content-area {
    flex: 1;
    padding: 40px 0 40px 40px;
    position: relative;
    margin-top: 10px;
    min-width: 0; /* Allow flex item to shrink below content size */
    display: block;
    width: 100%;
}

.rule-section {
    display: none;
    animation: fadeIn 0.5s ease-in-out;
    width: 100%;
}

.rule-section.active {
    display: block;
    width: 100%;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Rule Panels */
.rule-panel {
    background: transparent;
    padding: 0;
    box-shadow: none;
    position: relative;
    clip-path: none;
    margin-bottom: 20px;
    width: 100%;
    display: block;
}

.panel-header {
    background: var(--gradient-panel);
    padding: 30px 40px;
    margin-bottom: 30px;
    border: 1px solid var(--border-warm);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.7);
    position: relative;
    clip-path: polygon(0 0, calc(100% - 30px) 0, 100% 50%, calc(100% - 30px) 100%, 0 100%);
    display: flex;
    align-items: center;
    backdrop-filter: blur(15px);
}

.panel-icon {
    width: 72px;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(91, 58, 41, 0.4);
    border-radius: 6px;
    margin-right: 20px;
    flex-shrink: 0;
}

.panel-icon svg {
    color: var(--accent);
}

.panel-header h2 {
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--text-1);
}

.panel-content {
    color: var(--text-1);
    background: transparent;
    display: block;
    width: 100%;
    margin-bottom: 0;
}

.content-section {
    background: var(--gradient-panel);
    padding: 30px;
    margin-bottom: 20px;
    border: 1px solid var(--border-warm);
    box-shadow: var(--shadow);
    position: relative;
    clip-path: polygon(0 0, calc(100% - 20px) 0, 100% 50%, calc(100% - 20px) 100%, 0 100%);
    backdrop-filter: blur(15px);
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}


.content-section h3 {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: flex;
    align-items: center;
    gap: 12px;
}

.content-section h3::before {
    content: "★";
    font-size: 1.2rem;
    color: var(--accent);
}

.content-section p {
    font-size: 1rem;
    color: var(--text-2);
    margin-bottom: 16px;
    line-height: 1.7;
}

.content-section ul {
    list-style: none;
    padding-left: 0;
}

.content-section li {
    position: relative;
    padding-left: 24px;
    margin-bottom: 12px;
    color: var(--text-2);
    font-size: 1rem;
    line-height: 1.6;
}

.content-section li::before {
    content: "▶";
    position: absolute;
    left: 0;
    color: var(--accent);
    font-size: 0.8rem;
    top: 2px;
}

.content-section a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    border-bottom: 1px solid transparent;
}

.content-section a:hover {
    color: var(--accent-hover);
    border-bottom-color: var(--accent-hover);
    transform: translateY(-1px);
}

/* Callout Boxes */
.callout {
    background: rgba(91, 58, 41, 0.55);
    border-left: 4px solid var(--accent);
    padding: 20px;
    margin: 20px 0;
    border-radius: 0 8px 8px 0;
}

.callout h4 {
    color: var(--accent);
    font-weight: 600;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Regular Footer */
.footer {
    width: 100%;
    background: var(--bg-2);
    z-index: 100;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.3);
    margin-top: auto;
}

.footer-content {
    display: flex;
    align-items: center;
    padding: 15px 40px;
    max-width: 1400px;
    margin: 0 auto;
    min-height: 60px;
}

.footer-left {
    flex: 0 0 auto;
}

.footer-logo {
    display: flex;
    align-items: center;
}

.logo-purple {
    color: var(--accent);
}

.logo-white {
    color: var(--text-1);
}

.footer-center {
    flex: 1;
    text-align: center;
    padding: 0 20px;
    margin-left: 0;
}

.footer-text {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-1);
    margin: 0;
    line-height: 1.4;
}

.rainbow-text {
    background: linear-gradient(45deg, #924A36, #AC714A, #C3976A, #D9D7C7, #AC714A, #5B3A29);
    background-size: 300% 300%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: westernShimmer 4s ease-in-out infinite;
}

@keyframes westernShimmer {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.pink-purple-gradient {
    background: linear-gradient(45deg, #C3976A, #D9D7C7, #AC714A, #924A36, #5B3A29, #3f281d);
    background-size: 300% 300%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: westernShimmer 4s ease-in-out infinite;
}

.footer-right {
    flex: 0 0 auto;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
}

.footer-link-row {
    display: flex;
    flex-direction: row;
    gap: 20px;
    align-items: center;
}

.footer-link {
    color: var(--text-2);
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 600;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
}

.footer-link:hover {
    color: var(--accent);
    transform: translateX(4px);
}

.link-icon {
    font-size: 0.6rem;
    color: var(--text-2);
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 100px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--panel-1-start);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow);
    transition: var(--transition);
    z-index: 1000;
}

.back-to-top:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-btn-hover);
    background: var(--gradient-btn-active);
}

.back-to-top svg {
    color: var(--text-1);
}

.back-to-top.visible {
    display: flex;
}

/* Mobile Navigation Toggle */
.mobile-nav-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-1);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 8px;
    margin-left: 10px;
}

.mobile-nav-toggle:hover {
    color: var(--accent);
}

/* Mobile Navigation Overlay */
.mobile-nav-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(47, 30, 22, 0.88);
    z-index: 999;
}

.mobile-nav-overlay.active {
    display: block;
}

/* Desktop Layout Enforcement */
@media (min-width: 1025px) {
    .main-container.rules-page {
        flex-direction: row !important;
        display: flex !important;
    }
    
    .left-nav {
        width: 350px;
        position: sticky;
        top: 130px;
        flex-shrink: 0;
    }
    
    .content-area {
        flex: 1;
        display: block !important;
        padding: 40px 0 40px 40px;
    }
    
    .rule-section {
        width: 100%;
    }
    
    .rule-section.active {
        display: block !important;
        width: 100%;
    }
    
    .rule-panel {
        width: 100%;
        display: block;
    }
    
    .panel-content {
        display: block;
        width: 100%;
    }
}

/* Responsive Design */
@media (max-width: 1024px) {
    .main-container {
        flex-direction: column;
        padding: 0 15px;
        flex: 1;
    }
    
    .left-nav {
        width: 100%;
        padding: 20px 0;
        position: static;
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 12px;
        padding-bottom: 20px;
        overflow-x: visible;
    }
    
    .nav-item {
        width: 100%;
        min-width: auto;
        flex-shrink: 0;
        margin-bottom: 0;
        height: 70px;
        min-height: 70px;
        max-height: 70px;
        padding: 12px 16px;
    }
    
    .content-area {
        padding: 0;
        width: 100%;
        display: block !important;
    }
    
    .rule-section {
        display: none;
    }
    
    .rule-section.active {
        display: block !important;
    }
    
    .nav-container {
        padding: 0 15px;
    }
    
    .main-container {
        margin-top: 20px;
    }
    
    .content-area {
        margin-top: 5px;
    }
    
    .footer-content {
        padding: 15px 20px;
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .footer-center {
        margin-left: 0;
    }
    
    .footer-links {
        flex-direction: column;
        gap: 10px;
        justify-content: center;
    }
    
    .footer-link-row {
        flex-direction: column;
        gap: 8px;
    }
    
    .footer-text {
        font-size: 0.8rem;
    }
}

@media (max-width: 768px) {
    .rule-panel {
        padding: 0;
        margin-bottom: 16px;
    }
    
    .panel-header {
        padding: 24px 30px;
        clip-path: polygon(0 0, calc(100% - 20px) 0, 100% 50%, calc(100% - 20px) 100%, 0 100%);
    }
    
    .content-section {
        padding: 24px;
        margin-bottom: 16px;
        clip-path: polygon(0 0, calc(100% - 15px) 0, 100% 50%, calc(100% - 15px) 100%, 0 100%);
    }
    
    .panel-header {
        flex-direction: column;
        text-align: center;
        margin-bottom: 20px;
    }
    
    .panel-icon {
        margin-right: 0;
        margin-bottom: 16px;
    }
    
    .panel-header h2 {
        font-size: 1.5rem;
    }
    
    .left-nav {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
        padding: 15px 0;
    }
    
    .nav-item {
        height: 55px;
        min-height: 55px;
        max-height: 55px;
    }
    
    .nav-icon {
        width: 28px;
        height: 28px;
    }
    
    .nav-icon img {
        width: 20px;
        height: 20px;
    }
    
    .nav-item {
        width: 100%;
        min-width: auto;
        padding: 12px 16px;
        height: 65px;
        min-height: 65px;
        max-height: 65px;
    }
    
    .nav-content h3 {
        font-size: 0.9rem;
    }
    
    .nav-content p {
        font-size: 0.7rem;
    }
    
    .site-logo {
        height: 44px;
        max-width: 180px;
    }

    .site-logo--footer {
        height: 38px;
        max-width: 160px;
    }
}

@media (max-width: 480px) {
    .main-container {
        margin-top: 15px;
        padding: 0 10px;
    }
    
    .content-area {
        margin-top: 0;
        padding: 0;
    }
    
    .rule-panel {
        padding: 0;
        clip-path: none;
        border-radius: none;
    }
    
    .panel-header {
        padding: 20px 24px;
        clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 50%, calc(100% - 10px) 100%, 0 100%);
    }
    
    .content-section {
        padding: 16px 12px;
        margin-bottom: 12px;
        clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 50%, calc(100% - 10px) 100%, 0 100%);
        width: 100%;
        max-width: none;
        box-sizing: border-box;
    }
    
    .content-section p {
        font-size: 0.95rem;
        line-height: 1.6;
        margin-bottom: 12px;
        word-spacing: 0.05em;
    }
    
    .content-section li {
        font-size: 0.9rem;
        line-height: 1.5;
        margin-bottom: 8px;
        padding-left: 18px;
    }
    
    .content-section h3 {
        font-size: 1.1rem;
        margin-bottom: 12px;
        line-height: 1.2;
    }
    
    .content-section h4 {
        font-size: 1rem;
        margin-bottom: 10px;
        line-height: 1.3;
    }
    
    .left-nav {
        grid-template-columns: repeat(2, 1fr);
        gap: 6px;
        padding: 10px 0;
    }
    
    .nav-item {
        height: 50px;
        min-height: 50px;
        max-height: 50px;
    }
    
    .nav-icon {
        width: 24px;
        height: 24px;
    }
    
    .nav-icon img {
        width: 18px;
        height: 18px;
    }
    
    .nav-item {
        height: 60px;
        min-height: 60px;
        max-height: 60px;
        padding: 10px 14px;
        width: 100%;
    }
    
    .nav-content h3 {
        font-size: 0.8rem;
    }
    
    .nav-content p {
        font-size: 0.6rem;
    }
    
    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
    }
    
    .footer-content {
        padding: 12px 15px;
        gap: 12px;
    }
    
    .footer-center {
        margin-left: 0;
    }
    
    .site-logo--footer {
        height: 36px;
        max-width: 150px;
    }
    
    .footer-text {
        font-size: 0.7rem;
    }
    
    .footer-links {
        gap: 8px;
    }
    
    .footer-link-row {
        gap: 6px;
    }
    
    .footer-link {
        font-size: 0.7rem;
    }
    
    .nav-container {
        padding: 0 10px;
    }
    
    .site-logo {
        height: 36px;
        max-width: 150px;
    }
}

/* Extra small mobile devices */
@media (max-width: 360px) {
    .main-container {
        padding: 0 5px;
    }
    
    .left-nav {
        padding: 8px 0;
        gap: 4px;
    }
    
    .nav-item {
        height: 55px;
        min-height: 55px;
        max-height: 55px;
        padding: 8px 12px;
    }
    
    .nav-content h3 {
        font-size: 0.75rem;
    }
    
    .nav-content p {
        font-size: 0.55rem;
    }
    
    .panel-header {
        padding: 16px 20px;
    }
    
    .content-section {
        padding: 12px 10px;
        margin-bottom: 10px;
        width: 100%;
        max-width: none;
        box-sizing: border-box;
    }
    
    .content-section p {
        font-size: 0.9rem;
        line-height: 1.5;
        margin-bottom: 10px;
        word-spacing: 0.02em;
    }
    
    .content-section li {
        font-size: 0.85rem;
        line-height: 1.4;
        margin-bottom: 6px;
        padding-left: 16px;
    }
    
    .content-section h3 {
        font-size: 1rem;
        margin-bottom: 10px;
        line-height: 1.1;
    }
    
    .content-section h4 {
        font-size: 0.95rem;
        margin-bottom: 8px;
        line-height: 1.2;
    }
    
    .nav-container {
        padding: 0 5px;
    }
    
    .site-logo {
        height: 32px;
        max-width: 130px;
    }
}

/* Mobile landscape orientation */
@media (max-width: 768px) and (orientation: landscape) {
    .left-nav {
        grid-template-columns: repeat(4, 1fr);
        gap: 8px;
    }
    
    .nav-item {
        height: 50px;
        min-height: 50px;
        max-height: 50px;
    }
    
    .nav-content h3 {
        font-size: 0.8rem;
    }
    
    .nav-content p {
        font-size: 0.6rem;
    }
}

/* Touch-friendly improvements for mobile */
@media (max-width: 768px) {
    /* Mobile Icon-Only Navigation */
    .left-nav {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 8px;
        padding: 20px 0;
        width: 100%;
        margin-bottom: 20px;
        margin-top: 20px;
    }
    
    /* Ensure main container is properly set up for mobile */
    .main-container.rules-page {
        flex-direction: column;
        width: 100%;
        max-width: none;
        margin: 20px auto 0 auto;
        padding: 0 15px;
        display: block;
    }
    
    /* Remove order properties to use natural document flow */
    .left-nav {
        order: unset;
    }
    
    .hero-header {
        order: unset;
    }
    
    .content-area {
        order: unset;
    }
    
    .nav-item {
        width: 100%;
        height: 60px;
        min-height: 60px;
        max-height: 60px;
        padding: 8px;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        border-radius: 8px;
        clip-path: none;
        margin-bottom: 0;
        touch-action: manipulation;
        position: relative;
    }
    
    /* Hide text on mobile, show only icons */
    .nav-content {
        display: none;
    }
    
    .nav-icon {
        width: 32px;
        height: 32px;
        margin: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        background: rgba(255, 255, 255, 0.1);
        border-radius: 6px;
    }
    
    .nav-icon img {
        width: 24px;
        height: 24px;
        object-fit: contain;
    }
    
    /* Active state for mobile icons */
    .nav-item.active {
        background: var(--gradient-btn-active);
        transform: none;
        box-shadow: var(--shadow-btn-hover);
    }
    
    .nav-item:hover {
        background: var(--gradient-btn-hover);
        transform: none;
        box-shadow: var(--shadow-btn-hover);
    }
    
    /* Tooltip for mobile navigation */
    .nav-item::after {
        content: attr(data-tooltip);
        position: absolute;
        bottom: -35px;
        left: 50%;
        transform: translateX(-50%);
        background: rgba(47, 30, 22, 0.92);
        color: var(--text-1);
        padding: 4px 8px;
        border-radius: 4px;
        font-size: 0.7rem;
        white-space: nowrap;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.3s ease;
        border: 1px solid var(--border-warm);
        z-index: 1000;
    }
    
    .nav-item:hover::after,
    .nav-item:focus::after {
        opacity: 1;
    }
    
    .nav-link,
    .nav-icon-btn,
    .nav-auth-btn {
        min-height: 44px;
        touch-action: manipulation;
    }
    
    .back-to-top {
        min-width: 44px;
        min-height: 44px;
        touch-action: manipulation;
    }
    
    /* Improve text readability on mobile */
    .content-section p {
        font-size: 1rem;
        line-height: 1.6;
    }
    
    .content-section li {
        font-size: 0.95rem;
        line-height: 1.5;
    }
    
    .content-section h3 {
        font-size: 1.2rem;
        margin-bottom: 12px;
    }
    
    .content-section h4 {
        font-size: 1.1rem;
        margin-bottom: 10px;
    }
    
    /* Improve mobile scrolling and spacing */
    .main-container {
        padding-bottom: 20px;
    }
    
    /* Better mobile content spacing */
    .panel-content {
        margin-bottom: 0;
    }
    
    /* Ensure proper mobile viewport handling */
    .content-area {
        overflow-x: hidden;
        word-wrap: break-word;
        padding: 20px 0;
        margin-top: 0;
        width: 100%;
        min-width: 0;
        display: block !important;
    }
    
    /* Ensure rule sections are visible on mobile */
    .rule-section {
        display: none;
        width: 100%;
    }
    
    .rule-section.active {
        display: block !important;
        width: 100%;
    }
    
    /* Improve mobile link accessibility */
    .content-section a {
        font-size: 1rem;
        padding: 2px 4px;
        border-radius: 3px;
        display: inline-block;
        min-height: 44px;
        line-height: 40px;
    }
    
    /* Prevent content squishing on mobile */
    .content-section {
        padding: 20px 16px;
        margin-bottom: 16px;
        width: 100%;
        max-width: none;
        box-sizing: border-box;
    }
    
    .content-section p {
        font-size: 1rem;
        line-height: 1.7;
        margin-bottom: 14px;
        word-spacing: 0.1em;
    }
    
    .content-section li {
        font-size: 0.95rem;
        line-height: 1.6;
        margin-bottom: 10px;
        padding-left: 20px;
    }
    
    .content-section h3 {
        font-size: 1.3rem;
        margin-bottom: 14px;
        line-height: 1.3;
    }
    
    .content-section h4 {
        font-size: 1.1rem;
        margin-bottom: 12px;
        line-height: 1.4;
    }
    
    /* Better mobile content flow */
    .panel-content {
        width: 100%;
        max-width: none;
        display: block !important;
    }
    
    .rule-panel {
        width: 100%;
        max-width: none;
        display: block !important;
    }
    
    /* Ensure panel header is visible */
    .panel-header {
        display: flex !important;
        width: 100%;
        margin-bottom: 20px;
    }
    
    /* Ensure content sections are visible */
    .content-section {
        display: block !important;
        width: 100%;
        margin-bottom: 20px;
    }
    
    /* Better mobile text flow */
    .content-section p,
    .content-section li {
        max-width: none;
        width: 100%;
    }
    
    /* Improve mobile bullet points */
    .content-section li::before {
        font-size: 0.7rem;
        top: 1px;
    }
}

/* Focus States for Accessibility */
.nav-item:focus,
.back-to-top:focus,
.nav-link:focus,
.nav-icon-btn:focus,
.nav-auth-btn:focus,
.nav-profile:focus {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* Print Styles */
@media print {
    .left-nav,
    .back-to-top,
    .top-nav {
        display: none;
    }
    
    .content-area {
        padding: 0;
    }
    
    .rule-section {
        display: block !important;
        page-break-inside: avoid;
    }
    
    .rule-panel {
        box-shadow: none;
        border: 1px solid #ccc;
        clip-path: none;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    :root {
        --text-1: #FFFFFF;
        --text-2: #FFFFFF;
        --muted: #CCCCCC;
        --nav-bg: #FFFFFF;
        --nav-text: #000000;
    }
    
    .nav-item {
        border: 2px solid var(--accent);
    }
    
    .nav-item.active {
        background: var(--accent);
        color: var(--nav-text-active);
    }
}

/* Dark Mode Intensity Toggle Support */
body.light-intensity {
    --bg-1: #3f281d;
    --bg-2: #5B3A29;
    --panel-1-start: #924A36;
    --panel-1-end: #AC714A;
}

body.dark-intensity {
    --bg-1: #2f1e16;
    --bg-2: #3f281d;
    --panel-1-start: #5B3A29;
    --panel-1-end: #924A36;
}

/* Construction Page Styles */
.main-container.store-page {
    justify-content: center;
    align-items: center;
    padding: 0;
    max-width: none;
    flex: 1;
}

.construction-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
    padding: 2rem;
    text-align: center;
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
}

.construction-image {
    margin-bottom: 2rem;
    animation: float 3s ease-in-out infinite;
}

.construction-image img {
    width: 300px;
    height: 300px;
    object-fit: contain;
    filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.3));
}

.construction-content {
    max-width: 600px;
    margin: 0 auto;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.construction-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, var(--panel-1-start), var(--panel-1-end));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.construction-content h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--accent);
}

.construction-content h4 {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 1.5rem 0 1rem 0;
    color: var(--text-1);
}

.construction-content p {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    color: var(--text-2);
    line-height: 1.7;
}

.construction-content ul {
    text-align: center;
    margin: 1rem auto;
    padding: 0;
    list-style: none;
    max-width: 500px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.construction-content li {
    margin-bottom: 0.5rem;
    color: var(--text-2);
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.construction-content li::before {
    content: "•";
    color: var(--accent);
    font-weight: bold;
    margin-right: 0.5rem;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* Responsive adjustments for construction page */
@media (max-width: 768px) {
    .construction-image img {
        width: 250px;
        height: 250px;
    }
    
    .construction-title {
        font-size: 2rem;
    }
    
    .construction-content {
        padding: 0 1rem;
    }
}

/* Home Page Styles */
.home-page {
    padding-top: 0;
}

.main-container.home-page {
    margin-top: 0;
    flex: 1;
    padding-top: 0;
}

.home-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    flex: 1;
    padding: 0.75rem 2rem 2rem;
    text-align: center;
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    min-height: 0;
}

.home-logo {
    margin-bottom: 1rem;
    animation: float 3s ease-in-out infinite;
    flex-shrink: 0;
    line-height: 0;
}

.home-logo-image {
    width: 450px;
    max-width: 100%;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.3));
}

.home-content {
    max-width: 600px;
    margin: 0 auto;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.home-content h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-top: 0;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, var(--panel-1-start), var(--panel-1-end));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.home-content p {
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 2rem;
    color: var(--text-2);
    max-width: 500px;
}

.home-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}

.home-content-btn {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: var(--transition);
    border: none;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    cursor: pointer;
}

.home-content-btn.primary {
    background: var(--gradient-btn);
    color: white;
    box-shadow: var(--shadow-btn);
}

.home-content-btn.primary:hover {
    background: var(--gradient-btn-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-btn-hover);
}

.home-content-btn.secondary {
    background: var(--gradient-btn);
    color: white;
    box-shadow: var(--shadow-btn);
}

.home-content-btn.secondary:hover {
    background: var(--gradient-btn-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-btn-hover);
}

/* Responsive Design for Home Page */
@media (max-width: 768px) {
    .home-container {
        padding: 1rem;
        flex: 1;
    }
    
    .home-logo-image {
        width: 320px;
        max-width: 100%;
        height: auto;
    }
    
    .home-content h2 {
        font-size: 1.5rem;
    }
    
    .home-content p {
        font-size: 1rem;
    }
    
    .home-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .home-content-btn {
        width: 200px;
        text-align: center;
    }
}

/* Large screen adjustments for better centering */
@media (min-width: 1920px) {
    .home-container {
        padding: 3rem 2rem;
    }
    
    .home-logo {
        margin-bottom: 1.25rem;
    }
    
    .home-logo-image {
        width: 520px;
        max-width: 100%;
        height: auto;
    }
}

@media (min-width: 2560px) {
    .home-container {
        padding: 4rem 2rem;
    }
    
    .home-logo {
        margin-bottom: 1.5rem;
    }
    
    .home-logo-image {
        width: 600px;
        max-width: 100%;
        height: auto;
    }
}

/* ==========================================================================
   Forums Page
   ========================================================================== */

.forums-hero .forums-hero-banner {
    background: linear-gradient(135deg, var(--rust), var(--terracotta), var(--sand-warm));
    background-size: 200% 200%;
    animation: westernShimmer 6s ease-in-out infinite;
}

.main-container.forums-page {
    max-width: 1200px;
    padding-bottom: 3rem;
}

.forums-welcome {
    margin: 1.5rem 0 2rem;
}

.forums-welcome-inner {
    background: var(--gradient-panel);
    border: 1px solid var(--border-warm);
    padding: 2rem 2.5rem;
    text-align: center;
    clip-path: polygon(0 0, calc(100% - 24px) 0, 100% 50%, calc(100% - 24px) 100%, 0 100%);
    box-shadow: var(--shadow);
    backdrop-filter: blur(15px);
}

.forums-welcome-inner h2 {
    font-size: 1.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 0.75rem;
    background: linear-gradient(135deg, var(--sand), var(--sand-warm));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.forums-welcome-inner p {
    color: var(--text-2);
    font-size: 1.05rem;
    max-width: 640px;
    margin: 0 auto;
    line-height: 1.7;
}

.forums-layout {
    display: grid;
    grid-template-columns: 380px 1fr;
    gap: 2rem;
    align-items: start;
}

/* Auth Panel */
.forums-auth-panel {
    background: var(--gradient-panel);
    border: 1px solid var(--border-warm);
    box-shadow: var(--shadow-hover);
    clip-path: polygon(0 0, calc(100% - 20px) 0, 100% 50%, calc(100% - 20px) 100%, 0 100%);
    backdrop-filter: blur(15px);
    position: sticky;
    top: 130px;
}

.auth-tabs {
    display: flex;
    border-bottom: 2px solid var(--border-warm);
}

.auth-tab {
    flex: 1;
    padding: 1rem;
    background: transparent;
    border: none;
    color: var(--text-3);
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
}

.auth-tab:hover {
    color: var(--text-1);
    background: rgba(91, 58, 41, 0.3);
}

.auth-tab.active {
    color: var(--sand);
    background: rgba(146, 74, 54, 0.35);
}

.auth-tab.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--accent);
}

.auth-panel {
    display: none;
    padding: 1.75rem;
}

.auth-panel.active {
    display: block;
    animation: fadeIn 0.35s ease-in-out;
}

.auth-form .form-group {
    margin-bottom: 1.25rem;
}

.auth-form label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--accent);
    margin-bottom: 0.4rem;
}

.auth-form label .optional {
    font-weight: 400;
    text-transform: none;
    letter-spacing: normal;
    color: var(--text-3);
    font-size: 0.75rem;
}

.auth-form input[type="text"],
.auth-form input[type="email"],
.auth-form input[type="password"] {
    width: 100%;
    padding: 0.75rem 1rem;
    background: rgba(47, 30, 22, 0.6);
    border: 1px solid var(--border-warm);
    border-radius: 4px;
    color: var(--text-1);
    font-family: inherit;
    font-size: 0.95rem;
    transition: var(--transition);
}

.auth-form input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(195, 151, 106, 0.25);
}

.auth-form input::placeholder {
    color: var(--muted);
}

.password-field {
    position: relative;
}

.password-field input {
    padding-right: 2.75rem;
}

.password-toggle {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    background: none;
    border: none;
    color: var(--text-3);
    cursor: pointer;
    padding: 0.35rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    pointer-events: auto;
}

.password-toggle:hover {
    color: var(--accent);
}

.field-hint {
    display: block;
    font-size: 0.7rem;
    color: var(--muted);
    margin-top: 0.25rem;
}

.password-strength {
    margin-top: 0.5rem;
}

.password-strength .strength-bar {
    height: 4px;
    background: rgba(47, 30, 22, 0.8);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 0.25rem;
}

.password-strength .strength-bar span {
    display: block;
    height: 100%;
    width: 0;
    border-radius: 2px;
    transition: width 0.3s ease, background 0.3s ease;
}

.password-strength[data-level="weak"] .strength-bar span { background: #c0392b; width: 25% !important; }
.password-strength[data-level="fair"] .strength-bar span { background: #e67e22; width: 50% !important; }
.password-strength[data-level="good"] .strength-bar span { background: var(--sand-warm); width: 75% !important; }
.password-strength[data-level="strong"] .strength-bar span { background: #27ae60; width: 100% !important; }

.password-strength .strength-label {
    font-size: 0.7rem;
    color: var(--text-3);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.form-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-2);
    cursor: pointer;
    line-height: 1.4;
}

.checkbox-label input[type="checkbox"] {
    margin-top: 0.2rem;
    accent-color: var(--accent);
    flex-shrink: 0;
}

.consent-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.consent-group a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
}

.consent-group a:hover {
    text-decoration: underline;
}

.form-link {
    color: var(--accent);
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
}

.form-link:hover {
    color: var(--accent-hover);
    text-decoration: underline;
}

.auth-submit {
    width: 100%;
    padding: 0.85rem 1.5rem;
    background: var(--gradient-btn);
    border: none;
    border-radius: 4px;
    color: white;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    cursor: pointer;
    box-shadow: var(--shadow-btn);
    transition: var(--transition);
}

.auth-submit:hover {
    background: var(--gradient-btn-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-btn-hover);
}

.auth-submit:active {
    transform: translateY(0);
}

.auth-submit:disabled,
.auth-submit[data-loading="true"] {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.auth-submit--logout {
    background: rgba(47, 30, 22, 0.6);
    border: 1px solid var(--border-warm);
    margin-top: 0.5rem;
}

.auth-submit--logout:hover {
    background: rgba(146, 74, 54, 0.4);
}

/* Logged-in panel */
.auth-logged-in {
    padding: 1.75rem;
    animation: fadeIn 0.35s ease-in-out;
}

.logged-in-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.logged-in-avatar {
    width: 56px;
    height: 56px;
    flex-shrink: 0;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-btn-active);
    border-radius: 6px;
    overflow: hidden;
    box-shadow: var(--shadow-btn);
}

.logged-in-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.logged-in-avatar-fallback {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--saddle-darker);
    line-height: 1;
}

.avatar-upload {
    margin: 1rem 0 0.75rem;
}

.avatar-upload-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: rgba(91, 58, 41, 0.35);
    border: 1px solid var(--border-warm);
    border-radius: 4px;
    color: var(--text-1);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.avatar-upload-btn:hover {
    background: rgba(146, 74, 54, 0.45);
    color: #fff;
}

.avatar-upload-hint {
    margin-top: 0.5rem;
    font-size: 0.75rem;
    color: var(--text-3);
}

.logged-in-greeting {
    display: block;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-3);
    margin-bottom: 0.15rem;
}

.logged-in-info h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-1);
    margin-bottom: 0.15rem;
}

.logged-in-username {
    font-size: 0.85rem;
    color: var(--accent);
    font-weight: 600;
}

.logged-in-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
}

.role-badge {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 0.3rem 0.65rem;
    background: rgba(91, 58, 41, 0.5);
    border: 1px solid var(--border-warm);
    color: var(--sand-warm);
    border-radius: 4px;
}

.role-badge[data-role="admin"] {
    background: rgba(146, 74, 54, 0.6);
    color: var(--sand);
}

.role-badge[data-role="moderator"] {
    background: rgba(195, 151, 106, 0.25);
    color: var(--sand);
}

.member-since {
    font-size: 0.75rem;
    color: var(--muted);
}

.form-message {
    margin-top: 1rem;
    font-size: 0.85rem;
    text-align: center;
    min-height: 1.2em;
}

.form-message.error { color: #e74c3c; }
.form-message.success { color: #27ae60; }
.form-message.info { color: var(--accent); }

/* Auth panel footer — mobile login/register switch */
.auth-panel-footer {
    display: none;
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-warm);
    text-align: center;
}

.auth-panel-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 4px 2px;
    background: none;
    border: none;
    color: #f0ece4;
    font-family: inherit;
    font-weight: 500;
    font-size: 0.95rem;
    cursor: pointer;
    transition: color 0.2s ease;
}

.auth-panel-link:hover {
    color: #ffffff;
}

.auth-panel-link svg {
    flex-shrink: 0;
}

@media (max-width: 768px) {
    .auth-tabs {
        display: none;
    }

    .auth-panel-footer {
        display: block;
    }
}

/* Forum Categories */
.forums-main {
    min-width: 0;
}

.forums-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.25rem;
    gap: 1rem;
}

.forums-section-header h2 {
    font-size: 1.25rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-1);
}

.forums-badge {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 0.35rem 0.75rem;
    background: rgba(146, 74, 54, 0.5);
    border: 1px solid var(--border-warm);
    color: var(--sand-warm);
    border-radius: 4px;
}

.forum-categories {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.forum-category-card {
    display: flex;
    align-items: flex-start;
    gap: 1.25rem;
    padding: 1.25rem 1.5rem;
    background: var(--gradient-panel);
    border: 1px solid var(--border-warm);
    clip-path: polygon(0 0, calc(100% - 16px) 0, 100% 50%, calc(100% - 16px) 100%, 0 100%);
    box-shadow: var(--shadow);
    backdrop-filter: blur(15px);
    transition: var(--transition);
    cursor: default;
}

.forum-category-card:hover {
    transform: translateX(6px);
    box-shadow: var(--shadow-hover);
    border-color: var(--accent-dark);
}

.category-icon {
    width: 52px;
    height: 52px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(91, 58, 41, 0.45);
    border-radius: 6px;
    color: var(--accent);
}

.category-body h3 {
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-1);
    margin-bottom: 0.35rem;
}

.category-body p {
    font-size: 0.9rem;
    color: var(--text-2);
    line-height: 1.5;
    margin-bottom: 0.5rem;
}

.category-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.75rem;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* Stats Bar */
.forums-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-top: 2rem;
    padding: 1.5rem;
    background: var(--gradient-panel);
    border: 1px solid var(--border-warm);
    clip-path: polygon(0 0, calc(100% - 20px) 0, 100% 50%, calc(100% - 20px) 100%, 0 100%);
    box-shadow: var(--shadow);
}

.stat-item {
    text-align: center;
}

.stat-value {
    display: block;
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--accent);
    line-height: 1.2;
}

.stat-label {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-3);
}

/* Forums Responsive */
@media (max-width: 1024px) {
    .forums-layout {
        grid-template-columns: 1fr;
    }

    .forums-auth-panel {
        position: static;
    }
}

@media (max-width: 768px) {
    .forums-welcome-inner {
        padding: 1.5rem;
        clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 50%, calc(100% - 12px) 100%, 0 100%);
    }

    .forums-welcome-inner h2 {
        font-size: 1.35rem;
    }

    .forums-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .forum-category-card {
        clip-path: none;
        border-radius: 6px;
    }

    .forums-auth-panel {
        clip-path: none;
        border-radius: 6px;
    }
}

@media (max-width: 480px) {
    .auth-panel {
        padding: 1.25rem;
    }

    .stat-value {
        font-size: 1.4rem;
    }
}

/* ==========================================================================
   Direct Messages
   ========================================================================== */

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.dm-page {
    background: var(--bg-1);
}

.dm-hero {
    margin-top: var(--nav-height);
    min-height: 120px;
    background:
        linear-gradient(135deg, rgba(47, 30, 22, 0.88), rgba(91, 58, 41, 0.62)),
        linear-gradient(180deg, rgba(146, 74, 54, 0.35), rgba(47, 30, 22, 0.92)),
        var(--gradient-hero);
    border-bottom: 1px solid var(--border-warm);
    display: flex;
    align-items: center;
}

.dm-hero-inner {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 28px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.dm-hero-inner--center {
    justify-content: center;
}

.dm-hero-title {
    font-size: clamp(1.6rem, 4vw, 2.4rem);
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #fff;
    text-shadow:
        -1px -1px 0 rgba(0, 0, 0, 0.8),
        1px -1px 0 rgba(0, 0, 0, 0.8),
        -1px 1px 0 rgba(0, 0, 0, 0.8),
        1px 1px 0 rgba(0, 0, 0, 0.8),
        0 4px 16px rgba(0, 0, 0, 0.45);
    margin: 0;
}

.dm-hero-action {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 18px;
    background: var(--gradient-btn);
    border: 1px solid var(--border-warm);
    border-radius: 4px;
    color: #fff;
    font-weight: 700;
    font-size: 0.82rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-decoration: none;
    white-space: nowrap;
    box-shadow: var(--shadow-btn);
    transition: var(--transition);
}

.dm-hero-action:hover {
    background: var(--gradient-btn-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-btn-hover);
}

.dm-container {
    max-width: 1400px;
    padding-top: 1.5rem;
    padding-bottom: 3rem;
}

.dm-toolbar {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    margin-bottom: 1rem;
}

.dm-toolbar-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    background: rgba(91, 58, 41, 0.45);
    border: 1px solid var(--border-warm);
    border-radius: 4px;
    color: var(--text-1);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: var(--transition);
}

.dm-toolbar-btn:hover,
.dm-toolbar-btn.active {
    background: rgba(146, 74, 54, 0.55);
    color: #fff;
}

.dm-filter-wrap {
    position: relative;
}

.dm-filter {
    appearance: none;
    padding: 8px 36px 8px 14px;
    background: rgba(47, 30, 22, 0.85);
    border: 1px solid var(--border-warm);
    border-radius: 4px;
    color: var(--text-1);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23D9D7C7' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
}

.dm-inbox {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.dm-row {
    display: flex;
    align-items: stretch;
    background: rgba(47, 30, 22, 0.72);
    border: 1px solid var(--border-warm);
    border-radius: 8px;
    overflow: hidden;
    transition: var(--transition);
}

.dm-row:hover {
    border-color: var(--sand-warm);
    box-shadow: var(--shadow);
}

.dm-row--unread {
    border-color: var(--accent);
}

.dm-row-select {
    display: flex;
    align-items: center;
    padding: 0 12px;
    background: rgba(0, 0, 0, 0.15);
}

.dm-row-link {
    flex: 1;
    display: grid;
    grid-template-columns: 56px 1fr auto auto;
    gap: 16px;
    align-items: center;
    padding: 16px 18px;
    text-decoration: none;
    color: inherit;
}

.dm-row-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    overflow: hidden;
    background: linear-gradient(135deg, #5b8ea8, #3d6f8b);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.dm-row-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.dm-row-avatar-fallback {
    font-size: 1.2rem;
    font-weight: 800;
    color: #fff;
}

.dm-row-title {
    margin: 0 0 6px;
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
}

.dm-row-subtitle {
    margin: 0;
    font-size: 0.82rem;
    color: var(--text-3);
}

.dm-row-stats {
    display: flex;
    align-items: center;
    gap: 18px;
    min-width: 140px;
}

.dm-row-lock {
    color: var(--text-3);
    display: flex;
}

.dm-row-stat {
    text-align: center;
}

.dm-row-stat-label {
    display: block;
    font-size: 0.68rem;
    color: var(--text-3);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.dm-row-stat-value {
    display: block;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-1);
}

.dm-row-side {
    text-align: right;
    min-width: 110px;
}

.dm-row-date {
    display: block;
    font-size: 0.82rem;
    color: var(--text-2);
    margin-bottom: 4px;
}

.dm-row-sender {
    display: block;
    font-size: 0.82rem;
    color: var(--text-3);
}

.dm-empty,
.dm-guest-prompt {
    text-align: center;
    padding: 3rem 1.5rem;
    background: rgba(47, 30, 22, 0.55);
    border: 1px solid var(--border-warm);
    border-radius: 8px;
}

.dm-empty-link {
    color: var(--accent);
    font-weight: 600;
}

.dm-breadcrumb {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 1.25rem;
    font-size: 0.9rem;
}

.dm-breadcrumb-home,
.dm-breadcrumb-link {
    color: var(--text-2);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.dm-breadcrumb-link:hover,
.dm-breadcrumb-home:hover {
    color: var(--accent);
}

/* Compose page — match .hero-banner width exactly */
body[data-page="messages-compose"] .main-container.dm-container {
    max-width: none;
    width: 100%;
    padding: 1.5rem 0 3rem;
}

body[data-page="messages-compose"] .dm-breadcrumb,
body[data-page="messages-compose"] .dm-compose-form {
    width: calc(100% - (var(--hero-banner-margin-x) * 2));
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
}

body[data-page="messages-compose"] .dm-compose-form {
    padding: 2rem;
}

body[data-page="messages-compose"] .dm-editor-body,
body[data-page="messages-compose"] .dm-editor-preview-pane {
    min-height: 340px;
}

.dm-compose-form {
    background: rgba(47, 30, 22, 0.78);
    border: 1px solid var(--border-warm);
    border-radius: 8px;
    padding: 1.5rem;
}

.dm-form-group {
    margin-bottom: 1rem;
}

.dm-form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-2);
    font-size: 0.9rem;
    font-weight: 600;
}

.dm-form-group input[type="text"] {
    width: 100%;
    padding: 12px 14px;
    background: rgba(20, 12, 8, 0.75);
    border: 1px solid var(--border-warm);
    border-radius: 4px;
    color: var(--text-1);
    font-size: 0.95rem;
}

.dm-form-group input:focus {
    outline: 2px solid var(--accent);
    outline-offset: 1px;
}

.dm-recipients-field {
    position: relative;
}

.dm-field-hint {
    display: block;
    margin-top: 0.4rem;
    font-size: 0.8rem;
    color: var(--text-3);
}

.dm-user-suggestions {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    z-index: 100;
    max-height: 260px;
    overflow-y: auto;
    background: rgba(20, 12, 8, 0.98);
    border: 1px solid var(--border-warm);
    border-radius: 6px;
    box-shadow: var(--shadow-hover);
}

.dm-user-suggestions[hidden] {
    display: none !important;
}

.dm-suggestion-item {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    text-align: left;
    padding: 10px 14px;
    background: none;
    border: none;
    border-bottom: 1px solid rgba(114, 74, 56, 0.35);
    color: var(--text-1);
    cursor: pointer;
    transition: background 0.15s ease;
}

.dm-suggestion-item:last-child {
    border-bottom: none;
}

.dm-suggestion-item:hover,
.dm-suggestion-item.active {
    background: rgba(91, 58, 41, 0.55);
}

.dm-suggestion-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    background: linear-gradient(135deg, #5b8ea8, #3d6f8b);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 800;
    color: #fff;
}

.dm-suggestion-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.dm-suggestion-text {
    min-width: 0;
    line-height: 1.3;
}

.dm-suggestion-name {
    display: block;
    font-weight: 700;
    color: #fff;
}

.dm-suggestion-username {
    display: block;
    font-size: 0.82rem;
    color: var(--text-3);
}

.dm-suggestion-empty {
    padding: 12px 14px;
    color: var(--text-3);
    font-size: 0.88rem;
}

.dm-editor {
    width: 100%;
    margin: 1rem 0;
    border: 1px solid var(--border-warm);
    border-radius: 6px;
    overflow: hidden;
    background: rgba(20, 12, 8, 0.75);
}

.dm-editor-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
    padding: 8px;
    background: rgba(47, 30, 22, 0.9);
    border-bottom: 1px solid var(--border-warm);
}

.dm-editor-btn {
    min-width: 32px;
    height: 32px;
    padding: 0 8px;
    background: rgba(91, 58, 41, 0.35);
    border: 1px solid transparent;
    border-radius: 4px;
    color: var(--text-1);
    font-size: 0.82rem;
    cursor: pointer;
}

.dm-editor-btn:hover,
.dm-editor-btn.active {
    background: rgba(146, 74, 54, 0.55);
    border-color: var(--border-warm);
}

.dm-editor-divider {
    width: 1px;
    height: 24px;
    background: var(--border-warm);
    margin: 0 4px;
}

.dm-editor-preview {
    margin-left: auto;
}

.dm-editor-body,
.dm-editor-preview-pane {
    min-height: 220px;
    padding: 16px;
    color: var(--text-1);
    line-height: 1.6;
}

.dm-editor-body:empty::before {
    content: attr(data-placeholder);
    color: var(--text-3);
}

.dm-editor-body:focus {
    outline: none;
}

.dm-compose-options {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin: 1rem 0 1.5rem;
}

.dm-submit-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    max-width: 360px;
    margin: 0 auto;
    padding: 14px 24px;
    background: var(--gradient-btn);
    border: 1px solid var(--border-warm);
    border-radius: 4px;
    color: #fff;
    font-weight: 800;
    font-size: 0.9rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    cursor: pointer;
    box-shadow: var(--shadow-btn);
    transition: var(--transition);
}

.dm-submit-btn:hover:not(:disabled) {
    background: var(--gradient-btn-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-btn-hover);
}

.dm-submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.dm-submit-btn--inline {
    max-width: none;
    width: auto;
    margin-top: 0.75rem;
}

.dm-view-container {
    max-width: 960px;
}

.dm-view-header h1 {
    margin: 0 0 0.5rem;
    font-size: 1.6rem;
    color: #fff;
}

.dm-view-meta {
    color: var(--text-3);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

.dm-thread {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.dm-msg {
    display: flex;
    gap: 14px;
    padding: 1rem;
    background: rgba(47, 30, 22, 0.72);
    border: 1px solid var(--border-warm);
    border-radius: 8px;
}

.dm-msg-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    overflow: hidden;
    background: var(--gradient-btn-active);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.dm-msg-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.dm-msg-avatar-fallback {
    font-weight: 800;
    color: var(--saddle-darker);
}

.dm-msg-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 0.5rem;
    font-size: 0.88rem;
}

.dm-msg-header time {
    color: var(--text-3);
}

.dm-msg-content {
    color: var(--text-1);
    line-height: 1.6;
}

.dm-msg-content p {
    margin: 0 0 0.75rem;
}

.dm-reply-form textarea {
    width: 100%;
    padding: 12px 14px;
    background: rgba(20, 12, 8, 0.75);
    border: 1px solid var(--border-warm);
    border-radius: 4px;
    color: var(--text-1);
    font-family: inherit;
    resize: vertical;
}

.dm-locked-notice {
    text-align: center;
    padding: 1rem;
    color: var(--text-3);
    font-style: italic;
}

@media (max-width: 900px) {
    .dm-row-link {
        grid-template-columns: 48px 1fr;
        grid-template-rows: auto auto;
    }

    .dm-row-stats,
    .dm-row-side {
        grid-column: 2;
    }

    .dm-row-side {
        text-align: left;
    }

    .dm-hero-inner {
        flex-direction: column;
        align-items: flex-start;
    }

    .dm-hero-inner--center {
        align-items: center;
    }

    body[data-page="messages-compose"] .dm-compose-form {
        padding: 1.25rem 1rem;
    }

    body[data-page="messages-compose"] .dm-editor-body,
    body[data-page="messages-compose"] .dm-editor-preview-pane {
        min-height: 240px;
    }
}
