/* Quest Board (/questboard). Moved out of Main.razor so the browser can cache it: inline, these
   ~48 KB were re-sent over the live connection on every visit. Linked from that page only; some class
   names here (.btn-discord, .dot, .wood-panel, ...) are not unique to it. */

    .btn-discord {
        background-color: #5865F2;
        border-color: #5865F2;
        color: #fff;
        font-weight: 600;
        border-radius: .75rem
    }

        .btn-discord:hover, .btn-discord:focus {
            background-color: #4752C4;
            border-color: #4752C4;
            color: #fff
        }

        .btn-discord:focus {
            box-shadow: 0 0 0 .25rem rgba(88,101,242,.35)
        }



    .pagination-controls {
        margin-top: 30px;
        margin-bottom: 10px;
        text-align: center;
    }


    .category-filter {
        display: flex;
        justify-content: center; /* ✅ Center items when space allows */
        flex-wrap: nowrap;
        overflow-x: auto;
        gap: 8px;
        padding: 0 10px;
        white-space: nowrap;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
    }

    .read-toggle-link {
        color: #007bff !important; /* Bootstrap blue */
        font-size: 0.95rem;
        text-decoration: underline !important;
        font-weight: 100 !important;
        cursor: pointer;
    }


    .toolbar-btn {
        min-width: 190px; /* make them the same width */
        font-weight: 600;
    }



        .category-filter::-webkit-scrollbar {
            display: none;
        }

        .category-filter .nav-link {
            background-color: gray;
            color: white;
            border: 2px solid black;
            border-radius: 8px;
            padding: 3px 6px;
            font-weight: 600;
            display: inline-block;
            white-space: nowrap;
            cursor: pointer;
            user-select: none;
            text-align: center;
            font-size: 0.75rem;
            flex-shrink: 0;
            min-width: max-content; /* Ensures it doesn’t get too small */
        }




    /* 🔹 Wood Border (Outer Frame) */
    .wood-border {
        width: 100%;
        min-height: 100vh;
        padding: 0px;
        display: block;
		ustify-content: center;
		align-items: centerj;
    }




    /* 🔹 Wood Panel (Quest Board Background) */
    .wood-panel {
        background: url('/images/wood-border.jpg') top center repeat-y; /* ✅ Repeat only vertically */
        background-size: 100% auto; /* ✅ Always full width, height adjusts */
        width: 100%; /* ✅ Forces full width */
        max-width: 100%; /* ✅ Prevents unnecessary constraints */
        min-height: 100vh; /* ✅ Fills the entire screen height */
        border: 0px solid #8B4513;
        display: block;
        flex-direction: column;
        align-items: center;
        padding: 0px;
    }



    .quest-board {
        background: url('/images/wood-panel2.jpg') center top repeat-y;
        background-size: contain;
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        align-items: stretch;
        gap: 10px;
        width: 100%;
        max-width: 1600px;
        margin: 0 auto;
        min-height: 60vh;
        height: auto;
        flex-grow: 1;
        padding: 75px 20px;
        position: relative;
        box-sizing: border-box;
    }





        /* 🔹 Force Quest Board to Expand When Empty */
        .quest-board::after {
            content: "";
            display: block;
            min-height: 550px; /* ✅ Adds extra height when no quests are available */
            width: 100%;
        }





    /* 🔹 Quest Scrolls (Responsive Quest Listings) */
    .quest-scroll {
        background: url('/images/parchment.jpg') center center / cover no-repeat;
        width: 100%;
        max-width: 450px;
        min-width: 350px;
        min-height: 200px;
        padding: 10px;
        box-shadow: 5px 5px 10px rgba(0, 0, 0, 0.4);
        border-radius: 5px;
        border: 1px solid #00000f;
        font-family: 'Papyrus', serif;
        color: #2B1D10;
        display: flex; /* let inner content stretch to fill row height */
        flex-direction: column; /* stack children vertically */
    }



    /* 🔹 Transparent Background for Description Area */
    .scroll-content {
        background: rgba(255, 255, 255, 0.2); /* ✅ Semi-transparent white */
        padding: 5px; /* ✅ Adds some spacing */
        border-radius: 5px; /* ✅ Optional: Slight rounding for smooth look */
    }



    /* 🔹 Ensures all buttons are on the same row */
    .nav-underline {
        flex-wrap: nowrap !important; /* ✅ Forces buttons to stay on one row */
        gap: 20px; /* ✅ Adds spacing between buttons */
        overflow-x: auto; /* ✅ Enables horizontal scrolling if needed */
        white-space: nowrap; /* ✅ Ensures text doesn’t wrap */
    }

     .scroll-content p {
        
        font-size: 1.30rem;
        
        text-shadow: 1px 1px 1px rgba(0,0,0,0.3); /* ✅ Correctly placed */
    } 


    .description-preview-wrapper {
        position: relative;
        max-height: 8.5em;
        overflow: hidden;
        mask-image: linear-gradient(to bottom, black 75%, transparent 100%);
        -webkit-mask-image: linear-gradient(to bottom, black 75%, transparent 100%);
    }


    .description-preview {
        display: -webkit-box;
        -webkit-line-clamp: 6; /* number of lines */
        -webkit-box-orient: vertical;
        overflow: hidden;
        text-overflow: ellipsis;
        position: relative;
        z-index: 1;
    }

    /* 🔹 Transparent fade overlay (no background color) */
    .description-preview-wrapper::after {
        content: "";
        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;
        height: 1em;
        background: linear-gradient(to bottom, rgba(255,255,255,0), rgba(255,255,255,0.05), rgba(255,255,255,0.15), rgba(255,255,255,0.3), rgba(255,255,255,0.6), rgba(255,255,255,0.85), rgba(255,255,255,1));
        pointer-events: none;
        z-index: 2;
        mask-image: linear-gradient(to bottom, rgba(0,0,0,1), rgba(0,0,0,0));
        -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,1), rgba(0,0,0,0));
    }




    




    .modal-calendar-wrapper {
        position: fixed;
        top: 120px;
        left: 50%;
        transform: translateX(-50%);
        z-index: 1050;
        background-color: transparent;
    }

    .fantasy-calendar {
        background: #1b1b1b;
        border: 3px solid gold;
        border-radius: 12px;
        color: gold;
        width: 320px;
        font-family: 'Cinzel', serif;
    }

        .fantasy-calendar .card-header {
            background-color: #3b1a1a;
            color: gold;
            border-bottom: 2px solid gold;
        }

        .fantasy-calendar .card-body {
            background-color: #2b2b2b;
            padding: 10px;
        }

    .calendar-grid {
        display: grid;
        grid-template-columns: repeat(7, 1fr);
        gap: 6px;
        font-size: 0.85rem;
    }

    .calendar-day {
        background-color: #2f2f2f;
        border: 1px solid #555;
        border-radius: 5px;
        min-height: 55px;
        padding: 5px;
        text-align: center;
        color: gold;
        position: relative;
        transition: background-color 0.2s ease;
    }

        .calendar-day:hover {
            background-color: #3b2a1a;
            cursor: pointer;
        }

    .today-highlight {
        border: 2px solid gold;
        box-shadow: 0 0 6px gold;
    }

    .clickable-day {
        font-weight: bold;
    }

    .day-number {
        font-weight: bold;
        font-size: 1rem;
    }

    .day-quest-count {
        font-size: 0.7rem;
        color: #ddd;
    }

    .day-dots {
        margin-top: 2px;
        display: flex;
        justify-content: center;
        flex-wrap: wrap;
        gap: 2px;
    }

    .dot {
        width: 8px;
        height: 8px;
        border-radius: 50%;
        display: inline-block;
        border: 1px solid #000;
    }

    .btn-outline-gold {
        color: gold;
        border: 1px solid gold;
        background-color: transparent;
    }

        .btn-outline-gold:hover {
            background-color: gold;
            color: black;
        }



        .quest-when {
    font-weight: 800;             /* thicker */
    font-size: 1.05rem;           /* slightly larger than body */
    letter-spacing: .2px;         /* tiny breathing room */
    margin-bottom: .4rem;         /* space before description */
    color: #2B1D10;               /* inherits parchment tone; adjust if needed */
    text-shadow: 1px 1px 1px rgba(0,0,0,.35);
}

    .locked-quests-divider {
        width: 100%;
        display: flex;
        align-items: center;
        gap: 14px;
        margin: 10px 0 6px 0;
        color: #ffe8a3;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 1px;
        font-family: 'Cinzel', serif;
    }

        .locked-quests-divider::before,
        .locked-quests-divider::after {
            content: "";
            flex: 1;
            height: 2px;
            background: linear-gradient(to right, transparent, #d4af37, transparent);
        }

    .quest-team-badge {
        font-size: 12px;
        padding: 4px 8px;
        line-height: 1;
    }





    /* =========================================================
       MAIN PAGE - MOBILE FIT FIX, VERSION 2
       ---------------------------------------------------------
       Desktop is intentionally left alone.

       This version keeps the original quest-card layout much
       closer to what you already had.

       Goals:
       - No cut-off edges on mobile
       - No separate horizontal scroll area at the top
       - Keep DM / Rank / Need using the width of the card
       - Keep quest cards compact enough to see multiple quests
       - Do not change desktop users
       ========================================================= */

    @media (max-width: 767.98px) {
        /* =====================================================
           Page Width Safety
           -----------------------------------------------------
           Prevents the page from being wider than the phone.
           ===================================================== */

        .wood-border,
        .wood-panel,
        .jumbotron-custom,
        .bleed-right-wood,
        .quest-board {
            width: 100% !important;
            max-width: 100% !important;
            overflow-x: hidden !important;
            box-sizing: border-box !important;
        }


            .jumbotron-custom > .m-auto {
                width: 100% !important;
                max-width: 100% !important;
                min-width: 0 !important;
                padding-left: .65rem !important;
                padding-right: .65rem !important;
                box-sizing: border-box !important;
            }
            /* =====================================================
           Search Bar
           -----------------------------------------------------
           Keep search visible and easy to use.
           ===================================================== */

            .jumbotron-custom input.form-control {
                min-height: 48px !important;
                padding: .85rem 2.75rem .85rem 1rem !important;
                font-size: 1rem !important;
            }
        /* =====================================================
           Rank / Category Buttons
           -----------------------------------------------------
           IMPORTANT:
           No horizontal scrolling here.

           Instead of making a second scrollable area, let the
           category/rank buttons wrap naturally.
           ===================================================== */

        .category-filter {
            display: flex !important;
            flex-wrap: wrap !important;
            justify-content: center !important;
            width: 100% !important;
            max-width: 100% !important;
            overflow-x: visible !important;
            overflow-y: visible !important;
            white-space: normal !important;
            gap: .4rem !important;
            padding-left: .25rem !important;
            padding-right: .25rem !important;
        }


            .category-filter .nav-item {
                flex: 0 0 auto !important;
            }


            .category-filter .nav-link {
                min-height: 34px !important;
                display: inline-flex !important;
                align-items: center !important;
                justify-content: center !important;
                padding: .38rem .58rem !important;
                font-size: .76rem !important;
                line-height: 1 !important;
                white-space: nowrap !important;
            }
        /* =====================================================
           Toolbar Buttons
           -----------------------------------------------------
           Keep buttons available, but let them wrap normally.
           Later we can move these into a mobile dropdown.
           ===================================================== */

        .toolbar-btn {
            min-width: 0 !important;
            width: auto !important;
            min-height: 42px !important;
            padding-left: .75rem !important;
            padding-right: .75rem !important;
            font-size: .88rem !important;
            line-height: 1.15 !important;
        }
        /* =====================================================
           Quest Board
           -----------------------------------------------------
           Reduce the large desktop padding, but keep the board
           layout feeling like the original.
           ===================================================== */

        .quest-board {
            display: flex !important;
            flex-wrap: wrap !important;
            justify-content: center !important;
            align-items: stretch !important;
            gap: .8rem !important;
            padding: 1rem .55rem 2rem .55rem !important;
            background-size: cover !important;
        }


            .quest-board::after {
                min-height: 140px !important;
            }
        /* =====================================================
           Quest Card
           -----------------------------------------------------
           Main cutoff fix.

           Original desktop card had min-width: 350px.
           On smaller phones that can break the page.

           This keeps the same card style, but lets it shrink
           safely to the screen width.
           ===================================================== */

        .quest-scroll {
            width: 100% !important;
            max-width: 450px !important;
            min-width: 0 !important;
            padding: .7rem !important;
            box-sizing: border-box !important;
            overflow: hidden !important;
            border-radius: 8px !important;
        }
            /* =====================================================
           Quest Title
           -----------------------------------------------------
           Keep it strong, just not huge on mobile.
           ===================================================== */

            .quest-scroll .scroll-header {
                font-size: clamp(1.25rem, 6vw, 1.6rem) !important;
                line-height: 1.08 !important;
                margin-bottom: .35rem !important;
                overflow-wrap: anywhere !important;
            }


        .quest-team-badge {
            font-size: .7rem !important;
            padding: .22rem .42rem !important;
        }
        /* =====================================================
           Quest Meta Row
           -----------------------------------------------------
           Keep the original 3-column idea:
           - DM
           - Rank
           - Need

           This uses the whole card width instead of stacking.
           ===================================================== */

        .quest-scroll .mt-1.mb-6.row {
            display: flex !important;
            flex-wrap: nowrap !important;
            align-items: center !important;
            margin-left: 0 !important;
            margin-right: 0 !important;
            margin-top: .3rem !important;
            margin-bottom: .55rem !important;
        }


            .quest-scroll .mt-1.mb-6.row > .col-4 {
                width: 33.333% !important;
                max-width: 33.333% !important;
                flex: 0 0 33.333% !important;
                padding-left: .12rem !important;
                padding-right: .12rem !important;
                min-width: 0 !important;
            }


            .quest-scroll .mt-1.mb-6.row .d-flex {
                justify-content: center !important;
            }


            .quest-scroll .mt-1.mb-6.row .btn,
            .quest-scroll .mt-1.mb-6.row .badge,
            .quest-scroll .mt-1.mb-6.row i {
                max-width: 100% !important;
                font-size: .68rem !important;
                line-height: 1.1 !important;
                padding: .28rem .38rem !important;
                white-space: normal !important;
                overflow-wrap: anywhere !important;
            }


            .quest-scroll .mt-1.mb-6.row button.btn {
                font-size: .66rem !important;
                padding: .22rem .34rem !important;
            }
        /* =====================================================
           Status Badges
           -----------------------------------------------------
           Prevent badges from forcing the card wider.
           ===================================================== */

        .quest-scroll .badge {
            max-width: 100% !important;
            white-space: normal !important;
            text-align: center !important;
        }
        /* =====================================================
           Time / Duration
           ===================================================== */

        .quest-when {
            font-size: .92rem !important;
            line-height: 1.2 !important;
            margin-bottom: .45rem !important;
        }


            .quest-when .badge {
                margin-left: .35rem !important;
                font-size: .7rem !important;
                padding: .28rem .42rem !important;
            }
        /* =====================================================
           Description
           -----------------------------------------------------
           Keep readable text but reduce huge card height.
           ===================================================== */

        .scroll-content {
            padding: .55rem !important;
            border-radius: 7px !important;
        }


            .scroll-content p,
            .scroll-content .card-text,
            .description-preview {
                font-size: .98rem !important;
                line-height: 1.36 !important;
            }


        .description-preview-wrapper {
            max-height: 5.7em !important;
        }


        .description-preview {
            -webkit-line-clamp: 4 !important;
        }


        .read-toggle-link {
            margin-top: .35rem !important;
            font-size: .9rem !important;
            font-weight: 800 !important;
        }
        /* =====================================================
           Bottom Action Area
           -----------------------------------------------------
           Keep main actions large enough to tap.
           ===================================================== */

        .quest-scroll h4 {
            margin: .6rem 0 0 0 !important;
            font-size: 1rem !important;
            line-height: 1.15 !important;
        }


            .quest-scroll h4 .btn,
            .quest-scroll h4 .form-control {
                min-height: 44px !important;
                display: inline-flex !important;
                align-items: center !important;
                justify-content: center !important;
                padding: .55rem .85rem !important;
                font-size: .9rem !important;
                line-height: 1.1 !important;
                font-weight: 800 !important;
                border-radius: .7rem !important;
            }
        /* =====================================================
           Locked Divider / Pagination
           ===================================================== */

        .locked-quests-divider {
            gap: .55rem !important;
            margin: .85rem 0 .45rem 0 !important;
            font-size: .78rem !important;
            letter-spacing: .08em !important;
        }


        .pagination-controls {
            width: 100% !important;
            display: flex !important;
            align-items: center !important;
            justify-content: center !important;
            flex-wrap: wrap !important;
            gap: .45rem !important;
            margin-top: 1.1rem !important;
        }


            .pagination-controls .btn {
                min-height: 40px !important;
                min-width: 86px !important;
            }


            .pagination-controls span {
                width: 100% !important;
                order: -1 !important;
                margin: 0 0 .15rem 0 !important;
                font-size: .92rem !important;
            }
        /* =====================================================
           Calendar Containment
           -----------------------------------------------------
           Still not the final mobile calendar redesign.

           This only keeps it from being cut off.
           ===================================================== */

        .modal-calendar-wrapper {
            position: fixed !important;
            inset: 0 !important;
            top: 0 !important;
            left: 0 !important;
            transform: none !important;
            display: flex !important;
            align-items: flex-start !important;
            justify-content: center !important;
            padding: calc(5rem + env(safe-area-inset-top)) .65rem calc(1rem + env(safe-area-inset-bottom)) .65rem !important;
            background: rgba(0, 0, 0, .58) !important;
            overflow-y: auto !important;
            z-index: 1050 !important;
        }


        .fantasy-calendar {
            width: min(100%, 420px) !important;
            max-width: 100% !important;
        }


        .calendar-grid {
            gap: 3px !important;
            font-size: .72rem !important;
        }


        .calendar-day {
            min-height: 46px !important;
            padding: 3px !important;
        }


        .day-number {
            font-size: .88rem !important;
        }


        .day-quest-count {
            font-size: .58rem !important;
            line-height: 1.05 !important;
        }


        .dot {
            width: 6px !important;
            height: 6px !important;
        }
        /* =====================================================
           Bootstrap Modals
           ===================================================== */

        .modal-dialog {
            width: calc(100% - 1rem) !important;
            max-width: calc(100% - 1rem) !important;
            margin-left: auto !important;
            margin-right: auto !important;
        }
    }






    /* =========================================================
       MAIN PAGE - MOBILE FILTERS & CALENDAR DROPDOWN
       ---------------------------------------------------------
       Desktop is intentionally left alone.

       Desktop:
       - Tools panel is always visible.
       - Mobile toggle button is hidden.

       Mobile:
       - Search remains visible.
       - Tools collapse behind one button.
       - No horizontal scrolling filter row.
       ========================================================= */


    /* =========================================================
       Desktop Defaults
       ========================================================= */

    .mobile-quest-tools-toggle {
        display: none !important;
    }


    .quest-tools-panel {
        width: 100%;
    }


    .quest-tools-label {
        display: none;
    }


    /* =========================================================
       Mobile Only
       ========================================================= */

    @media (max-width: 767.98px) {
        /* -----------------------------------------------------
           Mobile Toggle Button
           ----------------------------------------------------- */
        .mobile-quest-tools-toggle {
            width: min(100%, 360px) !important;
            min-height: 44px !important;
            display: inline-flex !important;
            align-items: center !important;
            justify-content: center !important;
            gap: .55rem !important;
            margin-top: .65rem !important;
            margin-left: auto !important;
            margin-right: auto !important;
            color: #1d1406 !important;
            background: linear-gradient(180deg, #ffe28d, #d4a13d) !important;
            border: 1px solid rgba(80, 45, 8, .45) !important;
            border-radius: 999px !important;
            font-weight: 900 !important;
            letter-spacing: .01em !important;
            box-shadow: 0 8px 18px rgba(0, 0, 0, .32), inset 0 1px 0 rgba(255, 255, 255, .55) !important;
        }


            .mobile-quest-tools-toggle.has-active-filters {
                background: linear-gradient(180deg, #bdefff, #54c6e8) !important;
            }


        .mobile-filter-count {
            min-width: 22px !important;
            height: 22px !important;
            display: inline-flex !important;
            align-items: center !important;
            justify-content: center !important;
            color: #fff !important;
            background: #7a0808 !important;
            border-radius: 999px !important;
            font-size: .8rem !important;
            line-height: 1 !important;
            font-weight: 900 !important;
        }


        .mobile-tools-chevron {
            font-size: .75rem !important;
            line-height: 1 !important;
        }
        /* -----------------------------------------------------
           Mobile Panel Closed/Open
           ----------------------------------------------------- */
        .quest-tools-panel {
            display: none !important;
            width: min(100%, 390px) !important;
            margin-top: .65rem !important;
            margin-left: auto !important;
            margin-right: auto !important;
            padding: .75rem !important;
            color: #fff8dc !important;
            background: linear-gradient(180deg, rgba(35, 25, 13, .94), rgba(12, 9, 5, .96)) !important;
            border: 1px solid rgba(255, 216, 128, .35) !important;
            border-radius: 16px !important;
            box-shadow: 0 12px 26px rgba(0, 0, 0, .42), inset 0 1px 0 rgba(255, 255, 255, .08) !important;
        }


            .quest-tools-panel.mobile-open {
                display: block !important;
            }


        .quest-tools-section {
            padding-bottom: .7rem !important;
            margin-bottom: .7rem !important;
            border-bottom: 1px solid rgba(255, 216, 128, .18) !important;
        }


            .quest-tools-section:last-of-type {
                margin-bottom: 0 !important;
            }


        .quest-tools-label {
            display: block !important;
            margin-bottom: .45rem !important;
            color: #ffe28d !important;
            font-size: .78rem !important;
            font-weight: 900 !important;
            letter-spacing: .08em !important;
            text-align: center !important;
            text-transform: uppercase !important;
        }
        /* -----------------------------------------------------
           Mobile Rank Buttons
           -----------------------------------------------------
           No horizontal scrolling.
           Buttons wrap inside the dropdown.
           ----------------------------------------------------- */
        .quest-tools-panel .category-filter {
            display: flex !important;
            flex-wrap: wrap !important;
            justify-content: center !important;
            width: 100% !important;
            max-width: 100% !important;
            margin-top: 0 !important;
            margin-bottom: 0 !important;
            padding: 0 !important;
            gap: .4rem !important;
            overflow: visible !important;
            white-space: normal !important;
        }


            .quest-tools-panel .category-filter .nav-item {
                flex: 0 0 auto !important;
            }


            .quest-tools-panel .category-filter .nav-link {
                min-height: 34px !important;
                display: inline-flex !important;
                align-items: center !important;
                justify-content: center !important;
                padding: .38rem .58rem !important;
                color: #fff !important;
                border: 2px solid rgba(0, 0, 0, .75) !important;
                border-radius: 8px !important;
                font-size: .76rem !important;
                line-height: 1 !important;
                font-weight: 800 !important;
                white-space: nowrap !important;
            }


                .quest-tools-panel .category-filter .nav-link.active {
                    outline: 2px solid #ffe28d !important;
                    box-shadow: 0 0 12px rgba(255, 226, 141, .45) !important;
                }
        /* -----------------------------------------------------
           Mobile Schedule Buttons
           ----------------------------------------------------- */
        .quest-toolbar-actions {
            display: grid !important;
            grid-template-columns: 1fr !important;
            gap: .55rem !important;
            width: 100% !important;
        }


            .quest-toolbar-actions .toolbar-btn {
                width: 100% !important;
                min-width: 0 !important;
                min-height: 42px !important;
                display: inline-flex !important;
                align-items: center !important;
                justify-content: center !important;
                margin: 0 !important;
                border-radius: .8rem !important;
                font-size: .9rem !important;
                font-weight: 850 !important;
                line-height: 1.1 !important;
            }
        /* -----------------------------------------------------
           Mobile Notices / Active Filters
           ----------------------------------------------------- */
        .quest-tools-alert {
            margin-bottom: .7rem !important;
            font-size: .86rem !important;
            line-height: 1.25 !important;
        }


        .quest-tools-current-filters {
            margin-top: .75rem !important;
            padding: .65rem !important;
            color: rgba(255, 255, 255, .9) !important;
            background: rgba(255, 255, 255, .08) !important;
            border: 1px solid rgba(255, 255, 255, .14) !important;
            border-radius: 12px !important;
            text-align: center !important;
            font-size: .84rem !important;
            line-height: 1.35 !important;
        }


            .quest-tools-current-filters .btn {
                min-height: 38px !important;
                margin-bottom: .45rem !important;
                border-radius: 999px !important;
                font-weight: 800 !important;
            }
    }

    /* =========================================================
       Preferred Times Reminder + Schedule Buttons
       ========================================================= */

    .preferred-times-main-reminder {
        width: min(100%, 600px);
        margin: .85rem auto .5rem auto;
        display: flex;
        align-items: center;
        gap: .75rem;
        padding: .85rem .95rem;
        color: #fff8dc;
        background: linear-gradient(180deg, rgba(55, 38, 12, .96), rgba(24, 17, 8, .97));
        border: 1px solid rgba(255, 216, 128, .55);
        border-radius: 16px;
        box-shadow: 0 10px 22px rgba(0, 0, 0, .35), inset 0 1px 0 rgba(255, 255, 255, .08);
    }

    .preferred-times-reminder-icon {
        width: 42px;
        height: 42px;
        min-width: 42px;
        display: flex;
        align-items: center;
        justify-content: center;
        background: rgba(255, 226, 141, .14);
        border: 1px solid rgba(255, 226, 141, .45);
        border-radius: 999px;
        font-size: 1.3rem;
    }

    .preferred-times-reminder-body {
        flex: 1;
        min-width: 0;
    }

    .preferred-times-reminder-title {
        color: #ffe28d;
        font-weight: 900;
        line-height: 1.15;
    }

    .preferred-times-reminder-text {
        color: #f8f1d2;
        font-size: .9rem;
        line-height: 1.25;
        margin-top: .15rem;
    }

    .preferred-times-reminder-button {
        min-width: 96px;
        min-height: 38px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        color: #1d1406 !important;
        background: linear-gradient(180deg, #ffe28d, #d4a13d);
        border: 1px solid rgba(80, 45, 8, .45);
        border-radius: 999px;
        padding: .45rem .8rem;
        font-weight: 900;
        text-decoration: none !important;
        white-space: nowrap;
    }

        .preferred-times-reminder-button:hover,
        .preferred-times-reminder-button:focus {
            color: #1d1406 !important;
            background: linear-gradient(180deg, #fff0b8, #e2b24d);
        }

    /* Schedule buttons: side-by-side on desktop */
    .quest-toolbar-actions {
        width: min(100%, 600px);
        display: grid !important;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: .55rem;
        margin: .75rem auto 0 auto;
        align-items: stretch;
    }

    .quest-action-btn {
        min-width: 0 !important;
        min-height: 44px;
        width: 100%;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: .35rem;
        padding: .55rem .55rem;
        border-radius: 999px;
        border: 1px solid rgba(80, 45, 8, .45);
        font-weight: 900;
        font-size: .86rem;
        line-height: 1.05;
        text-align: center;
        text-decoration: none !important;
        white-space: nowrap;
        box-shadow: 0 7px 15px rgba(0, 0, 0, .22), inset 0 1px 0 rgba(255, 255, 255, .35);
    }

        .quest-action-btn.calendar {
            color: #1d1406 !important;
            background: linear-gradient(180deg, #ffe28d, #d4a13d);
        }

        .quest-action-btn.preferred {
            color: #05202b !important;
            background: linear-gradient(180deg, #bdefff, #54c6e8);
        }

            .quest-action-btn.preferred.active {
                color: #061a0d !important;
                background: linear-gradient(180deg, #bdf7c8, #41c96b);
            }

        .quest-action-btn.availability {
            color: #fff8dc !important;
            background: linear-gradient(180deg, #7b4b20, #3c2410);
            border-color: rgba(255, 216, 128, .45);
        }

        .quest-action-btn.disabled-soft,
        .quest-action-btn:disabled {
            opacity: .72;
            cursor: not-allowed;
            box-shadow: none;
            filter: grayscale(.12);
        }

        .quest-action-btn:hover:not(:disabled),
        .quest-action-btn:focus:not(:disabled) {
            transform: translateY(-1px);
            filter: brightness(1.05);
        }

    /* Mobile: stack cleanly */
    @media (max-width: 767.98px) {
        .preferred-times-main-reminder {
            width: min(100%, 390px);
            flex-direction: column;
            text-align: center;
            padding: .8rem;
        }

        .preferred-times-reminder-button {
            width: 100%;
        }

        .quest-toolbar-actions {
            width: min(100%, 390px) !important;
            display: grid !important;
            grid-template-columns: 1fr !important;
            gap: .55rem !important;
        }

        .quest-action-btn {
            width: 100% !important;
            min-width: 0 !important;
            min-height: 42px !important;
            font-size: .9rem !important;
            border-radius: .8rem !important;
        }
    }


    /* =========================================================
       QUEST BOARD RESTYLE (guild theme)
       ---------------------------------------------------------
       Overrides the wood/parchment era rules above. The board sits
       on the map backdrop like the home page; quest cards keep
       their parchment art (with the guild paper texture blended in)
       but drop Papyrus for Garamond and pick up the shared badge,
       chip and gold-button language. Behaviour is unchanged.
       ========================================================= */
    .qb-page {
        max-width: 1240px;
        margin: 0 auto;
        padding: 1.5rem 1rem 3rem;
        color: #ece9e2;
        font-family: 'Garamond', 'Georgia', serif;
    }

    .qb-header {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        justify-content: space-between;
        gap: 1rem;
        margin-bottom: 1.25rem;
    }

        .qb-header h1 {
            margin: 0;
            font-size: clamp(1.6rem, 3vw, 2.2rem);
            font-weight: 700;
            color: #ffd86b;
        }

            .qb-header h1:focus,
            .qb-header h1:focus-visible {
                outline: none;
            }

    /* Search + filters + schedule tools, as a slate notice card */
    /* No backdrop-filter here on purpose: it would make this card the containing block
       for the fixed-position calendar overlay inside it, trapping the calendar under
       the quest cards. */
    .qb-tools-card {
        position: relative;
        background-color: rgba(35, 39, 43, 0.95);
        border: 1px solid rgba(202, 162, 75, 0.35);
        border-radius: 12px;
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35), inset 0 0 38px rgba(0, 0, 0, 0.28);
        padding: 1.1rem 1.25rem 1rem;
        margin-bottom: 1.5rem;
    }

    .qb-tools-inner {
        max-width: 900px;
        margin: 0 auto;
        display: flex;
        flex-direction: column;
        align-items: center;
        width: 100%;
    }

    .qb-page .qb-tools-inner input.form-control {
        background: #1b1e22 !important;
        color: #ece9e2 !important;
        border: 1px solid rgba(202, 162, 75, 0.35) !important;
        padding: 0.8rem 1.25rem !important;
        font-family: inherit;
    }

        .qb-page .qb-tools-inner input.form-control::placeholder {
            color: rgba(236, 233, 226, 0.5);
        }

        .qb-page .qb-tools-inner input.form-control:focus {
            border-color: #caa24b !important;
            box-shadow: 0 0 0 0.2rem rgba(202, 162, 75, 0.2) !important;
        }

    .qb-page .quest-tools-section {
        width: 100%;
    }

    .qb-page .category-filter .nav-link {
        border: 1px solid rgba(0, 0, 0, 0.55);
        border-radius: 999px;
        padding: 0.25rem 0.75rem;
        font-family: inherit;
        font-size: 0.8rem;
        letter-spacing: 0.02em;
        opacity: 0.75;
        transition: opacity 0.15s ease, box-shadow 0.15s ease;
    }

        .qb-page .category-filter .nav-link.active,
        .qb-page .category-filter .nav-link:hover {
            opacity: 1;
            box-shadow: 0 0 0 2px rgba(255, 216, 107, 0.55);
        }

    .qb-page .quest-action-btn,
    .qb-page .quest-action-btn.calendar,
    .qb-page .quest-action-btn.preferred,
    .qb-page .quest-action-btn.availability {
        background: linear-gradient(180deg, #3a3020, #2a2418);
        border: 1px solid #caa24b;
        color: #ffd86b !important;
        font-family: inherit;
        font-weight: 700;
        box-shadow: none;
    }

        .qb-page .quest-action-btn:hover:not(:disabled),
        .qb-page .quest-action-btn:focus:not(:disabled) {
            background: linear-gradient(180deg, #4a3d28, #33291b);
            color: #ffffff !important;
        }

        .qb-page .quest-action-btn.preferred.active {
            background: #caa24b;
            color: #1b1e22 !important;
            border-color: #ffd86b;
        }

    .qb-page .quest-tools-current-filters {
        color: rgba(236, 233, 226, 0.85);
    }

        .qb-page .quest-tools-current-filters .btn-light {
            background: transparent;
            color: #ffd86b;
            border: 1px solid #caa24b;
            border-radius: 999px;
        }

    /* Board: no wood, a card grid on the backdrop */
    .qb-page .quest-board {
        background: none;
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
        gap: 1.25rem;
        padding: 0;
        min-height: 0;
        max-width: none;
    }

        .qb-page .quest-board::after {
            display: none;
        }

        .qb-page .quest-board > .pagination-controls,
        .qb-page .quest-board > .locked-quests-divider {
            grid-column: 1 / -1;
        }

    .qb-page .pagination-controls {
        margin: 0.25rem 0;
    }

        .qb-page .pagination-controls .btn {
            background: linear-gradient(180deg, #3a3020, #2a2418);
            border: 1px solid #caa24b;
            color: #ffd86b;
            border-radius: 999px;
            padding: 0.4rem 1rem;
            font-family: inherit;
            font-weight: 700;
        }

            .qb-page .pagination-controls .btn:disabled {
                opacity: 0.45;
            }

        .qb-page .pagination-controls span {
            color: rgba(236, 233, 226, 0.8);
        }

    .qb-page .locked-quests-divider {
        font-family: inherit;
        color: #ffd86b;
    }

    /* Quest cards: parchment kept, Papyrus retired */
    .qb-page .quest-scroll {
        width: auto;
        max-width: none;
        min-width: 0;
        font-family: 'Garamond', 'Georgia', serif;
        color: #2b1d10;
        padding: 0.9rem 1rem 1rem;
        border: 1px solid rgba(90, 60, 25, 0.6);
        border-radius: 10px;
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    }

        .qb-page .quest-scroll .scroll-header {
            font-size: 1.45rem;
            font-weight: 700;
            line-height: 1.2;
            color: #4a2a0c;
            text-shadow: none;
        }

        .qb-page .quest-scroll .qb-chip {
            display: inline-flex;
            align-items: center;
            padding: 0.2rem 0.65rem;
            border-radius: 999px;
            border: 1px solid rgba(43, 29, 16, 0.5);
            background: rgba(43, 29, 16, 0.85);
            color: #f3e6c8;
            font-size: 0.78rem;
            font-weight: 700;
            line-height: 1.2;
            white-space: nowrap;
            text-shadow: none;
        }

        .qb-page .quest-scroll .qb-chip-btn {
            background: transparent;
            color: #4a2a0c;
            cursor: pointer;
        }

            .qb-page .quest-scroll .qb-chip-btn:hover {
                background: rgba(43, 29, 16, 0.12);
            }

        .qb-page .quest-scroll .qb-rank {
            border: 1px solid rgba(0, 0, 0, 0.45);
            padding: 0.3rem 0.8rem;
            border-radius: 999px;
            font-size: 0.9rem;
            font-family: inherit;
            /* White label over a rank colour that comes from the database, and several of
               those are very pale (silver, gold, platinum). The old inline style leaned on
               a solid black shadow to stay readable; keep it at full strength now that the
               badge text is a little smaller than it used to be. */
            text-shadow: 1px 1px 1px #000, 0 0 3px rgba(0, 0, 0, 0.9);
        }

        .qb-page .quest-scroll .badge.bg-info {
            background: rgba(43, 29, 16, 0.85) !important;
            color: #f3e6c8 !important;
            font-family: inherit;
            font-size: 0.8rem !important;
            border-radius: 999px;
        }

        .qb-page .quest-scroll .scroll-content {
            background: rgba(255, 255, 255, 0.28);
            border: 1px solid rgba(43, 29, 16, 0.15);
            border-radius: 8px;
            padding: 0.6rem 0.75rem;
        }

        .qb-page .quest-scroll .quest-when .event-time {
            font-weight: 700;
            color: #4a2a0c;
        }

        .qb-page .quest-scroll .quest-when .badge {
            background: rgba(43, 29, 16, 0.85) !important;
            color: #f3e6c8 !important;
            border: 0 !important;
            font-family: inherit;
        }

        .qb-page .quest-scroll .read-toggle-link {
            color: #7a4a12;
            font-weight: 700;
        }

        /* Sign-up area: gold pills for the actions, quiet badges for states */
        .qb-page .quest-scroll h4 {
            margin-top: auto;
            padding-top: 0.5rem;
        }

            .qb-page .quest-scroll h4 .btn-success,
            .qb-page .quest-scroll h4 .btn-primary,
            .qb-page .quest-scroll h4 .btn-warning,
            .qb-page .quest-scroll h4 .btn-info {
                background: #caa24b !important;
                color: #1b1e22 !important;
                border: 1px solid #ffd86b !important;
                border-radius: 999px !important;
                font-family: 'Garamond', 'Georgia', serif;
                font-weight: 700 !important;
                font-size: 1rem;
                text-shadow: none !important;
                box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
            }

                .qb-page .quest-scroll h4 .btn-success:hover,
                .qb-page .quest-scroll h4 .btn-primary:hover,
                .qb-page .quest-scroll h4 .btn-warning:hover,
                .qb-page .quest-scroll h4 .btn-info:hover {
                    background: #ffd86b !important;
                }

            .qb-page .quest-scroll h4 .btn-discord {
                border-radius: 999px !important;
                font-family: 'Garamond', 'Georgia', serif;
            }

            .qb-page .quest-scroll h4 .badge {
                font-family: inherit;
                font-size: 0.85rem;
                border-radius: 999px;
                padding: 0.35rem 0.8rem;
            }

    /* Calendar card inside the tools */
    .qb-page .fantasy-calendar {
        background-color: #23272b !important;
        border: 1px solid rgba(202, 162, 75, 0.45) !important;
        color: #ece9e2 !important;
        font-family: inherit;
    }

        .qb-page .fantasy-calendar .card-header {
            background: transparent !important;
            border-bottom: 1px solid rgba(202, 162, 75, 0.25) !important;
            color: #ffd86b !important;
        }

    /* Preferred-times reminder as a quiet slate notice */
    .qb-page .preferred-times-main-reminder {
        background: rgba(35, 39, 43, 0.92) !important;
        border: 1px solid rgba(202, 162, 75, 0.35) !important;
        color: #ece9e2 !important;
        box-shadow: none !important;
    }

    /* Modals opened from the board */
    .qb-modal .modal-content {
        background-color: #23272b !important;
        color: #ece9e2 !important;
        border: 1px solid rgba(202, 162, 75, 0.45) !important;
        border-radius: 12px;
        font-family: 'Garamond', 'Georgia', serif;
    }

        .qb-modal .modal-header,
        .qb-modal .modal-footer {
            border-color: rgba(202, 162, 75, 0.25) !important;
        }

        .qb-modal .modal-title {
            color: #ffd86b;
        }

    @media (max-width: 767.98px) {
        .qb-page {
            padding: 1rem 0.75rem 2.5rem;
        }

        .qb-page .quest-board {
            grid-template-columns: 1fr;
            gap: 1rem;
        }

        .qb-page .quest-scroll {
            width: auto;
            max-width: none;
            min-width: 0;
            padding: 0.9rem 0.9rem 1rem;
        }
    }

