/* each pc-98 font in two: the glyphs the site's pages use (~12KB, scripts/subset_fonts.py) and the full font
   (woff2 ~384KB, the ttf a fallback) for any other character, fetched only when a page shows one */
@font-face {
    font-family: pc-98;
    src: url('/fonts/pc-9800-core.woff2') format('woff2'), url('/fonts/pc-9800.woff2') format('woff2'), url('/fonts/pc-9800.ttf') format('truetype');   /* the full font if the core can't load */
    unicode-range: U+0-FF, U+2010-2027, U+2030-203B, U+2190-21FF, U+2500-266F, U+3000-30FF, U+4F7F, U+53EF, U+5922, U+5E7B, U+623B, U+7528, U+7D44, U+80FD, U+898B, U+8B5A, U+8FBC, U+FF00-FFEF;
}

@font-face {
    font-family: pc-98;
    src: url('/fonts/pc-9800.woff2') format('woff2'), url('/fonts/pc-9800.ttf') format('truetype');
    unicode-range: U+100-200F, U+2028-202F, U+203C-218F, U+2200-24FF, U+2670-2FFF, U+3100-4F7E, U+4F80-53EE, U+53F0-5921, U+5923-5E7A, U+5E7C-623A, U+623C-7527, U+7529-7D43, U+7D45-80FC, U+80FE-898A, U+898C-8B59, U+8B5B-8FBB, U+8FBD-FEFF, U+FFF0-10FFFF;
}

@font-face {
    font-family: pc-98-bold;
    src: url('/fonts/pc-9800-bold-core.woff2') format('woff2'), url('/fonts/pc-9800-bold.woff2') format('woff2'), url('/fonts/pc-9800-bold.ttf') format('truetype');
    unicode-range: U+0-FF, U+2010-2027, U+2030-203B, U+2190-21FF, U+2500-266F, U+3000-30FF, U+4F7F, U+53EF, U+5922, U+5E7B, U+623B, U+7528, U+7D44, U+80FD, U+898B, U+8B5A, U+8FBC, U+FF00-FFEF;
}

@font-face {
    font-family: pc-98-bold;
    src: url('/fonts/pc-9800-bold.woff2') format('woff2'), url('/fonts/pc-9800-bold.ttf') format('truetype');
    unicode-range: U+100-200F, U+2028-202F, U+203C-218F, U+2200-24FF, U+2670-2FFF, U+3100-4F7E, U+4F80-53EE, U+53F0-5921, U+5923-5E7A, U+5E7C-623A, U+623C-7527, U+7529-7D43, U+7D45-80FC, U+80FE-898A, U+898C-8B59, U+8B5B-8FBB, U+8FBD-FEFF, U+FFF0-10FFFF;
}

@font-face {
    font-family: f14seg-italic;
    src: url('/fonts/DSEG14Classic-Italic.woff2');
}

@font-face {
    font-family: f14seg-bolditalic;
    src: url('/fonts/DSEG14Classic-BoldItalic.woff2');
}

p {
    font-family: 'pc-98';
    font-size: 30px;
    color: white;
}

.nav-row {
    display: flex;
    width: 100%;
    justify-content: space-around;
    flex-direction: row;
    flex-wrap: nowrap;
    height: auto;
    height: min-content;
}

/* 18px vertical padding fits three rows of icons in the 348px sidebar */
.nav-row>.navbutton {
    display: flex;
    padding: 18px 25px;
    flex: 1;
    justify-content: center;
    align-items: center;
}

.nav-row img {
    width: 100%
}

.main-container {
    width: 1280px;
    margin: auto;
}

.main-window {
    background-image: url("/img/background-frame.png");
    background-repeat: no-repeat;
    background-size: cover;
    width: 1280px;
    height: 800px;
    position: relative;
}

body {
    background-color: black;
    background-image: url("/img/stars.gif");
    width: 100vw;
    height: 100%;
    display: flex;
    overflow: auto;
}

#audio-player-container {
    display: none;
}

#mute {
    width: 100px;
    height: 100px;
    filter: grayscale(100%);

    position: absolute;
    bottom: 0px;
    right: 0px;
}


.subwindow {
    position: absolute;
    /* background-color: rgba(200,50,50,.8); */
}

.subwindow a {
    width: 80%;
    margin-left: auto;
    margin-right: auto;
}

#main-image {
    width: 740px;
    height: 528px;
    left: 270px;
    top: 10px;

    overflow: hidden;
}

#main-image-tall {
    width: 766px;
    height: 790px;
    left: 258px;
    top: 0px;

    overflow: hidden;
}

/* full-height pages: the standard frame only borders the picture area above the text box.
   Desktop only: phones drop the frame image, and this selector would outrank that */
@media (min-width: 769px) {
    .main-window:has(#main-image-tall) {
        background-image: url("/img/background-frame-tall.png");
    }
}

.page-image {
    width: 100%;
    height: 100%;
}

#left-sidebar {
    width: 244px;
    height: 348px;
    top: 439px;
    left: 6px;

    flex-direction: column;
}

#text-box {
    width: 762px;
    height: 252px;
    top: 552px;
    left: 259px;
    border-radius: 5px;
}

.text-container {
    position: absolute;
    margin: 5px;
}

.speaker-text {
    color: #ef0060;
    margin-top: 0px;
}

.dialog-text {
    margin-left: 18px;
}

#right-sidebar {
    width: 244px;
    height: 348px;
    top: 446px;
    left: 1030px;

    background-image: url("/img/holo/HoloHappyBGTransparent.png");
    background-size: cover;
    background-position-x: -183px;
}

/* Update the body styles for mobile */
@media (max-width: 768px) {

    html,
    body {
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
        margin: 0;
        padding: 0;
        position: relative;
        overflow-x: hidden;
        overflow-y: auto;
        height: auto;
    }

    body {
        background-attachment: fixed;
    }

    .main-container {
        width: 100%;
        max-width: 100%;
        margin: 0;
        padding: 0;
        position: relative;
        overflow-x: clip;
    }

    .main-window {
        width: 100%;
        max-width: 100%;
        background-image: none;
        margin: 0;
        padding: 0;
        position: relative;
        overflow-x: clip;
        height: auto;
    }

    /* Hide sidebars completely */
    #left-sidebar,
    #right-sidebar {
        display: none;
    }

    /* Force all direct children to respect container width */
    .main-window>* {
        max-width: 100vw;
        overflow-x: hidden;
    }

    /* Ensure images don't overflow */
    img {
        max-width: 100%;
        height: auto;
    }
}