body{
    width: 100vw;
    height: 100%;
    background-color:#eeeeee;
    font-size:14px;
}
#fixed-background {
    position: fixed;
    left: 0;
    /* padding-top: 3em; */
    width: 100vw;
    height: calc(100% - 3em);
    z-index: 0;
    margin-top: 100px;
    margin-left: 50px;
    /* background-image: url(../50s_60s/Vol_1_header.jpg); */
    background-blend-mode: darken;
    mix-blend-mode: darken;
    background-position: left center;
    background-repeat: no-repeat;
    background-size: auto;
    /*pointer-events: none;*/
    text-align: left;
    font-size: 3.2vmax;
    max-width:30vw;
    font-family: Romain, Antwerp, serif;
    line-height: 0.9em;
    overflow-wrap: normal;
        }
        
         /*#fixed-background { position: fixed; left: 0; width: 100vw; height: calc(100% - 3em); z-index: 0; margin-top: 10vmin; margin-left: 38px; pointer-events: none; text-align: left; font-family: Romain, Antwerp, serif; line-height: 0.9em; max-width: 34vw; font-size: 3.5vmax; }*/
        
.fixedbg-sub{    padding-top: 2.2em;
    font-size: 0.6em;
    line-height: 1em;
}
strong{color:red;}
#fixed-background ul{
    list-style:none;margin-top:-1em;margin-block-start: 0em !important;
    margin-block-end: 0em !important;
    padding-inline-start: 0 !important;
}
#thumbs {
    position:absolute;
    margin-top:3em;
}
 @media (max-width: 600px) {
            #thumbs{padding-top: 33%;margin-left:-2em;}
        #fixed-background{background-color:#eee;background-blend-mode: normal;margin-left: 10vw;}
    .reading-content-container {
        margin-top: 4em;
        max-width: 80vw !important;
        padding:none;
        margin: 2em auto;
    }
            #fixed-background{max-width: 80vw;
        max-height: 40vmax;
        margin-top: 2em; pointer-events:none;}
            #spacer {display:none;}
        }
        @font-face {
            font-family: Antwerp;
            font-style: normal;
            font-weight: normal;
            src: url("font/Antwerp.otf");
        }
        @font-face {
            font-family: Antwerp;
            font-style: italic;
            font-weight: normal;
            src: url("font/Antwerp-Italic.otf");
        }
        @font-face {
            font-family: Antwerp;
            font-style: oblique;
            font-weight: normal;
            src: url("font/Antwerp-Italic.otf");
        }
        @font-face {
            font-family: Romain;
            font-style: normal;
            src: url("font/RomainHeadline.otf");
        }
        @font-face {
            font-family: "Minion Pro";
            font-style: normal;
            font-weight: normal;
            src: url("font/MinionPro-Regular.otf");
        }
        @font-face {
            font-family: "Romain Headline";
            font-style: normal;
            font-weight: normal;
            src: url("font/RomainHeadline.otf");
        }
        body, div, dl, dt, dd, h1, h2, h3, h4, h5, h6, p, pre, code, blockquote, figure {
            font-family: 'Antwerp';
            line-height:1.1em;
        }
        .card {
            margin: 10px;
            padding: 10px;
            position: relative; /* Needed for z-index */
            z-index: 1;
            transition: z-index 0s linear 0.3s; /* Delay z-index reset slightly on close */
            background-color: white; /* Ensure background is opaque */
        }
        .card img {
            width: 100%;
            height: auto;
            display: block; /* Prevents extra space below image */
        }
        p {
            line-height: 1.1em;
            margin-top: 0.5em;
            margin-bottom: 0.5em;
        }
        .fullscreen img {
            object-fit: contain;
            max-height: 100vh;
        }
        .card.details-focused {
            z-index: 10; /* Bring card to the front */
            transition: z-index 0s; /* Apply immediately on open */
            /* Optional: Add a subtle shadow to enhance the "on top" effect */
            box-shadow: 0 8px 16px rgba(0,0,0,0.2);
        }
        details > summary {
            cursor: pointer;
            list-style: none; /* Optional: remove default triangle */
            padding: 5px 0;
        }
        details > summary::-webkit-details-marker {
             display: none; /* Optional: remove default triangle in Webkit */
        }
        details > summary::before {
             content: '+ '; /* Custom marker */
        }
        details[open] > summary::before {
             content: '- '; /* Custom marker when open */
        }
     /* Adjust Timeline position to make space */
     #timeline-nav {
            position: fixed;
            right: 0;
            top: 15%; /* Make space above */
            bottom: 15%; /* Make space below */
            width: 60px; /* Keep width from mobile adjustments */
            z-index: 100;
            display: flex;
            align-items: center;
            padding: 0 5px 0 15px; /* Keep padding */
            cursor: pointer;
            -webkit-user-select: none;
            -moz-user-select: none;
            -ms-user-select: none;
            user-select: none;
            touch-action: none;
        }


        #timeline-track {
            position: absolute;
            left: 50%; /* Center the track */
            transform: translateX(-50%);
            top: 0;
            bottom: 0;
            width: 4px; /* Track width */
            background-color: #ccc;
            border-radius: 2px;
        }

        #timeline-handle {
            position: absolute;
            left: 50%; /* Center the handle */
            transform: translateX(-50%);
            width: 16px; /* Handle size */
            height: 16px;
            background-color: #555;
            border-radius: 50%;
            cursor: grab;
            z-index: 3; /* Above track and markers */
            /* Initial position will be set by JS */
        }
        #timeline-handle:active {
             cursor: grabbing;
         }


                #timeline-markers {
            position: absolute;
            /* Change left to position markers container to the left of the track */
            /*right: calc(50% + 10px); */
            /* Position markers container to the left */
            left: auto; /* Reset left */
            top: 0;
            bottom: 0;
            width: 20px; /* Area for markers */
            z-index: 2; /* Above track */
            /* Align text to the right within the marker container */
            text-align: right;
        }

        .timeline-marker {
            position: absolute;
            /* Change left to right to align text to the right edge */
            right: 0;
            left: auto; /* Reset left */
            transform: translateY(-50%); /* Center marker vertically on its position */
            /*font-size: 10px;*/
            color: #333;
            cursor: pointer;
            white-space: nowrap;
        }
        .timeline-marker::before {
            content: '';
            position: absolute;
            /* Change right to left to position dash to the right of the text */
            left: 100%;
            right: auto; /* Reset right */
            top: 50%;
            width: 8px; /* Length of the dash */
            height: 1px;
            background-color: #666;
            /* Change margin-right to margin-left */
            margin-left: 3px; /* Space between text and dash */
            margin-right: 0; /* Reset margin-right */
        }

        /* Optional: Adjust tooltip position slightly if needed */
        #timeline-tooltip {
            position: absolute;
            /* You might want to adjust horizontal positioning if it looks off */
            left: 50%;
            transform: translateX(-50%) translateY(-100%); /* Position above handle */
            background-color: rgba(0, 0, 0, 0.7);
            color: white;
            padding: 3px 6px;
            border-radius: 4px;
            font-size: 11px;
            white-space: nowrap;
            opacity: 0; /* Hidden by default */
            transition: opacity 0.2s;
            pointer-events: none; /* Don't interfere with clicks */
            z-index: 4; /* Above handle */
        }
        #prev-range-nav,
        #next-range-nav {
            position: fixed;
            right: 1.5em;
            width: 60px; /* Match timeline width */
            z-index: 101; /* Slightly above timeline */
            text-align: right;
            padding: 5px 0;
             box-sizing: border-box;
        }

        #prev-range-nav {
            top: 4.5em; /* Position above the timeline's top */
            /*border-bottom: 1px solid #ccc; */
            /* Optional separator */
        }

        #next-range-nav {
            bottom: 10%; /* Position below the timeline's bottom */
            /*border-top: 1px solid #ccc; */
            /* Optional separator */
        }
    .item{    padding-top: 4px;
    padding-bottom: 6px;}    
.search-highlight .card{
    box-shadow: 0 4px 10px 0 rgb(221 48 48 / 75%), 0 4px 20px 0 rgb(223 86 86 / 55%) !important;
    }

        
        #prev-range-nav a,
#next-range-nav a {
    display: block;
    text-decoration: none;
    /* Adjust font size - smaller might be needed */
    font-size: 14px;
    font-weight: normal; /* Maybe remove bold */
    color: #333;
    padding: 8px 5px; /* Adjust padding */
    transition: color 0.2s, background-color 0.2s; /* Add background transition */
    line-height: 1.2; /* Adjust line height if needed */
    white-space: nowrap; /* Prevent wrapping */
    text-align:right;
}

#prev-range-nav a:hover,
#next-range-nav a:hover {
    color: #000;
    /* background-color: #eee; Add hover background */
}

           /* Adjust media query if needed for the new buttons */
        @media (max-width: 480px) {
            #timeline-nav {
                width: 50px;
                padding: 0 3px 0 10px;
                top: 12%; /* Adjust slightly more if needed */
                bottom: 12%;
            }
            #prev-range-nav,
            #next-range-nav {
                width: 50px; /* Match timeline width */
            }
             #prev-range-nav {
                 top: 4em; /* Adjust */
             }
             #next-range-nav {
                 bottom: 7%; /* Adjust */
             }
             #prev-range-nav a,
     #next-range-nav a {
         font-size: 11px; /* Even smaller on mobile */
         padding: 5px 2px;
     }
             #timeline-track {
                 left: calc(100% - 10px);
             }
             #timeline-handle {
                 left: calc(100% - 10px);
                 width: 20px;
                 height: 20px;
             }
             #timeline-markers {
                 right: 10px;
             }
             .timeline-marker {
                 font-size: 11px; /* Smaller font on tiny screens */
             }
             .timeline-marker::before {
                 width: 6px;
                 margin-left: 3px;
             }
             #timeline-tooltip {
                 left: calc(100% - 10px);
                 font-size: 11px;
             }
        }
        #timeline-nav:hover #timeline-tooltip.visible,
        #timeline-handle:active + #timeline-tooltip.visible { /* Show on hover or drag */
             opacity: 1;
        }

 @media (max-width: 767px) {
            #search-container {
            top: 0.5em;
            right: 0.5em;
            padding: 5px;
        }
        #search-input {
            width: 120px; /* Smaller on mobile */
            font-size: 12px;
            padding: 5px 7px;
        }
        #search-button {
            padding: 5px 7px;
        }
        #prev-range-nav {
            top: 4.5em; /* Adjust for mobile */
            right: 0.5em;
        }
        #next-range-nav {
            right: 0.5em;
        }
        #timeline-nav {
             right: -5px; /* Adjust if timeline feels too close to edge after adding search */
        }
       
}
    #search-container {
        position: fixed;
        top: 1em; /* Adjust for vertical positioning */
        right: 1.5em;
        z-index: 102; /* Above timeline nav, range navs */
        display: flex;
        align-items: center;
        background-color: rgba(255, 255, 255, 0.9); /* Slightly opaque background */
        padding: 8px;
        z-index:50;
        border-radius: 6px;
        box-shadow: 0 2px 6px rgba(0,0,0,0.15);
    }
    #search-input {
        padding: 7px 10px;
        font-size: 13px;
        font-family: Antwerp, sans-serif; /* Match body font */
        border: 1px solid #ccc;
        border-radius: 4px;
        width: 180px; /* Adjust width as needed */
        margin-right: 6px;
    }
    #search-button {
        padding: 7px 9px;
        font-size: 13px;
        cursor: pointer;
        background-color: #f0f0f0;
        border: 1px solid #ccc;
        border-radius: 4px;
        display: flex;
        align-items: center;
        justify-content: center;
        color: #333;
    }
    #search-button:hover {
        background-color: #e0e0e0;
    }
    #search-button svg {
        pointer-events: none; /* Ensures click hits the button */
    }
