#wallpaper-table td {
    width: 50%;
    text-align: center;
    vertical-align: top;
    padding: 4px;
}
@media (max-width: 1024px) {
    #wallpaper-table table,
    #wallpaper-table tr,
    #wallpaper-table td,
    #wallpaper-table th {
        display: block;
        width: 100%;
    }
    #wallpaper-table td { padding: 6px 0; }
}

#wallpaper-table img {
    width: auto !important;
    height: auto !important;
    max-width: none !important;
    max-height: none !important;
    display: inline-block;
}

#wallpaper-table table {
    border-collapse: collapse;
    border-spacing: 0;
    width: 98%;
    margin: 0 auto;
}

#wallpaper-table td {
    width: auto;
}

p.indent {
    text-indent: 2em;
}

#kingsfold {
    width: 300px;
}
@media (min-width: 576px) and (max-width: 991px) {
    #kingsfold {
        width: 200px !important;
    }
}
@media (max-width: 575px) {
    #kingsfold {
        width: 150px !important;
    }
}
table#books {
    width: 100% !important;
    max-width: 100vw !important;
    table-layout: fixed !important;
    border-collapse: collapse;
}
table[width="100%"] {
    width: 100% !important;
    max-width: 100vw !important;
    table-layout: fixed !important;
    border-collapse: collapse;
}
td#intro {
    width: 40% !important;
    max-width: 40vw !important;
    padding: 0;
    overflow: hidden;
}
td[width="60%"] {
    width: 60% !important;
    max-width: 60vw !important;
    padding: 0;
    overflow: hidden;
    text-align: center; /* Center images in td */
}
.iframe-wrapper {
    position: relative;
    width: 100%;            /* let it scale with viewport */
    max-width: 560px;       /* cap the size on large screens */
    height: 0;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    margin: 0 auto;         /* ✅ this centers the block */
    overflow: hidden;
}
.iframe-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

#savage {
    max-width: 100%;
    height: auto;
    display: block;      /* optional, gets rid of inline spacing */
    margin: 0 auto;      /* optional, centers it */
}

.responsive-container {
    max-width: 600px !important;
    height: 900px !important;
    min-height: 900px !important;
    max-height: 900px !important;
    display: block;
    margin: 0 auto;
}
.responsive-cover {
    width: 100% !important;
    max-width: 600px !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    border-top-right-radius: 10px;
    border-bottom-right-radius: 10px;
    object-fit: contain; /* Scale image without cropping */
    opacity: 0;
    transition: opacity 2s ease-in-out;
    cursor: pointer;
    display: block;
    margin: 0 auto; /* Center image horizontally */
}
.responsive-cover-visible {
    width: 100% !important;
    max-width: 600px !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    border-top-right-radius: 10px;
    border-bottom-right-radius: 10px;
    object-fit: contain; /* Scale image without cropping */
    cursor: pointer;
    display: block;
    margin: 0 auto; /* Center image horizontally */
}
.responsive-back-cover-visible {
    width: 100% !important;
    max-width: 600px !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    border-top-left-radius: 10px;
    border-bottom-left-radius: 10px;
    object-fit: contain; /* Scale image without cropping */
    cursor: pointer;
    display: block;
    margin: 0 auto; /* Center image horizontally */
}
.responsive-extra-art {
    width: 100% !important;
    max-width: 600px !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    border-radius: 10px;
    object-fit: contain; /* Scale image without cropping */
    cursor: default;
    display: block;
    margin: 0 auto; /* Center image horizontally */
}
.responsive-short-story-cover {
    width: 100% !important;
    max-width: 600px !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    border-top-right-radius: 10px;
    border-bottom-right-radius: 10px;
    object-fit: contain; /* Scale image without cropping */
    cursor: default;
    display: block;
    margin: 0 auto; /* Center image horizontally */
}
.responsive-logo {
    width: 80px;
    height: auto;
    display: block;
    margin: 0 auto;
    object-fit: contain;
    cursor: pointer;
}
.social-buttons {
    width: 100%;
    max-width: 100%;
    margin-top: 10px;
    text-align: center;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}
.social-buttons a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 120px;
    height: 36px;
    border-radius: 5px;
    background-color: #000;
    color: #fff;
    text-decoration: none;
    font-family: Arial, sans-serif;
    transition: background-color 0.3s;
}
.social-buttons a:hover {
    background-color: #333;
}
.social-buttons .x-follow-button::before,
.social-buttons .x-share-button::before {
    content: '\1D54F'; /* Unicode for 𝕏 */
    font-size: 20px;
    line-height: 1;
}
.social-buttons .x-follow-button::after,
.social-buttons .x-share-button::after {
    content: attr(data-label);
    margin-left: 8px;
    font-size: 14px;
}
.intro-section {
    font-size: x-large !important;
}
.title-section {
    font-size: large !important;
}
@media (min-width: 576px) and (max-width: 991px) {
    .responsive-container {
        max-width: 500px !important;
        min-height: 500px !important;
        max-height: 500px !important;
    }
}
@media (max-width: 575px) {
    .responsive-container {
        max-width: 300px !important;
        min-height: 300px !important;
        max-height: 300px !important;
    }
}
@media screen and (min-width: 576px) and (max-width: 991px) {
    .responsive-cover {
        max-width: 500px !important; /* Smaller cap for tablet */
        max-height: 500px !important;
    }
    .intro-section {
        font-size: larger !important;
    }
    .title-section {
        font-size: small !important;
    }
}
@media screen and (max-width: 575px) {
    td#intro {
        width: 80% !important;
        max-width: 80vw !important;
    }
    td[width="60%"] {
        width: 80% !important;
        max-width: 80vw !important;
    }
    .responsive-cover {
        max-width: 300px !important; /* Smaller cap for phone */
        max-height: 300px !important;
    }
    .intro-section {
        font-size: large !important;
    }
    .title-section {
        font-size: x-small !important;
    }
    .social-buttons a {
        width: 100px;
        height: 32px;
    }
    .social-buttons .x-follow-button::before,
    .social-buttons .x-share-button::before {
        font-size: 16px;
    }
    .social-buttons .x-follow-button::after,
    .social-buttons .x-share-button::after {
        font-size: 12px;
    }
}
p[hidden] {
    display: none !important;
}

/* Overlay covers the page from first paint */
#overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    /* <- NOTE: no opacity/visibility transitions on the container */
}

/* We still support the case where a very early head script
   wants to kill the overlay before first paint via display:none!important */
#overlay:not(.vis) { display: none; }

/* Fade the IMAGE, not the container */
#overlay img {
    width: 100vw; height: auto; max-height: 100vh; object-fit: contain; display: block;
    transform: scale(1.02);
    opacity: 0;                     /* start transparent */
    transition: opacity 800ms ease-in, transform 800ms ease-in;
}

#overlay.on img {
    opacity: 1;                     /* fade in image only */
    transform: scale(1);
}

/* Optional: slower “out” transition when dismissing */
#overlay.slow-out img {
    transition: opacity 1200ms ease-out, transform 1200ms ease-out;
}

/* Reduced motion users */
@media (prefers-reduced-motion: reduce) {
    #overlay img { transition: none; transform: none; opacity: 1; }
}

.inline-image {
    display: inline-block;  /* or inline-flex */
    vertical-align: middle; /* aligns with text baseline */
    margin-left: 8px;       /* optional spacing */
}

@media (max-width: 991px) {
    #cover-cell-collapsible { display: none; }
}