/* ========== BASE PAGE STYLES ========== */

  
.profile-button {
    background-color: #d98737;
    border: 1.5px solid #94592e;
    font-size: 1.5em; 
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 15px;
    padding: 10px;
    color: #94592e;
    width: 50px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  .dropdown-menu {
    display: none;
    position: absolute;
    right: 0;
    background-color: #f5e8d4;
    border: 1px solid #94592e;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    padding: 10px;
    z-index: 100;
    min-width: 120px;
  }
  
  .dropdown-menu a {
    display: block;
    padding: 5px;
    text-decoration: none;
    color: #1f1e1c;
    font-weight: bold;
  }
  
  .dropdown-menu a:hover {
    background-color: #d9b982;
  }
  
  .profile-dropdown:hover .dropdown-menu {
    display: block;
  }  


header {
    display: flex; 
    align-items: center; 
    justify-content: space-between; 
    padding: 0px 20px;
    box-sizing: border-box;
    background-color: #ebe3cd;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
    padding: 10px 0;
}

.header-left a {
    text-decoration: none;
    font-size: 1.2em;
    color: #1f1e1c;
    padding: 5px 10px;
    transition: all 0.3s ease;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.4);
}

.header-left a:hover {
    color: #fff;
    background-color: #94592e;
    border-radius: 5px;
}

.separator {
    color: #94592e;
    font-size: 1.5em;
}

.header-logo {
    height: 60px;
    width: auto;
    cursor: pointer;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.main-container {
    max-width: auto;
    margin: 120px auto 20px;
}

.main-container.flex-layout {
    display: flex;
}

.search-input-wrapper {
    position: relative;
    display: inline-block;
    width: 100%;
}

.search-bar {
    padding: 7px 35px 7px 7px;
    font-size: 1em;
    border: 1.5px solid #94592e;
    border-radius: 15px;
    background: #ebe3cd;
    width: 100%;
    box-sizing: border-box;
    direction: ltr;
    text-align: left;
    unicode-bidi: plaintext;
}

.search-clear-btn {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #94592e;
    transition: color 0.3s ease;
    font-size: 1.2em;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-clear-btn:hover {
    color: red;
}

.chat-search-wrapper {
    position: relative;
    z-index: 1002;
}

.mobile-search-toggle {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background-color: transparent;
    border: 1.5px solid #94592e;
    color: #94592e;
    display: none;
    align-items: center;
    justify-content: center;
}

.mobile-search-overlay {
    display: none;
}

@media (max-width: 545px) {
    .chat-search-wrapper {
        display: inline-flex;
        align-items: center;
        gap: 8px;
    }

    .chat-search-wrapper .search-input-wrapper {
        position: absolute;
        top: 50%;
        right: 0;
        transform: translateY(-50%);
        width: 0;
        opacity: 0;
        pointer-events: none;
        transition: width 0.25s ease, opacity 0.25s ease;
    }

    body.mobile-search-open .chat-search-wrapper .search-input-wrapper {
        position: relative;
        top: auto;
        right: auto;
        width: min(70vw, 360px);
        opacity: 1;
        pointer-events: auto;
        transform: none !important;
        z-index: 1102;
    }

    body.mobile-search-open .search-bar {
        display: block;
    }

    body.mobile-search-open .header-left-group .mobile-nav-icons {
        display: none !important;
    }

    body.mobile-search-open .mobile-search-overlay {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.2);
        z-index: 900;
    }

    body.mobile-search-open .mobile-search-toggle {
        display: none;
    }
}

.header-button {
    background-color: #d98737;
    border: 1.5px solid #94592e;
    font-size: 1.5em; 
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 15px;
    padding: 10px;
    color: #94592e;
    width: 50px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.more-options {
    font-size: 1.5em;
    background-color: #ebe3cd;
}

.header-button:hover {
    background-color: #ba8151;
}

.profile-button:hover {
    background-color: #ba8151;
}



/* NAVBAR BASE */
.custom-navbar {
    background-color: #ebe3cd;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
}

/* Desktop nav links */
.custom-nav-link {
    font-size: 1.2em;
    color: #1f1e1c;
    text-decoration: none;
    padding: 5px 15px;
    border-radius: 15px;
    transition: 0.3s;
}

.custom-nav-link:hover {
    background-color: #94592e;
    color: white;
    border-radius: 5px;
}

/* Hamburger */
.custom-toggler {
    background: none;
    border: none;
    font-size: 1.8em;
    color: #94592e;
}

/* Offcanvas */
.custom-offcanvas {
    background-color: #f5e8d4;
    border-left: 2px solid #94592e;
}

.offcanvas-link {
    display: block;
    padding: 12px;
    font-size: 1.2em;
    color: #1f1e1c;
    text-decoration: none;
    border-bottom: 1px solid #d9b982;
}

.offcanvas-link:hover {
    background-color: #d9b982;
}

.inbox-link {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.badge-unread {
    background-color: #155daac2;
    color: white;
    font-size: 11px;
    padding: 3px;
    border-radius:50%;
    margin-left: 6px;
    display: inline-block;
    min-width: 18px;
    height: 16px;
    line-height: 12px; /* aligne verticalement */
    text-align: center;
}

.notification-container {
    position: relative;
}

.notif-button {
    position: relative;
}

.notif-dot {
    position: absolute;
    bottom: -3px;
    right: -2px;
    width: 15px;
    height: 15px;
    background-color: #a4c29a; /* même bleu que ton badge */
    border-radius: 50%;
}

/* Mobile adjustments */
@media (max-width: 575px) {
    .custom-navbar .container-fluid {
        flex-wrap: nowrap;
        justify-content: space-between;
        gap: 6px;
        align-items: center;
        padding-left: 6px;
        padding-right: 6px;
    }

    .custom-navbar a {
        margin: 0 !important;
    }

    .header-spacer {
        display: none;
    }

    .header-left-group {
        display: flex;
        align-items: center;
        flex: 0 1 auto;
        min-width: 0;
    }

    #menu-container {
        display: flex;
        margin-left: auto;
        margin-right: 8px;
        flex: 0 0 auto;
        min-width: 0;
    }

    .header-logo {
        width: 40px;
        height: 40px;
        object-fit: contain;
    }

    .navbar-brand {
        width: 40px;
        height: 40px;
        margin-right: 0;
        padding: 0;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        flex: 0 0 auto;
    }
 
    .search-bar {
        display: block;
    }

    .post-art-button,
    .custom-nav-link {
        display: none;
    }

    .mobile-nav-icons {
        gap: 6px;
        width: auto;
        justify-content: flex-start;
        flex: 0 0 auto;
    }

    .mobile-shop-link {
        width: 40px;
        height: 40px;
        border-radius: 12px;
        background-color: transparent;
        border: 1.5px solid #94592e;
        color: #94592e;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        font-size: 1.2rem;
        transition: background-color 0.2s ease, color 0.2s ease;
        text-decoration: none;
    }

    .mobile-shop-link i {
        color: #94592e;
    }

    .mobile-shop-link:hover {
        background-color: #ba8151;
        color: #fff;
    }

    .mobile-shop-link:hover i {
        color: #fff;
    }

    .mobile-post-link {
        background-color: #d98737;
    }

    .mobile-post-link i {
        color: #fff;
    }

    #menu-container > .d-flex {
        gap: 6px !important;
        align-items: center;
        flex-wrap: nowrap;
        justify-content: flex-end;
        max-width: 100%;
    }

    #menu-container .chat-search-wrapper {
        display: inline-flex;
        align-items: center;
        position: relative;
        width: auto !important;
        min-width: 0;
        flex: 0 0 auto;
    }

    #menu-container .chat-search-wrapper .search-input-wrapper {
        position: absolute !important;
        top: 50%;
        right: 0;
        transform: translateY(-50%);
        width: 0 !important;
        min-width: 0 !important;
        opacity: 0;
        pointer-events: none;
    }

    body.mobile-search-open #menu-container .chat-search-wrapper .search-input-wrapper {
        width: min(70vw, 360px) !important;
        opacity: 1 !important;
        pointer-events: auto !important;
        z-index: 1102;
    }

    body.mobile-search-open #menu-container .chat-search-wrapper .search-bar {
        display: block !important;
        direction: ltr;
        text-align: left;
        unicode-bidi: plaintext;
    }

    .chat-search-wrapper,
    .notification-container,
    .profile-dropdown {
        flex: 0 0 auto;
    }

    .mobile-search-toggle,
    .header-button,
    .profile-button {
        width: 38px;
        height: 38px;
        border-radius: 12px;
        padding: 0;
        font-size: 1.1rem;
    }

    .post-art-button.mobile-post-art {
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
        padding: 10px;
        font-size: 1rem;
        height: 36px;
        white-space: nowrap;
    }

    .header-left-group {
        gap: 4px;
    }

    /* Horse detail page only: shift right header controls much more to the left */
    body.horse-page #menu-container {
        margin-right: 0 !important;
        transform: translateX(-128px);
    }
}

@media (max-width: 545px) {
    .mobile-search-toggle {
        display: inline-flex;
    }

    .search-bar {
        display: none;
    }
}



footer {
    text-align: center;
    padding: 20px;
    background-color: #ebd7b9;
    margin-top: auto;
}

footer p {
    margin: 0;
    font-size: 1em;
    color: #555;
}

.post-art-button {
    background-color: #d98737;
    color: white;
    border: solid 1px #94592e;
    padding: 5px 15px;
    cursor: pointer;
    border-radius: 15px;
    font-size: 1.2rem;
    font-family: 'Cinzel', serif;
    display: flex;
    flex-direction: column;
}


.post-art-button:hover {
    background-color: #94592e;
}


.notification-container {
    position: relative;
    display: inline-block;
}

.notification-dropdown {
    position: absolute;
    right: 0;
    top: 100%;
    margin-top: 6px;
    background-color: #ebe3cd;
    border: 1.5px solid #94592e;
    border-radius: 0 0 10px 10px;
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);
    width: 250px;
    max-height: 300px;
    overflow-y: auto;
    display: none;
}

.notification-container.open .notification-dropdown {
    display: block;
}

.notification-container.open .header-button {
    background-color: #ba8151;
    color: #fff;
}

.notification-dropdown ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.notification-dropdown li {
    padding: 10px;
    border-bottom: 1px solid #94592e;
    color: #1f1e1c;
    font-size: 14px;
}

.notification-dropdown li a {
    display: block;
    color: inherit;
    text-decoration: none;
}

.notification-dropdown li:not(.empty):hover {
    background-color: #e0c899;
    cursor: pointer;
}

.notification-dropdown li:last-child {
    border-bottom: none;
}

.notification-dropdown li.empty {
    text-align: center;
    color: #94592e;
    font-style: italic;
}

.notification-item {
    display: flex;
    align-items: center;
    gap: 6px;
    justify-content: space-between;
}

.notification-link {
    color: #94592e;
    font-weight: bold;
    text-decoration: none;
    background: transparent;
    border: none;
    padding: 0;
    text-align: left;
    width: 100%;
    white-space: normal;
    line-height: 1.2;
    font-size: 14px;
}

.notification-link:hover {
    color: #5a2e0f;
    text-decoration: underline;
}

.modal-beige {
    background-color: #f5ebd8 !important;
    border: 2px solid #ba8151;
    border-radius: 10px;
}

.notification-container:hover .notif-tooltip {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.notif-tooltip {
    display: none;
}

.profile-settings-btn {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none !important;
}

.profile-settings-modal .modal-dialog {
    max-width: 420px;
}

.profile-settings-content {
    overflow: hidden;
    transform: translateY(8px) scale(0.98);
    opacity: 0;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.profile-settings-modal.show .profile-settings-content {
    transform: translateY(0) scale(1);
    opacity: 1;
}

.profile-settings-item {
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: transform 0.15s ease, box-shadow 0.2s ease, filter 0.2s ease;
    box-shadow: inset 0 0 0 1px rgba(148, 89, 46, 0.2);
}

.profile-settings-item:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 6px 14px rgba(90, 46, 15, 0.2);
    filter: brightness(1.05);
}

.profile-settings-item:active:not(:disabled) {
    transform: translateY(0);
    box-shadow: 0 3px 8px rgba(90, 46, 15, 0.18);
}

.background-container {
    position: absolute;
    width: 100%;
    bottom: 0; /* Moves it to the bottom instead of the top */
    height: 100vh; /* Makes sure it fills the full height */
    overflow: hidden;
    z-index: -1;
    display: flex;
    justify-content: space-between;
    align-items: flex-end; /* Ensures backgrounds are "planted" at the bottom */
    opacity: 0.9;
}

.background-left,
.background-right {
    position: fixed;
    bottom: 0;
    width: 30%;
    z-index: -1;
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
    opacity: 0.6; /* tu peux ajuster */
}

.background-left {
    left: 0;
    background-image: url('/static/images/main_page_bg.svg');
}

.background-right {
    right: 0;
    background-image: url('/static/images/main_page_bg.svg');
    transform: scaleX(-1); /* effet miroir si tu veux */
}



/* ========== HOME PAGE STYLES ========== */

body {
    font-family: 'Cinzel', serif;
    margin: 0;
    padding: 0;
    background-color: #e7ddbf;
    color: #1f1e1c;
    overflow-x: hidden;
}



.gallery-title {
    font-size: 3.5em;
    font-family: 'Cinzel', serif;
    font-weight: bold;
    color: #1f1e1c;
    display: block;
    text-transform: uppercase;
    text-align: center;
}

.sidebar {
    width: 15%;
    min-width: 200px;
    margin: 5px;
    padding: 0 15px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.doc-card {
    background-color: #ebe3cd;
    border: 1.5px solid #94592e;
    border-radius: 10px;
    padding: 10px;
    text-decoration: none;
    margin-bottom: 15px;
    text-align: center;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    max-width: 200px;
    box-sizing: border-box;
    color: inherit;
    height: auto;
    box-shadow: inset 0 0 0 5px #e4d2b0;
}

@media (max-width: 900px) {
    .doc-card {
        width: 180px;
        max-width: 180px;
    }
}

.doc-card img {
    width: 100%;
    border-radius: 5px;
    margin-top: 10px;
}

.doc-card img.doc-card-image-small {
    height: 92px;
    object-fit: contain;
    background: #f5e8d4;
}

.doc-card p {
    margin-top: 10px;
    font-size: 0.7em;
    color: #ba8151;
}

.doc-card:hover {
    background-color: #e4d2b0;
    color: #1f1e1c;
}

.filter-menu {
    text-align: center;
    margin-top: 20px;
    margin-bottom: 20px;
    font-size: 1.2em;
    font-family: 'Cinzel', serif;
    display: flex;
    flex-direction: column;
}

.marketplace-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    justify-content: center;
    align-items: flex-end;
    padding: 16px 20px;
    margin: 20px auto;
    background: linear-gradient(180deg, #f5e8d4 0%, #e0d1ba 100%);
    border: 5px solid #e7d2b3;
    box-shadow: 0 0 0 1px #bb8f6b;
    border-radius: 12px;
    max-width: 900px;
}

.marketplace-filters .filter-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 200px;
}

.marketplace-filters label {
    font-weight: 600;
    color: #5a2e0f;
}

.marketplace-filters select {
    width: 100%;
    border-radius: 8px;
    border: 1.5px solid #bb8f6b;
    padding: 8px 10px;
    background: #fdf6e3;
    color: #1f1e1c;
}

.marketplace-card-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.marketplace-card-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 140px;
    font-weight: 600;
    color: #5a2e0f;
    background: rgba(245, 232, 212, 0.6);
    border-bottom: 1px solid #e7d2b3;
}

@media (max-width: 545px) {
    .marketplace-cards {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.65rem;
        padding: 8px 6px;
        margin: 0;
    }

    .marketplace-cards .marketplace-card {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0;
        margin: 0 !important;
        padding: 8px;
    }

    .marketplace-cards .card-img-fixed {
        height: 150px;
    }

    .marketplace-cards .card-body {
        padding: 0.55rem 0.45rem;
    }

    .marketplace-cards .card-title,
    .marketplace-cards .card-text {
        word-break: normal;
        overflow-wrap: break-word;
        hyphens: auto;
    }

    .marketplace-cards .card-title {
        font-size: 0.95rem;
        line-height: 1.2;
    }

    .marketplace-cards .card-text {
        font-size: 0.88rem;
        line-height: 1.25;
        margin-bottom: 0.25rem;
    }

    .marketplace-cards .btn {
        font-size: 0.84rem;
        padding: 0.35rem 0.5rem;
    }
}

.breed-page {
    max-width: 980px;
    margin: 24px auto 36px;
    padding: 0 12px;
}

.breed-card {
    background: #f5e8d4;
    border: 1.5px solid #94592e;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 6px 14px rgba(90, 46, 15, 0.12);
}

.breed-hero {
    position: relative;
    border-bottom: 1px solid #d4a373;
}

.breed-hero img {
    width: 100%;
    height: 260px;
    object-fit: cover;
    display: block;
}

.breed-hero-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: flex-end;
    padding: 16px;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.1) 45%, rgba(0, 0, 0, 0.5) 100%);
}

.breed-hero-overlay h1 {
    margin: 0;
    color: #fff;
    font-size: 2rem;
}

.breed-section {
    padding: 14px 18px;
    border-bottom: 1px solid #e1c8a2;
    text-align: left;
}

.breed-section:last-child {
    border-bottom: none;
}

.breed-section h2,
.breed-section h3 {
    color: #5a2e0f;
    margin: 0 0 8px;
}

.breed-section p {
    margin: 0 0 10px;
    color: #3f2a19;
    line-height: 1.5;
}

.breed-section p:last-child {
    margin-bottom: 0;
}

.guide-list {
    margin: 0 0 10px 18px;
    color: #3f2a19;
    padding: 0;
}

.guide-list li {
    margin-bottom: 6px;
    line-height: 1.45;
}

.guide-steps {
    margin-top: 4px;
}

.guide-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 12px;
}

.guide-note {
    margin-top: 8px !important;
    font-size: 0.9rem;
    color: #6c4b2d;
    font-style: italic;
}

.guide-subtitle {
    margin: 10px 0 6px;
    color: #7a4d28;
    font-size: 1rem;
}

.breed-figure {
    margin: 10px 0 2px;
    border: 1px solid #d8b98f;
    border-radius: 10px;
    overflow: hidden;
    background: #fff7ea;
}

.breed-figure img {
    width: 100%;
    max-height: 460px;
    object-fit: contain;
    display: block;
}

.breed-figure figcaption {
    padding: 8px 10px;
    font-size: 0.85rem;
    color: #6c4b2d;
    border-top: 1px solid #e7d2b3;
    background: #f8efdf;
}

.guide-figure-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 6px;
}

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

.guide-hub-card {
    display: block;
    text-decoration: none;
    background: #fff7ea;
    border: 1px solid #d8b98f;
    border-radius: 10px;
    padding: 12px;
    color: #3f2a19;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.guide-hub-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(90, 46, 15, 0.12);
}

.guide-hub-card h3 {
    margin: 0 0 6px;
    color: #5a2e0f;
    font-size: 1.02rem;
}

.guide-hub-card p {
    margin: 0;
    font-size: 0.92rem;
}

.guide-hub-list {
    border-top: 1px solid #d8b98f;
    border-bottom: 1px solid #d8b98f;
}

.guide-hub-row {
    display: block;
    padding: 12px 10px;
    text-decoration: none !important;
    color: #3f2a19 !important;
    border-top: 1px solid #e6cfad;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.guide-hub-row:first-child {
    border-top: none;
}

.guide-hub-row:hover,
.guide-hub-row:focus-visible {
    background: #f5e8d4;
    color: #5a2e0f !important;
}

.guide-hub-row h3 {
    margin: 0 0 4px;
    color: inherit !important;
    font-size: 2rem;
    line-height: 1.05;
}

.guide-hub-row p {
    margin: 0;
    color: inherit !important;
    font-size: 0.95rem;
}

.guide-item-row {
    display: grid;
    grid-template-columns: 70px 1fr;
    gap: 12px;
    align-items: start;
}

.guide-item-row img {
    width: 64px;
    height: 64px;
    object-fit: contain;
    border: 1px solid #d8b98f;
    border-radius: 8px;
    background: #fffaf2;
    padding: 6px;
}

.badge-guide-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 10px;
    margin-top: 10px;
}

.badge-guide-item {
    display: grid;
    grid-template-columns: 74px 1fr;
    gap: 10px;
    align-items: center;
    padding: 10px;
    border: 1px solid #d8b98f;
    border-radius: 10px;
    background: #fff7ea;
}

.badge-guide-icon {
    width: 64px;
    height: 64px;
    object-fit: contain;
}

.badge-guide-content h4 {
    margin: 0 0 4px;
    color: #5a2e0f;
    font-size: 1.02rem;
}

.badge-guide-content p {
    margin: 0;
    font-size: 0.9rem;
    color: #4b3725;
}

.badge-guide-item.locked .badge-guide-icon {
    filter: grayscale(1);
    opacity: 0.35;
}

.badge-guide-item.locked .badge-guide-content {
    opacity: 0.72;
}

@media (max-width: 545px) {
    .badge-guide-item {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .badge-guide-icon {
        margin: 0 auto;
    }

    .guide-hub-row h3 {
        font-size: 1.65rem;
    }

    .guide-item-row {
        grid-template-columns: 1fr;
    }

    .guide-item-row img {
        width: 72px;
        height: 72px;
    }
}

.farm-card {
    overflow: visible;
}

.farm-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.farm-panel {
    background: #fff7ea;
    border: 1px solid #d8b98f;
    border-radius: 10px;
    padding: 12px;
}

.farm-subpanel {
    margin-top: 8px;
    padding: 10px;
    border: 1px dashed #d4a373;
    border-radius: 8px;
    background: #fffdf9;
}

.farm-subtitle {
    margin: 10px 0 8px;
    color: #7a4d28;
}

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

.farm-grid-stats {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.farm-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 8px;
}

.farm-field label {
    color: #5a2e0f;
    font-weight: 600;
}

.farm-field input[type="text"],
.farm-field input[type="url"],
.farm-field input[type="number"],
.farm-field input[type="file"],
.farm-field select,
.farm-field textarea {
    border: 1px solid #c89666;
    border-radius: 8px;
    padding: 8px 10px;
    background: #fff;
}

.farm-art-link-wrap {
    display: flex;
    gap: 8px;
    align-items: center;
}

.farm-art-link-wrap input[type="url"] {
    flex: 1 1 auto;
    min-width: 0;
}

.farm-art-link-wrap .farm-link-art-btn {
    flex: 0 0 auto;
    white-space: nowrap;
}

.farm-art-preview {
    width: 100%;
    min-height: 120px;
    border: 1px solid #d8b98f;
    border-radius: 8px;
    background: #fffaf2;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.farm-art-preview img {
    width: 100%;
    max-height: 220px;
    object-fit: contain;
    display: block;
}

.farm-art-preview span {
    color: #7c5a38;
    font-size: 0.9rem;
}

.farm-gene-grid ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px 10px;
}

.farm-gene-grid li label {
    display: none;
    align-items: center;
    gap: 6px;
    font-weight: 500;
    color: #4a2d16;
}

.farm-errors {
    color: #a12a2a;
    margin: 6px 0;
    font-size: 0.9rem;
}

.farm-carousel-controls {
    display: flex;
    justify-content: flex-end;
    gap: 6px;
    margin-bottom: 8px;
}

.farm-carousel-track {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(190px, 220px);
    gap: 10px;
    overflow-x: auto;
    padding: 2px 2px 10px;
    scroll-snap-type: x mandatory;
}

.farm-select-card {
    display: block;
    border: 1px solid #cfa77a;
    border-radius: 10px;
    background: #fffaf2;
    padding: 8px;
    cursor: pointer;
    scroll-snap-align: start;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.farm-select-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(90, 46, 15, 0.12);
}

.farm-select-card input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.farm-select-card.selected {
    border-color: #8c4d22;
    box-shadow: 0 0 0 2px #8c4d22 inset;
}

.farm-select-media img {
    width: 100%;
    height: 130px;
    object-fit: cover;
    border-radius: 7px;
    display: block;
}

.farm-select-title {
    margin-top: 8px;
    font-weight: 700;
    color: #4d2b11;
}

.farm-select-meta {
    color: #8a5e3a;
    font-size: 0.85rem;
}

.farm-member-card {
    display: block;
    border: 1px solid #cfa77a;
    border-radius: 10px;
    background: #fffaf2;
    padding: 8px;
    text-decoration: none;
    color: inherit;
    scroll-snap-align: start;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.farm-member-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(90, 46, 15, 0.12);
    border-color: #8c4d22;
}

.farm-member-media img {
    width: 100%;
    height: 130px;
    object-fit: cover;
    border-radius: 7px;
    display: block;
}

.farm-member-title {
    margin-top: 8px;
    font-weight: 700;
    color: #4d2b11;
}

.farm-member-meta {
    color: #8a5e3a;
    font-size: 0.85rem;
}

.farm-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 12px;
}

.farm-gallery-card {
    display: block;
    text-decoration: none;
    color: inherit;
    background: #fff7ea;
    border: 1px solid #d8b98f;
    border-radius: 10px;
    padding: 10px;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.farm-gallery-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(90, 46, 15, 0.12);
}

.farm-gallery-logo img {
    width: 100%;
    height: 130px;
    object-fit: cover;
    border-radius: 8px;
    display: block;
}

.farm-gallery-name {
    margin-top: 8px;
    font-weight: 700;
    color: #4d2b11;
}

.farm-official-star {
    color: #c48a1c;
    font-size: 0.95em;
    vertical-align: middle;
    margin-left: 4px;
}

.farm-gallery-summary {
    margin-top: 6px;
    color: #6a4526;
    font-size: 0.9rem;
}

.farm-check-badge {
    display: inline-block;
    min-width: 64px;
    text-align: center;
    font-size: 0.78rem;
    font-weight: 700;
    border-radius: 999px;
    padding: 2px 8px;
    margin-right: 6px;
    border: 1px solid transparent;
}

.farm-check-badge.ok {
    color: #2f5d37;
    background: #dcebdc;
    border-color: #b8d4bc;
}

.farm-check-badge.missing {
    color: #7a3c3c;
    background: #f3dfdf;
    border-color: #e1bcbc;
}

@media (max-width: 768px) {
    .guide-figure-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .breed-hero img {
        height: 190px;
    }

    .breed-hero-overlay h1 {
        font-size: 1.55rem;
    }

    .breed-section {
        padding: 12px;
    }

    .breed-figure img {
        max-height: 300px;
    }

    .farm-grid,
    .farm-grid-stats {
        grid-template-columns: 1fr;
    }

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

.sale-detail-page {
    max-width: 980px;
    margin: 24px auto;
    padding: 0 12px 30px;
}

.sale-detail-card {
    background: #f5e8d4;
    border: 1.5px solid #94592e;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 6px 14px rgba(90, 46, 15, 0.1);
}

.sale-detail-media {
    width: 100%;
    border-bottom: 1px solid #d4a373;
    background: #eadabf;
}

.sale-detail-media img {
    width: 100%;
    height: 330px;
    object-fit: cover;
    display: block;
}

.sale-detail-body {
    padding: 16px 18px 18px;
    text-align: left;
}

.sale-detail-title {
    margin: 0 0 12px;
    color: #5a2e0f;
}

.sale-detail-lines p,
.sale-detail-meta p {
    margin: 0 0 6px;
    color: #3f2a19;
    line-height: 1.35;
}

.sale-detail-lines span,
.sale-detail-meta span {
    display: inline-block;
    min-width: 90px;
    font-weight: 700;
    color: #7a4d28;
}

.sale-detail-meta {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #d8b98f;
}

.sale-detail-notes {
    margin-top: 10px;
    padding: 10px 12px;
    border-radius: 10px;
    background: #fff7ea;
    border: 1px solid #e3c79d;
}

.sale-detail-notes-label {
    font-weight: 700;
    color: #7a4d28;
    margin-bottom: 4px;
}

.sale-detail-notes-text {
    color: #4a2e1a;
    font-size: 0.95rem;
}

.sale-detail-actions {
    margin-top: 14px;
    padding-top: 10px;
    border-top: 1px solid #d8b98f;
}

.sale-detail-muted {
    margin: 0;
    color: #7a5f37;
    font-style: italic;
}

@media (max-width: 768px) {
    .sale-detail-media img {
        height: 220px;
    }

    .sale-detail-body {
        padding: 12px;
    }
}



.sub-tabs {
    margin-top: 10px;
    text-align: center;
    font-size: 1.1em;
    font-weight: bold;
  }
  
  .sub-tabs a {
    margin: 0 15px;
    color: #5e3c1b;
    text-decoration: none;
    padding: 6px 12px;
    border-bottom: 2px solid transparent;
    transition: 0.3s ease;
  }
  
  .sub-tabs a:hover {
    border-bottom: 2px solid #d4a373;
  }
  
  .sub-tabs a.active {
    border-bottom: 3px solid #b08968;
    color: #8d5c2d;
  }

  
.navbar a {
    text-decoration: none;
    color: #1f1e1c;
    margin: 0 5px;
    transition: color 0.3s ease, border-bottom 0.3s ease;
}

.filter-menu a:hover {
    color: #94592e;
}

.filter-menu .separator {
    color: #94592e;
    margin: 0 5px;
}

.content {
    flex: 1;
}

.gallery-header {
    text-align: center;
    margin-bottom: 30px;
    margin-top: 30px;
}

.gallery-header img {
    width: 100%;
    max-height: 220px;
    object-fit: cover;
    border-radius: 10px;
    border: 1.5px solid #94592e;
}

.breeding-banner-button {
    display: block;
    width: 100%;
    margin-top: 10px;
    padding: 12px 16px;
    text-align: center;
    background-color: #d98737;
    color: white;
    border: 1.5px solid #94592e;
    border-radius: 10px;
    font-size: 16px;
    font-family: 'Cinzel', serif;
    text-decoration: none;
}

.breeding-banner-button:hover {
    background-color: #94592e;
}

.breeding-banner-button.disabled {
    cursor: not-allowed;
    opacity: 0.8;
}

.cards {
    display: flex;
    flex-wrap: wrap;
    justify-content: center; /* centrage */
    gap: 12px; /* espace régulier entre les cartes */
    padding: 12px;
}

.card {
    background-color: #e4d2b0;
    width: 200px;
    border-radius: 10px;
    overflow: hidden;
    text-align: center;
    padding: 10px;
    border: 1.5px solid #94592e;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.userlist-admin-ban-btn {
    border: none !important;
    box-shadow: none !important;
    background: transparent;
}

.userlist-admin-ban-btn:hover {
    background-color: #dc3545;
    color: #fff;
}

.userlist-admin-actions {
    position: absolute;
    top: 8px;
    right: 8px;
    display: inline-flex;
    gap: 6px;
}

.userlist-admin-unban-btn {
    border: none !important;
    box-shadow: none !important;
    background: transparent;
}

.userlist-admin-unban-btn:hover {
    background-color: #b4cbac;
    color: #1f1e1c;
}

.admin-unban-history {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 220px;
    overflow-y: auto;
    padding-right: 6px;
}

.admin-unban-item {
    background: #fffaf2;
    border: 1px solid #d4a373;
    border-radius: 8px;
    padding: 8px 10px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.admin-unban-reason {
    font-size: 0.85rem;
    color: #5a2e0f;
    font-weight: 600;
}

.admin-unban-date {
    font-size: 0.75rem;
    color: #737454;
}

.card-title {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 10px;
}

.card img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    margin-bottom: 10px;
}

.card-description {
    font-size: 14px;
    margin-bottom: 10px;
}

.like-button {
    background-color: #ba8151;
    border: none;
    color: #f7eddc;
    padding: 5px 10px;
    cursor: pointer;
    font-size: 14px;
    border-radius: 5px;
}

.like-button i {
    color: #f7eddc;
}
.like-button:hover {
    background-color: #a37144;
}

.like-button.action-button {
    border: none;
    color: #f7eddc;
}

.like-button.action-button.liked {
    background-color: #9dbe92;
    color: #1f1e1c;
}

.like-button.action-button.liked i {
    color: #1f1e1c;
}

.card h3 {
    margin: 10px 0;
    font-size: 1.2em;
    color: #444;
}

/* ============================
   RESPONSIVE LAYOUT
   ============================ */

/* --- Mobile & Tablet: stack layout --- */
@media (max-width: 991px) {
    .cards {
        justify-content: center;
    }
}

/* --- Mobile only: gallery becomes 1 column --- */
@media (max-width: 576px) {
    .cards {
        display: grid;
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .card {
        width: 190px;
        max-width: 190px;
        margin: 0 auto;
    }

    .main-container.flex-layout .content .cards {
        padding: 12px 8px;
    }

    .main-container.flex-layout .content .cards .card {
        width: 100%;
        max-width: 100%;
        margin: 0;
    }
}

/* ============================
   RESPONSIVE SIDEBAR CAROUSELS
   ============================ */

/* --- Mobile layout --- */
@media (max-width: 800px) {
    .cards {
        display: grid;
        grid-template-columns: 1fr;
        gap: 20px;
        width: 100%;
    }

    .doc-card {
        width: 160px;
        max-width: 160px;
    }
}

@media (max-width: 700px) {
    .sidebar {
        min-width: 140px;
        padding: 0 8px;
    }

    .doc-card,
    .card {
        width: 125px;
        max-width: 125px;
    }

    .doc-card {
        padding: 8px;
    }
}

/* ========== BREEDING PAGE STYLES ========== */

.foal-card {

    margin-top: 30px;

    background: #e4d2b0;

    border: 2px solid #ba8151;

    max-width: 520px;

    padding: 0;

}



.foal-header {

    background: #d98737;

    color: #1f1e1c;

    font-weight: bold;

    padding: 10px 14px;

    font-size: 1.1em;

}



.foal-section {

    padding: 14px;

    border-top: 1px solid #ba8151;

}



.foal-section h4 {

    margin-bottom: 8px;

    color: #2f2417;

}



.foal-section ul {

    list-style: none;

    padding: 0;

    margin: 0;

}



.foal-section li {

    margin-bottom: 6px;

}



.geno {

    font-family: monospace;

    background: #e0c899;

    padding: 6px;

    border: 1px solid #94592e;

}



.stats-grid {

    display: grid;

    grid-template-columns: 1fr 1fr;

    gap: 6px 12px;

}



.stats-grid div {

    display: flex;

    justify-content: space-between;

    background: #ebe3cd;

    padding: 4px 6px;

    border: 1px solid #cd7838;

}



.stats-grid span {

    font-weight: bold;

}



.height {

    grid-column: span 2;

}





.breed-title {

    text-align: center;

    margin-bottom: 30px;

}



.breeding-layout {

    display: grid;

    grid-template-columns: 1fr auto 1fr;

    gap: 30px;

    align-items: start;

}



.parent-card {

    background: #e4d2b0;

    border: 2px solid #ba8151;

    padding: 15px;

}



.parent-card h3 {

    text-align: center;

}



.parent-info {

    margin-top: 10px;

    text-align: center;

}



.parent-image.placeholder {

    height: 120px;

    background: #e0c899;

    border: 1px solid #94592e;

    display: flex;

    align-items: center;

    justify-content: center;

    font-size: 3em;

}



.stats {

    list-style: none;

    padding: 0;

    margin-top: 10px;

    text-align: left;

}



.breed-center {

    display: flex;

    flex-direction: column;

    gap: 15px;

    align-items: center;

}



.item-btn {

    background: #737454;

    color: #ebe3cd;

    padding: 8px 12px;

    border: none;

    cursor: not-allowed;

}



.breed-btn {

    background: #d98737;

    color: #1f1e1c;

    font-weight: bold;

    padding: 12px 20px;

    border: 2px solid #94592e;

    cursor: pointer;

}



.foal-results {

    margin-top: 50px;

    display: flex;

    flex-direction: column;

    align-items: center;

}



.foal-card {

    width: 420px;

    max-width: 90%;

}





.foal-header {

    font-weight: bold;

    margin-bottom: 10px;

}



.geno {

    font-family: monospace;

    background: #e0c899;

    padding: 5px;

}



.stats-grid {

    display: grid;

    grid-template-columns: 1fr 1fr;

    gap: 8px;

    margin-top: 10px;

}



.stats-grid div {

    display: flex;

    justify-content: space-between;

    background: #ebe3cd;

    padding: 4px 6px;

}



.height {

    grid-column: span 2;

}



.mutation {

    color: #94592e;

    font-weight: bold;

}



.parent-image {

    height: 160px;

    border: 1px solid #94592e;

    background: #e0c899;

    display: flex;

    align-items: center;

    justify-content: center;

    overflow: hidden;

}



.parent-image img {

    width: 100%;

    height: 100%;

    object-fit: cover;   /* ⬅️ remplit le cadre sans déformer */

    display: block;

}





.parent-image .placeholder {

    font-size: 3em;

    opacity: 0.6;

}





.parent-image {

    width: 100%;

    max-width: 220px;          /* ⬅️ largeur MAX de la photo */

    height: 160px;             /* ⬅️ hauteur FIXE */

    margin: 0 auto 10px auto;  /* centrée dans la card */



    border: 2px solid #94592e;

    background: #e0c899;



    display: flex;

    align-items: center;

    justify-content: center;



    overflow: hidden;          /* ⬅️ empêche TOUT débordement */

}



/* item et autre */

.item-locker {

    display: flex;

    border: 2px solid #94592e;

    background: #e0c899;

}



.item-slot {

    flex: 1;

    padding: 8px 4px;

    text-align: center;

    cursor: pointer;

    border-right: 1px solid #94592e;



    display: flex;

    flex-direction: column;

    align-items: center;

    justify-content: center;

    gap: 2px;



    font-size: 0.75em;

}

.item-disabled {
    opacity: 0.4;
    cursor: not-allowed;
    filter: grayscale(0.6);
}

.item-count {
    display: inline-block;
    margin-left: 6px;
    font-size: 0.85em;
    color: #5a2e0f;
}



.item-icon {

    font-size: 1.3em;

    line-height: 1;

}



.item-label {

    font-size: 0.7em;

    text-transform: uppercase;

    letter-spacing: 0.05em;

}



.item-slot.active {

    background: #d98737;

    font-weight: bold;

}



.item-slot:last-child {

    border-right: none;

}



.item-slot.active {

    background: #d98737;

    color: #1f1e1c;

}



.item-ui-zone {

    margin-top: 10px;

}



.item-ui {

    display: none;

    background: #ebe3cd;

    border: 1px solid #ba8151;

    padding: 10px;

}



.chimera-option {

    margin-top: 8px;

    padding-left: 10px;

    border-left: 2px solid #cd7838;

    font-size: 0.85em;

}



.chimera-help {

    font-size: 0.75em;

    opacity: 0.8;

    margin-top: 4px;

}




/* ========== BREEDING PAGE STYLES ========== */
.foal-card {
    margin-top: 30px;
    background: #e4d2b0;
    border: 2px solid #ba8151;
    max-width: 520px;
    padding: 0;
}

.foal-header {
    background: #d98737;
    color: #1f1e1c;
    font-weight: bold;
    padding: 10px 14px;
    font-size: 1.1em;
}

.foal-section {
    padding: 14px;
    border-top: 1px solid #ba8151;
}

.foal-section h4 {
    margin-bottom: 8px;
    color: #2f2417;
}

.foal-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.foal-section li {
    margin-bottom: 6px;
}

.geno {
    font-family: monospace;
    background: #e0c899;
    padding: 6px;
    border: 1px solid #94592e;
}

.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px 12px;
}

.stats-grid div {
    display: flex;
    justify-content: space-between;
    background: #ebe3cd;
    padding: 4px 6px;
    border: 1px solid #cd7838;
}

.stats-grid span {
    font-weight: bold;
}

.height {
    grid-column: span 2;
}


.breed-title {
    text-align: center;
    margin-bottom: 30px;
}

.toast-container {
    position: fixed;
    top: 110px;
    right: 24px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 1000;
}

.breed-toast {
    background: #fff4dd;
    border: 1.5px solid #94592e;
    color: #94592e;
    padding: 10px 14px;
    border-radius: 8px;
    font-weight: bold;
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.15);
    animation: toast-in 200ms ease-out;
}

@keyframes toast-in {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
}

.breeding-layout {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 30px;
    align-items: start;
}

.parent-card {
    background: #e4d2b0;
    border: 2px solid #ba8151;
    padding: 15px;
}

.parent-card h3 {
    text-align: center;
}

.parent-info {
    margin-top: 10px;
    text-align: center;
}

.parent-image.placeholder {
    height: 120px;
    background: #e0c899;
    border: 1px solid #94592e;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3em;
}

.stats {
    list-style: none;
    padding: 0;
    margin-top: 10px;
    text-align: left;
}

.breed-center {
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: center;
}

.item-btn {
    background: #737454;
    color: #ebe3cd;
    padding: 8px 12px;
    border: none;
    cursor: not-allowed;
}

.breed-btn {
    background: #d98737;
    color: #1f1e1c;
    font-weight: bold;
    padding: 12px 20px;
    border: 2px solid #94592e;
    cursor: pointer;
}

.foal-results {
    margin-top: 50px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.foal-card {
    width: 420px;
    max-width: 90%;
}


.foal-header {
    font-weight: bold;
    margin-bottom: 10px;
}

.geno {
    font-family: monospace;
    background: #e0c899;
    padding: 5px;
}

.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 10px;
}

.stats-grid div {
    display: flex;
    justify-content: space-between;
    background: #ebe3cd;
    padding: 4px 6px;
}

.height {
    grid-column: span 2;
}

.mutation {
    color: #94592e;
    font-weight: bold;
}

.parent-image {
    height: 160px;
    border: 1px solid #94592e;
    background: #e0c899;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.parent-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;   /* ⬅️ remplit le cadre sans déformer */
    display: block;
}


.parent-image .placeholder {
    font-size: 3em;
    opacity: 0.6;
}


.parent-image {
    width: 100%;
    max-width: 220px;          /* ⬅️ largeur MAX de la photo */
    height: 160px;             /* ⬅️ hauteur FIXE */
    margin: 0 auto 10px auto;  /* centrée dans la card */

    border: 2px solid #94592e;
    background: #e0c899;

    display: flex;
    align-items: center;
    justify-content: center;

    overflow: hidden;          /* ⬅️ empêche TOUT débordement */
}

/* item et autre */
.item-locker {
    display: flex;
    border: 2px solid #94592e;
    background: #e0c899;
}

.item-slot {
    flex: 1;
    padding: 8px 4px;
    text-align: center;
    cursor: pointer;
    border-right: 1px solid #94592e;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;

    font-size: 0.75em;
}

.item-icon {
    font-size: 1.3em;
    line-height: 1;
}

.item-label {
    font-size: 0.7em;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.item-slot.active {
    background: #d98737;
    font-weight: bold;
}

.item-slot:last-child {
    border-right: none;
}

.item-slot.active {
    background: #d98737;
    color: #1f1e1c;
}

.item-ui-zone {
    margin-top: 10px;
}

.breed-risk {
    margin-top: 12px;
    padding: 10px 12px;
    background: #fff4dd;
    border: 1.5px solid #94592e;
    border-radius: 8px;
    font-size: 0.9em;
}

.breed-risk ul {
    margin: 6px 0 8px 18px;
    padding: 0;
}

.lethal-messages {
    margin: 14px auto;
    padding: 10px 14px;
    max-width: 520px;
    background: #ffecec;
    border: 1.5px solid #b45a5a;
    border-radius: 8px;
    text-align: center;
}

.lethal-message {
    margin: 0;
    color: #7b2f2f;
    font-weight: 600;
}

.item-ui {
    display: none;
    background: #ebe3cd;
    border: 1px solid #ba8151;
    padding: 10px;
}

.chimera-option {
    margin-top: 8px;
    padding-left: 10px;
    border-left: 2px solid #cd7838;
    font-size: 0.85em;
}

.chimera-help {
    font-size: 0.75em;
    opacity: 0.8;
    margin-top: 4px;
}


/* ========== POST ART PAGE STYLES ========== */


.posting-header {
    font-size: 2.5rem;
    font-weight: bold;
    margin-top: 120px;
    margin-bottom: 30px;
    text-align: center;
    width: 100%;
    font-family: 'Cinzel', serif;
    flex-basis: 100%;
}


        /* Main container */
        .posting-container {
            display: flex;
            justify-content: space-between;
            max-width: 980px;
            width: calc(100% - 24px);
            gap: 24px;
            margin: 0 auto;
            padding: 20px;
            background: linear-gradient(180deg, #f5e8d4 0%, #e0d1ba 100%);
            border: 5px solid #e7d2b3;
            box-shadow: 0 0 0 1px #bb8f6b;
            border-radius: 12px;
        }

        /* Left Section */
        .left-section {
            width: 62%;
            display: flex;
            flex-direction: column;
            gap: 15px;
        }

        .form-group {
            display: flex;
            flex-direction: column;
        }

        .form-group label {
            font-weight: bold;
            margin-bottom: 5px;
        }

        .form-group input, .form-group textarea {
            width: 100%;
            padding: 10px 12px;
            font-size: 1rem;
            border: 1.5px solid #bb8f6b;
            border-radius: 8px;
            background-color: #fdf6e3;
            color: #1f1e1c;
            box-sizing: border-box;
        }

        .nsfw-group {
            border: 1.5px solid #bb8f6b;
            border-radius: 8px;
            padding: 10px 12px;
            background: rgba(255, 248, 239, 0.55);
        }

        .nsfw-title {
            color: #5a3a1d;
            margin-bottom: 6px;
        }

        .nsfw-checkbox-row {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            color: #4a341b;
            font-weight: 700;
            cursor: pointer;
            user-select: none;
        }

        .nsfw-checkbox-row input[type="checkbox"] {
            width: 18px;
            height: 18px;
            accent-color: #ba8151;
            cursor: pointer;
            margin: 0;
        }

        .nsfw-label {
            line-height: 1.2;
        }

        .nsfw-help-text {
            margin: 8px 0 0;
            color: #5d381c;
        }

        .external-vasteuro-query,
        .external-vasteuro-select {
            width: 100%;
            padding: 10px 12px;
            font-size: 1rem;
            border: 1.5px solid #bb8f6b;
            border-radius: 8px;
            background-color: #fdf6e3;
            color: #1f1e1c;
            box-sizing: border-box;
        }

        .external-vasteuro-search-wrap {
            position: relative;
        }

        .external-vasteuro-query {
            padding-right: 42px;
        }

        .external-vasteuro-search-btn {
            position: absolute;
            top: 50%;
            right: 6px;
            transform: translateY(-50%);
            width: 30px;
            height: 30px;
            border: none;
            border-radius: 6px;
            background: transparent;
            color: #755032;
            font-size: 1rem;
            cursor: pointer;
            display: inline-flex;
            align-items: center;
            justify-content: center;
        }

        .external-vasteuro-search-btn:hover {
            background: rgba(148, 89, 46, 0.12);
            color: #5d381c;
        }

        .external-vasteuro-select {
            min-height: 176px;
            padding: 8px 10px;
            line-height: 1.35;
        }

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

        /* Separator */
        hr {
            border: none;
            height: 1px;
            background-color: #d9b987;
            margin: 12px 0;
        }

        /* Right Section (Image Preview) */
        .right-section {
            width: 38%;
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 15px;
        }

        .right-section .form-group {
            width: 100%;
        }

        .image-preview {
            width: 100%;
            max-width: 300px;
            height: 300px;
            border: 1.5px solid #bb8f6b;
            border-radius: 10px;
            background-color: #fdf6e3;
            display: flex;
            align-items: center;
            justify-content: center;
            overflow: hidden;
            position: relative;
        }

        .image-preview img {
            width: 100%;
            height: 100%;
            object-fit: contain;
        }

        .upload-button {
            background-color: #ba8151;
            color: white;
            border: none;
            padding: 10px;
            border-radius: 8px;
            cursor: pointer;
            font-size: 1rem;
        }

        .upload-button:hover {
            background-color: #94592e;
        }

        /* Vasteuro Section */
        .vasteuro-title {
            font-weight: bold;
            cursor: pointer;
            padding: 10px;
            background-color: #ba8151;
            color: white;
            text-align: center;
            border-radius: 8px;
            user-select: none;
        }

        .vasteuro-title:hover {
            background-color: #94592e;
        }

        .vasteuro-container {
            border: none;
            border-radius: 0;
            background-color: transparent;
            padding: 0;
            display: none; /* Hidden by default */
            flex-direction: column;
            gap: 10px;
        }

.vasteuro-group {
    display: flex;
    flex-direction: column; /* Forces vertical layout */
    gap: 10px; /* Adds spacing between elements */
    padding: 10px;
    border: 1.5px solid #bb8f6b;
    border-radius: 8px;
    background-color: #f5e8d4;
}

.vasteuro-group-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 10px;
    border: 1.5px solid #bb8f6b;
    border-radius: 8px;
    background-color: #fdf6e3;
}

.vasteuro-group-title {
    font-weight: 700;
    color: #4a341b;
}

.vasteuro-group-toggle {
    border: 1px solid #bb8f6b;
    background: #fff8ef;
    color: #4a341b;
    border-radius: 6px;
    padding: 4px 10px;
    font-size: 0.85rem;
    cursor: pointer;
}

.vasteuro-group-body {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

#tags-input-wrapper,
.tags-input-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    padding: 5px;
    background-color: #fdf6e3;
    border: 1.5px solid #bb8f6b;
    border-radius: 8px;
}

#tags-input-wrapper input,
.tags-input-wrapper input {
    border: none;
    outline: none;
    background: none;
    flex: 1;
    min-width: 100px;
}

.tag-label {
    background-color: #ba8151;
    color: white;
    padding: 5px 8px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.remove-tag {
    cursor: pointer;
    font-weight: bold;
}


        .vasteuro-group input {
            width: 70%;
            padding: 10px;
            font-size: 1rem;
            color: #1f1e1c;
        }

        .remove-button {
            background-color: #ba8151;
            color: white;
            padding: 8px;
            border: none;
            border-radius: 8px;
            cursor: pointer;
        }

        .remove-button:hover {
            background-color: #94592e;
        }

        .add-button {
            background-color: #ba8151;
            color: white;
            padding: 10px;
            font-size: 1rem;
            border: none;
            border-radius: 8px;
            cursor: pointer;
            width: 100%;
            text-align: center;
            margin-top: 5px;
        }

        .add-button:hover {
            background-color: #94592e;
        }

        /* Submit Button */
        .submit-button {
            background-color: #ba8151;
            color: white;
            font-size: 1.2rem;
            padding: 15px 30px;
            border: none;
            border-radius: 8px;
            cursor: pointer;
            align-self: flex-end;
            margin-top: 20px;
        }

        .submit-button:hover {
            background-color: #94592e;
        }

@media (max-width: 900px) {
    .posting-container {
        flex-direction: column;
    }

    .left-section,
    .right-section {
        width: 100%;
    }

    .image-preview {
        max-width: 100%;
    }
}

@media (max-width: 545px) {
    .vasteuro-group .button-group {
        flex-wrap: wrap;
        gap: 8px;
    }

    .vasteuro-group .button-group > button,
    .vasteuro-group .button-group > label {
        flex: 1 1 calc(50% - 8px);
        min-width: 130px;
        text-align: center;
    }

    .counter-item {
        flex-wrap: wrap;
        justify-content: flex-start;
        gap: 8px;
    }
}

        /* XP Category */
        .xp-category {
            margin-top: 10px;
        }

        .button-group {
            display: flex;
            gap: 5px;
        }

        .style-button,
        .xp-button,
        .bg-button,
        .anim-button,
        .event-button,
        .artist-button,
        .color-button {
            background: linear-gradient(180deg, #f3e4cf 0%, #ead6bc 100%);
            color: #5a3a1d;
            border: 1.5px solid #b08a57;
            padding: 8px 12px;
            border-radius: 8px;
            cursor: pointer;
            font-size: 14px;
            font-weight: 600;
            transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.12s ease;
        }

        .style-button:hover,
        .xp-button:hover,
        .bg-button:hover,
        .anim-button:hover,
        .event-button:hover,
        .artist-button:hover,
        .color-button:hover {
            background: #ecd9bf;
            border-color: #9a7044;
            color: #4a2f17;
            transform: translateY(-1px);
        }

        .style-button.selected,
        .xp-button.selected,
        .bg-button.selected,
        .anim-button.selected,
        .event-button.selected,
        .artist-button.selected,
        .color-button.selected {
            background: linear-gradient(180deg, #c8a97a 0%, #b48b5d 100%);
            color: #fff8ee;
            border-color: #8f653c;
        }


        .counter-group {
            display: flex;
            flex-direction: column;
            gap: 10px;
        }

        .counter-item {
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .counter-button {
            width: 30px;
            height: 30px;
            font-size: 1rem;
            background: linear-gradient(180deg, #f3e4cf 0%, #ead6bc 100%);
            color: #5a3a1d;
            border: 1.5px solid #b08a57;
            border-radius: 5px;
            cursor: pointer;
        }

        .counter-button:hover {
            background: #ecd9bf;
            border-color: #9a7044;
        }

        .counter-value {
            width: 34px;
            min-width: 34px;
            height: 30px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            text-align: center;
            font-size: 1rem;
            font-weight: bold;
            background: #fff8ef;
            color: #5a3a1d;
            border: 1.5px solid #b08a57;
            border-radius: 5px;
            padding: 0;
        }

        .disabled {
    opacity: 0.5;
    pointer-events: none;
}


.color-mode-wrapper .button-group {
    flex-wrap: wrap;
}

.additional-character-config {
    margin-top: 10px;
}

.additional-char-panel {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.additional-char-card {
    border: 1.5px solid #b08a57;
    border-radius: 8px;
    background: rgba(255, 248, 239, 0.55);
    padding: 8px 10px;
}

.additional-char-card label {
    display: block;
    margin-bottom: 6px;
}

.additional-char-group {
    flex-wrap: wrap;
    gap: 6px;
}

.additional-char-button {
    padding: 5px 9px;
    font-size: 12px;
    border-radius: 7px;
    line-height: 1.2;
    flex: 0 0 auto;
}


/* ========== POST DETAIL STYLES ========== */

.post-container-publi {
    width: min(720px, calc(100% - 24px));
    margin: 0 auto;
    background-color: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;
    overflow: visible;
    padding-bottom: 15px;
    font-family: 'Cinzel', serif;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 3;
}


.post-detail-shell {
    position: relative;
    max-width: 840px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
}

.post-nav-arrow {
    position: absolute;
    top: 50%;
    margin: 10px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #f5e8d4;
    border: 1.5px solid #94592e;
    color: #5a2e0f;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
    transition: transform 0.18s ease, background 0.18s ease, box-shadow 0.18s ease, color 0.18s ease;
    z-index: 3;
}

.post-nav-left {
    left: 0;
}

.post-nav-right {
    right: 0;
}

.post-nav-arrow:hover {
    transform: translateY(-10%) scale(1.08);
    background: #ba8151;
    color: #fff;
    box-shadow: 0 6px 16px rgba(90, 46, 15, 0.3);
}

.post-tap-zone {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 30%;
    z-index: 1;
    display: none;
}

.post-tap-left {
    left: 0;
}

.post-tap-right {
    right: 0;
}

.post-nav-mobile-bar {
    display: none;
    padding: 10px 12px;
    gap: 10px;
    justify-content: space-between;
    align-items: center;
    position: fixed;
    left: 50%;
    bottom: 12px;
    transform: translateX(-50%);
    width: min(420px, calc(100% - 24px));
    z-index: 4;
    background: rgba(245, 232, 212, 0.92);
    border: 1.5px solid #94592e;
    border-radius: 999px;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.18);
    backdrop-filter: blur(4px);
}

.post-nav-mobile-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #f5e8d4;
    border: 1.5px solid #94592e;
    color: #5a2e0f;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
    transition: transform 0.18s ease, background 0.18s ease, box-shadow 0.18s ease, color 0.18s ease;
}

.post-nav-mobile-btn:hover {
    transform: scale(1.03);
    background: #ba8151;
    color: #fff;
    box-shadow: 0 6px 16px rgba(90, 46, 15, 0.3);
}

.post-nav-mobile-spacer {
    width: 44px;
    height: 44px;
    display: inline-block;
}

.post-swipe-left {
    animation: postSwipeLeft 120ms ease-out;
}

.post-swipe-right {
    animation: postSwipeRight 120ms ease-out;
}

@keyframes postSwipeLeft {
    from { transform: translateX(0); }
    to { transform: translateX(-6px); }
}

@keyframes postSwipeRight {
    from { transform: translateX(0); }
    to { transform: translateX(6px); }
}

@media (max-width: 576px) {
    .post-detail-shell {
        padding: 0 12px;
        flex-direction: column;
        align-items: center;
    }

    .post-nav-arrow {
        display: none;
    }

    .post-nav-mobile-bar {
        display: flex;
        position: static;
        width: auto;
        transform: none;
        margin: 10px auto 0;
        background: transparent;
        border: none;
        box-shadow: none;
        backdrop-filter: none;
    }

    .post-tap-zone {
        display: block;
    }

    .post-header {
        padding: 10px;
    }

    .drawing-section {
        padding: 8px 0 6px;
    }

    .drawing-description {
        padding: 10px;
        font-size: 0.95em;
    }

    .post-actions {
        padding: 10px;
    }

    .drawing-image {
        width: 100%;
        max-height: 42vh;
        object-fit: contain;
    }

    .post-container-publi {
        min-height: calc(100vh - 190px);
    }

    .post-actions {
        flex-direction: row;
        gap: 10px;
    }
}

.post-card,
.gallery-card,
.profile-card {
    position: relative;
    background: linear-gradient(180deg, #f5e8d4 0%, #e0d1ba 100%);
    border: 5px solid #e7d2b3;
    box-shadow: 0 0 0 1px #bb8f6b;
    overflow: visible;
}

.post-card::after,
.gallery-card::after,
.profile-card::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(circle at 5px 5px, #e7d2b3 0 3px, transparent 4px),
        radial-gradient(circle at calc(100% - 5px) 5px, #e7d2b3 0 3px, transparent 4px),
        radial-gradient(circle at 5px calc(100% - 5px), #e7d2b3 0 3px, transparent 4px),
        radial-gradient(circle at calc(100% - 5px) calc(100% - 5px), #e7d2b3 0 3px, transparent 4px);
}

.post-card-delete {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 2;
}

.post-card-delete .post-delete-btn {
    opacity: 0.2;
}

.post-delete-btn:hover {
    opacity: 1;
}

.post-header {
    display: flex;
    align-items: center;
    padding: 0;
    background-color: transparent;
    color: #1F1E1C;
    border-bottom: none;
    gap: 8px;
}

.profile-pic {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #b08a57;
    background-color: #f5e8d4;
  }
  
  .profile-picture {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #b08a57;
    background-color: #f5e8d4;
  }


.artist-info {
    display: flex;
    flex-direction: column;
}

.artist-name {
    margin-left: 10px;
    margin-top: auto;
    margin-bottom: auto;
    font-size: 1.2em;
    font-weight: bold;
    color: #5A2E0F;
    text-decoration: none;
}

.artist-name:hover {
    text-decoration: underline;
}

.profile-link img {
    transition: filter 0.12s ease, transform 0.12s ease;
}

.profile-link:hover img {
    filter: brightness(0.85);
    transform: translateY(-1px);
}

.artist-handle {
    font-size: 0.9em;
    color: #eee;
}

.drawing-section {
    width: 100%;
    margin-left: 0;
    text-align: center;
    padding: 12px 0 8px;
    background-color: transparent;
    border-bottom: none;
    position: relative;
}

.drawing-frame {
    width: 100%;
    margin: 0;
    padding: 0;
    border: none;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    box-sizing: border-box;
}

.drawing-header {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
}

.drawing-header .profile-pic {
    width: 40px;
    height: 40px;
    margin-right: 10px;
}

.drawing-header .artist-name {
    font-size: 1.1em;
    font-weight: bold;
    color: #1f1e1c;
}

.drawing-image {
    width: 100%;
    max-width: none;
    height: auto;
    max-height: 80vh;
    border-radius: 8px;
    border: none;
    box-shadow: none;
    object-fit: contain;
}

.post-meta {
    padding: 14px 16px 0;
    background: rgba(245, 232, 212, 0.85);
    width: 100%;
    margin-left: 0;
    padding-left: min(24px, 3vw);
    padding-right: min(24px, 3vw);
}

.post-title {
    margin: 0;
    font-size: 1.6em;
    color: #1f1e1c;
    flex: 1;
}

.post-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.post-title-actions {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.post-like-inline {
    padding: 4px 8px;
    font-size: 0.85em;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.post-like-inline.like-button {
    background-color: #ba8151;
    color: #f7eddc;
}

.post-like-inline.like-button:hover {
    background-color: #a37144;
}

.post-like-inline.like-button.liked {
    background-color: #b4cbac;
    color: #1f1e1c;
}

.post-like-inline.like-button.liked i {
    color: #1f1e1c;
}

.post-author-row {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 6px;
}

.post-author-row .profile-pic {
    width: 32px;
    height: 32px;
    border-width: 1px;
}

.post-author-row .artist-name {
    margin: 0;
    font-size: 0.95em;
    color: #5a2e0f;
}

.post-credit {
    margin: 6px 0 0;
    font-size: 0.9rem;
    color: #7a4d28;
}

.post-meta .tag-label {
    background: rgba(148, 89, 46, 0.12);
    color: #94592e;
    padding: 2px 6px;
    border: 1px solid #b08a57;
    border-radius: 6px;
    font-size: 0.9em;
}

.post-description {
    font-size: 1em;
    margin-bottom: 8px;
    color: #1f1e1c;
    text-align: left;
}

.post-linked-horses {
    margin: 0 0 10px;
}

.post-linked-horses-label {
    display: inline-block;
    margin-bottom: 4px;
    font-size: 0.9rem;
    color: #6c4b2b;
    font-weight: 700;
}

.post-linked-horses-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.post-linked-horse-tag {
    text-decoration: none;
}

.post-linked-horse-tag:hover {
    text-decoration: underline;
    color: #6f4322;
}

.post-xp {
    margin-top: 6px;
    font-size: 0.9em;
}

.post-xp-estimate {
    cursor: help;
    text-decoration: underline dotted;
    text-underline-offset: 2px;
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    padding: 0 15px 15px;
}

.tag-label {
    background-color: #cd7838;
    color: white;
    padding: 5px 8px;
    border-radius: 4px;
    font-size: 0.9em;
}

.post-actions {
    display: flex;
    justify-content: space-around;
    padding: 15px;
    border-top: none;
    background-color: rgba(245, 232, 212, 0.85);
    width: 100%;
    margin-left: 0;
    padding-left: min(24px, 3vw);
    padding-right: min(24px, 3vw);
}

.action-button {
    background-color: #d98737;
    border: 1.5px solid #94592e;
    color: #94592e;
    padding: 10px 15px;
    font-size: 16px;
    cursor: pointer;
    border-radius: 10px;
    transition: background 0.3s ease;
}

#like-count{
    color:#1F1E1C;
}

.action-button.liked {
    background-color: rgb(255, 167, 177);
    border-color: #8d5c2d;
}

.action-button:hover {
    background-color: #94592e;
    color: #fff;
}

.action-button.liked:hover {
    background-color: #8d5c2d;
}

.comments-section {
    padding: 15px;
    text-align: left;
    background-color: rgba(245, 232, 212, 0.85);
    width: 100%;
    margin-left: 0;
    padding-left: min(24px, 3vw);
    padding-right: min(24px, 3vw);
}

.comments-section h3 {
    margin-bottom: 10px;
    font-size: 1.2em;
    color: #1f1e1c;
}

#comments-list {
    list-style-type: none;
    padding: 0;
    max-height: 250px;
    overflow-y: auto;
    background: transparent;
    border-radius: 0;
    padding: 10px 0 0;
}

#comments-list:empty {
    display: none;
    padding: 0;
    background: transparent;
}

.comment-item {
    display: flex;
    gap: 12px;
    padding: 10px;
    border-bottom: 1px solid #d4a373;
}

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

.comment-avatar {
    width: 42px;
    height: 42px;
    flex-shrink: 0;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid #ba8151;
    background-color: #fdf5e6;
}

.comment-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

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

.comment-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 4px;
}

.comment-author {
    font-weight: bold;
    color: #5a2e0f;
    text-decoration: none;
}

.comment-author:hover {
    text-decoration: underline;
}

.comment-meta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.comment-date {
    font-size: 0.75rem;
    color: #6f5a44;
    white-space: nowrap;
}

.comment-text {
    font-size: 0.95rem;
    color: #1f1e1c;
    white-space: pre-wrap;
    word-break: break-word;
}

.comment-actions {
    margin-top: 6px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.comment-reply-btn {
    border: 0;
    background: transparent;
    color: #ba8151;
    box-shadow: none;
    font-size: 0.85rem;
    padding: 0;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
}

.comment-reply-btn:hover {
    color: #94592e;
    background: transparent;
    border: 0;
}

.comment-flag-btn {
    border: 0;
    background: transparent;
    color: #ba8151;
    box-shadow: none;
    font-size: 0.85rem;
    padding: 0;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
}

.comment-flag-btn:hover {
    color: #94592e;
    background: transparent;
    border: 0;
}

.comment-replies {
    list-style: none;
    margin: 10px 0 0 12px;
    padding: 0 0 0 14px;
    border-left: 1px solid rgba(148, 89, 46, 0.35);
}

.comment-reply-item {
    padding: 8px 0;
    border-bottom: none;
}

.comment-reply-item .comment-avatar {
    width: 34px;
    height: 34px;
}

.comment-reply-banner {
    margin-bottom: 8px;
    padding: 6px 10px;
    border: 1px solid #d4a373;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.55);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    color: #5a2e0f;
    font-size: 0.9rem;
}

.comment-reply-cancel {
    border: none;
    background: transparent;
    color: #6f5a44;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.comment-reply-cancel:hover {
    color: #94592e;
}

.comment-form {
    margin-top: 12px;
}

.comment-form form {
    display: flex;
    flex-direction: column;
    gap: 8px;
}



.comment-form .input-group {
    width: 100%;
}

.comment-form .input-group .form-control {
    border-radius: 16px 0 0 16px;
    border-right: 0;
    min-height: 44px;
}

.comment-form .input-group .chat-send-btn {
    border-radius: 0 16px 16px 0;
    min-height: 44px;
    padding: 8px 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.comment-empty {
    text-align: center;
    color: #6f5a44;
    font-style: italic;
    padding: 10px 0;
}

.comment-delete-wrapper {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.comment-delete-btn {
    border: none;
    background: transparent;
    color: #ba8151;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

.comment-delete-btn:hover {
    color: #94592e;
}

.comment-delete-confirm-bar {
    position: absolute;
    top: 0;
    right: 0;
    height: 100%;
    white-space: nowrap;
    display: flex;
    align-items: center;
    padding: 0 0.6rem;
    border-radius: 999px;
    opacity: 0;
    pointer-events: none;
    transform: scaleX(0);
    transform-origin: right center;
    transition: transform 0.2s ease-out, opacity 0.2s ease-out;
    z-index: 10;
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.comment-delete-confirm-text {
    font-size: 0.8rem;
    margin-right: 6px;
}

.comment-delete-wrapper.confirm-open .comment-delete-confirm-bar {
    opacity: 1;
    pointer-events: auto;
    transform: scaleX(1);
}

.comment-delete-wrapper.confirm-open .comment-delete-btn {
    opacity: 0;
    pointer-events: none;
}

.required-error {
    color: #dc3545;
}

.required-asterisk {
    font-weight: 700;
}

.required-error-border {
    border-color: #dc3545 !important;
}

.post-art-error {
    color: #dc3545;
    font-weight: 600;
    margin-bottom: 8px;
}

.post-delete-wrapper {
    position: absolute;
    top: 8px;
    right: 8px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    z-index: 5;
}

.post-delete-btn {
    border: none;
    background: transparent;
    color: #8b5a2b;
    opacity: 1;
    transition: opacity 0.2s ease, color 0.2s ease;
    cursor: pointer;
}

.post-delete-btn:hover {
    opacity: 1;
    color: #5a2e0f;
}

.post-delete-toast {
    position: fixed;
    right: 16px;
    bottom: 16px;
    z-index: 3000;
    min-width: 280px;
    max-width: 360px;
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    border-radius: 12px;
    padding: 12px;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.2);
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.15s ease, transform 0.15s ease;
    pointer-events: none;
}

.post-delete-toast.show {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.post-delete-toast-text {
    font-size: 0.9rem;
    margin-bottom: 8px;
}

.post-delete-toast-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

.post-delete-confirm-bar {
    position: absolute;
    top: 0;
    right: 32px;
    height: 100%;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0 8px;
    border-radius: 999px;
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    opacity: 0;
    pointer-events: none;
    transform: scaleX(0);
    transform-origin: right center;
    transition: transform 0.2s ease-out, opacity 0.2s ease-out;
    white-space: nowrap;
}

.post-delete-wrapper.confirm-open .post-delete-confirm-bar {
    opacity: 1;
    pointer-events: auto;
    transform: scaleX(1);
    animation: postDeleteConfirmIn 0.18s ease-out;
}

.post-delete-confirm-text {
    font-size: 0.8rem;
}


@keyframes postDeleteConfirmIn {
    from { opacity: 0; transform: scaleX(0.95); }
    to { opacity: 1; transform: scaleX(1); }
}


/* ========== PROFILE PAGE STYLES ========== */

/* PALETTE BEIGE HARMONISÉE */

:root {
    --beige-light: #F3E8D3;   /* sable clair */
    --beige-mid:   #D9C2A3;   /* beige moyen */
    --beige-dark:  #A9744F;   /* cuir chaud */
    --brown:       #4A2E1A;   /* brun profond */
    --forest-green: #4f673d;
}

a:not([class]),
a:not([class]):visited {
    color: var(--forest-green);
}

a:not([class]):hover,
a:not([class]):focus {
    color: #3f5530;
}

/* BACKGROUNDS & TEXT */

.bg-beige-light { background-color: var(--beige-light) !important; }
.bg-beige-mid   { background-color: var(--beige-mid) !important; }
.bg-beige-dark  { background-color: var(--beige-dark) !important; }

.text-brown     { color: var(--brown) !important; }

.border-brown   { border-color: var(--brown) !important; }
.border-menu    { border-color: #c4a081 !important; }

.geno-recessive {
    font-family: Georgia, "Times New Roman", serif;
    font-style: italic;
}

/* PROFILE PICTURE */

.profile-picture {
    width: 130px;
    height: 130px;
    object-fit: cover;
    border-radius: 50%;
    border: 3px solid var(--beige-dark);
}

/* DECORATIVE SIDE PANELS */

.decorative-side {
    width: 100%;
    height: 100%;
    background-image: url('/static/images/main_page_bg.svg');
    background-size: contain;
    background-position: center bottom;
    background-repeat: no-repeat;
    border-radius: 0;
    border: none;
}

.decorative-side-left {
    transform: scaleX(-1);
}

.profile-box {
    padding: 12px;
}

.profile-header {
    margin-bottom: 0;
    padding-bottom: 0;
}

.profile-rank-xp {
    margin-top: 6px;
    color: #ba8151;
    font-weight: 600;
    text-align: center;
    line-height: 1.2;
}

.profile-member-since {
    margin-top: 0;
    font-weight: 500;
    color: #94592e;
    font-size: 0.85em;
    text-align: center;
}

.profile-badges {
    margin-top: 8px;
    text-align: center;
}

.profile-badges-title {
    font-weight: 700;
    color: #94592e;
    font-size: 0.9em;
    margin-bottom: 4px;
}

.profile-badges-list {
    display: flex;
    justify-content: flex-start;
    gap: 14px;
    flex-wrap: nowrap;
    font-size: 0.85em;
    overflow-x: auto;
    overflow-y: visible;
    scroll-snap-type: x mandatory;
    padding: 6px 2px 16px;
    -webkit-overflow-scrolling: touch;
}

.profile-badges-list::-webkit-scrollbar {
    height: 8px;
}

.profile-badges-list::-webkit-scrollbar-thumb {
    background: rgba(148, 89, 46, 0.3);
    border-radius: 999px;
}

.profile-badge-item {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    scroll-snap-align: start;
}

.profile-badge-icon {
    width: 78px;
    height: 78px;
    object-fit: contain;
}

.profile-badge-tooltip {
    display: none !important;
}

.profile-badge-tooltip-title,
.profile-badge-hoverbox-title {
    font-weight: 700;
    color: #7a4724;
    font-size: 0.9rem;
    line-height: 1.25;
}

.profile-badge-tooltip-reason,
.profile-badge-hoverbox-reason {
    margin-top: 3px;
    font-size: 0.82rem;
    line-height: 1.25;
    color: #734b2b;
}

.profile-badge-bubble {
    position: fixed;
    z-index: 9999;
    pointer-events: none;
    display: none;
    max-width: 280px;
    padding: 8px 10px;
    border: 1px solid rgba(148, 89, 46, 0.45);
    border-radius: 8px;
    background: #fff8eb;
    box-shadow: 0 10px 24px rgba(54, 31, 17, 0.2);
    text-align: left;
}

.profile-badge-bubble.active {
    display: block;
}

.profile-bio {
    text-align: center;
    font-weight: 600;
    color: #1f1e1c;
}

/*   NAVIGATION TABS */

/* .navbar {
    background-color: var(--beige-mid) !important;
} */

.profile-tab {
    color: var(--brown) !important;
    font-weight: bold;
    cursor: pointer;
    padding: 10px 20px !important;
    border-radius: 6px;
    transition: 0.3s;
}

.profile-tab:hover,
.profile-tab.active {
    background-color: var(--beige-dark) !important;
    color: white !important;
}

/* BUTTONS */

.btn-brown {
    background-color: var(--beige-dark);
    color: white;
    border: 1px solid var(--brown);
    font-weight: bold;
}

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

.btn-outline-brown {
    background: transparent;
    color: var(--brown);
    border: 1.5px solid var(--brown);
    font-weight: bold;
}

.btn-outline-brown:hover {
    background: var(--brown);
    color: white;
}

#profileToggle i {
    display: inline-block; /* indispensable pour animer transform */
    transition: transform 0.3s ease;
}

#profileToggle i.rotate {
    transform: rotate(180deg);
}

/* CARDS (posts, horses, inventory) */

.card-post {
    background-color: var(--beige-light);
    border: 1px solid var(--beige-mid);
    border-radius: 10px;
    overflow: hidden;
    transition: transform 0.2s ease;
}

.card-post:hover {
    transform: translateY(-3px);
}

/* Profile gallery cards: force post-style frame */
.card-post.profile-card {
    position: relative;
    background: linear-gradient(180deg, #f5e8d4 0%, #e0d1ba 100%) !important;
    border: 5px solid #e7d2b3 !important;
    box-shadow: 0 0 0 1px #bb8f6b !important;
    overflow: visible !important;
    border-radius: 10px !important;
}

.card-post.profile-card::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(circle at 5px 5px, #e7d2b3 0 3px, transparent 4px),
        radial-gradient(circle at calc(100% - 5px) 5px, #e7d2b3 0 3px, transparent 4px),
        radial-gradient(circle at 5px calc(100% - 5px), #e7d2b3 0 3px, transparent 4px),
        radial-gradient(circle at calc(100% - 5px) calc(100% - 5px), #e7d2b3 0 3px, transparent 4px);
}

/* Fixe la hauteur des images */
.card-img-fixed {
    height: 140px;
    object-fit: cover;
}

.card-img-fixed.item-thumb-stat {
    height: 140px;
    object-fit: contain;
    padding: 6px;
}

/* ============================
   LIST GROUP (infos profil)
   ============================ */

.list-group-item {
    border: none;
    padding-left: 0;
    padding-right: 0;
    color: var(--brown);
    background-color: var(--beige-light);
}

  /* ========== USER TEMPLATES (LOGIN, REGISTER, EDIT PROFILE) ========== */

.user-form-wrapper {
    max-width: 500px;
    margin: 10px auto;
    padding: 30px;
    background-color: #f5e8d4 !important;
    border: 2px solid #b08a57;
    border-radius: 16px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    font-family: 'Cinzel', serif;
  }
  
  .user-form-wrapper h2 {
    text-align: center;
    margin-bottom: 20px;
    color: #5a2e0f;
  }
  
  .user-form-wrapper form {
    display: flex;
    flex-direction: column;
  }
  
  .user-form-wrapper label {
    margin-top: 10px;
    font-weight: bold;
    color: #5a2e0f;
  }
  
  .user-form-wrapper input,
  .user-form-wrapper select,
  .user-form-wrapper textarea {
    padding: 10px;
    margin-top: 4px;
    border: 1px solid #b08a57;
    border-radius: 8px;
    background-color: #fffaf2;
    font-size: 14px;
  }
  
  .user-form-wrapper button {
    margin-top: 20px;
    padding: 12px;
    background-color: #cd7838;
    color: white;
    font-weight: bold;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.3s ease;
  }
  
  .user-form-wrapper button:hover {
    background-color: #94592e;
  }
  
  .user-form-wrapper a {
    color: #94592e;
    text-decoration: none;
    margin-top: 10px;
    display: inline-block;
    text-align: center;
  }
  
  .user-form-wrapper a:hover {
    text-decoration: underline;
  }

  .form-errors {
    background-color: #fff1f1;
    border: 1px solid #d96060;
    border-radius: 8px;
    padding: 10px 15px;
    margin-bottom: 15px;
    list-style-type: none;
    color: #a62424 !important;
  }

  .errorlist{
    font-weight: 600;
    color: #c91414 !important;
  }  
  

  .logout-link {
    background: none;
    border: none;
    color: inherit;
    text-decoration: underline;
    cursor: pointer;
    font: inherit;
  }

    /* Empêche les inputs et textarea de dépasser */
    .user-form-wrapper input:not([type="checkbox"]),
    .user-form-wrapper select,
    .user-form-wrapper textarea {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }


/* ========== HORSE GALLERY STYLES ========== */

  .horse-gallery {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    padding: 20px 0;
  }
  
  .horse-card {
    background-color: #fef6e4;
    border: 2px solid #d4a373;
    border-radius: 12px;
    width: 180px;
    padding: 10px;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
  }
  
  .horse-image img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 10px;
  }
  
  .horse-info h3 {
    font-size: 1.1em;
    margin: 10px 0 4px;
    color: #5e3c1b;
  }
  
  .horse-info p {
    margin: 2px 0;
    font-size: 0.9em;
    color: #704f2c;
  }

  .card:hover {
    transform: scale(1.03);
    transition: transform 0.2s ease-in-out;
    cursor: pointer;
}

  
  
  /* ========== PAGINATION STYLES ========== */

  .pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 14px;
    padding: 30px 0;
    font-size: 1em;
    color: #5a2e0f;
  }

  .pagination-pages {
    display: inline-flex;
    align-items: center;
    gap: 8px;
  }

  .pagination-nav,
  .pagination-page {
    min-width: 38px;
    height: 38px;
    padding: 0 12px;
    border-radius: 999px;
    border: 1px solid #d8b58a;
    background: #f5ead7;
    color: #7b4f2c;
    text-decoration: none;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
  }

  .pagination-nav:hover,
  .pagination-page:hover {
    background: #e9d4b6;
    color: #5f3c21;
    border-color: #c89e70;
  }

  .pagination-page.active {
    background: #8c5c31;
    border-color: #8c5c31;
    color: #f8f0df;
    cursor: default;
    pointer-events: none;
  }

  .pagination-nav.disabled {
    opacity: 0.45;
    pointer-events: none;
    cursor: default;
  }

  .pagination-ellipsis {
    color: #9a7a56;
    font-weight: 700;
    min-width: 20px;
    text-align: center;
  }

.current-page {
    font-weight: bold;
    color: #5a2e0f;
}

@media (max-width: 545px) {
  [data-profile-section] {
    padding-left: 8px;
    padding-right: 8px;
  }

  [data-profile-section] .row {
    --bs-gutter-x: 0.5rem;
    --bs-gutter-y: 0.65rem;
  }

  [data-profile-section] .card,
  [data-profile-section] .card-post.profile-card {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0;
  }

  [data-profile-section] .card-body {
    padding: 0.55rem 0.5rem;
  }

  [data-profile-section] .card-title,
  [data-profile-section] .card-text,
  [data-profile-section] .card-description,
  [data-profile-section] .card-rank {
    word-break: normal;
    overflow-wrap: break-word;
    hyphens: auto;
  }

  #posts-section .row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem;
    margin: 0;
  }

  #posts-section .post-card {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
  }

  #posts-section .row > p {
    grid-column: 1 / -1;
  }
}

  @media (max-width: 575.98px) {
    .pagination {
      gap: 8px;
      padding: 20px 0;
    }

    .pagination-pages {
      gap: 6px;
    }

    .pagination-nav,
    .pagination-page {
      min-width: 32px;
      height: 32px;
      padding: 0 10px;
      font-size: 0.9rem;
    }
  }
  


  /* ========== HORSE DETAIL STYLES ========== */
  body {
    font-family: 'Cinzel', serif;
    background-color: #ebe3cd;
    color: #1f1e1c;
}

.horse-profile {
    max-width: 900px;
    margin: 40px auto;
    display: flex;
    flex-direction: column;
    gap: 18px;
    padding: 0 16px;
    background: transparent;
    border: none;
    box-shadow: none;
}

.horse-hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.frame {
    background-color: #e4d2b0;
    padding: 10px;
    border-radius: 8px;
    text-align: center;
    margin-bottom: 10px;
    border: 2px solid #94592e;
}

.horse-image {
    width: min(420px, 85vw);
    height: auto;
    max-height: 420px;
    object-fit: cover;
    border-radius: 12px;
    border: none;
    display: block;
    margin: 0 auto;
}

.horse-lineage-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    flex-wrap: wrap;
}

.parent-icons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 0;
}

.parent-icons img {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 50%;
    border: 2px solid #94592e;
}

.parent-label {
    text-align: center;
    font-size: 0.8em;
    color: #5a2e0f;
    margin-top: 4px;
}

.lineage-button {
    padding: 6px 12px;
    font-size: 0.9em;
}

.horse-owners {
    text-align: center;
    font-size: 0.9em;
    color: #5a2e0f;
}

.horse-owners a {
    color: #5a2e0f;
    text-decoration: none;
}

.horse-owners a:hover {
    text-decoration: underline;
}

.owner-sep {
    margin: 0 6px;
    color: #5a2e0f;
}

.horse-coowner-actions {
    margin-top: 6px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.horse-coowner-actions .btn-orange {
    padding: 4px 10px;
    font-size: 0.85em;
}

.horse-coowner-actions input[type="text"] {
    width: 220px;
    max-width: 70vw;
    padding: 6px 8px;
    font-size: 0.85em;
}

.horse-info-box {
    background: #f5e8d4;
    border: 1px solid #d9b987;
    border-radius: 10px;
    padding: 18px;
}

.horse-info-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}

.horse-info-left p,
.horse-info-right p {
    margin: 4px 0;
    line-height: 1.2;
}

.info-header {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 8px;
}

.horse-stats {
    margin-top: 10px;
}

.stats-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-top: 10px;
}

.stats-list {
    flex: 1;
    padding: 0;
    margin: 0;
}

.chart-container {
    flex: 1;
    max-width: 300px;
    margin: 0;
    height: 220px;
}

.horse-actions,
.horse-selling {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.horse-selling-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.horse-art-gallery {
    width: 100%;
    background: #f5e8d4;
    border: 1px solid #d9b987;
    border-radius: 10px;
    padding: 12px;
}

.horse-art-gallery-title {
    text-align: center;
    font-weight: 700;
    color: #5a2e0f;
    margin-bottom: 10px;
}

.horse-art-carousel-shell {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 8px;
}

.horse-art-carousel-arrow {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 1px solid #b08a57;
    background: #f5e8d4;
    color: #94592e;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}

.horse-art-carousel-arrow:hover {
    background: #ba8151;
    color: #f7eddc;
}

.horse-art-carousel-track {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 4px 2px 6px;
    scroll-behavior: smooth;
    scrollbar-width: thin;
}

.horse-art-card {
    flex: 0 0 180px;
    text-decoration: none;
    border: 1px solid #d9b987;
    border-radius: 10px;
    background: linear-gradient(180deg, #f6ead7 0%, #efe0c8 100%);
    overflow: hidden;
}

.horse-art-card:hover {
    border-color: #ba8151;
}

.horse-art-thumb-wrap {
    width: 100%;
    aspect-ratio: 1 / 1;
    background: #d8ccb8;
}

.horse-art-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.horse-art-meta {
    padding: 8px 10px 10px;
}

.horse-art-title {
    font-size: 0.9rem;
    color: #1f1e1c;
    line-height: 1.2;
    margin-bottom: 4px;
}

.horse-art-author {
    font-size: 0.82rem;
    color: #6c4b2b;
}

.horse-inventory {
    margin-top: 8px;
    width: 100%;
}

.horse-inventory-title {
    text-align: center;
    font-weight: 600;
    color: #5a2e0f;
    margin-bottom: 10px;
}

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

.horse-inventory-card {
    text-align: center;
}

.horse-inventory-card .card-body {
    padding: 8px 10px;
}

.horse-inventory-card .card-title {
    font-size: 0.9em;
    margin-bottom: 4px;
}

.horse-inventory-card .card-text {
    font-size: 0.85em;
}

.inventory-items {
    margin-top: 6px;
}

.inventory-item {
    font-size: 0.9em;
}

.inventory-empty {
    font-size: 0.9em;
    font-style: italic;
}

.design-submit-card {
    width: 100%;
    max-width: 760px;
    margin: 8px auto 0;
    padding: 14px 16px;
    background: #f5e8d4;
    border: 1px solid #d9b987;
    border-radius: 10px;
}

.design-submit-title {
    font-weight: 700;
    color: #5a2e0f;
    margin-bottom: 10px;
    text-align: center;
}

.design-submit-form {
    display: grid;
    gap: 10px;
}

.design-submit-form p {
    margin: 0;
    display: grid;
    gap: 6px;
}

.design-submit-form label {
    color: #5a2e0f;
    font-weight: 600;
    font-size: 0.92em;
}

.design-submit-form input[type="text"],
.design-submit-form input[type="url"],
.design-submit-form input[type="file"],
.design-submit-form textarea,
.design-submit-form select {
    width: 100%;
    border: 1px solid #cd7838;
    border-radius: 8px;
    background-color: #fffaf2;
    color: #1f1e1c;
    padding: 8px 10px;
}

.design-submit-form .helptext {
    color: #7a6a56;
    font-size: 0.82em;
}

.design-submit-form ul.errorlist {
    margin: 0 0 6px;
    padding-left: 18px;
    color: #9a2f2f;
    font-size: 0.85em;
}

.design-submit-form .btn-orange {
    width: fit-content;
    min-width: 180px;
    justify-self: center;
    padding: 10px 14px;
}

@media (max-width: 768px) {
    .horse-info-columns {
        grid-template-columns: 1fr;
    }

    .horse-image {
        width: 180px;
        height: 180px;
    }

    .horse-art-card {
        flex-basis: 150px;
    }

    .horse-art-carousel-shell {
        grid-template-columns: 1fr;
    }

    .horse-art-carousel-arrow {
        display: none;
    }
}

@media (max-width: 545px) {
    .design-submit-card {
        padding: 12px;
        border-radius: 8px;
    }

    .design-submit-title {
        font-size: 0.98rem;
    }

    .design-submit-form input[type="text"],
    .design-submit-form input[type="url"],
    .design-submit-form input[type="file"],
    .design-submit-form textarea,
    .design-submit-form select {
        font-size: 0.95rem;
        padding: 8px 9px;
    }

    .design-submit-form .btn-orange {
        width: 100%;
        min-width: 0;
    }
}

  .overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    display: none;
    z-index: 100;
}

.lineage-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: #fff8e1;
    padding: clamp(12px, 2vw, 20px);
    border-radius: 10px;
    border: 2px solid #94592e;
    z-index: 101;
    display: none;
    max-width: min(980px, 96vw);
    width: 96vw;
    max-height: 88vh;
    overflow: auto;
    box-shadow: 0px 0px 15px rgba(0,0,0,0.3);
}

.lineage-popup h3 {
    margin-top: 0;
    margin-bottom: 0;
    font-size: 1.3em;
    color: #5a2e0f;
}

.lineage-popup-header {
    position: sticky;
    top: 0;
    z-index: 2;
    background: #fff8e1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 8px;
    margin-bottom: 8px;
    border-bottom: 1px solid rgba(148, 89, 46, 0.25);
}

.lineage-popup-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.lineage-add-parents-btn {
    margin-bottom: 0;
}

.lineage-add-parents-form {
    display: grid;
    grid-template-columns: 1fr;
    gap: 6px;
    margin-bottom: 10px;
}

.lineage-add-parents-form label {
    font-weight: 700;
    color: #5a2e0f;
}

.lineage-add-parents-form input {
    border: 1px solid #ba8151;
    border-radius: 6px;
    background: #fffaf0;
    padding: 6px 8px;
}

.lineage-grid-scroll {
    overflow: auto;
    max-height: calc(88vh - 160px);
    padding-right: 2px;
}

.lineage-tree-stage {
    position: relative;
    width: 100%;
    padding: 8px 2px 12px;
}

.lineage-tree-svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

.lineage-tree-grid {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(4, minmax(132px, 1fr));
    grid-template-rows: repeat(12, minmax(0, auto));
    column-gap: 8px;
    row-gap: 4px;
    width: 100%;
}

.lineage-tree-card {
    grid-column: var(--tree-col);
    grid-row: var(--tree-row);
    justify-self: center;
    width: min(100%, 124px);
    min-height: 46px;
}

.lineage-card {
    display: flex;
    align-items: center;
    gap: 5px;
    border: 1px solid rgba(148, 89, 46, 0.35);
    border-radius: 8px;
    padding: 4px;
    background: rgba(255, 250, 240, 0.85);
    text-decoration: none;
    color: #1f1e1c;
}

.lineage-card-known:hover {
    border-color: #94592e;
    background: #fff6e8;
}

.lineage-card-unknown {
    opacity: 0.92;
}

.lineage-img {
    width: 34px;
    height: 34px;
    object-fit: cover;
    border-radius: 50%;
    border: 1px solid #94592e;
    flex: 0 0 auto;
}

.lineage-card-meta {
    min-width: 0;
}

.lineage-card-label {
    font-size: 0.68rem;
    color: #6c4b2b;
    line-height: 1.2;
}

.lineage-card-title {
    font-size: 0.8rem;
    font-weight: 700;
    color: #1f1e1c;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

@media (max-width: 768px) {
    .lineage-popup {
        max-height: 84vh;
    }

    .lineage-popup-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .lineage-popup-actions {
        width: 100%;
        justify-content: space-between;
    }

    .lineage-tree-grid {
        grid-template-columns: repeat(4, minmax(94px, 1fr));
        column-gap: 4px;
        row-gap: 6px;
    }

    .lineage-tree-card {
        width: min(100%, 98px);
        min-height: 42px;
    }

    .lineage-img {
        width: 28px;
        height: 28px;
    }
}

.close-btn {
    margin-top: 0;
    padding: 6px 12px;
    background-color: #c49b6c;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
}

.close-btn:hover {
    background-color: #a87a4f;
}

.design-upload-popup {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(22, 20, 16, 0.55);
    padding: 18px;
}

.design-upload-popup.is-visible {
    display: flex;
}

.design-upload-popup-card {
    width: min(420px, 94vw);
    background: #f8eddc;
    border: 2px solid #ba8151;
    border-radius: 12px;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.22);
    padding: 16px 14px;
    text-align: center;
}

.design-upload-popup-card p {
    margin: 0 0 12px;
    color: #5a2e0f;
    font-weight: 700;
}


.claim-header {
    color: #1f1e1c;
    font-weight: bold;
    padding: 10px;
    margin-bottom: 15px;
    font-size: 1.2em;
}

.claim-form input,
.claim-form textarea,
.claim-form select {
    border: 1px solid #cd7838;
    border-radius: 6px;
    background-color: #fffaf0;
    font-family: 'Cinzel', serif;
    width: 80%;
}


.form-container {
    max-width: 600px;
    margin: 50px auto;
    padding: 30px;
    background-color: #f8f1e4;
    border-radius: 12px;
    border: 2px solid #ba8151;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    font-family: 'Cinzel', serif;
    color: #1f1e1c;
}

.form-container h2 {
    text-align: center;
    margin-bottom: 20px;
    background-color: #e4d2b0;
    border: 2px solid #94592e;
    border-radius: 10px;
    padding: 10px;
}

.form-container form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.form-container input[type="text"],
.form-container input[type="number"],
.form-container input[type="file"],
.form-container textarea,
.form-container select {
    padding: 10px;
    border-radius: 6px;
    border: 1px solid #cd7838;
    background-color: #fffaf2;
    font-size: 1em;
}

.btn-orange {
    background: linear-gradient(135deg, #d4a373, #b08968);
    color: white;
    padding: 12px;
    border: none;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s ease;
    text-align: center;
}

.btn-orange:hover {
    background: linear-gradient(135deg, #e0a96d, #a67c52);
}

.form-container a {
    display: block;
    margin-top: 20px;
    color: #94592e;
    text-align: center;
    font-weight: bold;
    text-decoration: none;
}


/* ========== ADMIN PAGE STYLES ========== */

.admin-panel {
    padding: 40px;
    background-color: #f5ebd8;
    border-radius: 10px;
    margin: 40px auto;
    max-width: 1000px;
    border: 2px solid #ba8151;
    overflow-x: hidden;
}

.admin-header {
    text-align: center;
    margin-bottom: 20px;
    color: #94592e;
    font-size: 28px;
}

.admin-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.admin-header-btn {
    padding: 8px 14px;
    text-decoration: none;
    font-size: 0.95em;
}

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

.admin-stat-card {
    background: #fffaf2;
    border: 2px solid #ba8151;
    border-radius: 8px;
    padding: 10px 12px;
    text-align: center;
    color: #5a2e0f;
}

.admin-stats-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}

.admin-subtitle {
    margin: 12px 0;
    font-size: 18px;
    color: #5a2e0f;
    text-align: center;
}

@media (max-width: 768px) {
    .admin-header-row {
        flex-direction: column;
    }

    .admin-stats-columns {
        grid-template-columns: 1fr;
    }
}

.admin-section {
    margin-top: 24px;
    overflow-x: auto;
}

.admin-section-title {
    margin: 0 0 12px;
    color: #5a2e0f;
    font-size: 22px;
    text-align: center;
}

.claim-table {
    width: 100%;
    border-collapse: collapse;
    background-color: #fffaf2;
    border: 2px solid #ba8151;
    table-layout: fixed;
}

.claim-table th,
.claim-table td {
    padding: 12px;
    border: 1px solid #d4a373;
    text-align: center;
    vertical-align: top;
    white-space: normal;
    word-break: break-word;
    overflow-wrap: anywhere;
}

.claim-table th {
    background-color: #e0c899;
    color: #1f1e1c;
}

.action-buttons {
    display: flex;
    gap: 8px;
    justify-content: center;
    align-items: flex-start;
    flex-wrap: wrap;
}

.action-buttons form {
    max-width: 100%;
}

.action-buttons input[type="text"],
.action-buttons input[type="number"],
.action-buttons textarea,
.claim-table td input[type="text"],
.claim-table td input[type="number"],
.claim-table td textarea {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.btn-approve,
.btn-decline {
    border: none;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 16px;
    cursor: pointer;
}

.btn-approve {
    background-color: #b4cbac;
    color: #1f1e1c;
}

.btn-decline {
    background-color: #cd7838;
    color: white;
}

.no-claims {
    text-align: center;
    font-style: italic;
    color: #737454;
    margin-top: 20px;
}

/* ========== ADMIN SWITCH ========== */
.admin-switch {
    margin: 20px 0 30px;
    padding: 16px;
    border: 2px solid #ba8151;
    background: #fffaf2;
    border-radius: 10px;
}

.admin-switch-title {
    font-size: 20px;
    color: #94592e;
    margin-bottom: 10px;
    text-align: center;
}

.admin-switch-form {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    flex-wrap: wrap;
}

.admin-switch-toggle {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.admin-switch-toggle input {
    display: none;
}

.admin-switch-slider {
    width: 52px;
    height: 28px;
    background: #d4a373;
    border: 1.5px solid #94592e;
    border-radius: 999px;
    position: relative;
    transition: background 0.2s ease;
}

.admin-switch-slider::after {
    content: "";
    width: 22px;
    height: 22px;
    background: #f5ebd8;
    border: 1.5px solid #94592e;
    border-radius: 50%;
    position: absolute;
    top: 2px;
    left: 2px;
    transition: transform 0.2s ease;
}

.admin-switch-toggle input:checked + .admin-switch-slider {
    background: #b4cbac;
}

.admin-switch-toggle input:checked + .admin-switch-slider::after {
    transform: translateX(24px);
}

.admin-switch-label {
    font-weight: bold;
    color: #1f1e1c;
}

.admin-switch-save {
    padding: 8px 16px;
}

.admin-switch-note {
    margin-top: 10px;
    text-align: center;
    font-style: italic;
    color: #737454;
}

/* ========== SELL HORSE STYLES ========== */

.form-wrapper {
    max-width: 640px;
    margin: 40px auto;
    padding: 24px;
    background: linear-gradient(180deg, #f5e8d4 0%, #e0d1ba 100%);
    border: 5px solid #e7d2b3;
    box-shadow: 0 0 0 1px #bb8f6b;
    border-radius: 12px;
}

.form-title {
    text-align: center;
    font-size: 24px;
    color: #94592e;
    margin-bottom: 20px;
}

.form-box {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.form-subtitle {
    text-align: center;
    margin: 0 0 8px;
    color: #5a2e0f;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    font-weight: 600;
    color: #5a2e0f;
    margin-bottom: 6px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    border-radius: 8px;
    border: 1.5px solid #bb8f6b;
    padding: 10px 12px;
    background: #fdf6e3;
    color: #1f1e1c;
}

.form-cancel {
    display: inline-block;
    text-align: center;
    color: #5a2e0f;
    text-decoration: none;
}

.form-cancel:hover {
    text-decoration: underline;
}


.sale-description {
    padding: 6px;
    background-color: #fdf5e6;
    border-left: 3px solid #d98737;
    margin-top: 8px;
    border-radius: 4px;
}

/* INBOX / CHAT */

/* Thème global */
.chat-body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: #3b2f2f;
}

.chat-container {
    max-width: 1200px;
}

/* Titres */
.chat-title {
    font-size: 1.6rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #5b3e1a;
}

.chat-subtitle {
    color: #8a6b3f;
}

/* Panels */
.chat-panel {
    border-radius: 16px;
    border: 1px solid #d2c2a9;
    background: linear-gradient(145deg, #fffdf7, #f3e6cf);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
    padding:5px;
}

.chat-panel-conversation {
    display: flex;
    flex-direction: column;
    height: fit-content;
    min-height: 360px;
}

/* Inputs */
.chat-input {
    border: 1px solid #d6c6aa;
    background-color: #fffaf2;
}

.chat-input:focus {
    border-color: #b9975b;
    box-shadow: 0 0 0 0.15rem rgba(185, 151, 91, 0.35);
}

.chat-input-group-text {
    border-radius: 999px 0 0 999px;
    border: 1px solid #d6c6aa;
    border-right: 0;
    background-color: #f7eddc;
}

/* Contacts */

.chat-contact-list {
    max-height: calc(100vh - 230px);
    overflow-y: auto;
    overflow-x: auto;
    border-radius: 12px;
    border: none;
    padding : 8px !important;

}

.chat-contact-item {
    border: none;
    border-radius: 12px !important;
    margin-bottom: 10px;
    background-color: transparent;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.1s ease;
    overflow: hidden;
    min-width: 0;
    padding-left: calc(var(--bs-list-group-item-padding-x) - 10px);
}

.chat-contact-item .flex-grow-1 {
    min-width: 0;         /* ← super important avec flex + ellipsis */
}

.chat-contact-item:hover {
    background-color: rgba(189, 164, 110, 0.15);
    transform: scale(1.03);
}

.chat-contact-item.active {
    background-color: rgba(120, 148, 104, 0.2) !important;
    border-color: rgba(120, 148, 104, 0.35) !important;
    color: inherit !important;
}

.chat-contact-avatar {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid rgba(163, 132, 86, 0.5);
    background-color: #fdf5e6;
}

.chat-contact-name {
    font-weight: 600;
    color: #4a341b;
}

.chat-contact-lastmsg {
    font-size: 0.78rem;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
}

.chat-contact-lastmsg.unread {
    font-weight: 700;
    color: #000000;
}

.chat-contact-lastmsg.unread::after {
    content: "";
    width: 18px;
    height: 12px;
    background: #155daac2;
    border-radius: 0 12px 0 8px;
    position: absolute;
    right: 0;
    top: 0;
}

.chat-contact-lasttime {
    font-size: 0.7rem;
    position: absolute;
    right: 5px;
}

.chat-contact-avatar img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block; /* évite les espaces fantômes */
}

/* Searchbar */

.chat-search-wrapper {
    position: relative;
}

.chat-search-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #ddd;
    border-top: none;
    border-radius: 0 0 4px 4px;
    max-height: 300px;
    overflow-y: auto;
    z-index: 9999;
    display: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.suggestion-item {
    display: flex;
    align-items: center;
    padding: 5px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.15s ease;
}

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

.suggestion-item:hover {
    background: #f9f9f9;
}

.suggestion-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    margin-right: 12px;
    object-fit: cover;
    flex-shrink: 0;
}

.suggestion-name {
    font-size: 14px;
    font-weight: 500;
    color: #202124;
}

/* Wrapper général du blocage */
.chat-block-wrapper {
    position: relative;
    display: inline-flex;
    align-items: center;
}

/* Tooltip blocage */
.chat-block-tooltip {
    position: absolute;
    right: 120%;
    top: 50%;
    transform: translateY(-50%) translateX(8px);
    min-width: 220px;
    max-width: 280px;
    background-color: #ffffff;
    border-radius: 12px;
    border: 1px solid #d6c6aa;
    padding: 8px 10px;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.12);
    font-size: 0.8rem;
    z-index: 1001;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.18s ease, transform 0.18s ease;
}

.chat-block-tooltip::after {
    content: "";
    position: absolute;
    right: -8px;
    top: 50%;
    transform: translateY(-50%);
    border-width: 8px;
    border-style: solid;
    border-color: transparent transparent transparent #ffffff;
}

.chat-block-tooltip.visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(-50%) translateX(0);
}


/* Bouton block normal */
.chat-block-btn {
    transition: background-color 0.2s ease, color 0.2s ease, transform 0.15s ease;
    border: none !important;
    box-shadow: none !important;
}

/* Hover → devient rouge */
.chat-block-btn:hover {
    background-color: #dc3545;
    color: #fff;
}

/* Bouton "Blocked" */
.chat-blocked-badge {
    cursor: default;
}

/* Bouton Unblock */
.chat-unblock-btn {
    transition: background-color 0.2s ease, color 0.2s ease;
}

/* Bandeau de confirmation Block */
.chat-block-confirm-bar,
.chat-unblock-confirm-bar {
    position: absolute;
    top: 0;
    right: 0;
    left: auto;
    height: 100%;
    white-space: nowrap;
    display: flex;
    align-items: center;
    padding: 0 0.6rem;
    border-radius: 999px;
    opacity: 0;
    pointer-events: none;
    transform: scaleX(0);
    transform-origin: right center;
    transition: transform 0.2s ease-out, opacity 0.2s ease-out;
    z-index: 10;
}

.btn-xs {
    padding: 0.1rem 0.35rem;
    font-size: 0.7rem;
    line-height: 1;
    border-radius: 0.35rem;
}

/* Couleurs spécifiques */
.chat-block-confirm-bar {
    background-color: #f8d7da; /* rouge clair */
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.chat-unblock-confirm-bar {
    background-color: #e2e3e5; /* gris clair */
    color: #383d41;
    border: 1px solid #d6d8db;
}

/* Texte dans le bandeau */
.chat-block-confirm-text {
    font-size: 0.8rem;
}

/* État "ouvert" du bandeau */
.chat-block-wrapper.confirm-block-open .chat-block-confirm-bar,
.chat-block-wrapper.confirm-unblock-open .chat-unblock-confirm-bar {
    opacity: 1;
    pointer-events: auto;
    transform: scaleX(1);
}

/* Quand le bandeau est ouvert, on masque les boutons */
.chat-block-wrapper.confirm-block-open .chat-block-btn,
.chat-block-wrapper.confirm-block-open .chat-unblock-btn,
.chat-block-wrapper.confirm-block-open .chat-blocked-badge,
.chat-block-wrapper.confirm-unblock-open .chat-block-btn,
.chat-block-wrapper.confirm-unblock-open .chat-unblock-btn,
.chat-block-wrapper.confirm-unblock-open .chat-blocked-badge {
    opacity: 0;
    pointer-events: none;
}

/* Griser un contact dans la liste */
.chat-contact-item.blocked,
.chat-contact-item.admin-banned {
    filter: grayscale(1);
    opacity: 0.7;
}

/* Griser la conversation */
.chat-conversation-disabled {
    filter: grayscale(1);
    opacity: 0.7;
}

/* Bandeau info dans la zone de saisie */
.chat-block-banner {
    background-color: #e2e3e5;
    color: #383d41;
    border-radius: 0.375rem;
    padding: 0.5rem 0.75rem;
    font-size: 0.85rem;
    margin-bottom: 0.25rem;
}

/* Variante admin */
.chat-block-banner-admin {
    background-color: #f8d7da;
    color: #721c24;
}

/* Masquer textarea + bouton quand bloqué/banni */
.chat-input-disabled textarea,
.chat-input-disabled button {
    pointer-events: none;
    opacity: 0.5;
}

.chat-input-hidden {
    display: none;
}

.chat-block-banner-user {
    background-color: #e2e3e5;
    color: #383d41;
}

/* Conversation */

.conversation-placeholder {
    text-align: center;
    padding: 40px 20px;
    color: #6c757d;
    font-size: 1.1rem;
}

.chat-conversation-header {
    border-bottom: none;
    background: transparent;
}

.chat-messages-wrapper {
    flex: 1;
    overflow: hidden;
}

.chat-messages {
    height: calc(100vh - 440px);
    overflow-y: auto;
    padding: 12px 16px;
}

/* Bulles de messages */
.chat-message-row {
    display: flex;
    margin-bottom: 6px;
}

.chat-message-row.me {
    justify-content: flex-end;
}

.chat-message-row.other {
    justify-content: flex-start;
}

.chat-message-bubble {
    max-width: 75%;
    border-radius: 18px;
    padding: 8px 12px;
    font-size: 0.9rem;
    position: relative;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.08);
    animation: chatMessageFadeIn 0.18s ease-out;
}

.chat-message-bubble.me {
    background: linear-gradient(135deg, #e5f0dd, #cfdcbe);
    border-bottom-right-radius: 4px;
}

.chat-message-bubble.other {
    background: linear-gradient(135deg, #fdf5e6, #f1e0c7);
    border-bottom-left-radius: 4px;
}

.chat-message-text {
    white-space: pre-wrap;
    word-wrap: break-word;
}

.chat-message-meta {
    font-size: 0.7rem;
    color: #7b6a54;
    margin-top: 3px;
    text-align: right;
}

/* Animation apparitions messages */
@keyframes chatMessageFadeIn {
    from {
        opacity: 0;
        transform: translateY(4px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Footer / input message */
.chat-input-footer {
    border-top: 1px solid #dacaaa;
    background: linear-gradient(180deg, #f8efdf, #f4e5c9);
    position: relative;
}

.chat-send-btn {
    border-radius: 999px;
    background: #ba8151;
    border-color: #ba8151;
}

.chat-send-btn:hover {
    background: #94592e;
    border-color: #94592e;
}

/* Bulle rate limit */
.chat-rate-limit-bubble {
    position: absolute;
    top: -30px;
    left: 12px;
    right: 12px;
    border: 1px solid #f1c675;
    background-color: #fff7e1;
    opacity: 0;
    pointer-events: none;
    transform: translateY(8px);
    transition: opacity 0.2s ease, transform 0.2s ease;
    font-size: 0.8rem;
}

.chat-rate-limit-bubble.visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

/* Bouton refresh */
.chat-refresh-btn {
    padding: 0 !important;
    width: 28px;
    height: 28px;
    margin: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.chat-refresh-btn i {
    font-size: 1rem;
}

.chat-refresh-wrapper:hover .chat-refresh-tooltip {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(-50%) translateX(0);
}

.chat-refresh-wrapper {
    display: inline-flex;
    align-items: center;
    height: 100%;
}

.chat-refresh-tooltip {
    position: absolute;
    right: 120%;
    top: 50%;
    transform: translateY(-50%) translateX(8px);
    min-width: 240px;
    max-width: 320px;
    background-color: #ffffff;
    border-radius: 12px;
    border: 1px solid #d6c6aa;
    padding: 8px 10px;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.12);
    font-size: 0.8rem;
    z-index: 1001;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.18s ease, transform 0.18s ease;
}

.chat-refresh-tooltip::after {
    content: "";
    position: absolute;
    right: -8px;
    top: 50%;
    transform: translateY(-50%);
    border-width: 8px;
    border-style: solid;
    border-color: transparent transparent transparent #ffffff;
}

/* Tooltip d’aide */
.chat-help-btn {
    font-size: 1.5rem;
    color: #8a6b3f;
    position: relative;
}

.help-icon {
    animation: helpIconIdle 3s infinite ease-in-out;
}

@keyframes helpIconIdle {
    0%, 80%, 100% {
        transform: translateY(0);
    }
    85% {
        transform: translateY(-2px);
    }
    90% {
        transform: translateY(1px);
    }
    95% {
        transform: translateY(-1px);
    }
}

/* Bulle d’aide */
.chat-help-tooltip {
    position: absolute;
    right: 120%;
    top: 50%;
    transform: translateY(-50%) translateX(8px);
    min-width: 260px;
    max-width: 320px;
    background-color: #ffffff;
    border-radius: 12px;
    border: 1px solid #d6c6aa;
    padding: 10px 12px;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.12);
    font-size: 0.85rem;
    z-index: 1001;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.18s ease, transform 0.18s ease;
}

.chat-help-tooltip::after {
    content: "";
    position: absolute;
    right: -8px;
    top: 50%;
    transform: translateY(-50%);
    border-width: 8px;
    border-style: solid;
    border-color: transparent transparent transparent #ffffff;
}

.chat-help-tooltip.visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(-50%) translateX(0);
}

@media (max-width: 768px) {
    .main-container.flex-layout {
        flex-direction: column;
    }

    .sidebar {
        display: none;
    }

    .mobile-sidebar-strip {
        margin: 16px 0 8px;
    }

    .mobile-sidebar-track {
        display: grid;
        grid-auto-flow: column;
        grid-auto-columns: minmax(180px, 60vw);
        gap: 12px;
        overflow-x: scroll;
        padding: 4px 4px 12px;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        scrollbar-gutter: stable;
        scrollbar-width: auto;
        scrollbar-color: #d98737 #ead8bb;
    }

    .mobile-sidebar-track::-webkit-scrollbar {
        height: 10px;
    }

    .mobile-sidebar-track::-webkit-scrollbar-track {
        background: #ead8bb;
        border-radius: 999px;
    }

    .mobile-sidebar-track::-webkit-scrollbar-thumb {
        background: #d98737;
        border-radius: 999px;
        border: 1px solid #b36d2a;
    }

    .mobile-sidebar-track::-webkit-scrollbar-thumb:hover {
        background: #c5772f;
    }

    .mobile-doc-card {
        background-color: #ebe3cd;
        border: 1.5px solid #94592e;
        border-radius: 12px;
        padding: 10px;
        text-decoration: none;
        color: inherit;
        font-weight: bold;
        box-shadow: inset 0 0 0 4px #e4d2b0;
        scroll-snap-align: start;
        min-height: 210px;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
    }

    .mobile-doc-card img {
        width: 100%;
        border-radius: 8px;
        margin-top: 8px;
        height: 110px;
        object-fit: cover;
    }

    .mobile-doc-card img.doc-card-image-small {
        height: 92px;
        object-fit: contain;
        background: #f5e8d4;
    }

    .mobile-doc-card p {
        margin-top: 6px;
        font-size: 0.75rem;
        color: #ba8151;
    }
}

.chat-profile-link {
    color: inherit;
    text-decoration: none;
}

.chat-profile-link:hover {
    text-decoration: underline;
}

/* Overlay global */
.chat-global-overlay {
    position: fixed;
    inset: 0;
    background: transparent;
    z-index: 1000;
    display: none;
}

/* Mobile tabs */
.chat-mobile-tabs {
    background-color: rgba(245, 231, 202, 0.9);
    border-radius: 999px;
    padding: 4px;
}

.chat-tab-button {
    border-radius: 999px !important;
    border: none !important;
    font-size: 0.9rem;
    color: #7a5f37;
}

.chat-tab-button.active {
    background: linear-gradient(135deg, #c8dbb0, #9cb784);
    color: #2f3b23;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.18);
}

/* scrollbar  */

.chat-contact-list::-webkit-scrollbar,
    .chat-messages::-webkit-scrollbar {
        width: 10px;
    }

    .chat-contact-list::-webkit-scrollbar-track,
    .chat-messages::-webkit-scrollbar-track {
        background: #f3e7d3; /* beige clair */
        border-radius: 10px;
    }

    .chat-contact-list::-webkit-scrollbar-thumb,
    .chat-messages::-webkit-scrollbar-thumb {
        background: #d2b48c; /* beige plus foncé */
        border-radius: 10px;
        border: 2px solid #f3e7d3; /* effet creusé */
    }

    .chat-contact-list::-webkit-scrollbar-thumb:hover,
    .chat-messages::-webkit-scrollbar-thumb:hover {
        background: #c19a6b; /* beige encore plus foncé au hover */
    }


/* Responsive */
@media (max-width: 767.98px) {
    .chat-panel-conversation {
        height: auto;
        min-height: 320px;
    }

    #conversationColumn {
        display: none;
    }

    #conversationColumn.active-mobile {
        display: block;
    }

    #contactsColumn {
        display: block;
    }

    #contactsColumn.hidden-mobile {
        display: none;
    }

    .chat-contact-list {
        max-height: calc(100vh - 260px);
    }

    /* MODAL */
    .modal-beige {
        background-color: #f5e8d4 !important;
    }

    .helptext {
        display: block;
        margin-top: 4px;
    }

    #passwordModal p label {
        display: inline-block;
        margin-right: 8px;
    }

    #passwordModal p input {
        display: inline-block;
    }
}
/* ========== POST DETAIL AJAX ANIMATIONS ========== */

/* Like button animation */
#like-button {
    transition: all 0.3s ease;
    transform: scale(1);
}

#like-button:hover {
    transform: scale(1.05);
}

#like-button.liked {
    color: #e74c3c;
}

#like-button.like-animate {
    animation: likeHeartBeat 0.4s ease;
}

@keyframes likeHeartBeat {
    0% { transform: scale(1); }
    25% { transform: scale(1.3); }
    50% { transform: scale(1); }
    75% { transform: scale(1.3); }
    100% { transform: scale(1); }
}

/* Comment animations */
.comment-new {
    animation: slideInComment 0.4s ease;
}

@keyframes slideInComment {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.comment-delete-animate {
    animation: slideOutComment 0.4s ease forwards;
}

@keyframes slideOutComment {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(100%);
    }
}

/* Button loading state */
.btn-success-flash {
    animation: buttonFlash 0.5s ease;
}

@keyframes buttonFlash {
    0%, 100% { background-color: inherit; }
    50% { background-color: #28a745; }
}

/* Notifications */
.post-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    min-width: 300px;
    z-index: 1500;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border-radius: 8px;
    opacity: 0;
    transition: opacity 0.3s ease;
    animation: slideInNotification 0.3s ease;
}

.post-notification.show {
    opacity: 1;
}

.post-header {
    position: relative;
}

.post-edit-gear {
    background: #f5e8d4;
    border: 1.5px solid #94592e;
    color: #5a2e0f;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, transform 0.2s ease;
}

.post-edit-gear:hover {
    background: #d98737;
    color: #fff;
    transform: translateY(-1px);
}

.post-edit-audit-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 44vh;
    overflow-y: auto;
    padding-right: 4px;
}

.post-edit-audit-row {
    border: 1px solid #c89a6d;
    border-radius: 10px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.35);
}

.post-edit-audit-row-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 8px;
    flex-wrap: wrap;
}

.post-edit-audit-row-head .small {
    color: #6c4b2b;
}

@keyframes slideInNotification {
    from {
        opacity: 0;
        transform: translateX(400px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Disabled button state */
button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Comment item hover effect */
.comment-item {
    transition: background-color 0.2s ease;
    position: relative;
}

.comment-item:hover {
    background-color: rgba(0, 0, 0, 0.02);
}

/* Textarea auto-expand */
#comment-input {
    resize: vertical;
    min-height: 60px;
    transition: height 0.2s ease;
}

/* Responsive notifications for mobile */
@media (max-width: 640px) {
    .post-notification {
        min-width: calc(100vw - 40px);
        right: 20px;
        left: 20px;
    }
}

/* ========== QUESTS ========== */
.quest-shell {
    display: flex;
    gap: 20px;
    width: 100%;
    padding: 20px;
    box-sizing: border-box;
}

.quest-sidebar {
    width: 240px;
    min-width: 220px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.quest-sidebar-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: #5e3c1b;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.quest-list-item {
    background: #ebe3cd;
    border: 1.5px solid #94592e;
    border-radius: 10px;
    padding: 10px;
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.quest-list-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.12);
}

.quest-list-item.active {
    box-shadow: inset 0 0 0 2px #d98737;
}

.quest-list-item.locked {
    opacity: 0.6;
    cursor: not-allowed;
}

.quest-list-title {
    font-weight: bold;
}

.quest-list-summary {
    margin-top: 4px;
    font-size: 0.8rem;
    color: #8a6b3f;
}

.quest-list-status {
    margin-top: 6px;
    font-size: 0.75rem;
    text-transform: uppercase;
    color: #94592e;
}

.quest-stage {
    flex: 1;
    min-width: 0;
}

.quest-scene {
    position: relative;
    display: grid;
    grid-template-rows: 1fr auto;
    min-height: 620px;
    border: 2px solid #94592e;
    border-radius: 12px;
    overflow: hidden;
    background-size: cover;
    background-position: center;
}

.quest-sprite-layer {
    grid-row: 1;
    display: flex;
    align-items: flex-end;
    gap: 12px;
    padding: 0 2%;
    position: relative;
    pointer-events: none;
}

.quest-sprite {
    position: relative;
    max-height: 70%;
    max-width: 38%;
    width: auto;
    pointer-events: none;
}

.quest-sprite.left {
    margin-right: auto;
}

.quest-sprite.right {
    margin-left: auto;
}

.quest-dialogue {
    grid-row: 2;
    background: rgba(235, 227, 205, 0.96);
    border-top: 2px solid #94592e;
    padding: 12px 16px 48px;
    min-height: 180px;
    box-sizing: border-box;
}

.quest-dialogue-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.quest-dialogue-title {
    font-size: 1.2rem;
    font-weight: bold;
    color: #5e3c1b;
}

.quest-badge {
    background: #b4cbac;
    border: 1px solid #5a2e0f;
    border-radius: 999px;
    padding: 2px 10px;
    font-size: 0.75rem;
}

.quest-badge.active {
    background: #d98737;
    color: #fff;
}

.quest-dialogue-lines p {
    margin: 0 0 6px;
    font-size: 0.95rem;
}

.quest-dialogue-lines {
    max-height: 110px;
    overflow-y: auto;
    padding-right: 6px;
}

.quest-speaker {
    font-weight: bold;
    color: #5a2e0f;
}

.quest-actions {
    margin-top: 10px;
}

.quest-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.quest-form-title {
    font-weight: bold;
    color: #5a2e0f;
    margin-bottom: 4px;
}

.quest-select {
    padding: 8px;
    border-radius: 8px;
    border: 1.5px solid #94592e;
    background: #f5e8d4;
}

.quest-btn {
    align-self: flex-start;
    background: #d98737;
    color: #fff;
    border: 1.5px solid #94592e;
    padding: 8px 16px;
    border-radius: 10px;
    cursor: pointer;
    font-family: 'Cinzel', serif;
}

.quest-btn:hover {
    background: #94592e;
}

.quest-summary-card {
    background: #fffaf2;
    border: 1.5px solid #94592e;
    border-radius: 12px;
    padding: 12px;
    margin-bottom: 12px;
}

.quest-summary-title {
    font-size: 1.2rem;
    font-weight: bold;
    margin-bottom: 6px;
    color: #5a2e0f;
}

.quest-summary-text {
    font-size: 0.95rem;
    margin-bottom: 6px;
    color: #6b5a45;
}

.quest-summary-reward {
    font-size: 0.85rem;
    font-weight: 600;
    color: #94592e;
}

.quest-advance-form {
    position: absolute;
    right: 16px;
    bottom: 12px;
}

.quest-next-btn {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 1.5px solid #94592e;
    background: #d98737;
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.12);
    font-size: 0.75rem;
}

.quest-next-btn:hover {
    background: #94592e;
}

.quest-alert {
    padding: 8px 12px;
    border-radius: 8px;
    margin-bottom: 8px;
    font-size: 0.85rem;
}

.quest-alert.error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

.quest-alert.notice {
    background: #fff7e1;
    border: 1px solid #f1c675;
    color: #6b4c15;
}

.quest-muted {
    font-size: 0.9rem;
    color: #6b5a45;
}

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

.quest-horse-card {
    border: 1.5px solid #94592e;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    background: #e4d2b0;
    transition: transform 0.15s ease, box-shadow 0.2s ease;
}

.quest-horse-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 10px rgba(0, 0, 0, 0.12);
}

.quest-horse-card input {
    display: none;
}

.quest-horse-card-body {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 8px;
}

.quest-horse-card-body img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: 6px;
}

.quest-horse-card input:checked + .quest-horse-card-body {
    outline: 2px solid #d98737;
    box-shadow: 0 0 0 2px #d98737;
    background: #f1d9a9;
}

.quest-horse-card input:checked + .quest-horse-card-body .quest-horse-name {
    color: #5a2e0f;
}

.quest-horse-name {
    font-size: 0.85rem;
    font-weight: bold;
    text-align: center;
}

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

.quest-post-card {
    border: 1.5px solid #94592e;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    background: #e4d2b0;
    transition: transform 0.15s ease, box-shadow 0.2s ease;
}

.quest-post-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 10px rgba(0, 0, 0, 0.12);
}

.quest-post-card input {
    display: none;
}

.quest-post-card-body {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 8px;
    text-align: center;
}

.quest-post-card-body img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: 6px;
}

.quest-post-title {
    font-size: 0.85rem;
    font-weight: bold;
}

.quest-post-card input:checked + .quest-post-card-body {
    outline: 2px solid #d98737;
    box-shadow: 0 0 0 2px #d98737;
    background: #f1d9a9;
}

.quest-foal-card {
    background: #fffaf2;
    border: 1.5px solid #94592e;
    border-radius: 10px;
    padding: 10px;
    margin-bottom: 10px;
}

.quest-foal-title {
    font-weight: bold;
    margin-bottom: 6px;
}

.quest-foal-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 6px;
    font-size: 0.85rem;
}

.quest-modal .modal-body {
    max-height: 70vh;
    overflow-y: auto;
}

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

.quest-horse-meta {
    font-size: 0.75rem;
    color: #5a2e0f;
    line-height: 1.2;
}

@media (max-width: 992px) {
    .quest-parents-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 900px) {
    .quest-shell {
        flex-direction: column;
    }

    .quest-sidebar {
        width: 100%;
        flex-direction: row;
        overflow-x: auto;
    }

    .quest-list-item {
        min-width: 220px;
    }
}

/* =========================
   EVENTS
========================= */
.event-carousel {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    border: 1.5px solid #94592e;
    background: #e4d2b0;
    height: 200px;
}

.event-carousel-track {
    position: relative;
    height: 100%;
}

.event-carousel-slide {
    display: none;
    position: relative;
    height: 100%;
}

.event-carousel-slide.is-active {
    display: block;
}

.event-carousel-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.event-carousel-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 6px;
    padding: 18px;
    background: linear-gradient(180deg, rgba(0,0,0,0.0) 30%, rgba(0,0,0,0.55) 100%);
    color: #fff;
}

.event-carousel-title {
    font-size: 1.6rem;
    font-weight: 700;
    text-shadow: 0 2px 6px rgba(0,0,0,0.5);
}

.event-carousel-subtitle {
    font-size: 0.9rem;
    color: #f5e8d4;
}

.event-carousel-link {
    align-self: flex-start;
    padding: 6px 12px;
    background: rgba(217, 135, 55, 0.9);
    border: 1.5px solid #94592e;
    border-radius: 999px;
    color: #fff;
    text-decoration: none;
    font-size: 0.9rem;
    transition: transform 0.2s ease, filter 0.2s ease;
}

.event-carousel-links {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.event-carousel-link:hover {
    transform: translateY(-1px);
    filter: brightness(1.05);
}

.event-carousel-link.disabled {
    pointer-events: none;
    opacity: 0.6;
}

.event-carousel-date {
    font-size: 0.9rem;
    font-weight: 600;
    padding: 0px 10px;
    border-radius: 999px;
    display: inline-flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    width: fit-content;
    background: rgba(255, 255, 255, 0.2);
    text-shadow: 0 1px 3px rgba(0,0,0,0.5);
    max-width: 100%;
    text-align: right;
}

.event-carousel-date.date-dark {
    color: #1f1e1c;
    background: rgba(245, 232, 212, 0.75);
    text-shadow: none;
}

.event-carousel-date.date-light {
    color: #ffffff;
}

.event-carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    background: rgba(245, 232, 212, 0.8);
    border: 1.5px solid #94592e;
    color: #5a2e0f;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease, background 0.2s ease;
}

.event-carousel-nav:hover {
    transform: translateY(-50%) scale(1.05);
    background: #f5e8d4;
}

.event-carousel-nav.prev {
    left: 12px;
}

.event-carousel-nav.next {
    right: 12px;
}

.event-carousel-dots {
    position: absolute;
    bottom: 10px;
    right: 16px;
    display: flex;
    gap: 6px;
    z-index: 2;
}

.event-carousel-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 1px solid #fff;
    background: rgba(255, 255, 255, 0.4);
}

.event-carousel-dot.active {
    background: #fff;
}

.event-carousel-slide.is-locked .event-carousel-overlay {
    cursor: default;
}

.event-carousel-slide.is-locked .event-carousel-link {
    opacity: 0.6;
}

.event-carousel-slide[data-clickable="1"]:hover .event-carousel-image img {
    transform: scale(1.02);
}

.event-carousel-slide[data-clickable="1"] .event-carousel-image img {
    transition: transform 0.4s ease;
}

.event-carousel-slide[data-clickable="1"] {
    cursor: pointer;
}

.events-page {
    max-width: 980px;
    margin: 0 auto;
    padding: 20px 10px 40px;
}

.events-header {
    text-align: center;
    margin-bottom: 24px;
}

.events-title {
    font-size: 2.6rem;
    color: #5a2e0f;
}

.events-subtitle {
    color: #8a6b3f;
}

.event-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.event-list-card {
    display: flex;
    align-items: center;
    gap: 16px;
    background: #fffaf2;
    border: 1.5px solid #94592e;
    border-radius: 12px;
    padding: 12px;
    box-shadow: 0 4px 10px rgba(90, 46, 15, 0.08);
}

.event-list-banner img {
    width: 120px;
    height: 70px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid #d4a373;
}

.event-list-banner {
    position: relative;
}

.event-list-finished .event-list-banner img {
    filter: grayscale(1);
}

.event-list-finished-badge {
    position: absolute;
    inset: 0;
    background: rgba(245, 232, 212, 0.7);
    color: #8b6a40;
    font-weight: 700;
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 6px;
    border-radius: 8px;
}

.event-list-body {
    flex: 1;
}

.event-list-action {
    margin-left: auto;
}

.event-list-title {
    font-weight: 700;
    color: #5a2e0f;
    font-size: 1.1rem;
}

.event-list-dates {
    font-size: 0.9rem;
    color: #7a5f37;
    display: flex;
    gap: 6px;
    align-items: center;
}

.event-list-meta {
    font-size: 0.85rem;
    color: #8a6b3f;
}

.event-list-link {
    padding: 6px 12px;
    border-radius: 999px;
    background: #d98737;
    color: #fff;
    text-decoration: none;
    border: 1.5px solid #94592e;
}

.event-list-link:hover {
    background: #94592e;
}

.event-list-empty {
    text-align: center;
    padding: 20px;
    color: #8a6b3f;
    background: #fffaf2;
    border: 1.5px dashed #d4a373;
    border-radius: 12px;
}

.event-detail {
    max-width: 980px;
    margin: 0 auto;
    padding: 20px 10px 40px;
}

.event-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.event-admin-actions {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.event-admin-actions form {
    margin: 0;
}

.event-detail-title {
    font-size: 2.4rem;
    color: #5a2e0f;
}

.event-detail-banner {
    margin-top: 16px;
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    border: 1.5px solid #94592e;
}

.event-detail-banner img {
    width: 100%;
    max-height: 120px;
    object-fit: cover;
    display: block;
}

.event-detail-date {
    position: absolute;
    bottom: 12px;
    right: 12px;
    background: rgba(245, 232, 212, 0.85);
    color: #5a2e0f;
    padding: 6px 12px;
    border-radius: 999px;
    font-weight: 600;
    border: 1px solid #94592e;
}

.event-detail-description {
    margin-top: 18px;
    padding: 16px;
    background: #fffaf2;
    border: 1.5px solid #d4a373;
    border-radius: 12px;
}

.event-detail .quill-wrapper {
    background: #fffaf2;
    border: 1.5px solid #94592e;
    border-radius: 12px;
    min-height: 180px;
}

.event-detail .quill-wrapper .ql-toolbar {
    border: none;
    border-bottom: 1px solid #d4a373;
    border-radius: 12px 12px 0 0;
    background: #f1d9a9;
}

.event-detail .quill-wrapper .ql-container {
    border: none;
    border-radius: 0 0 12px 12px;
    min-height: 150px;
}

.event-detail-actions {
    margin-top: 16px;
    display: flex;
    justify-content: flex-start;
}

.event-posts-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.event-sort-select {
    max-width: 220px;
    background: #f5e8d4;
    border: 1.5px solid #94592e;
    border-radius: 10px;
}

.event-podium {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 16px;
    margin: 24px 0 10px;
    flex-wrap: wrap;
}

.podium-slot {
    width: 160px;
    border-radius: 12px 12px 0 0;
    text-align: center;
    padding: 12px 10px 16px;
    color: #1f1e1c;
    font-weight: 700;
    border: 2px solid #94592e;
    position: relative;
    box-shadow: 0 6px 14px rgba(90, 46, 15, 0.15);
}

.podium-first {
    background: #f3c158;
    height: 160px;
}

.podium-second {
    background: #d7d7d7;
    height: 130px;
}

.podium-third {
    background: #b78b5a;
    height: 110px;
}

.podium-rank {
    font-size: 1.4rem;
}

.podium-name {
    display: inline-block;
    margin-top: 6px;
    background: rgba(255, 255, 255, 0.7);
    padding: 4px 10px;
    border-radius: 8px;
    color: #5a2e0f;
    text-decoration: none;
}

.podium-name:hover {
    text-decoration: underline;
}

.winner-modal-layout {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 20px;
}

.winner-modal-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.winner-modal-results {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.winner-row {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #fffaf2;
    border: 1.5px solid #d4a373;
    border-radius: 10px;
    padding: 10px 12px;
}

.winner-rank {
    font-size: 1.2rem;
    font-weight: 700;
    color: #5a2e0f;
    width: 24px;
}

.winner-slot {
    flex: 1;
}

.event-rewards-showcase {
    margin: 22px 0 6px;
}

.event-rewards-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.event-reward-card {
    background: #fffaf2;
    border: 1.5px solid #d4a373;
    border-radius: 10px;
    padding: 10px 12px;
}

.event-reward-title {
    font-size: 1rem;
    color: #5a2e0f;
    margin: 0 0 6px;
}

.event-reward-list {
    margin: 0;
    padding-left: 18px;
    color: #6c5736;
}

.event-reward-list li {
    margin-bottom: 3px;
}

.winner-slot-actions {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.winner-xp {
    width: 90px;
}

.winner-xp label {
    font-size: 0.75rem;
    color: #8a6b3f;
}

.winner-rewards {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 8px;
    padding: 6px 2px 4px 40px;
}

.reward-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    font-size: 0.8rem;
    color: #5a2e0f;
}

.reward-item i {
    font-size: 1rem;
}

.reward-input {
    padding: 4px 6px;
    font-size: 0.75rem;
    text-align: center;
}

.winner-cosmetics {
    padding: 0 2px 2px 40px;
}

.winner-cosmetics .form-label {
    margin: 0 0 4px;
    font-size: 0.8rem;
    color: #6c5736;
}

.winner-cosmetics .form-select {
    min-height: 90px;
}

.winner-others {
    background: #fffaf2;
    border: 1.5px dashed #d4a373;
    border-radius: 10px;
    padding: 10px 12px;
}

.winner-others h6 {
    margin: 0 0 8px;
    color: #5a2e0f;
}

.winner-others-row {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-bottom: 8px;
}

.others-rewards {
    padding-left: 0;
}

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

.winner-username {
    font-weight: 700;
    color: #5a2e0f;
}

.winner-likes {
    font-size: 0.85rem;
    color: #8a6b3f;
}

.winner-empty {
    color: #8a6b3f;
}

.winner-entry-card-compact {
    display: flex;
    align-items: center;
    gap: 10px;
}

.winner-entry-thumb-wrap {
    width: 58px;
    height: 58px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #d4a373;
    background: #f5e8d4;
    flex: 0 0 58px;
}

.winner-entry-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.winner-entry-thumb-empty {
    background: #e8d2b2;
}

.winner-entry-title {
    font-weight: 700;
    color: #5a2e0f;
    font-size: 0.9rem;
}

.winner-entry-author {
    color: #8a6b3f;
    font-size: 0.8rem;
}

.entry-browser {
    border: 1.5px dashed #d4a373;
    border-radius: 10px;
    padding: 10px 12px;
    background: #fffaf2;
}

.entry-browser-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.entry-browser-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    max-height: 260px;
    overflow-y: auto;
}

.entry-picker-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    max-height: 70vh;
    overflow-y: auto;
}

.entry-pick-card {
    border: 1px solid #d4a373;
    border-radius: 8px;
    padding: 0;
    overflow: hidden;
    background: #f8ecd9;
    text-align: left;
    cursor: pointer;
}

.entry-pick-image-wrap {
    width: 100%;
    aspect-ratio: 4 / 3;
    background: #ead8bc;
}

.entry-pick-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.entry-pick-image-empty {
    background: #ead8bc;
}

.entry-pick-meta {
    padding: 6px 7px;
}

.entry-pick-title {
    font-weight: 700;
    color: #5a2e0f;
    font-size: 0.82rem;
    line-height: 1.2;
}

.entry-pick-author {
    color: #8a6b3f;
    font-size: 0.75rem;
}

.entry-pick-card:hover,
.entry-pick-card.entry-card-active-target {
    border-color: #94592e;
    box-shadow: 0 0 0 2px rgba(148, 89, 46, 0.2);
}

.entry-pick-card.entry-pick-selected {
    border-color: #6d3f1f;
    box-shadow: 0 0 0 3px rgba(109, 63, 31, 0.28);
    background: #f2ddbe;
}

.entry-pick-card.entry-card-disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.event-entry-type-option {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-right: 8px;
}

.event-entry-type-option input[type="radio"] {
    margin: 0;
}

.winner-search {
    position: relative;
}

.winner-suggestions {
    position: absolute;
    top: 110%;
    left: 0;
    right: 0;
    background: #fffaf2;
    border: 1.5px solid #d4a373;
    border-radius: 10px;
    z-index: 10;
    max-height: 160px;
    overflow-y: auto;
    padding: 6px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.winner-suggestion {
    background: #f1d9a9;
    border: none;
    border-radius: 8px;
    padding: 6px 8px;
    text-align: left;
    cursor: pointer;
}

.winner-suggestion:hover {
    background: #d98737;
    color: white;
}

.winner-submit {
    display: flex;
    justify-content: center;
    margin-top: 10px;
}

@media (max-width: 768px) {
    .event-posts-header {
        flex-direction: column;
        align-items: flex-start;
    }

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

    .podium-slot {
        width: 120px;
    }

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

    .winner-rewards {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        padding-left: 0;
    }

    .winner-cosmetics {
        padding-left: 0;
    }

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

    .entry-picker-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
.event-detail-posts-title {
    margin-top: 26px;
    margin-bottom: 10px;
    color: #5a2e0f;
}

@media (max-width: 768px) {
    .event-list-card {
        flex-direction: column;
        align-items: flex-start;
    }

    .event-list-banner img {
        width: 100%;
        height: 120px;
    }

    .event-carousel-title {
        font-size: 1.3rem;
    }

    .event-carousel img{
        height: 200px;
    }
}
/* Horse rank color themes */
.horse-card.rank-registered {
    background: linear-gradient(180deg, #f5e8d4 0%, #e0d1ba 100%) !important;
    border-color: #e7d2b3 !important;
    box-shadow: 0 0 0 1px #bb8f6b !important;
}

.horse-card.rank-starter {
    background: linear-gradient(180deg, #b98266 0%, #9a6a52 100%) !important;
    border-color: #a17258 !important;
    box-shadow: 0 0 0 1px #7f5542 !important;
}

.horse-card.rank-approved {
    background: linear-gradient(180deg, #bcb2ae 0%, #9f9692 100%) !important;
    border-color: #ada4a0 !important;
    box-shadow: 0 0 0 1px #7e7774 !important;
}

.horse-card.rank-elite {
    background: linear-gradient(180deg, #e2c089 0%, #c79a5e 100%) !important;
    border-color: #d4ac70 !important;
    box-shadow: 0 0 0 1px #a07b4a !important;
}

.horse-card.rank-famous {
    background: linear-gradient(180deg, #c5dbe0 0%, #9fbac1 100%) !important;
    border-color: #b0ccd1 !important;
    box-shadow: 0 0 0 1px #7f9aa0 !important;
}

.horse-card.rank-pantheon {
    background: linear-gradient(180deg, #7b3c36 0%, #5a2925 100%) !important;
    border-color: #69312c !important;
    box-shadow: 0 0 0 1px #3b1b18 !important;
    color: #f7eddc !important;
}

.horse-card.rank-legendary {
    background: linear-gradient(180deg, #3a3444 0%, #1f1c27 100%) !important;
    border-color: #24202e !important;
    box-shadow: 0 0 0 1px #14121a !important;
    color: #f7eddc !important;
}

.horse-card.rank-pantheon .card-title,
.horse-card.rank-pantheon .card-description,
.horse-card.rank-pantheon .card-rank,
.horse-card.rank-legendary .card-title,
.horse-card.rank-legendary .card-description,
.horse-card.rank-legendary .card-rank {
    color: #f7eddc !important;
}

.horse-claim-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 2;
    padding: 2px 8px;
    border-radius: 999px;
    border: 1px solid #bb8f6b;
    font-size: 0.72rem;
    line-height: 1.2;
    letter-spacing: 0.01em;
    font-weight: 700;
}

.horse-claim-badge.claimed {
    background: rgba(180, 203, 172, 0.92);
    color: #1f1e1c;
}

.horse-claim-badge.unclaimed {
    background: rgba(240, 201, 178, 0.92);
    color: #4b2b20;
}

.horse-kind-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 2;
    padding: 2px 8px;
    border-radius: 999px;
    border: 1px solid #bb8f6b;
    font-size: 0.72rem;
    line-height: 1.2;
    letter-spacing: 0.01em;
    font-weight: 700;
}

.horse-kind-horse {
    background: rgba(233, 215, 184, 0.95);
    color: #5a2e0f;
}

.horse-kind-mini {
    background: rgba(180, 203, 172, 0.95);
    color: #1f1e1c;
}

/* Final override: post like button colors */
.post-card .like-button.action-button {
    background-color: #ba8151 !important;
    border: none !important;
    color: #f7eddc !important;
}

.post-card .like-button.action-button:hover {
    background-color: #a37144 !important;
    color: #f7eddc !important;
}

.post-card .like-button.action-button.liked {
    background-color: #b4cbac !important;
    color: #1f1e1c !important;
}

.post-card .like-button.action-button.liked i {
    color: #1f1e1c !important;
}

.global-flash-container {
    display: grid;
    gap: 8px;
    margin: 10px 0 16px;
    max-width: 980px;
    margin-left: auto;
    margin-right: auto;
}

.global-flash-toast {
    background: #f5e8d4;
    border: 1px solid #94592e;
    border-radius: 8px;
    padding: 10px 14px;
    color: #94592e;
    font-weight: 700;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
}

[data-theme="dark"] {
    color-scheme: dark;
    --beige-light: #241607;
    --beige-mid: #35230d;
    --beige-dark: #8f4c17;
    --brown: #f2e7d7;
    --forest-green: #8ea47a;
}

[data-theme="dark"] body {
    background-color: #161106;
    color: #f2e7d7;
}

[data-theme="dark"] a:not([class]),
[data-theme="dark"] a:not([class]):visited {
    color: #c8d2b0;
}

[data-theme="dark"] a:not([class]):hover,
[data-theme="dark"] a:not([class]):focus {
    color: #e4edd0;
}

[data-theme="dark"] header,
[data-theme="dark"] .custom-navbar,
[data-theme="dark"] footer,
[data-theme="dark"] .search-bar,
[data-theme="dark"] .dropdown-menu,
[data-theme="dark"] .custom-offcanvas,
[data-theme="dark"] .modal-beige,
[data-theme="dark"] .user-form-wrapper,
[data-theme="dark"] .global-flash-toast,
[data-theme="dark"] .bg-beige-light,
[data-theme="dark"] .bg-beige-mid,
[data-theme="dark"] .bg-beige-dark,
[data-theme="dark"] .list-group-item,
[data-theme="dark"] .card-post,
[data-theme="dark"] .card-post.profile-card,
[data-theme="dark"] .profile-box,
[data-theme="dark"] .claim-frame,
[data-theme="dark"] .design-submit-card,
[data-theme="dark"] .horse-info-box,
[data-theme="dark"] .horse-art-gallery,
[data-theme="dark"] .horse-inventory,
[data-theme="dark"] .horse-selling-actions,
[data-theme="dark"] .lineage-popup,
[data-theme="dark"] .lineage-add-parents-form {
    background-color: #241607 !important;
    color: #f2e7d7 !important;
    border-color: #8b5a31 !important;
}

[data-theme="dark"] .card-post.profile-card {
    background: linear-gradient(180deg, #2d1b09 0%, #241607 100%) !important;
    box-shadow: 0 0 0 1px #8b5a31 !important;
}

[data-theme="dark"] .card-post.profile-card::after {
    background:
        radial-gradient(circle at 5px 5px, #8b5a31 0 3px, transparent 4px),
        radial-gradient(circle at calc(100% - 5px) 5px, #8b5a31 0 3px, transparent 4px),
        radial-gradient(circle at 5px calc(100% - 5px), #8b5a31 0 3px, transparent 4px),
        radial-gradient(circle at calc(100% - 5px) calc(100% - 5px), #8b5a31 0 3px, transparent 4px);
}

[data-theme="dark"] .profile-button,
[data-theme="dark"] .header-button,
[data-theme="dark"] .mobile-shop-link,
[data-theme="dark"] .mobile-search-toggle,
[data-theme="dark"] .post-art-button,
[data-theme="dark"] .btn-brown,
[data-theme="dark"] .btn-orange {
    background-color: #8f4c17 !important;
    color: #fff7ec !important;
    border-color: #b8804f !important;
}

[data-theme="dark"] .btn-brown:hover,
[data-theme="dark"] .btn-orange:hover,
[data-theme="dark"] .post-art-button:hover,
[data-theme="dark"] .profile-button:hover,
[data-theme="dark"] .header-button:hover,
[data-theme="dark"] .mobile-shop-link:hover,
[data-theme="dark"] .mobile-search-toggle:hover {
    background-color: #6e180f !important;
    color: #fff7ec !important;
}

[data-theme="dark"] .btn-outline-brown,
[data-theme="dark"] .close-btn,
[data-theme="dark"] .custom-nav-link,
[data-theme="dark"] .dropdown-menu a,
[data-theme="dark"] .offcanvas-link,
[data-theme="dark"] .search-clear-btn,
[data-theme="dark"] .separator,
[data-theme="dark"] .text-brown,
[data-theme="dark"] .profile-tab,
[data-theme="dark"] .profile-member-since,
[data-theme="dark"] .profile-rank-xp,
[data-theme="dark"] .profile-badges-title,
[data-theme="dark"] .card-rank,
[data-theme="dark"] .card-text,
[data-theme="dark"] .horse-info-box p,
[data-theme="dark"] .horse-info-box strong,
[data-theme="dark"] .horse-art-title,
[data-theme="dark"] .horse-art-author,
[data-theme="dark"] .lineage-card-label,
[data-theme="dark"] .lineage-card-title,
[data-theme="dark"] .form-label,
[data-theme="dark"] .modal-title,
[data-theme="dark"] .navbar-brand,
[data-theme="dark"] footer p,
[data-theme="dark"] .global-flash-toast,
[data-theme="dark"] .list-group-item,
[data-theme="dark"] .profile-bio {
    color: #f2e7d7 !important;
}

[data-theme="dark"] .profile-tab:hover,
[data-theme="dark"] .profile-tab.active {
    background-color: #6e180f !important;
    color: #fff7ec !important;
}

[data-theme="dark"] .dropdown-menu a:hover,
[data-theme="dark"] .offcanvas-link:hover {
    background-color: #3b240d !important;
}

[data-theme="dark"] .form-control,
[data-theme="dark"] .form-select,
[data-theme="dark"] input,
[data-theme="dark"] select,
[data-theme="dark"] textarea {
    background-color: #2c1b09 !important;
    color: #f2e7d7 !important;
    border-color: #8b5a31 !important;
}

[data-theme="dark"] .form-control::placeholder,
[data-theme="dark"] textarea::placeholder,
[data-theme="dark"] input::placeholder {
    color: #c8b29b !important;
}

[data-theme="dark"] .search-bar {
    background: #2c1b09 !important;
}

[data-theme="dark"] .notif-dot {
    background-color: #9dbd92 !important;
}

[data-theme="dark"] .badge-unread {
    background-color: #6e180f !important;
    color: #fff7ec !important;
}

[data-theme="dark"] .background-left,
[data-theme="dark"] .background-right {
    opacity: 0.45;
}

[data-theme="dark"] .profile-badge-bubble,
[data-theme="dark"] .daily-gift-popup,
[data-theme="dark"] .quest-dialog-box,
[data-theme="dark"] .tutorial-card,
[data-theme="dark"] .facility-card,
[data-theme="dark"] .donkey-card,
[data-theme="dark"] .horse-card,
[data-theme="dark"] .mini-card {
    background: #241607 !important;
    color: #f2e7d7 !important;
    border-color: #8b5a31 !important;
}
[data-theme="dark"] .post-card,
[data-theme="dark"] .gallery-card,
[data-theme="dark"] .profile-card,
[data-theme="dark"] .marketplace-card,
[data-theme="dark"] .marketplace-cards .marketplace-card,
[data-theme="dark"] .marketplace-filters,
[data-theme="dark"] .farm-gallery-card,
[data-theme="dark"] .guide-hub-card,
[data-theme="dark"] .guide-hub-row,
[data-theme="dark"] .guide-item-row,
[data-theme="dark"] .badge-guide-item,
[data-theme="dark"] .quest-shell,
[data-theme="dark"] .quest-sidebar,
[data-theme="dark"] .quest-stage,
[data-theme="dark"] .quest-dialogue,
[data-theme="dark"] .quest-summary-card,
[data-theme="dark"] .quest-alert,
[data-theme="dark"] .quest-horse-card-body,
[data-theme="dark"] .quest-post-card-body,
[data-theme="dark"] .quest-foal-card,
[data-theme="dark"] .chat-body,
[data-theme="dark"] .chat-container,
[data-theme="dark"] .chat-panel,
[data-theme="dark"] .chat-contact-item,
[data-theme="dark"] .chat-message-bubble.other,
[data-theme="dark"] .chat-message-bubble.me,
[data-theme="dark"] .chat-input-footer,
[data-theme="dark"] .chat-block-banner,
[data-theme="dark"] .conversation-placeholder,
[data-theme="dark"] .notification-dropdown,
[data-theme="dark"] .notification-dropdown li,
[data-theme="dark"] .notification-link,
[data-theme="dark"] .posting-container,
[data-theme="dark"] .posting-header,
[data-theme="dark"] .doc-card,
[data-theme="dark"] .mobile-doc-card,
[data-theme="dark"] .event-carousel-card,
[data-theme="dark"] .event-carousel-link,
[data-theme="dark"] .breed-section,
[data-theme="dark"] .resource-card,
[data-theme="dark"] .rules-card,
[data-theme="dark"] .admin-section,
[data-theme="dark"] .notification-box,
[data-theme="dark"] .conversation-card,
[data-theme="dark"] .message-thread,
[data-theme="dark"] .chat-search-suggestions,
[data-theme="dark"] .chat-help-tooltip,
[data-theme="dark"] .chat-refresh-tooltip,
[data-theme="dark"] .notif-tooltip {
    background-color: #241607 !important;
    color: #f2e7d7 !important;
    border-color: #8b5a31 !important;
}

[data-theme="dark"] .post-card .card-title,
[data-theme="dark"] .post-card .card-text,
[data-theme="dark"] .gallery-card .card-title,
[data-theme="dark"] .gallery-card .card-text,
[data-theme="dark"] .marketplace-cards .card-title,
[data-theme="dark"] .marketplace-cards .card-text,
[data-theme="dark"] .marketplace-filters label,
[data-theme="dark"] .guide-list,
[data-theme="dark"] .guide-list li,
[data-theme="dark"] .guide-steps,
[data-theme="dark"] .guide-note,
[data-theme="dark"] .guide-subtitle,
[data-theme="dark"] .guide-hub-row h3,
[data-theme="dark"] .guide-hub-row p,
[data-theme="dark"] .guide-item-row h3,
[data-theme="dark"] .guide-item-row p,
[data-theme="dark"] .badge-guide-content h4,
[data-theme="dark"] .badge-guide-content p,
[data-theme="dark"] .quest-sidebar-title,
[data-theme="dark"] .quest-list-title,
[data-theme="dark"] .quest-list-summary,
[data-theme="dark"] .quest-list-status,
[data-theme="dark"] .quest-dialogue-title,
[data-theme="dark"] .quest-dialogue-lines p,
[data-theme="dark"] .quest-speaker,
[data-theme="dark"] .quest-form-title,
[data-theme="dark"] .quest-summary-title,
[data-theme="dark"] .quest-summary-text,
[data-theme="dark"] .quest-summary-reward,
[data-theme="dark"] .quest-muted,
[data-theme="dark"] .quest-horse-name,
[data-theme="dark"] .quest-horse-meta,
[data-theme="dark"] .quest-post-title,
[data-theme="dark"] .chat-title,
[data-theme="dark"] .chat-subtitle,
[data-theme="dark"] .chat-contact-name,
[data-theme="dark"] .chat-contact-lastmsg,
[data-theme="dark"] .chat-contact-lasttime,
[data-theme="dark"] .chat-message-text,
[data-theme="dark"] .chat-message-meta,
[data-theme="dark"] .chat-block-confirm-text,
[data-theme="dark"] .notification-dropdown li a,
[data-theme="dark"] .notification-link,
[data-theme="dark"] .notification-item,
[data-theme="dark"] .posting-header,
[data-theme="dark"] .doc-card p,
[data-theme="dark"] .doc-card h3,
[data-theme="dark"] .mobile-doc-card p,
[data-theme="dark"] .mobile-doc-card h3,
[data-theme="dark"] .event-carousel-link,
[data-theme="dark"] .farm-gallery-card p,
[data-theme="dark"] .farm-gallery-card h3,
[data-theme="dark"] .admin-section-title,
[data-theme="dark"] .notification-box,
[data-theme="dark"] .conversation-card,
[data-theme="dark"] .message-thread {
    color: #f2e7d7 !important;
}

[data-theme="dark"] .notification-dropdown li:not(.empty):hover,
[data-theme="dark"] .chat-contact-item:hover,
[data-theme="dark"] .guide-hub-row:hover,
[data-theme="dark"] .guide-hub-row:focus-visible,
[data-theme="dark"] .quest-list-item:hover,
[data-theme="dark"] .quest-post-card:hover,
[data-theme="dark"] .quest-horse-card:hover,
[data-theme="dark"] .farm-gallery-card:hover {
    background-color: #35230d !important;
}

[data-theme="dark"] .quest-list-item.active,
[data-theme="dark"] .quest-badge.active,
[data-theme="dark"] .quest-next-btn,
[data-theme="dark"] .quest-btn,
[data-theme="dark"] .chat-send-btn,
[data-theme="dark"] .post-card .like-button.action-button,
[data-theme="dark"] .event-banner,
[data-theme="dark"] .event-carousel-link,
[data-theme="dark"] .mobile-doc-card,
[data-theme="dark"] .doc-card .btn,
[data-theme="dark"] .guide-actions .btn {
    background-color: #6e180f !important;
    color: #fff7ec !important;
    border-color: #b8804f !important;
}

[data-theme="dark"] .chat-message-bubble.me {
    background-color: #6e180f !important;
    color: #fff7ec !important;
}

[data-theme="dark"] .chat-message-bubble.other {
    background-color: #2c1b09 !important;
    color: #f2e7d7 !important;
}

[data-theme="dark"] .chat-input,
[data-theme="dark"] .quest-select,
[data-theme="dark"] .marketplace-filters select,
[data-theme="dark"] .posting-container input,
[data-theme="dark"] .posting-container select,
[data-theme="dark"] .posting-container textarea {
    background-color: #2c1b09 !important;
    color: #f2e7d7 !important;
    border-color: #8b5a31 !important;
}

[data-theme="dark"] .horse-card.rank-registered,
[data-theme="dark"] .horse-card.rank-starter,
[data-theme="dark"] .horse-card.rank-approved,
[data-theme="dark"] .horse-card.rank-elite,
[data-theme="dark"] .horse-card.rank-famous,
[data-theme="dark"] .horse-card.rank-pantheon,
[data-theme="dark"] .horse-card.rank-legendary {
    background: linear-gradient(180deg, #2d1b09 0%, #241607 100%) !important;
}

[data-theme="dark"] .horse-kind-horse,
[data-theme="dark"] .horse-kind-mini,
[data-theme="dark"] .horse-claim-badge.claimed,
[data-theme="dark"] .horse-claim-badge.unclaimed {
    border-color: #b8804f !important;
}

[data-theme="dark"] .horse-kind-horse,
[data-theme="dark"] .horse-claim-badge.unclaimed {
    background: rgba(110, 24, 15, 0.9) !important;
    color: #fff7ec !important;
}

[data-theme="dark"] .horse-kind-mini,
[data-theme="dark"] .horse-claim-badge.claimed {
    background: rgba(86, 111, 74, 0.9) !important;
    color: #f2e7d7 !important;
}

[data-theme="dark"] .badge-guide-item.locked .badge-guide-icon,
[data-theme="dark"] .badge-guide-item.locked .badge-guide-content {
    opacity: 0.4;
}
[data-theme="dark"] {
    --theme-dark-bg: #161106;
    --theme-dark-surface: #1f1508;
    --theme-dark-card: #241607;
    --theme-dark-card-2: #2b1a09;
    --theme-dark-border: #4a2d17;
    --theme-dark-border-soft: #341e0f;
    --theme-dark-text: #f4e8d7;
    --theme-dark-muted: #d8bea2;
    --theme-dark-accent: #5b3012;
    --theme-dark-accent-hover: #45220c;
}

[data-theme="dark"] body,
[data-theme="dark"] .main-wrapper,
[data-theme="dark"] .main-container {
    background-color: var(--theme-dark-bg) !important;
    color: var(--theme-dark-text) !important;
}

[data-theme="dark"] .post-card,
[data-theme="dark"] .gallery-card,
[data-theme="dark"] .profile-card,
[data-theme="dark"] .card-post,
[data-theme="dark"] .card-post.profile-card,
[data-theme="dark"] .horse-card,
[data-theme="dark"] .mini-card,
[data-theme="dark"] .doc-card,
[data-theme="dark"] .mobile-doc-card,
[data-theme="dark"] .guide-hub-card,
[data-theme="dark"] .guide-hub-row,
[data-theme="dark"] .guide-item-row,
[data-theme="dark"] .badge-guide-item,
[data-theme="dark"] .farm-gallery-card,
[data-theme="dark"] .marketplace-cards .marketplace-card,
[data-theme="dark"] .marketplace-filters,
[data-theme="dark"] .quest-sidebar,
[data-theme="dark"] .quest-dialogue,
[data-theme="dark"] .quest-summary-card,
[data-theme="dark"] .quest-horse-card-body,
[data-theme="dark"] .quest-post-card-body,
[data-theme="dark"] .quest-foal-card,
[data-theme="dark"] .chat-panel,
[data-theme="dark"] .chat-message-bubble.other,
[data-theme="dark"] .conversation-placeholder,
[data-theme="dark"] .notification-dropdown,
[data-theme="dark"] .notification-dropdown li,
[data-theme="dark"] .horse-info-box,
[data-theme="dark"] .horse-art-gallery,
[data-theme="dark"] .horse-inventory,
[data-theme="dark"] .claim-frame,
[data-theme="dark"] .design-submit-card,
[data-theme="dark"] .lineage-popup,
[data-theme="dark"] .lineage-add-parents-form,
[data-theme="dark"] .user-form-wrapper,
[data-theme="dark"] .modal-beige,
[data-theme="dark"] .posting-container,
[data-theme="dark"] .profile-box,
[data-theme="dark"] .admin-section,
[data-theme="dark"] .global-flash-toast {
    background: linear-gradient(180deg, var(--theme-dark-card-2) 0%, var(--theme-dark-card) 100%) !important;
    color: var(--theme-dark-text) !important;
    border-color: var(--theme-dark-border) !important;
    box-shadow: 0 0 0 1px var(--theme-dark-border-soft) !important;
}

[data-theme="dark"] .post-card::after,
[data-theme="dark"] .gallery-card::after,
[data-theme="dark"] .profile-card::after,
[data-theme="dark"] .card-post.profile-card::after {
    background:
        radial-gradient(circle at 5px 5px, var(--theme-dark-border) 0 3px, transparent 4px),
        radial-gradient(circle at calc(100% - 5px) 5px, var(--theme-dark-border) 0 3px, transparent 4px),
        radial-gradient(circle at 5px calc(100% - 5px), var(--theme-dark-border) 0 3px, transparent 4px),
        radial-gradient(circle at calc(100% - 5px) calc(100% - 5px), var(--theme-dark-border) 0 3px, transparent 4px) !important;
}

[data-theme="dark"] .horse-card.rank-registered,
[data-theme="dark"] .horse-card.rank-starter,
[data-theme="dark"] .horse-card.rank-approved,
[data-theme="dark"] .horse-card.rank-elite,
[data-theme="dark"] .horse-card.rank-famous,
[data-theme="dark"] .horse-card.rank-pantheon,
[data-theme="dark"] .horse-card.rank-legendary {
    background: linear-gradient(180deg, var(--theme-dark-card-2) 0%, var(--theme-dark-card) 100%) !important;
    border-color: var(--theme-dark-border) !important;
    box-shadow: 0 0 0 1px var(--theme-dark-border-soft) !important;
    color: var(--theme-dark-text) !important;
}

[data-theme="dark"] .card-title,
[data-theme="dark"] .card-text,
[data-theme="dark"] .card-rank,
[data-theme="dark"] .guide-list,
[data-theme="dark"] .guide-list li,
[data-theme="dark"] .guide-note,
[data-theme="dark"] .guide-subtitle,
[data-theme="dark"] .guide-hub-row h3,
[data-theme="dark"] .guide-hub-row p,
[data-theme="dark"] .guide-item-row h3,
[data-theme="dark"] .guide-item-row p,
[data-theme="dark"] .badge-guide-content h4,
[data-theme="dark"] .badge-guide-content p,
[data-theme="dark"] .quest-sidebar-title,
[data-theme="dark"] .quest-list-title,
[data-theme="dark"] .quest-list-summary,
[data-theme="dark"] .quest-list-status,
[data-theme="dark"] .quest-dialogue-title,
[data-theme="dark"] .quest-dialogue-lines p,
[data-theme="dark"] .quest-summary-title,
[data-theme="dark"] .quest-summary-text,
[data-theme="dark"] .quest-summary-reward,
[data-theme="dark"] .quest-horse-name,
[data-theme="dark"] .quest-post-title,
[data-theme="dark"] .chat-title,
[data-theme="dark"] .chat-subtitle,
[data-theme="dark"] .chat-contact-name,
[data-theme="dark"] .chat-contact-lastmsg,
[data-theme="dark"] .chat-contact-lasttime,
[data-theme="dark"] .chat-message-text,
[data-theme="dark"] .chat-message-meta,
[data-theme="dark"] .notification-link,
[data-theme="dark"] .notification-item,
[data-theme="dark"] .post-title,
[data-theme="dark"] .post-description,
[data-theme="dark"] .post-credit,
[data-theme="dark"] .post-linked-horses-label,
[data-theme="dark"] .posting-header,
[data-theme="dark"] .marketplace-filters label,
[data-theme="dark"] .horse-info-box p,
[data-theme="dark"] .horse-info-box strong,
[data-theme="dark"] .horse-art-title,
[data-theme="dark"] .horse-art-author,
[data-theme="dark"] .profile-rank-xp,
[data-theme="dark"] .profile-badges-title,
[data-theme="dark"] .profile-member-since,
[data-theme="dark"] .profile-bio,
[data-theme="dark"] .text-brown,
[data-theme="dark"] .navbar-brand,
[data-theme="dark"] footer p {
    color: var(--theme-dark-text) !important;
}

[data-theme="dark"] .guide-note,
[data-theme="dark"] .card-text,
[data-theme="dark"] .quest-list-summary,
[data-theme="dark"] .quest-summary-text,
[data-theme="dark"] .chat-contact-lastmsg,
[data-theme="dark"] .chat-contact-lasttime,
[data-theme="dark"] .post-credit,
[data-theme="dark"] .post-linked-horses-label,
[data-theme="dark"] .profile-member-since {
    color: var(--theme-dark-muted) !important;
}

[data-theme="dark"] .profile-button,
[data-theme="dark"] .header-button,
[data-theme="dark"] .mobile-shop-link,
[data-theme="dark"] .mobile-search-toggle,
[data-theme="dark"] .post-art-button,
[data-theme="dark"] .btn-brown,
[data-theme="dark"] .btn-orange,
[data-theme="dark"] .event-carousel-link,
[data-theme="dark"] .quest-btn,
[data-theme="dark"] .quest-next-btn,
[data-theme="dark"] .chat-send-btn,
[data-theme="dark"] .post-card .like-button.action-button,
[data-theme="dark"] .post-like-inline.like-button,
[data-theme="dark"] .action-button {
    background: var(--theme-dark-accent) !important;
    color: #fff8ee !important;
    border-color: var(--theme-dark-border) !important;
}

[data-theme="dark"] .profile-button:hover,
[data-theme="dark"] .header-button:hover,
[data-theme="dark"] .mobile-shop-link:hover,
[data-theme="dark"] .mobile-search-toggle:hover,
[data-theme="dark"] .post-art-button:hover,
[data-theme="dark"] .btn-brown:hover,
[data-theme="dark"] .btn-orange:hover,
[data-theme="dark"] .event-carousel-link:hover,
[data-theme="dark"] .quest-btn:hover,
[data-theme="dark"] .quest-next-btn:hover,
[data-theme="dark"] .chat-send-btn:hover,
[data-theme="dark"] .post-card .like-button.action-button:hover,
[data-theme="dark"] .post-like-inline.like-button:hover,
[data-theme="dark"] .action-button:hover {
    background: var(--theme-dark-accent-hover) !important;
    color: #fff8ee !important;
}

[data-theme="dark"] .profile-tab,
[data-theme="dark"] .custom-nav-link,
[data-theme="dark"] .btn-outline-brown,
[data-theme="dark"] .close-btn,
[data-theme="dark"] .separator,
[data-theme="dark"] .search-clear-btn,
[data-theme="dark"] .dropdown-menu a,
[data-theme="dark"] .offcanvas-link,
[data-theme="dark"] .lineage-card-label,
[data-theme="dark"] .lineage-card-title {
    color: var(--theme-dark-text) !important;
}

[data-theme="dark"] .profile-tab:hover,
[data-theme="dark"] .profile-tab.active,
[data-theme="dark"] .quest-list-item.active,
[data-theme="dark"] .notification-dropdown li:not(.empty):hover,
[data-theme="dark"] .guide-hub-row:hover,
[data-theme="dark"] .guide-hub-row:focus-visible,
[data-theme="dark"] .quest-list-item:hover,
[data-theme="dark"] .quest-post-card:hover,
[data-theme="dark"] .quest-horse-card:hover,
[data-theme="dark"] .chat-contact-item:hover,
[data-theme="dark"] .dropdown-menu a:hover,
[data-theme="dark"] .offcanvas-link:hover {
    background-color: #35230d !important;
    color: #fff8ee !important;
}

[data-theme="dark"] .post-meta,
[data-theme="dark"] .post-actions,
[data-theme="dark"] .notification-dropdown ul,
[data-theme="dark"] .chat-body,
[data-theme="dark"] .chat-container,
[data-theme="dark"] .quest-stage,
[data-theme="dark"] .quest-shell,
[data-theme="dark"] .marketplace-card-placeholder,
[data-theme="dark"] .entry-pick-card,
[data-theme="dark"] .winner-suggestions {
    background: var(--theme-dark-surface) !important;
    color: var(--theme-dark-text) !important;
    border-color: var(--theme-dark-border) !important;
}

[data-theme="dark"] .form-control,
[data-theme="dark"] .form-select,
[data-theme="dark"] input,
[data-theme="dark"] select,
[data-theme="dark"] textarea,
[data-theme="dark"] .search-bar,
[data-theme="dark"] .chat-input,
[data-theme="dark"] .quest-select,
[data-theme="dark"] .marketplace-filters select {
    background-color: #2a1908 !important;
    color: var(--theme-dark-text) !important;
    border-color: var(--theme-dark-border) !important;
}

[data-theme="dark"] .form-control::placeholder,
[data-theme="dark"] textarea::placeholder,
[data-theme="dark"] input::placeholder {
    color: var(--theme-dark-muted) !important;
}
[data-theme="dark"],
[data-theme="dark"] p,
[data-theme="dark"] span,
[data-theme="dark"] div,
[data-theme="dark"] li,
[data-theme="dark"] ul,
[data-theme="dark"] ol,
[data-theme="dark"] small,
[data-theme="dark"] strong,
[data-theme="dark"] em,
[data-theme="dark"] label,
[data-theme="dark"] td,
[data-theme="dark"] th,
[data-theme="dark"] h1,
[data-theme="dark"] h2,
[data-theme="dark"] h3,
[data-theme="dark"] h4,
[data-theme="dark"] h5,
[data-theme="dark"] h6,
[data-theme="dark"] .card-title,
[data-theme="dark"] .card-text,
[data-theme="dark"] .text-muted,
[data-theme="dark"] .muted,
[data-theme="dark"] .guide-note,
[data-theme="dark"] .guide-list,
[data-theme="dark"] .guide-list li,
[data-theme="dark"] .guide-subtitle,
[data-theme="dark"] .quest-muted,
[data-theme="dark"] .quest-list-summary,
[data-theme="dark"] .quest-summary-text,
[data-theme="dark"] .chat-contact-lastmsg,
[data-theme="dark"] .chat-contact-lasttime,
[data-theme="dark"] .post-credit,
[data-theme="dark"] .post-linked-horses-label,
[data-theme="dark"] .profile-member-since,
[data-theme="dark"] .artist-handle,
[data-theme="dark"] .entry-pick-author,
[data-theme="dark"] .winner-author,
[data-theme="dark"] .horse-art-author,
[data-theme="dark"] .notification-item,
[data-theme="dark"] .notification-link,
[data-theme="dark"] .lineage-card-label,
[data-theme="dark"] .lineage-card-title {
    color: #f4e8d7 !important;
}

[data-theme="dark"] .form-control::placeholder,
[data-theme="dark"] textarea::placeholder,
[data-theme="dark"] input::placeholder {
    color: #e0ccb4 !important;
}

/* Final dark-mode component coverage */
[data-theme="dark"] .comments-section,
[data-theme="dark"] .comment-form,
[data-theme="dark"] .comment-item,
[data-theme="dark"] .comment-content,
[data-theme="dark"] .comment-reply-banner,
[data-theme="dark"] .comment-delete-confirm-bar,
[data-theme="dark"] #comments-list,
[data-theme="dark"] .sale-detail-card,
[data-theme="dark"] .sale-detail-notes,
[data-theme="dark"] .sale-detail-meta,
[data-theme="dark"] .form-wrapper,
[data-theme="dark"] .form-box,
[data-theme="dark"] .vasteuro-group,
[data-theme="dark"] .xp-category,
[data-theme="dark"] .counter-item,
[data-theme="dark"] .additional-char-card,
[data-theme="dark"] .vasteuro-title,
[data-theme="dark"] .vasteuro-container,
[data-theme="dark"] .lineage-grid-scroll,
[data-theme="dark"] .lineage-tree-stage,
[data-theme="dark"] .lineage-tree-card,
[data-theme="dark"] .lineage-card,
[data-theme="dark"] .lineage-popup-actions,
[data-theme="dark"] .lineage-add-parents-btn,
[data-theme="dark"] .chat-panel,
[data-theme="dark"] .chat-panel-conversation,
[data-theme="dark"] .chat-conversation-header,
[data-theme="dark"] .chat-messages-wrapper,
[data-theme="dark"] .chat-messages,
[data-theme="dark"] .chat-contact-item,
[data-theme="dark"] .chat-mobile-tabs,
[data-theme="dark"] .chat-rate-limit-bubble,
[data-theme="dark"] .notification-page-panel,
[data-theme="dark"] .notification-page-list,
[data-theme="dark"] .notification-page-detail,
[data-theme="dark"] .notification-page-item,
[data-theme="dark"] .notification-page-item.is-selected,
[data-theme="dark"] .admin-panel,
[data-theme="dark"] .admin-tabs-content,
[data-theme="dark"] .admin-section,
[data-theme="dark"] .admin-stat-card,
[data-theme="dark"] .claim-table,
[data-theme="dark"] .claim-table th,
[data-theme="dark"] .claim-table td,
[data-theme="dark"] .flags-section,
[data-theme="dark"] .flagged-post-card,
[data-theme="dark"] .flagged-post-header,
[data-theme="dark"] .flagged-post-details,
[data-theme="dark"] .flag-item,
[data-theme="dark"] .no-claims,
[data-theme="dark"] .daily-gift-popup-card {
    background: linear-gradient(180deg, var(--theme-dark-card-2) 0%, var(--theme-dark-card) 100%) !important;
    border-color: var(--theme-dark-border) !important;
    color: var(--theme-dark-text) !important;
    box-shadow: 0 0 0 1px var(--theme-dark-border-soft) !important;
}

[data-theme="dark"] .comment-form .input-group,
[data-theme="dark"] .sale-detail-lines,
[data-theme="dark"] .sale-detail-actions,
[data-theme="dark"] .item-ui-zone,
[data-theme="dark"] .breed-risk,
[data-theme="dark"] .foal-card,
[data-theme="dark"] .stats-grid > div,
[data-theme="dark"] .parent-card,
[data-theme="dark"] .breed-center,
[data-theme="dark"] .item-slot,
[data-theme="dark"] .notification-page-item a,
[data-theme="dark"] .admin-panel .bg-light,
[data-theme="dark"] .admin-panel .border.rounded.p-3.bg-light,
[data-theme="dark"] .admin-panel [style*="background:#f5e8d4"],
[data-theme="dark"] .admin-panel [style*="background: #f5e8d4"],
[data-theme="dark"] .admin-panel [style*="background-color:#FFF9F0"],
[data-theme="dark"] .admin-panel [style*="background-color: #FFF9F0"],
[data-theme="dark"] .admin-panel [style*="background:#FFF9F0"],
[data-theme="dark"] .admin-panel [style*="background: #FFF9F0"],
[data-theme="dark"] .notification-page-list [style*="background:#f5e8d4"],
[data-theme="dark"] .notification-page-detail [style*="background:#f5e8d4"],
[data-theme="dark"] .notification-page-item[style*="background:#e0c899"] {
    background: var(--theme-dark-surface) !important;
    border-color: var(--theme-dark-border) !important;
    color: var(--theme-dark-text) !important;
}

[data-theme="dark"] .chat-message-bubble.me {
    background: #7a1b16 !important;
    border-color: var(--theme-dark-border) !important;
    color: #fff4e7 !important;
}

[data-theme="dark"] .chat-message-bubble.other {
    background: #2b1a09 !important;
    border-color: var(--theme-dark-border) !important;
    color: var(--theme-dark-text) !important;
}

[data-theme="dark"] .quest-list-item.locked,
[data-theme="dark"] .event-carousel-slide.is-locked .event-carousel-overlay {
    background: #241607 !important;
    border-color: #6f4a28 !important;
    color: #cdb498 !important;
    opacity: 0.92 !important;
}

[data-theme="dark"] .quest-list-item.locked .quest-list-title,
[data-theme="dark"] .quest-list-item.locked .quest-list-summary,
[data-theme="dark"] .quest-list-item.locked .quest-list-status {
    color: #cdb498 !important;
}

[data-theme="dark"] .marketplace-card,
[data-theme="dark"] .marketplace-card .card-body,
[data-theme="dark"] .post-card,
[data-theme="dark"] .post-meta,
[data-theme="dark"] .post-actions,
[data-theme="dark"] .drawing-frame,
[data-theme="dark"] .drawing-section,
[data-theme="dark"] .post-container-publi,
[data-theme="dark"] .post-detail-shell {
    background: linear-gradient(180deg, var(--theme-dark-card-2) 0%, var(--theme-dark-card) 100%) !important;
    border-color: var(--theme-dark-border) !important;
    color: var(--theme-dark-text) !important;
}

[data-theme="dark"] .marketplace-card .card-body a,
[data-theme="dark"] .sale-detail-lines a,
[data-theme="dark"] .sale-detail-meta a,
[data-theme="dark"] .notification-page-item a,
[data-theme="dark"] .post-source-link a,
[data-theme="dark"] .post-linked-horse-tag,
[data-theme="dark"] .comment-author,
[data-theme="dark"] .artist-name {
    color: #f4e8d7 !important;
}

[data-theme="dark"] .comment-reply-btn,
[data-theme="dark"] .comment-flag-btn,
[data-theme="dark"] .chat-tab-button,
[data-theme="dark"] .admin-tab-btn,
[data-theme="dark"] .flag-expand-btn {
    color: var(--theme-dark-text) !important;
    border-color: var(--theme-dark-border) !important;
}

[data-theme="dark"] .admin-tab-btn.active,
[data-theme="dark"] .chat-tab-button.active,
[data-theme="dark"] .notification-page-item.is-selected,
[data-theme="dark"] .flagged-post-card:hover,
[data-theme="dark"] .flag-expand-btn:hover {
    background: #35230d !important;
    color: #fff8ee !important;
}

[data-theme="dark"] .claim-table th {
    background: #35230d !important;
}

[data-theme="dark"] .claim-table tr:nth-child(even) td {
    background: #21170b !important;
}

[data-theme="dark"] .claim-table tr:nth-child(odd) td {
    background: #26190c !important;
}

[data-theme="dark"] .daily-wheel-label span {
    color: #f4e8d7 !important;
    text-shadow: none !important;
}

[data-theme="dark"] #daily-wheel {
    border-color: var(--theme-dark-border) !important;
    background: conic-gradient(
        #2a1908 0deg 18deg,
        #1d1207 18deg 36deg,
        #2a1908 36deg 54deg,
        #1d1207 54deg 72deg,
        #2a1908 72deg 90deg,
        #1d1207 90deg 108deg,
        #2a1908 108deg 126deg,
        #1d1207 126deg 144deg,
        #2a1908 144deg 162deg,
        #1d1207 162deg 180deg,
        #2a1908 180deg 198deg,
        #1d1207 198deg 216deg,
        #2a1908 216deg 234deg,
        #1d1207 234deg 252deg,
        #2a1908 252deg 270deg,
        #1d1207 270deg 288deg,
        #2a1908 288deg 306deg,
        #1d1207 306deg 324deg,
        #2a1908 324deg 342deg,
        #1d1207 342deg 360deg
    ) !important;
    box-shadow: 0 0 0 1px var(--theme-dark-border-soft), 0 8px 18px rgba(0,0,0,0.35) !important;
}

[data-theme="dark"] .daily-gift-popup {
    background: rgba(0, 0, 0, 0.55) !important;
}

[data-theme="dark"] .daily-gift-popup-title,
[data-theme="dark"] #daily-gift-result,
[data-theme="dark"] #daily-gift-popup-reward,
[data-theme="dark"] #daily-gift-popup-details {
    color: var(--theme-dark-text) !important;
}

[data-theme="dark"] .breed-page,
[data-theme="dark"] .breed-page .breed-title,
[data-theme="dark"] .breed-page .item-locker-title,
[data-theme="dark"] .breed-page .parent-card h3,
[data-theme="dark"] .breed-page .foal-header,
[data-theme="dark"] .breed-page .mutation,
[data-theme="dark"] .breed-page .item-label,
[data-theme="dark"] .breed-page .item-count,
[data-theme="dark"] .breed-page .geno,
[data-theme="dark"] .breed-page .stats,
[data-theme="dark"] .breed-page .stats li,
[data-theme="dark"] .breed-page p,
[data-theme="dark"] .breed-page strong,
[data-theme="dark"] .breed-page label,
[data-theme="dark"] .breed-page h3 {
    color: var(--theme-dark-text) !important;
}

[data-theme="dark"] .breed-page .parent-card,
[data-theme="dark"] .breed-page .breed-center,
[data-theme="dark"] .breed-page .foal-card {
    background: linear-gradient(180deg, var(--theme-dark-card-2) 0%, var(--theme-dark-card) 100%) !important;
    border-color: var(--theme-dark-border) !important;
    box-shadow: 0 0 0 1px var(--theme-dark-border-soft) !important;
}

[data-theme="dark"] .breed-page select[name="stallion_id"],
[data-theme="dark"] .breed-page select[name="mare_id"],
[data-theme="dark"] .breed-page .item-slot,
[data-theme="dark"] .breed-page .item-ui-zone,
[data-theme="dark"] .breed-page .stats-grid > div {
    background: #2a1908 !important;
    border-color: var(--theme-dark-border) !important;
    color: var(--theme-dark-text) !important;
}

[data-theme="dark"] .breed-page .breed-risk {
    background: #2b1b0e !important;
    border-color: var(--theme-dark-border) !important;
}

/* Dark mode: selected red accents only */
[data-theme="dark"] .post-art-button,
[data-theme="dark"] .post-art-button.mobile-post-art,
[data-theme="dark"] .breeding-banner-button,
[data-theme="dark"] .event-carousel-link,
[data-theme="dark"] .profile-tab.active,
[data-theme="dark"] .profile-tab:hover {
    background: #6d0f0d !important;
    color: #fff8ee !important;
    border-color: var(--theme-dark-border) !important;
}

[data-theme="dark"] .post-art-button:hover,
[data-theme="dark"] .post-art-button.mobile-post-art:hover,
[data-theme="dark"] .breeding-banner-button:hover,
[data-theme="dark"] .event-carousel-link:hover,
[data-theme="dark"] .profile-tab.active:hover {
    background: #4f0a09 !important;
    color: #fff8ee !important;
}

[data-theme="dark"] .artist-button,
[data-theme="dark"] .style-button,
[data-theme="dark"] .xp-button,
[data-theme="dark"] .bg-button,
[data-theme="dark"] .anim-button,
[data-theme="dark"] .event-button,
[data-theme="dark"] .training-button,
[data-theme="dark"] .counter-button,
[data-theme="dark"] .color-button,
[data-theme="dark"] .remove-button,
[data-theme="dark"] .upload-button,
[data-theme="dark"] .external-vasteuro-search-btn {
    background: #2a1908 !important;
    border-color: var(--theme-dark-border) !important;
    color: var(--theme-dark-text) !important;
}

[data-theme="dark"] .artist-button.selected,
[data-theme="dark"] .style-button.selected,
[data-theme="dark"] .xp-button.selected,
[data-theme="dark"] .bg-button.selected,
[data-theme="dark"] .anim-button.selected,
[data-theme="dark"] .event-button.selected,
[data-theme="dark"] .training-button.selected,
[data-theme="dark"] .color-button.selected {
    background: var(--theme-dark-accent) !important;
    color: #fff8ee !important;
    border-color: var(--theme-dark-border) !important;
}

[data-theme="dark"] .artist-button.disabled,
[data-theme="dark"] .style-button.disabled,
[data-theme="dark"] .xp-button.disabled,
[data-theme="dark"] .bg-button.disabled,
[data-theme="dark"] .anim-button.disabled,
[data-theme="dark"] .event-button.disabled,
[data-theme="dark"] .training-button.disabled,
[data-theme="dark"] .color-button.disabled,
[data-theme="dark"] .counter-button.disabled {
    background: #1c1207 !important;
    color: #8e7458 !important;
    border-color: #5b3c1e !important;
}

[data-theme="dark"] .image-preview,
[data-theme="dark"] .vasteuro-select,
[data-theme="dark"] .external-vasteuro-select,
[data-theme="dark"] .external-vasteuro-query,
[data-theme="dark"] .artist-credit-input,
[data-theme="dark"] .frame-input {
    background: #2a1908 !important;
    color: var(--theme-dark-text) !important;
    border-color: var(--theme-dark-border) !important;
}

/* Remaining feature pages */
[data-theme="dark"] .farm-card,
[data-theme="dark"] .farm-panel,
[data-theme="dark"] .farm-subpanel,
[data-theme="dark"] .farm-field,
[data-theme="dark"] .farm-art-preview,
[data-theme="dark"] .farm-select-card,
[data-theme="dark"] .farm-member-card,
[data-theme="dark"] .farm-gallery-card,
[data-theme="dark"] .farm-carousel-track,
[data-theme="dark"] .order-vast-card,
[data-theme="dark"] .sale-detail-card,
[data-theme="dark"] .horse-art-card,
[data-theme="dark"] .horse-art-meta,
[data-theme="dark"] .lineage-foals-panel,
[data-theme="dark"] .lineage-foal-card,
[data-theme="dark"] .lineage-foal-empty,
[data-theme="dark"] .pxl-color-shell,
[data-theme="dark"] .pxl-topbar,
[data-theme="dark"] .pxl-controls,
[data-theme="dark"] .pxl-tool-section,
[data-theme="dark"] .pxl-mobile-controls,
[data-theme="dark"] .pxl-mobile-actions,
[data-theme="dark"] .help-box,
[data-theme="dark"] .field-panel,
[data-theme="dark"] .cosmetic-card,
[data-theme="dark"] .cosmetic-bottom,
[data-theme="dark"] .field-empty {
    background: linear-gradient(180deg, var(--theme-dark-card-2) 0%, var(--theme-dark-card) 100%) !important;
    border-color: var(--theme-dark-border) !important;
    color: var(--theme-dark-text) !important;
}

[data-theme="dark"] .farm-field input[type="text"],
[data-theme="dark"] .farm-field input[type="url"],
[data-theme="dark"] .farm-field input[type="number"],
[data-theme="dark"] .farm-field input[type="file"],
[data-theme="dark"] .farm-field select,
[data-theme="dark"] .farm-field textarea,
[data-theme="dark"] .order-vast-card select,
[data-theme="dark"] .order-vast-card textarea,
[data-theme="dark"] .order-vast-card input,
[data-theme="dark"] .pxl-mobile-select,
[data-theme="dark"] #pxlColorDesktop,
[data-theme="dark"] .horse-card,
[data-theme="dark"] .horse-thumb,
[data-theme="dark"] .cosmetic-thumb {
    background: #2a1908 !important;
    border-color: var(--theme-dark-border) !important;
    color: var(--theme-dark-text) !important;
}

[data-theme="dark"] .field-page,
[data-theme="dark"] .pxl-color-wrap,
[data-theme="dark"] .order-vast-card h2,
[data-theme="dark"] .order-vast-card h4,
[data-theme="dark"] .order-vast-card p,
[data-theme="dark"] .order-vast-card label,
[data-theme="dark"] .field-panel-title,
[data-theme="dark"] .horse-name,
[data-theme="dark"] .horse-action-btn,
[data-theme="dark"] .cosmetic-name,
[data-theme="dark"] .cosmetic-count,
[data-theme="dark"] .cosmetic-state,
[data-theme="dark"] .help-title,
[data-theme="dark"] .help-text,
[data-theme="dark"] .pxl-help,
[data-theme="dark"] .pxl-tool-title,
[data-theme="dark"] .farm-select-title,
[data-theme="dark"] .farm-select-meta,
[data-theme="dark"] .farm-gallery-name,
[data-theme="dark"] .farm-gallery-summary,
[data-theme="dark"] .farm-subtitle,
[data-theme="dark"] .horse-art-gallery-title,
[data-theme="dark"] .horse-art-carousel-arrow,
[data-theme="dark"] .lineage-card-label,
[data-theme="dark"] .lineage-card-title,
[data-theme="dark"] .lineage-foal-title,
[data-theme="dark"] .lineage-foal-rank,
[data-theme="dark"] .lineage-foal-phenotype,
[data-theme="dark"] .counter-value,
[data-theme="dark"] .vasteuro-group-title {
    color: var(--theme-dark-text) !important;
}

[data-theme="dark"] .horse-art-carousel-arrow,
[data-theme="dark"] .horse-edit-btn,
[data-theme="dark"] .horse-carousel-btn,
[data-theme="dark"] .cosmetic-item-btn,
[data-theme="dark"] .field-btn.alt,
[data-theme="dark"] .pxl-btn.alt,
[data-theme="dark"] .farm-link-art-btn {
    background: #2a1908 !important;
    border-color: var(--theme-dark-border) !important;
    color: var(--theme-dark-text) !important;
}

[data-theme="dark"] .pxl-btn,
[data-theme="dark"] .pxl-mobile-color-btn,
[data-theme="dark"] .pxl-chip.active,
[data-theme="dark"] .field-btn,
[data-theme="dark"] .horse-action-btn:hover {
    background: #6d0f0d !important;
    border-color: var(--theme-dark-border) !important;
    color: #fff8ee !important;
}

[data-theme="dark"] .pxl-btn:hover,
[data-theme="dark"] .pxl-mobile-color-btn:hover,
[data-theme="dark"] .pxl-chip.active:hover,
[data-theme="dark"] .field-btn:hover {
    background: #4f0a09 !important;
    color: #fff8ee !important;
}

[data-theme="dark"] .pxl-chip,
[data-theme="dark"] .cp-eyedropper {
    background: #2a1908 !important;
    border-color: var(--theme-dark-border) !important;
    color: var(--theme-dark-text) !important;
}

[data-theme="dark"] .field-panel-title,
[data-theme="dark"] .pxl-topbar,
[data-theme="dark"] .lineage-popup-header {
    background: #241607 !important;
    border-color: var(--theme-dark-border) !important;
}

[data-theme="dark"] .lineage-popup h3,
[data-theme="dark"] .lineage-foals-title {
    color: var(--theme-dark-text) !important;
}

[data-theme="dark"] .frame,
[data-theme="dark"] .frame a {
    background: #2a1908 !important;
    color: var(--theme-dark-text) !important;
    border-color: var(--theme-dark-border) !important;
}

[data-theme="dark"] .close-btn {
    background: #6d0f0d !important;
    color: #fff8ee !important;
    border-color: var(--theme-dark-border) !important;
}

[data-theme="dark"] .close-btn:hover {
    background: #4f0a09 !important;
    color: #fff8ee !important;
}

[data-theme="dark"] .farm-check-badge.ok {
    background: #294124 !important;
    color: #d8f0d0 !important;
}

[data-theme="dark"] .farm-check-badge.missing {
    background: #5b1813 !important;
    color: #f2cdc6 !important;
}

/* Posting audit readability */
[data-theme="dark"] .vasteuro-group {
    background: #1d1308 !important;
    border: 1px solid var(--theme-dark-border) !important;
}

[data-theme="dark"] .vasteuro-group-header {
    background: #26180b !important;
    border-bottom: 1px solid var(--theme-dark-border) !important;
}

[data-theme="dark"] .xp-category {
    background: #24170a !important;
    border: 1px solid #7b542f !important;
    border-radius: 10px !important;
    padding: 10px 12px !important;
}

[data-theme="dark"] .xp-category:nth-child(even) {
    background: #2a1a0b !important;
}

[data-theme="dark"] .counter-item {
    background: #2a1908 !important;
    border-color: var(--theme-dark-border) !important;
}

[data-theme="dark"] .counter-value {
    background: #f4e8d7 !important;
    color: #5a351b !important;
    border-color: var(--theme-dark-border) !important;
}

/* Inline-style rescue for specific templates */
[data-theme="dark"] [style*="background:#f5e8d4"],
[data-theme="dark"] [style*="background: #f5e8d4"],
[data-theme="dark"] [style*="background:#f9f1e4"],
[data-theme="dark"] [style*="background: #f9f1e4"],
[data-theme="dark"] [style*="background:#fffaf1"],
[data-theme="dark"] [style*="background: #fffaf1"],
[data-theme="dark"] [style*="background: rgba(255, 250, 241"],
[data-theme="dark"] [style*="background:#efe2cc"],
[data-theme="dark"] [style*="background: #efe2cc"],
[data-theme="dark"] [style*="background:#f8ecdb"],
[data-theme="dark"] [style*="background: #f8ecdb"],
[data-theme="dark"] [style*="background:#f3e2c7"],
[data-theme="dark"] [style*="background: #f3e2c7"],
[data-theme="dark"] [style*="background:#f3e2c6"],
[data-theme="dark"] [style*="background: #f3e2c6"],
[data-theme="dark"] [style*="background: linear-gradient(180deg, #f8eddc"],
[data-theme="dark"] [style*="background: linear-gradient(180deg, #f9efdf"] {
    background: linear-gradient(180deg, var(--theme-dark-card-2) 0%, var(--theme-dark-card) 100%) !important;
    color: var(--theme-dark-text) !important;
    border-color: var(--theme-dark-border) !important;
}

[data-theme="dark"] [style*="color:#6d4223"],
[data-theme="dark"] [style*="color: #6d4223"],
[data-theme="dark"] [style*="color:#7f654a"],
[data-theme="dark"] [style*="color: #7f654a"],
[data-theme="dark"] [style*="color:#5f5142"],
[data-theme="dark"] [style*="color: #5f5142"],
[data-theme="dark"] [style*="color:#5b371c"],
[data-theme="dark"] [style*="color: #5b371c"],
[data-theme="dark"] [style*="color:#6b4d2e"],
[data-theme="dark"] [style*="color: #6b4d2e"],
[data-theme="dark"] [style*="color:#8f552a"],
[data-theme="dark"] [style*="color: #8f552a"] {
    color: var(--theme-dark-text) !important;
}

/* Profile folder modals */
[data-theme="dark"] .profile-folder-edit-card,
[data-theme="dark"] .profile-folder-card,
[data-theme="dark"] .profile-folder-select,
[data-theme="dark"] .profile-folder-edit-header .form-control,
[data-theme="dark"] .profile-folder-action-btn,
[data-theme="dark"] .profile-folder-sort-form .form-select {
    background: #2a1908 !important;
    color: var(--theme-dark-text) !important;
    border-color: var(--theme-dark-border) !important;
}

[data-theme="dark"] .profile-folder-card-thumb {
    background: #201306 !important;
    border-bottom-color: var(--theme-dark-border) !important;
}

[data-theme="dark"] .profile-folder-card-check {
    background: rgba(42, 25, 8, 0.96) !important;
    border-color: var(--theme-dark-border) !important;
    color: transparent !important;
}

[data-theme="dark"] .profile-folder-card input:checked + .profile-folder-card-check {
    background: #6d0f0d !important;
    border-color: #9e6d41 !important;
    color: #fff8ee !important;
}

[data-theme="dark"] .profile-folder-card:has(input:checked) {
    border-color: #9e6d41 !important;
    box-shadow: 0 0 0 2px rgba(158, 109, 65, 0.2) !important;
}

[data-theme="dark"] .profile-folder-count,
[data-theme="dark"] .profile-folder-sort-label,
[data-theme="dark"] .profile-folder-card-name,
[data-theme="dark"] .profile-folder-edit-list .text-muted {
    color: var(--theme-dark-text) !important;
}

[data-theme="dark"] .profile-folder-card:hover {
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.32) !important;
}

/* Dark mode: post cards should use a browner accent, not bright orange */
[data-theme="dark"] .post-card {
    border-color: #8e6848 !important;
    box-shadow: 0 0 0 1px #6e4d31 !important;
}

[data-theme="dark"] .post-card::after {
    background:
        radial-gradient(circle at 5px 5px, #8e6848 0 3px, transparent 4px),
        radial-gradient(circle at calc(100% - 5px) 5px, #8e6848 0 3px, transparent 4px),
        radial-gradient(circle at 5px calc(100% - 5px), #8e6848 0 3px, transparent 4px),
        radial-gradient(circle at calc(100% - 5px) calc(100% - 5px), #8e6848 0 3px, transparent 4px) !important;
}

[data-theme="dark"] .post-card .like-button.action-button,
[data-theme="dark"] .post-like-inline.like-button {
    background: #8b4f1f !important;
    border-color: #a47a54 !important;
    color: #fff8ee !important;
}

[data-theme="dark"] .post-card .like-button.action-button:hover,
[data-theme="dark"] .post-like-inline.like-button:hover {
    background: #71401a !important;
    border-color: #9a6f49 !important;
}

[data-theme="dark"] .post-card .like-button.action-button.liked,
[data-theme="dark"] .post-like-inline.like-button.liked {
    background: #6c2b20 !important;
    border-color: #9a6f49 !important;
    color: #fff2e7 !important;
}

/* Dark mode: preserve horse rank card colors instead of flattening them */
[data-theme="dark"] .horse-card.rank-registered {
    background: linear-gradient(180deg, #2d1b09 0%, #241607 100%) !important;
    border-color: #9a6a3b !important;
    box-shadow: 0 0 0 1px #6f4a28 !important;
    color: #f4e8d7 !important;
}

[data-theme="dark"] .horse-card.rank-registered .card-title,
[data-theme="dark"] .horse-card.rank-registered .card-description,
[data-theme="dark"] .horse-card.rank-registered .card-rank,
[data-theme="dark"] .horse-card.rank-registered .horse-kind-horse,
[data-theme="dark"] .horse-card.rank-registered .horse-kind-mini,
[data-theme="dark"] .horse-card.rank-registered .horse-claim-badge {
    color: #f4e8d7 !important;
}

[data-theme="dark"] .horse-card.rank-registered .horse-thumb {
    background: #2a1908 !important;
    border-color: #9a6a3b !important;
}

[data-theme="dark"] .horse-card.rank-starter {
    background: linear-gradient(180deg, #b98266 0%, #9a6a52 100%) !important;
    border-color: #a17258 !important;
    box-shadow: 0 0 0 1px #7f5542 !important;
    color: #fff5ea !important;
}

[data-theme="dark"] .horse-card.rank-approved {
    background: linear-gradient(180deg, #bcb2ae 0%, #9f9692 100%) !important;
    border-color: #ada4a0 !important;
    box-shadow: 0 0 0 1px #7e7774 !important;
    color: #fff8ef !important;
}

[data-theme="dark"] .horse-card.rank-elite {
    background: linear-gradient(180deg, #e2c089 0%, #c79a5e 100%) !important;
    border-color: #d4ac70 !important;
    box-shadow: 0 0 0 1px #a07b4a !important;
    color: #fff8ef !important;
}

[data-theme="dark"] .horse-card.rank-famous {
    background: linear-gradient(180deg, #c5dbe0 0%, #9fbac1 100%) !important;
    border-color: #b0ccd1 !important;
    box-shadow: 0 0 0 1px #7f9aa0 !important;
    color: #fff8ef !important;
}

[data-theme="dark"] .horse-card.rank-pantheon {
    background: linear-gradient(180deg, #7b3c36 0%, #5a2925 100%) !important;
    border-color: #69312c !important;
    box-shadow: 0 0 0 1px #3b1b18 !important;
    color: #f7eddc !important;
}

[data-theme="dark"] .horse-card.rank-legendary {
    background: linear-gradient(180deg, #383838 0%, #141414 100%) !important;
    border-color: #5c5c5c !important;
    box-shadow: 0 0 0 1px #050505 !important;
    color: #fff8ef !important;
}

/* Dark mode: darker generic card frames and default card action buttons */
[data-theme="dark"] .post-card,
[data-theme="dark"] .gallery-card,
[data-theme="dark"] .profile-card,
[data-theme="dark"] .marketplace-card,
[data-theme="dark"] .marketplace-card .card-body,
[data-theme="dark"] .farm-gallery-card,
[data-theme="dark"] .horse-art-card,
[data-theme="dark"] .lineage-foal-card,
[data-theme="dark"] .profile-folder-card,
[data-theme="dark"] .profile-folder-edit-card {
    border-color: #6a4526 !important;
    box-shadow: 0 0 0 1px #4b3019 !important;
}

[data-theme="dark"] .post-card::after,
[data-theme="dark"] .gallery-card::after,
[data-theme="dark"] .profile-card::after {
    background:
        radial-gradient(circle at 5px 5px, #6a4526 0 3px, transparent 4px),
        radial-gradient(circle at calc(100% - 5px) 5px, #6a4526 0 3px, transparent 4px),
        radial-gradient(circle at 5px calc(100% - 5px), #6a4526 0 3px, transparent 4px),
        radial-gradient(circle at calc(100% - 5px) calc(100% - 5px), #6a4526 0 3px, transparent 4px) !important;
}

[data-theme="dark"] .btn-brown,
[data-theme="dark"] .btn-orange,
[data-theme="dark"] .post-card .like-button.action-button,
[data-theme="dark"] .post-like-inline.like-button,
[data-theme="dark"] .item-card .btn,
[data-theme="dark"] .inventory-card .btn,
[data-theme="dark"] .marketplace-card .btn,
[data-theme="dark"] .sale-detail-card .btn,
[data-theme="dark"] .transfer-panel .btn,
[data-theme="dark"] .profile-folder-action-btn {
    background: #6f3f18 !important;
    border-color: #8a5a32 !important;
    color: #fff8ee !important;
}

[data-theme="dark"] .btn-brown:hover,
[data-theme="dark"] .btn-orange:hover,
[data-theme="dark"] .post-card .like-button.action-button:hover,
[data-theme="dark"] .post-like-inline.like-button:hover,
[data-theme="dark"] .item-card .btn:hover,
[data-theme="dark"] .inventory-card .btn:hover,
[data-theme="dark"] .marketplace-card .btn:hover,
[data-theme="dark"] .sale-detail-card .btn:hover,
[data-theme="dark"] .transfer-panel .btn:hover,
[data-theme="dark"] .profile-folder-action-btn:hover {
    background: #5a3414 !important;
    border-color: #774c2a !important;
    color: #fff8ee !important;
}

/* Keep decorative side drawings visible in dark mode */
[data-theme="dark"] .main-wrapper,
[data-theme="dark"] .main-container {
    background-color: transparent !important;
}

[data-theme="dark"] .background-left,
[data-theme="dark"] .background-right {
    background-image: url('/static/images/main_page_bg.svg') !important;
    opacity: 0.5 !important;
}
