/* PrismBox - Responsive CSS */

*, *::before, *::after {
    box-sizing: border-box;
}

body {
    overflow-x: hidden;
}

img {
    max-width: 100%;
    height: auto;
}

/* === Logo area === */
.AREA_LOGO {
    overflow: hidden;
}


/* === Source code blocks: scrollable fallback for pages without tips.css === */
.SRCAREA {
    overflow-x: auto;
    display: block;
    max-width: 100%;
}

/* === AdSense: prevent overflow === */
ins.adsbygoogle {
    max-width: 100% !important;
}

/* === Content images === */
.MAINBOX img,
.MAINCONTENTS img {
    max-width: 100% !important;
    height: auto !important;
}

img.portrait {
    width: 64px !important;
    height: 64px !important;
    max-width: 64px !important;
}

img.package {
    width: 127px !important;
    height: 128px !important;
    max-width: 127px !important;
}

/* ==============================
   Logo: scale below natural width
   ============================== */
@media (max-width: 440px) {
    .AREA_LOGO {
        height: calc(100vw * 150 / 440);
        background-size: auto 100%, 100% 100%;
    }

}

@media (max-width: 560px) {
    .MENUBAR {
        flex-direction: column;
        align-items: flex-start;
        line-height: 14px;
    }
}

/* ==============================
   Tablet / Mobile: <= 768px
   ============================== */
@media (max-width: 768px) {
    body {
        font-size: 14px;
    }

    /* Sidebar + content: stack vertically */
    .layout-row {
        display: flex;
        flex-direction: column;
    }

    .LEFTAREA {
        width: 100% !important;
        border-bottom: 1px solid LightSteelBlue;
        margin-bottom: 8px;
    }

    .LEFTAREA + td {
        width: 100% !important;
    }

    /* Inner content tables */
    table[width="95%"],
    table[width="98%"] {
        width: 100% !important;
    }

    /* Source code on small screens */
    .SRCAREA {
        font-size: 12px;
    }

    /* Profile page */
    .MAINBOX table {
        width: 100% !important;
    }
}

/* ==============================
   Small mobile: <= 480px
   ============================== */
@media (max-width: 480px) {
    .MENUBAR {
        font-size: 10px;
    }

    .SRCAREA {
        font-size: 11px;
    }

    /* Home page close notice */
    .close-notice {
        width: 95% !important;
        height: auto !important;
        min-height: 280px;
    }
}
