/* Mobile text and layout follow the browser's default font size and available width. */
@media screen and (max-width: 1024px) {
    html:root { font-size: 125%; }
    html body {
        min-width: 0;
        line-height: 1.5;
        -webkit-text-size-adjust: auto;
        text-size-adjust: auto;
        overflow-wrap: anywhere;
    }
    .wrap, .right-content, .right-content-inner, .scan01-right, fieldset {
        min-width: 0;
        max-width: 100%;
    }
    .right-content :is(img, video, iframe), footer img { max-width: 100%; }
    .right-content img { object-fit: contain; }
    .content-title h2, .scan01-title h2, .setting-info-title, .program-textbox span,
    .test-envelope-textbox span, .univ-use-text span, .univ-use-inner-left h3 {
        line-height: 1.45;
        white-space: normal;
    }

    /* Each action gets enough space for its label, including the PDF link. */
    body .scan01-more.tabs, body .scan01-more.tabs:has(> .tab-btn5) {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(min(100%, 6.25em), 1fr));
        align-items: stretch;
        gap: .4em;
        font-size: .8rem;
    }
    body .scan01-more.tabs > .scan01-more-btn01 {
        display: grid;
        align-content: stretch;
        min-width: 0;
        height: auto;
        margin: 0;
        line-height: 1.4;
    }
    body .scan01-more.tabs .scan01-more-btn01 :is(a, span) {
        display: grid;
        place-items: center;
        font-size: inherit;
        line-height: inherit;
        white-space: normal;
        word-break: keep-all;
        overflow-wrap: anywhere;
    }
    body .scan01-more.tabs .scan01-more-btn01 a {
        width: 100%;
        height: 100%;
        min-height: 44px;
        padding: .45em .3em;
    }
    .scan01-more.tabs > :is(.tab-btn5, :has(a[href*="omrscan-cases"])) { grid-column: -2 / -1; }
    .scan01-right .scan-table {
        width: 100%;
        height: auto;
        table-layout: fixed;
        font-size: .8rem;
    }
    .scan01-right .scan-table tr > :is(td, th) {
        height: auto;
        line-height: 1.5;
        white-space: normal;
        overflow-wrap: anywhere;
    }
    .scan01-right .scan-table tr > :first-child { width: 32%; }
    .right-content .setting-tab-btn li a, .right-content .content-title-plus-btn a {
        min-height: 44px;
        height: auto;
        padding: .5em;
        font-size: .8rem;
        line-height: 1.4;
        white-space: normal;
    }
    .content-title-plus-btns { max-width: 100%; flex-wrap: wrap; gap: .4em; }
    .content-title-plus-btns > .content-title-plus-btn { flex: 1 1 8em; margin: 0; }
    .right-content :is(input:not([type]), input[type=text], input[type=email], input[type=tel], input[type=search], select, textarea) {
        max-width: 100%;
        min-width: 0;
        font-size: .8rem;
        line-height: 1.4;
    }
    .right-content :is(.scanner-search, .tableTypeView) :is(input:not([type]), input[type=text], select) {
        height: auto;
        min-height: 2.5em;
    }
    .right-content .scanner-search { height: auto; flex-wrap: wrap; }
    .right-content .scanner-table { max-width: 100%; overflow-x: auto; }
    .right-content .scanner-table table thead tr td { white-space: normal; line-height: 1.4; }

    #bl-phone-menu #bl-phone-title { font-size: 1.3rem; line-height: 1.35; }
    #bl-phone-menu .phone-category-title { font-size: 1.05rem; line-height: 1.4; }
    #bl-phone-menu .bl-phone-group-title { font-size: .65rem; }
    body #bl-phone-menu .category, body #bl-phone-menu .submenus summary, body #bl-phone-menu .submenus a {
        font-size: .8rem;
        line-height: 1.45;
        white-space: normal;
        word-break: keep-all;
        overflow-wrap: anywhere;
    }
    #bl-phone-menu .phone-columns { grid-template-columns: minmax(0, 32%) minmax(0, 1fr); }
}

@media screen and (max-width: 767px) {
    .setting-tab-btns > .setting-tab-btn {
        width: 100%;
        max-width: 100%;
        padding-inline: 0;
    }
    .right-content .program-keyword-inner {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(min(100%, 9em), 1fr));
        gap: .5em;
    }
    .program-keyword-inner .program-keywords { width: auto; min-width: 0; }
    .program-keywords .program-keyword01 {
        width: 100%;
        height: auto;
        min-height: 6em;
        padding: .65em;
        border-radius: 1em;
    }
    .right-content .univ-info01 p { line-height: 1.5; }
    .wrap .heading2, .wrap .univ-sp-title h2, .wrap .program-keyword-title h2 {
        font-size: max(18px, .9rem);
        line-height: 1.4;
    }
    .wrap .notice0003 .titTab { padding-inline: 0; }
    .wrap .notice0003 .titTab ul {
        display: flex;
        flex-wrap: wrap;
        gap: .35rem;
        margin: 0;
    }
    .wrap .notice0003 .titTab li {
        width: auto;
        max-width: 100%;
        margin: 0;
        padding: 0;
        font-size: .8rem;
    }
    .wrap .notice0003 .titTab li a,
    .wrap .notice0003 .titTab li a:is(.current, :focus, :hover) {
        display: grid;
        align-items: center;
        min-height: 44px;
        padding: .35em .55em;
        line-height: 1.4;
    }
    .wrap .notice0003 .titTab li a span { white-space: normal; }
    .wrap .notice0003 .titTab li a::before, .wrap .notice0003 .titTab li a::after { display: none; }
    .right-content table.bbs-search-tablebox { width: 100%; float: none; }
    .bbs-search-tablebox tbody { display: block; }
    .bbs-search-tablebox tr {
        display: flex;
        flex-wrap: wrap;
        align-items: stretch;
        gap: .3em;
    }
    .bbs-search-tablebox tr > :is(td, th) { flex: 1 1 6em; min-width: 0; padding-inline: 0 !important; }
    .right-content .bbs-search-tablebox :is(input, select, .bbs-search-btn) {
        width: 100%;
        min-height: 44px;
        height: auto;
        padding: .4em;
        line-height: 1.4;
        font-size: .8rem;
    }
    .wrap .scan01-left-size:is(.small, .middle, .lage, .best, .best2) {
        width: max-content;
        min-width: 2.5em;
        height: auto;
        min-height: 2.5em;
        padding-inline: .25em;
        font-size: .68rem;
        white-space: nowrap;
    }
}
