@font-face { font-family: 'Times1'; font-style: normal; src: url('../fonts/times new roman.ttf');  format('opentype');}
@font-face { font-family: 'Times1'; font-style: italic; src: url('../fonts/times new roman italic.ttf');  format('opentype');}
@font-face { font-family: 'Times1'; font-weight: bold; src: url('../fonts/times new roman bold.ttf');  format('opentype');}
@font-face { font-family: 'Times1'; font-style: italic; font-weight: bold; src: url('../fonts/times new roman bold italic.ttf');  format('opentype');}
@font-face { font-family: "jjannon"; font-style: normal; src: url('../fonts/JJannon-Regular.otf'); }
@font-face { font-family: "jjannon"; font-style: italic; src: url('../fonts/JJannon-Italic.otf'); }
html,body {
    margin: 0;
    border: 0;
    padding: 0;
    height: 100%;
    width: 100%;
    background-color: white;
    -webkit-overflow-scrolling: touch;
    overflow-x: hidden;
    font-size: 0;
    -webkit-text-size-adjust: none;
    -moz-text-size-adjust: none;
    text-size-adjust: none;
    font-size-adjust: none;
}
a, p, div, summary,th, td, details{
    -webkit-text-size-adjust: none;
    -moz-text-size-adjust: none;
    text-size-adjust: none;
    font-size-adjust: none;
    text-decoration: none;
    font-family: "jjannon","Songti SC","宋体",STSong, Simsun,"Noto Serif SC", 'Source Han Serif SC', ‘Source Han Serif’, source-han-serif-sc,TimesNewRoman,Times New Roman,Times,Baskerville,Georgia,serif;
    font-weight: 400;
    -moz-osx-font-smoothing: grayscale;
    -webkit-font-smoothing: antialiased;
    hyphens: auto;
}
hr{
    color: white;
    border-top: 0;
    border-bottom: dotted 1px black;
}
.text, summary, details{
    font-size-adjust: none;
    line-height: 16px;
    font-size: 14px;
    margin: 0;
    display: block;
    color: black;
    width: auto;
    /*-webkit-hyphens: auto;*/
    /*-ms-hyphens: auto;*/
    /*hyphens: auto;*/
    /*hyphenate-limit-chars: 10 4 4;*/
}
.howto{
    background: white;
    display: block;

    padding: 10px;
    /*outline: 1.5px dashed black;*/
    /*border: dashed 1px black;*/
}
video, img{
    max-width: 100vw;
    max-height: 100vh;
}
iframe{
    width: calc(100vw - 4px);
    height: 100vh;
    touch-action: pan-x pan-y;
}
.tableborder{
    outline: 1.5px dotted black;
    border: dotted 2px black;
    width: 94vw;
    overflow-x: scroll;
    margin: 3vw;
}
table{
    width: max-content;
}
th{
    display: block;
}
th, td{
    text-align: left;
    line-height: 14px;
    font-size: 12px;
}
.wip{
    opacity: 0.4;
}
th{
    padding-right: 1em;
}
th a{
    text-decoration-line: underline;
    color: black;
}
td{
    width: fit-content;
}
.subproject th{
    padding-left: 1em;
    width: fit-content;
    /*max-width: 48vw;*/
}
.text a{
    background: rgba(255, 0, 0, 0.15);
}

/* Container */
.recipe-gallery {
    display: flex;
    flex-wrap: wrap;
    width: 100%;
    /* Forces everything to start from the left */
    justify-content: flex-start;
    align-items: flex-start;
    /*background-color: white; !* Matches body *!*/
}

/* Individual Item */
.gallery-item {
    /* Allow the div to shrink to the width of the image */
    width: auto;
    /* Prevent images from taking up more than half the row on desktop */
    max-width: 50%;
    display: flex;
    flex-direction: column;
    margin: 0;
    padding: 0;
    flex-shrink: 0;
}

.gallery-item img {
    /* Maintain aspect ratio */
    display: block;
    width: auto;
    /* Ensure it fills the 50% max-width container if the image is large */
    max-width: 100%;
    /* Limits height to the viewport */
    max-height: 100vh;
    /* Show full image without any clipping */
    object-fit: contain;
}

.caption {
    width: 100%;
    text-align: center;
}

/* Mobile: Stack items at 100% width */
@media (max-aspect-ratio: 1/1){
    .gallery-item {
        max-width: 100%;
        width: 100%;
    }

    .gallery-placeholder {
        display: none;
    }
}
.buttons{
    background-color: white;
    display: none;
    width: auto;
    font-size: 80%;
    /*display: inline-block;*/
    padding: 1px 1px;
    position: fixed;
    mix-blend-mode: difference;
    color: #2f2f2f;
    font-size: 14px;
    bottom: 0;
    /*text-align: center;*/
}

.text .buttons{
    background: none;
}
    @media (max-width: 300px) {
        html, body {
            touch-action: pan-x pan-y;
        }
    }
    @media (max-width: 300px) and (min-aspect-ratio: 1/1){
        .buttons {
            transform: scale(0.2);
            transform-origin: bottom left;
        }
    }
    @media (max-width: 200px) {
        .text, th, td, summary, details{
            line-height: 5.5vw;
            font-size: 5vw;
        }
        .tableborder{
            outline: 1px dotted black;
            border: dotted 1.2px black;
        }
        .buttons {
            transform: scale(0.2);
            transform-origin: bottom left;
        }
        .howto{
            padding: 0;
        }
        .howto img{
            width: 40vw;
        }
    }
    @media (max-width: 100px) {
        .text, th, td, summary, details{
            line-height: 11vw;
            font-size: 10vw;
        }
    }
    @media (min-width: 500px) {
        .text{
            width: 500px;
        }
        .tableborder{
            width: 400px;
            margin: 25px;
        }
        th{
            width: 250px;
        }
        td{
            width: 150px;
        }
    }
    @media (min-width: 650px){
        .text {
            width: 650px;
        }
    }
    @media (min-width: 725px) {
        .howto{
            width: 132px;
            position: absolute;
            right: 5px;top: 5px;
        }
    }
