﻿html, body {
    margin: 0;
    padding: 0;
    background: #111111;
    color: #eeeeee;
}
.site-header {
    position: relative;
    z-index: 200;
}

.page {
    position: relative;
    z-index: 50; /* or even 1 */
}

.header-row {
    display: flex;
    gap: 24px; /* space between the two frames */
    align-items: center;
    margin-top: 64px;
}

.header-frame {
    position: relative; /* REQUIRED */
    display: inline-flex;
    flex-direction: column;
    gap: 4px;
    align-items: center;
    margin-top: 64px;
    box-sizing: border-box;
    border: 32px solid transparent;
    border-image: url("images/empty-frame.png") 16 repeat;
    padding: 8px;
    image-rendering: pixelated;

    background-color: #111111; /* fallback */
    background-image: url("images/tile7.png");
    background-repeat: repeat;
    background-size: 72px 72px; /* match your tile size */
    background-position: top left;
    background-clip: border-box;
    
}


    /* side accents */
    .header-frame .accent {
        position: absolute;
        width: 32px;
        height: 32px;
        /* place at the border edge and overlap it */
        top: -18px; /* start at top border outer edge */
        transform: translateY(18px); /* push down “beneath corner” */

        background-repeat: no-repeat;
        background-size: contain;
        image-rendering: pixelated;
        pointer-events: none;
    }

    .header-frame .accent-left {
        left: -32px; /* overlaps left border */
        background-image: url("images/accent-left.png");
    }

    .header-frame .accent-right {
        right: -32px; /* overlaps right border */
        background-image: url("images/accent-right.png");
    }


    .header-frame::before,
    .header-frame::after {
        content: "";
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
        width: 96px; /* set to your actual top/bottom accent size */
        height: 32px;
        background-repeat: no-repeat;
        background-size: contain;
        image-rendering: pixelated;
        pointer-events: none;
    }

    .header-frame::before {
        top: -32px; /* half the height */
        background-image: url("images/accent-top.png");
    }

    .header-frame::after {
        bottom: -32px;
        background-image: url("images/accent-bottom.png");
    }

.legend-frame {
    display: inline-flex;
    gap: 28px;
    border: 6px solid transparent;
    border-image: url("images/legend-frame.png") 6 repeat;
    padding: 0px 12px; /* top/bottom, left/right */
    background: #111111;
    image-rendering: pixelated;
    font-size: 16px;
    font-family: "ManaSeed", sans-serif;
}
.title-box {
    font-family: "DungeonFont", sans-serif;
    font-size: 25px;
    line-height: 1; 

    border: 6px solid transparent;
    border-image: url("images/legend-frame.png") 6 repeat;
    padding: 4px 12px; /* adjust vertical here */
    padding-bottom: 6px;
    background: #111111;
    image-rendering: pixelated;
}

    .title-box p {
        margin: 0; /* remove negative margin hack */
    }



    
    .legend-frame p {
        margin: 0px; /* important: remove default <p> margins */
    }

.back-link {
    color: #eeeeee;
    text-decoration: none;
}

.site-header {
    display: flex;
    justify-content: center;
}

.back-link:hover {
    color: #b1a97a;
}

.edge-tile {
    position: fixed;
    top: 0;
    bottom: 0;
    width: 24px;
    background-repeat: repeat-y;
    background-position: top center;
    background-size: 24px 122px;
    image-rendering: pixelated;
    z-index: 10;
    pointer-events: none;
}

    .edge-tile.left {
        left: 8px;
        background-image: url("images/edge-left.png");
    }

    .edge-tile.right {
        right: 8px;
        background-image: url("images/edge-right.png");
    }

/* tablet: smaller tiles, closer inset, reduce reserved space */
@media (max-width: 900px) {
    .edge-tile {
        width: 32px;
        background-size: 32px 32px;
    }

        .edge-tile.left {
            left: 12px;
        }

        .edge-tile.right {
            right: 12px;
        }

    body {
        padding-left: 56px; /* 12 + 32 + ~12 */
        padding-right: 56px;
    }
}

/* mobile: smallest tiles */
@media (max-width: 650px) {
    .edge-tile {
        width: 16px;
        background-size: 16px 16px;
    }

        .edge-tile.left {
            left: 8px;
        }

        .edge-tile.right {
            right: 8px;
        }

    body {
        padding-left: 32px; /* 8 + 16 + ~8 */
        padding-right: 32px;
    }
}

/* too tight: push them out of view (or just hide) */
@media (max-width: 420px) {
    .edge-tile.left {
        left: -32px;
    }

    .edge-tile.right {
        right: -32px;
    }

    body {
        padding-left: 0;
        padding-right: 0;
    }
}

.comics-box{
    position:relative;
    align-items: center;

}

.section-title {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    margin: 24px 0;
    margin-bottom: 64px;
    position: relative;
    z-index: 30;
    font-family: "ManaSeed", sans-serif;
}
    .section-title h1 {
        margin: 0;
    }
.download-link {
    text-decoration: underline;
    text-underline-offset: 4px;
}

    
.page {
    display: flex;
    justify-content: center;
    margin-top: 0;
}

.panel-frame {
    box-sizing: border-box;
    width: min(1100px, 100%);
    margin: 0 16px;
    border: 32px solid transparent;
    border-image: url("images/empty-frame.png") 16 repeat;
    padding: 16px;
    background-color: #111111;
    background-image: url("images/tile13.png");
    background-repeat: repeat;
    background-size: 48px 48px;
    background-position: top left;
    image-rendering: pixelated;
}
.download-link {
    text-decoration: underline;
    text-underline-offset: 4px;
}
.gallery-panel--large {
    width: min(1800px, 100%);
}
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.img-frame {
    box-sizing: border-box;
    border: 6px solid transparent;
    border-image: url("images/legend-frame.png") 6 repeat;
    padding: 8px;
    background: #111111;
    image-rendering: pixelated;
}

    .img-frame img {
        display: block;
        width: 100%;
        height: auto;
        image-rendering: pixelated; /* if pixel art */
    }


.nav-dropdown {
    position: relative;
}

/* hidden by default */
.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: #111111;
    border: 1px solid #555;
    padding: 6px 0;
    min-width: 160px;
    z-index: 1000;
}

/* show on hover or keyboard focus */
.nav-dropdown:hover .dropdown-menu,
.nav-dropdown:focus-within .dropdown-menu {
    display: block;
}

.dropdown-menu a {
    display: block;
    padding: 6px 12px;
    text-decoration: none;
}

    .dropdown-menu a:hover,
    .dropdown-menu a:focus {
        text-decoration: underline;
    }

.dropdown-trigger {
    background: none;
    border: none;
    padding: 0;
    font: inherit;
    color: inherit;
    cursor: pointer;
}

/* existing hover logic still works */
.nav-dropdown:hover .dropdown-menu,
.nav-dropdown:focus-within .dropdown-menu {
    display: block;
}

nav-dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
}

.dropdown-menu {
    z-index: 1000;
}

    /* default (unclicked) */
    .dropdown-menu a:link {
        color: #eeeeee;
    }

    /* after link has been visited */
    .dropdown-menu a:visited {
        color: #b1a97a;
    }

    /* mouse hover */
    .dropdown-menu a:hover {
        color: #b1a97a;
    }

    /* while clicking */
    .dropdown-menu a:active {
        color: #ffcc66;
    }

    /* keyboard focus */
    .dropdown-menu a:focus {
        color: #ffffff;
        outline: none;
    }
.gallery-grid--single {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}
.gallery-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 50px;
}

/* label styled like nav legend frame */
.img-label {
    display: inline-block;
    align-self: flex-start;
    border: 6px solid transparent;
    border-image: url("images/legend-frame.png") 6 repeat;
    padding: 6px 10px;
    background: #111111;
    font-size: 20px;
    image-rendering: pixelated;
    font-family: "ManaSeed", sans-serif;
}
.img-frame--portrait {
    max-width: 70%;
    margin-left: auto;
    margin-right: auto;
}
.comics-panels {
    display: flex;
    flex-direction: column;
    gap: 48px;
    width: 40%;
    align-items: center;
}
/* Reserve space but don't draw a frame when empty */
.img-label {
    min-height: 30px; /* adjust once */
    border: none;
    padding: 0;
    background: transparent;
}

    /* Only draw the framed style when there is actual text */
    .img-label:not(:empty) {
        border: 6px solid transparent;
        border-image: url("images/legend-frame.png") 6 repeat;
        padding: 0px 10px;
        background: #111111;
    }
/* Base label: no forced height */
.img-label {
    display: block;
    margin: 0;
}

    /* Empty label: reserve space, but show nothing */
    .img-label:empty {
        height: 54px; /* increase/decrease this to push down more */
        border: none;
        padding: 0;
        background: transparent;
    }

    /* Non-empty label: draw the framed box */
    .img-label:not(:empty) {
        border: 6px solid transparent;
        border-image: url("images/legend-frame.png") 6 repeat;
        padding: 6px 10px;
        background: #111111;
    }

@font-face {
    font-family: "Delaware!";
    src: url("fonts/That's Delaware! Mono.ttf") format("truetype");
    font-weight: normal;
    font-style: normal;
}
@font-face {
    font-family: "DungeonFont";
    src: url("fonts/DungeonFont.ttf") format("truetype");
    font-weight: normal;
    font-style: normal;
}
@font-face {
    font-family: "ManaSeed";
    src: url("fonts/ManaSeedBody.ttf") format("truetype");
    font-weight: normal;
    font-style: normal;
}
@font-face {
    font-family: "PersonalFont";
    src: url("fonts/Personal Font.ttf") format("truetype");
    font-weight: normal;
    font-style: normal;
}
@font-face {
    font-family: "OnesHandwriting";
    src: url("fonts/OnesHandwriting.ttf") format("truetype");
    font-weight: normal;
    font-style: normal;
}

.webgl-embed {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9; /* change if your game is 4:3, etc. */
    padding: 0; /* override img-frame padding for a tight fit */
    overflow: hidden;
}

    .webgl-embed iframe {
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
        border: 0;
        display: block;
    }
