#app nav.side .phone-home, #app .phone-modules { display: none; }

@media screen and (min-width: 700px) and (max-width: 860px) {
    #app { grid-template-columns: 11rem minmax(0, 1fr); }
    #app nav.side {
        display: block;
        height: calc(100dvh - 2.35rem);
        overflow: auto;
        padding: .8rem .55rem;
        border-right: 1px solid var(--hair);
        border-bottom: 0;
    }
    #app nav.side a { white-space: normal; }
    #app nav.side .navgrp { display: block; }
    body.focus #app .crumb { top: 0; }
}

@media screen and (max-width: 699px), screen and (max-height: 500px) and (max-width: 1000px) and (pointer: coarse) {
    #app { grid-template-columns: minmax(0, 1fr); }
    #app nav.side {
        display: flex;
        position: static;
        align-items: center;
        justify-content: space-between;
        height: auto;
        min-height: 3.15rem;
        width: 100%;
        padding: .25rem .7rem;
        border-bottom: 1px solid var(--hair);
        border-right: 0;
    }
    #app nav.side .brand { padding: .2rem 0; }
    #app nav.side .brand img { width: 8rem; }
    #app nav.side .desktop-links { display: none; }
    #app nav.side .phone-home {
        display: inline-flex;
        align-items: center;
        min-height: 44px;
        padding: .3rem .9rem;
        border: 1px solid var(--hair);
    }
    #app .phone-modules {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(min(100%, 9rem), 1fr));
        gap: .65rem;
        margin: 1rem 0 1.35rem;
    }
    #app .phone-modules .navgrp, #app .phone-modules [aria-current="page"] { display: none; }
    #app .phone-modules a {
        display: flex;
        align-items: center;
        min-height: 4.2rem;
        padding: .75rem;
        border: 1px solid var(--hair);
        border-radius: .75rem;
        background: #fff;
        color: var(--ink);
        text-decoration: none;
        box-shadow: 0 2px 5px #362b1710;
        font-weight: 600;
        overflow-wrap: anywhere;
    }
    #app .phone-modules a:active { background: #f6eedc; }
    #app .top { flex-wrap: wrap; gap: .45rem .7rem; padding: .55rem .8rem; }
    #app .top .who { min-width: 0; flex: 1 1 12rem; }
    #app .top .who form { display: flex; align-items: center; flex-wrap: wrap; gap: .3rem; }
    #app .account-tools { margin-inline-start: auto; }
    #app .top button, #app .top select, #app .top .account-tools a { min-height: 44px; }
    body.focus #app header.top { display: flex !important; }
    body.focus #app .crumb { top: 0; }
    #app main { padding: .85rem .8rem 5rem; }
    #app .cols { grid-template-columns: minmax(0, 1fr); }
    #app .block:has(> table), #app .tscroll, #app .table-wrap { max-width: 100%; overflow-x: auto; }
    #app .field input, #app .field select, #app .field textarea, #login input { font-size: 16px; }
    #app dialog { max-height: calc(100dvh - 1.5rem); }
    .sppanel { max-height: calc(100dvh - 5.5rem); }
    #login { grid-template-columns: minmax(0, 1fr); min-height: 100dvh; }
    #login .login-side { display: none; }
    #login .login-main { padding: 1rem; }
}
