

@media (max-width: 768px) {
    :root {
        --gzd-m-pad-x: max(0.85rem, env(safe-area-inset-left));
        --gzd-m-pad-x-end: max(0.85rem, env(safe-area-inset-right));
        --gzd-m-pad-top: max(0.45rem, env(safe-area-inset-top));
        --gzd-m-pad-bottom: max(0.85rem, env(safe-area-inset-bottom));
        --gzd-m-content-max: min(100%, 26rem);
        --gzd-m-content-max-wide: min(100%, 32rem);
        --gzd-m-touch: 2.75rem;
    }
}

@media (max-width: 959px) {
    html.gzd-portal-search-page,
    html.gzd-portal-search-page body.gzd-portal-search-page {
        overflow-x: hidden !important;
        overflow-y: auto !important;
        height: auto !important;
        min-height: 100dvh;
        width: 100%;
    }

    html.gzd-portal-search-page .wrapper {
        display: flex !important;
        flex-direction: column !important;
        width: 100% !important;
        max-width: 100% !important;
        height: auto !important;
        min-height: 100dvh;
        max-height: none !important;
        overflow: visible !important;
    }

    html.gzd-portal-search-page .search-page-body {
        display: flex !important;
        flex-direction: column !important;
        width: 100% !important;
        max-width: 100% !important;
        min-height: 0;
        overflow: visible !important;
    }

    html.gzd-portal-search-page .search-sidebar,
    html.gzd-portal-search-page .search-results-pane {
        width: 100% !important;
        max-width: 100% !important;
        flex: none !important;
        min-width: 0 !important;
    }

    html.gzd-portal-search-page .search-sidebar {
        max-height: none !important;
        overflow: visible !important;
        border-right: none !important;
        border-bottom: 2px solid rgba(122, 62, 26, 0.18);
    }

    html.gzd-portal-search-page .search-area,
    html.gzd-portal-search-page .cluster-nav--sidebar {
        overflow: visible !important;
        max-height: none !important;
        width: 100% !important;
    }

    html.gzd-portal-search-page .main,
    html.gzd-portal-search-page .content-container,
    html.gzd-portal-search-page .results-table-container,
    html.gzd-portal-search-page .search-results-layout,
    html.gzd-portal-search-page .search-results-layout--table-only,
    html.gzd-portal-search-page .search-results-main,
    html.gzd-portal-search-page .results-table-wrapper {
        width: 100% !important;
        max-width: 100% !important;
        height: auto !important;
        max-height: none !important;
        min-height: 0 !important;
        flex: none !important;
        overflow: visible !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    html.gzd-portal-search-page .main {
        padding: 0.35rem 0.5rem !important;
        display: block !important;
    }

    html.gzd-portal-search-page .content-container {
        gap: 0.5rem !important;
        display: block !important;
    }

    html.gzd-portal-search-page .results-table-container {
        border-radius: 0.625rem;
        border-width: 1px;
    }

    html.gzd-portal-search-page .results-table-header {
        display: none !important;
    }

    html.gzd-portal-search-page .results-table-wrapper {
        padding-bottom: 0.5rem !important;
        overflow-x: hidden !important;
    }

    html.gzd-portal-search-page .results-table [class*="col-"],
    html.gzd-portal-search-page .results-table-header [class*="col-"] {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
    }

    html.gzd-portal-search-page .results-table td.col-database,
    html.gzd-portal-search-page .results-table td.col-publisher,
    html.gzd-portal-search-page .results-table td.col-source,
    html.gzd-portal-search-page .results-table td.col-author,
    html.gzd-portal-search-page .results-table td.col-title {
        display: block !important;
    }

    html.gzd-portal-search-page .results-table {
        display: block !important;
        width: 100% !important;
        table-layout: auto !important;
        border-collapse: collapse;
    }

    html.gzd-portal-search-page .results-table colgroup {
        display: none !important;
    }

    html.gzd-portal-search-page .results-table tbody {
        display: block !important;
        width: 100% !important;
    }

    html.gzd-portal-search-page .results-table tbody tr {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box;
        margin: 0 0 0.625rem;
        padding: 0.75rem 0.85rem;
        border: 1px solid rgba(122, 62, 26, 0.16) !important;
        border-radius: 0.625rem;
        background: #fffef9;
        box-shadow: 0 2px 8px rgba(90, 48, 18, 0.05);
    }

    html.gzd-portal-search-page .results-table tbody tr:nth-child(even) {
        background: rgba(247, 240, 230, 0.88) !important;
    }

    html.gzd-portal-search-page .results-table tbody tr:hover {
        background: rgba(201, 162, 39, 0.1) !important;
    }

    html.gzd-portal-search-page .results-table tbody tr:last-child td {
        padding-bottom: 0.35rem !important;
    }

    html.gzd-portal-search-page .results-table tbody td {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        box-sizing: border-box;
        border: none !important;
        padding: 0.28rem 0 !important;
        font-size: 0.875rem;
        line-height: 1.5;
        text-align: left !important;
        white-space: normal !important;
    }

    html.gzd-portal-search-page .results-table tbody td.col-title,
    html.gzd-portal-search-page .results-table tbody td.col-database,
    html.gzd-portal-search-page .results-table tbody td.col-source,
    html.gzd-portal-search-page .results-table tbody td.col-author,
    html.gzd-portal-search-page .results-table tbody td.col-writer,
    html.gzd-portal-search-page .results-table tbody td.col-publisher {
        width: 100% !important;
        min-width: 0 !important;
    }

    html.gzd-portal-search-page .results-table tbody td.col-writer {
        display: none !important;
    }

    html.gzd-portal-search-page .results-table tbody td.col-title {
        border-bottom: 1px dashed rgba(122, 62, 26, 0.18);
        margin-bottom: 0.35rem;
        padding-bottom: 0.5rem !important;
        font-size: 0.9375rem;
        font-weight: 600;
    }

    html.gzd-portal-search-page .results-table tbody td.col-title a {
        display: inline;
        word-break: break-word;
    }

    html.gzd-portal-search-page .results-table tbody td::before {
        display: inline;
        font-weight: 700;
        color: #6b4423;
        font-size: 0.8125rem;
        margin-right: 0.35rem;
    }

    html.gzd-portal-search-page:not(.gzd-portal-elder-page) .results-table tbody td.col-title::before {
        content: "题名：";
    }

    html.gzd-portal-search-page:not(.gzd-portal-elder-page) body.gzd-search-field-full .results-table tbody td.col-title::before,
    body.gzd-portal-search-page.gzd-search-field-full:not(.gzd-portal-elder-page) .results-table tbody td.col-title::before {
        content: "全文：";
    }

    html.gzd-portal-search-page.gzd-portal-elder-page .results-table tbody td.col-title::before {
        content: "题名：";
    }

    html.gzd-portal-search-page.gzd-portal-elder-page body.gzd-search-field-full .results-table tbody td.col-title::before,
    body.gzd-portal-search-page.gzd-portal-elder-page.gzd-search-field-full .results-table tbody td.col-title::before {
        content: "全文：";
    }

    html.gzd-portal-search-page .results-table tbody td.col-database::before {
        content: "库别：";
    }

    html.gzd-portal-search-page .results-table tbody td.col-source::before {
        content: "来源：";
    }

    html.gzd-portal-search-page .results-table tbody td.col-author::before {
        content: "责任者：";
    }

    html.gzd-portal-search-page .results-table tbody td.col-publisher::before {
        content: "出版社：";
    }

    html.gzd-portal-search-page .database-badge,
    html.gzd-portal-search-page .source-badge,
    html.gzd-portal-search-page .meta-text {
        white-space: normal;
        word-break: break-word;
        max-width: 100%;
    }

    html.gzd-portal-search-page .search-card--results {
        margin: 0.35rem 0.5rem !important;
        width: auto;
        max-width: none;
    }

    html.gzd-portal-search-page .cluster-footer-actions {
        flex-wrap: wrap;
        gap: 0.5rem;
        width: 100%;
    }

    html.gzd-portal-search-page .cluster-footer-actions .cluster-nav__apply,
    html.gzd-portal-search-page .cluster-footer-actions .cluster-nav__clear {
        flex: 1 1 auto;
        min-height: var(--gzd-m-touch, 2.75rem);
    }

    html.gzd-portal-search-page .cluster-filter-bar {
        padding-left: max(0.5rem, env(safe-area-inset-left));
        padding-right: max(0.5rem, env(safe-area-inset-right));
    }

    html.gzd-portal-search-page .cluster-filter-bar__summary-hint {
        display: block;
        margin-top: 0.2rem;
        margin-left: 0;
        font-size: 0.8125rem;
    }

    html.gzd-portal-search-page .cluster-nav--sidebar.cluster-nav--multi {
        display: flex;
        flex-direction: column;
        min-height: 0;
    }

    html.gzd-portal-search-page .cluster-nav--sidebar .cluster-nav__scroll {
        flex: 1 1 auto;
        min-height: 0;
        overflow-x: hidden;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
    }

    html.gzd-portal-search-page .cluster-panel__list {
        max-height: none !important;
        overflow: visible !important;
    }

    html.gzd-portal-search-page .footer {
        width: 100% !important;
        flex-shrink: 0;
        padding-bottom: max(0.65rem, env(safe-area-inset-bottom)) !important;
    }

    html.gzd-portal-search-page .footer-content {
        width: 100% !important;
    }

    html.gzd-portal-search-page .footer-pagination {
        width: 100%;
    }
}

@media (max-width: 768px) {
    html.gzd-portal-search-page .header {
        padding:
            var(--gzd-m-pad-top)
            var(--gzd-m-pad-x-end)
            0.45rem
            var(--gzd-m-pad-x) !important;
        position: sticky;
        top: 0;
        z-index: 30;
        width: 100%;
    }

    html.gzd-portal-search-page .search-chrome {
        grid-template-columns: 1fr 1fr;
        grid-template-rows: auto auto auto;
        gap: 0.4rem 0.5rem;
        width: 100%;
        align-items: center;
    }

    html.gzd-portal-search-page .search-chrome__start {
        grid-column: 1;
        grid-row: 1;
        justify-self: start;
    }

    html.gzd-portal-search-page .search-chrome__end {
        grid-column: 2;
        grid-row: 1;
        justify-self: end;
        flex-direction: column;
        align-items: flex-end;
    }

    html.gzd-portal-search-page .search-chrome__brand {
        grid-column: 1 / -1;
        grid-row: 2;
        justify-self: center;
        text-align: center;
    }

    html.gzd-portal-search-page .search-chrome__brand .header-logo {
        max-height: 2rem;
        max-width: min(100%, 9rem);
    }

    html.gzd-portal-search-page .gzd-about-back {
        transform: scale(0.92);
        transform-origin: left center;
    }

    html.gzd-portal-search-page .results-count {
        font-size: 0.75rem;
        padding: 0.25rem 0.55rem;
    }

    html.gzd-portal-search-page .search-mode-toggle__hint {
        display: none;
    }

    html.gzd-portal-search-page .search-card__tabs .search-tab.portal-chip {
        flex: 1 1 calc(50% - 0.2rem);
        min-width: 0;
    }

    html.gzd-portal-search-page .search-card__tabs .search-tab-icon {
        display: none;
    }

    html.gzd-portal-search-page .search-query__input,
    html.gzd-portal-search-page .search-input {
        font-size: 16px;
    }

    html.gzd-portal-search-page .search-form-wrapper {
        flex-direction: column;
    }

    html.gzd-portal-search-page .search-btn {
        width: 100%;
    }

    html.gzd-portal-search-page .filter-toolbar__control {
        flex: 1 1 100%;
        min-width: 0;
    }

    html.gzd-portal-search-page .footer {
        position: sticky;
        bottom: 0;
        z-index: 25;
        padding-bottom: max(0.5rem, env(safe-area-inset-bottom)) !important;
        box-shadow: 0 -4px 16px rgba(90, 48, 18, 0.08);
    }

    html.gzd-portal-search-page .pagination-controls {
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.25rem;
    }

    html.gzd-portal-search-page .pagination-btn {
        min-width: 2.375rem;
        min-height: 2.375rem;
        font-size: 0.8125rem;
    }

    html.gzd-portal-search-page .pagination-jump {
        width: 100%;
        flex-wrap: wrap;
        justify-content: center;
        border-top: 1px solid rgba(122, 62, 26, 0.1);
        padding-top: 0.35rem;
        margin-top: 0.25rem;
    }

    html.gzd-portal-search-page .pagination-jump input {
        font-size: 16px;
        width: 3.25rem;
        min-height: var(--gzd-m-touch);
    }

    html.gzd-portal-search-page .search-btn {
        min-height: var(--gzd-m-touch);
    }

    html.gzd-portal-search-page .search-card--results {
        margin-left: var(--gzd-m-pad-x) !important;
        margin-right: var(--gzd-m-pad-x-end) !important;
    }

    html.gzd-portal-search-page .main {
        padding-left: var(--gzd-m-pad-x) !important;
        padding-right: var(--gzd-m-pad-x-end) !important;
    }

    html.gzd-portal-search-page .search-card {
        width: 100%;
        max-width: 100%;
    }

    html.gzd-portal-search-page .search-card__head,
    html.gzd-portal-search-page .search-card__tabs {
        justify-content: center;
    }

    html.gzd-portal-search-page .cluster-nav__head {
        text-align: center;
    }
}

@media (max-width: 380px) {
    html.gzd-portal-search-page .pagination-btn:not(.nav-btn):not(.active) {
        display: none;
    }

    html.gzd-portal-search-page .pagination-btn.active,
    html.gzd-portal-search-page .pagination-btn.nav-btn,
    html.gzd-portal-search-page .pagination-dots {
        display: inline-flex;
    }
}

@media (max-width: 768px) {
    html.gzd-portal-home-page,
    html.gzd-portal-home-page body {
        overflow-x: hidden !important;
        overflow-y: auto !important;
        height: auto !important;
        min-height: 100dvh;
        width: 100%;
    }

    html.gzd-portal-home-page .wrapper {
        display: flex !important;
        flex-direction: column !important;
        min-height: 100dvh;
        height: auto !important;
        width: 100%;
    }

    html.gzd-portal-home-page .header {
        flex-shrink: 0;
        width: 100%;
        overflow: visible !important;
        gap: 0.4rem !important;
        padding:
            var(--gzd-m-pad-top)
            var(--gzd-m-pad-x-end)
            0.5rem
            var(--gzd-m-pad-x) !important;
    }

    html.gzd-portal-home-page .header-top,
    html.gzd-portal-home-page .header-top.header-top--with-welcome {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        gap: 0 !important;
    }

    html.gzd-portal-home-page .header-top__row {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        width: 100% !important;
        max-width: 100% !important;
        gap: 0.5rem !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    html.gzd-portal-home-page .header-top__row > .portal-welcome,
    html.gzd-portal-home-page .header-top__row > .ip-display,
    html.gzd-portal-home-page .header-top--with-welcome .portal-welcome,
    html.gzd-portal-home-page .header-top--with-welcome .ip-display {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 auto !important;
        align-self: center !important;
        flex: 0 0 auto !important;
        display: flex !important;
        justify-content: center !important;
    }

    html.gzd-portal-home-page .header-top--with-welcome .gzd-mini-scroll {
        width: 100% !important;
        max-width: 100% !important;
        margin-left: auto !important;
        margin-right: auto !important;
        align-self: center !important;
        justify-content: center;
        filter: none;
    }

    html.gzd-portal-home-page .gzd-mini-scroll__roller {
        width: 0.35rem;
        min-height: 2.35rem;
        flex-shrink: 0;
    }

    html.gzd-portal-home-page .gzd-mini-scroll__paper {
        flex: 1 1 auto;
        min-width: 0;
        width: auto;
        max-width: none;
        display: flex !important;
        align-items: center;
        justify-content: center;
        flex-wrap: wrap;
        gap: 0.3rem 0.45rem;
        padding: 0.42rem 0.55rem !important;
        text-align: center;
    }

    html.gzd-portal-home-page .portal-welcome__mark,
    html.gzd-portal-home-page .ip-display__mark {
        width: 1.5rem;
        height: 1.5rem;
        font-size: 0.8125rem;
        flex-shrink: 0;
    }

    html.gzd-portal-home-page .portal-welcome__text {
        white-space: normal !important;
        text-overflow: unset !important;
        overflow: visible !important;
        text-align: center;
        line-height: 1.45;
        flex: 1 1 auto;
        min-width: 0;
    }

    html.gzd-portal-home-page .portal-welcome__who {
        word-break: break-word;
    }

    html.gzd-portal-home-page .ip-display__body {
        display: flex !important;
        flex-wrap: wrap;
        align-items: center;
        justify-content: center;
        gap: 0.2rem 0.4rem;
        width: 100%;
        min-width: 0;
    }

    html.gzd-portal-home-page .ip-display__label {
        white-space: normal;
        font-size: 0.8125rem;
    }

    html.gzd-portal-home-page .ip-display .ip-value,
    html.gzd-portal-home-page .ip-display__value {
        font-size: 0.875rem;
        word-break: break-all;
    }

    html.gzd-portal-home-page .header-top--with-welcome .portal-access-notice {
        align-self: center !important;
        width: 100% !important;
        max-width: 100% !important;
        margin: 0.25rem auto 0 !important;
        text-align: center;
    }

    html.gzd-portal-home-page .header-content {
        width: 100%;
        align-items: center !important;
        text-align: center;
        gap: 0.35rem;
    }

    html.gzd-portal-home-page .header-logo {
        max-width: min(100%, 13.5rem);
        height: auto;
        margin-left: auto;
        margin-right: auto;
    }

    html.gzd-portal-home-page .brand-slogan {
        flex-wrap: wrap !important;
        justify-content: center !important;
        width: 100%;
        max-width: 100%;
        margin-left: auto;
        margin-right: auto;
        padding: 0.35rem 0.75rem !important;
    }

    html.gzd-portal-home-page .slogan-text {
        font-size: 0.8125rem !important;
        letter-spacing: 0.2em !important;
    }

    html.gzd-portal-home-page .slogan-divider {
        height: 1rem;
    }

    html.gzd-portal-home-page .main {
        flex: 1 1 auto !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: flex-start !important;
        width: 100% !important;
        padding: 0.5rem var(--gzd-m-pad-x-end) 0.75rem var(--gzd-m-pad-x) !important;
        overflow: visible !important;
    }

    html.gzd-portal-home-page .main::before,
    html.gzd-portal-home-page .main::after {
        display: none;
    }

    html.gzd-portal-home-page .content-container {
        width: 100% !important;
        max-width: var(--gzd-m-content-max-wide) !important;
        margin-left: auto !important;
        margin-right: auto !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
        gap: 0.75rem !important;
    }

    html.gzd-portal-home-page .search-section {
        width: 100%;
    }

    html.gzd-portal-home-page .search-card {
        width: 100%;
        margin-left: auto;
        margin-right: auto;
        padding: 0.85rem 0.75rem !important;
        box-sizing: border-box;
    }

    html.gzd-portal-home-page .search-header {
        justify-content: center !important;
        text-align: center;
        margin-bottom: 0.5rem;
    }

    html.gzd-portal-home-page .search-title {
        text-align: center;
        font-size: 0.9375rem !important;
        letter-spacing: 0.15em !important;
    }

    html.gzd-portal-home-page .search-form {
        flex-direction: column !important;
        width: 100%;
        align-items: stretch !important;
        gap: 0.5rem !important;
    }

    html.gzd-portal-home-page .search-input-wrapper {
        width: 100% !important;
    }

    html.gzd-portal-home-page .search-input {
        font-size: 16px !important;
        width: 100%;
    }

    html.gzd-portal-home-page .search-btn {
        width: 100% !important;
        min-width: 0 !important;
        min-height: var(--gzd-m-touch);
        justify-content: center !important;
        font-size: 0.9375rem !important;
        letter-spacing: 0.12em !important;
    }

    html.gzd-portal-home-page .search-tabs {
        flex-wrap: wrap !important;
        justify-content: center !important;
        gap: 0.35rem;
        margin-bottom: 0.5rem;
    }

    html.gzd-portal-home-page .search-tab {
        flex: 1 1 calc(50% - 0.25rem);
        min-width: 4rem;
        min-height: var(--gzd-m-touch);
        justify-content: center;
        font-size: 0.8125rem !important;
        padding: 0.4rem 0.5rem !important;
    }

    html.gzd-portal-home-page .elder-mode-banner {
        flex-wrap: wrap;
        justify-content: center;
        text-align: center;
        gap: 0.5rem;
        padding: 0.65rem 0.75rem;
    }

    html.gzd-portal-home-page .elder-mode-banner__lead {
        justify-content: center;
        width: 100%;
    }

    html.gzd-portal-home-page .elder-mode-text__hint {
        white-space: normal;
    }

    html.gzd-portal-home-page .elder-mode-btn {
        width: 100%;
        min-height: var(--gzd-m-touch);
        justify-content: center;
    }

    html.gzd-portal-home-page .resources-section {
        width: 100%;
        padding: 0.65rem 0.5rem !important;
        margin: 0 auto;
        box-sizing: border-box;
    }

    html.gzd-portal-home-page .resources-header,
    html.gzd-portal-home-page .resources-title {
        text-align: center;
        width: 100%;
        justify-content: center;
    }

    html.gzd-portal-home-page .resources-nav {
        flex-wrap: wrap !important;
        justify-content: center !important;
        gap: 0.5rem !important;
        overflow-x: visible !important;
        width: 100%;
    }

    html.gzd-portal-home-page .resource {
        flex: 1 1 calc(25% - 0.5rem);
        min-width: 4.25rem;
        max-width: calc(50% - 0.35rem);
        align-items: center;
        text-align: center;
        padding: 0.4rem 0.25rem;
    }

    html.gzd-portal-home-page .resource-icon {
        margin-left: auto;
        margin-right: auto;
    }

    html.gzd-portal-home-page .resource-name {
        font-size: 0.6875rem !important;
        line-height: 1.3;
        word-break: keep-all;
    }

    html.gzd-portal-home-page .sidebar {
        position: static !important;
        transform: none !important;
        width: 100% !important;
        max-width: var(--gzd-m-content-max-wide) !important;
        margin: 0 auto !important;
        right: auto !important;
        top: auto !important;
        padding: 0 0 1rem;
    }

    html.gzd-portal-home-page .tools-card {
        width: 100%;
        margin-left: auto;
        margin-right: auto;
        padding: 0.75rem !important;
    }

    html.gzd-portal-home-page .tools-header {
        justify-content: center;
        text-align: center;
    }

    html.gzd-portal-home-page .tools-list {
        flex-direction: row !important;
        flex-wrap: wrap !important;
        justify-content: center !important;
        gap: 0.5rem !important;
    }

    html.gzd-portal-home-page .tool-item {
        flex: 1 1 calc(50% - 0.35rem);
        min-width: 0;
        min-height: var(--gzd-m-touch);
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 0.5rem 0.35rem;
    }

    html.gzd-portal-home-page .tool-info {
        align-items: center;
    }

    html.gzd-portal-home-page .tool-name {
        font-size: 0.8125rem !important;
    }

    html.gzd-portal-home-page .tool-desc {
        font-size: 0.6875rem !important;
    }

    html.gzd-portal-home-page .footer {
        flex-shrink: 0;
        width: 100%;
        padding:
            0.5rem
            var(--gzd-m-pad-x-end)
            var(--gzd-m-pad-bottom)
            var(--gzd-m-pad-x) !important;
    }

    html.gzd-portal-home-page .footer-content {
        align-items: center;
        text-align: center;
    }

    html.gzd-portal-home-page .footer-qr-section {
        width: 100%;
    }

    html.gzd-portal-home-page .qr-container {
        flex-wrap: wrap !important;
        justify-content: center !important;
        gap: 0.65rem !important;
    }

    html.gzd-portal-home-page .footer-links,
    html.gzd-portal-home-page .footer-info,
    html.gzd-portal-home-page .footer-bottom {
        flex-wrap: wrap !important;
        justify-content: center !important;
        text-align: center;
    }

    html.gzd-portal-home-page .footer-links a {
        min-height: var(--gzd-m-touch);
        display: inline-flex;
        align-items: center;
    }

    html.gzd-portal-elder-page.gzd-portal-home-page .elder-home-top {
        display: grid !important;
        grid-template-columns: 1fr;
        grid-template-rows: auto auto auto;
        justify-items: center;
        gap: 0.45rem;
        text-align: center;
        width: 100%;
    }

    html.gzd-portal-elder-page.gzd-portal-home-page .elder-home-top__center {
        order: -1;
        grid-row: 1;
        width: 100%;
        display: flex;
        justify-content: center;
    }

    html.gzd-portal-elder-page.gzd-portal-home-page .elder-home-top__start,
    html.gzd-portal-elder-page.gzd-portal-home-page .elder-home-top__end {
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 0.45rem;
    }

    html.gzd-portal-elder-page.gzd-portal-home-page .elder-home-top__start .portal-welcome,
    html.gzd-portal-elder-page.gzd-portal-home-page .elder-home-top__end .ip-display {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 auto !important;
        align-self: center !important;
    }

    html.gzd-portal-elder-page.gzd-portal-home-page .mode-toggle-header {
        width: 100%;
        display: flex;
        justify-content: center;
    }

    html.gzd-portal-elder-page.gzd-portal-home-page .mode-toggle-header__link {
        min-height: var(--gzd-m-touch);
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    html.gzd-portal-elder-page.gzd-portal-home-page .main {
        align-items: center !important;
    }

    html.gzd-portal-elder-page.gzd-portal-home-page .search-card,
    html.gzd-portal-elder-page.gzd-portal-home-page .resources-section {
        width: 100%;
        max-width: var(--gzd-m-content-max-wide);
        margin-left: auto;
        margin-right: auto;
    }

    html.gzd-portal-elder-page.gzd-portal-home-page .search-header,
    html.gzd-portal-elder-page.gzd-portal-home-page .section-title {
        text-align: center;
    }

    html.gzd-portal-elder-page.gzd-portal-home-page .search-tabs {
        justify-content: center;
        flex-wrap: wrap;
    }

    html.gzd-portal-elder-page.gzd-portal-home-page .resources-grid {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.5rem;
        justify-items: center;
    }

    html.gzd-portal-elder-page.gzd-portal-home-page .resources-grid .resource {
        width: 100%;
        max-width: 100%;
    }
}

@media (max-width: 400px) {
    html.gzd-portal-home-page .resource {
        flex: 1 1 calc(50% - 0.35rem);
        min-width: 3.75rem;
    }

    html.gzd-portal-home-page .gzd-mini-scroll__paper {
        padding: 0.38rem 0.45rem !important;
    }

    html.gzd-portal-home-page .portal-welcome__prefix,
    html.gzd-portal-home-page .portal-welcome__suffix {
        font-size: 0.8125rem;
    }
}

@media (max-width: 768px) {
    html.gzd-login-html,
    body.gzd-login-page {
        min-height: 100dvh;
        width: 100%;
        overflow-x: hidden;
    }

    body.gzd-login-page .page {
        display: flex !important;
        flex-direction: column !important;
        min-height: 100dvh;
        height: 100dvh;
        width: 100%;
        overflow: hidden;
    }

    body.gzd-login-page .header {
        flex: 0 0 auto;
        width: 100%;
        padding:
            var(--gzd-m-pad-top)
            var(--gzd-m-pad-x-end)
            0.45rem
            var(--gzd-m-pad-x) !important;
    }

    body.gzd-login-page .header-top {
        justify-content: flex-end;
        min-height: 0;
    }

    body.gzd-login-page .header-content {
        align-items: center;
        width: 100%;
        gap: 0.35rem;
    }

    body.gzd-login-page .brand-slogan {
        flex-wrap: wrap;
        justify-content: center;
        width: 100%;
        max-width: 100%;
        margin-left: auto;
        margin-right: auto;
        padding: 0.35rem 0.75rem;
    }

    body.gzd-login-page .header-logo {
        max-width: min(100%, 12.5rem);
        height: auto;
        margin-left: auto;
        margin-right: auto;
    }

    body.gzd-login-page .page .main,
    body.gzd-login-page .main {
        flex: 1 1 0 !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        align-self: stretch !important;
        width: 100% !important;
        min-height: 0 !important;
        margin: 0 !important;
        padding:
            0.65rem
            var(--gzd-m-pad-x-end)
            max(0.85rem, env(safe-area-inset-bottom))
            var(--gzd-m-pad-x) !important;
        overflow-x: hidden;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    body.gzd-login-page .login-card {
        width: 100%;
        max-width: var(--gzd-m-content-max);
        margin: auto !important;
        flex: 0 0 auto;
    }

    body.gzd-login-page .form-title {
        text-align: center;
    }

    body.gzd-login-page .form-group input {
        font-size: 16px;
        min-height: var(--gzd-m-touch);
    }

    body.gzd-login-page .btn-login {
        width: 100%;
        min-height: var(--gzd-m-touch);
        justify-content: center;
    }

    body.gzd-login-page .login-form {
        width: 100%;
    }
}

@media (max-width: 768px) and (orientation: landscape) and (max-height: 32rem) {
    body.gzd-login-page .page {
        height: auto;
        min-height: 100dvh;
        overflow: auto;
    }

    body.gzd-login-page .main {
        justify-content: center !important;
        align-items: center !important;
        padding-top: 0.5rem !important;
        padding-bottom: 0.5rem !important;
    }
}

@media (max-width: 768px) {
    html.gzd-about-html,
    html.gzd-about-html body.gzd-about-page {
        overflow-x: hidden;
        overflow-y: auto;
        height: auto;
        min-height: 100dvh;
    }

    html.gzd-about-html .gzd-about-wrapper {
        display: flex;
        flex-direction: column;
        min-height: 100dvh;
        height: auto;
        max-height: none;
    }

    html.gzd-about-html .gzd-about-header {
        flex-shrink: 0;
        padding:
            var(--gzd-m-pad-top)
            var(--gzd-m-pad-x-end)
            0.5rem
            var(--gzd-m-pad-x);
        text-align: center;
    }

    html.gzd-about-html .gzd-about-header-top {
        flex-wrap: wrap;
        justify-content: space-between;
        align-items: center;
        gap: 0.5rem;
    }

    html.gzd-about-html .gzd-about-header-content {
        display: flex;
        flex-direction: column;
        align-items: center;
        width: 100%;
        gap: 0.35rem;
    }

    html.gzd-about-html .gzd-about-logo {
        max-height: 2.25rem;
        max-width: min(100%, 11rem);
        margin-left: auto;
        margin-right: auto;
    }

    html.gzd-about-html .gzd-about-slogan {
        display: flex !important;
        flex-wrap: wrap;
        justify-content: center;
        width: 100%;
        max-width: 100%;
        margin-left: auto;
        margin-right: auto;
        padding: 0.35rem 0.75rem;
    }

    html.gzd-about-html .gzd-about-slogan-text {
        font-size: 0.875rem;
        letter-spacing: 0.15em;
    }

    html.gzd-about-html .gzd-about-page-title {
        display: flex !important;
        justify-content: center;
        max-width: 100%;
        width: 100%;
    }

    html.gzd-about-html .gzd-about-page-title__text {
        font-size: 0.9375rem;
        letter-spacing: 0.3em;
    }

    html.gzd-about-html .gzd-about-volume {
        font-size: 0.8125rem;
        white-space: normal;
        text-align: center;
        flex: 1 1 auto;
    }

    html.gzd-about-html .gzd-scroll-stage {
        flex: 1 1 auto;
        max-height: none !important;
        min-height: 0;
        width: 100%;
        display: flex;
        align-items: stretch;
        justify-content: center;
        padding: 0.5rem var(--gzd-m-pad-x-end) 0.35rem var(--gzd-m-pad-x);
    }

    html.gzd-about-html .gzd-scroll-viewport,
    html.gzd-about-html .gzd-scroll-paper,
    html.gzd-about-html .gzd-scroll-pages,
    html.gzd-about-html .gzd-scroll-page {
        width: 100%;
        max-width: 100%;
        margin-left: auto;
        margin-right: auto;
    }

    html.gzd-about-html .gzd-scroll-content--one,
    html.gzd-about-html .gzd-scroll-content--two {
        width: 100%;
        grid-template-columns: 1fr !important;
        justify-items: center;
    }

    html.gzd-about-html .gzd-scroll-content--one img,
    html.gzd-about-html .gzd-scroll-content--two img {
        width: 100% !important;
        max-width: 100% !important;
        height: auto !important;
        max-height: none !important;
        object-fit: contain;
        margin-left: auto;
        margin-right: auto;
    }

    html.gzd-about-html .gzd-scroll-roller {
        width: 0.5rem;
        flex-shrink: 0;
    }

    html.gzd-about-html .gzd-about-footer {
        flex-shrink: 0;
        padding:
            0.5rem
            var(--gzd-m-pad-x-end)
            var(--gzd-m-pad-bottom)
            var(--gzd-m-pad-x);
    }

    html.gzd-about-html .gzd-about-nav {
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.35rem;
    }

    html.gzd-about-html .gzd-about-nav-center {
        order: -1;
        width: 100%;
        display: flex;
        justify-content: center;
    }

    html.gzd-about-html .gzd-about-nav-indicator {
        width: 100%;
        max-width: 100%;
        text-align: center;
    }

    html.gzd-about-html .gzd-about-nav-btn {
        flex: 1 1 calc(50% - 0.35rem);
        min-width: 0;
        min-height: var(--gzd-m-touch);
        justify-content: center;
    }

    html.gzd-about-html .gzd-about-nav-btn__sub {
        display: none;
    }
}

@media (max-width: 768px) {
    html.gzd-advice-html,
    html.gzd-advice-html body.gzd-advice-page,
    html.gzd-video-html,
    html.gzd-video-html body.gzd-video-page {
        overflow-x: hidden;
        min-height: 100dvh;
    }

    html.gzd-advice-html .gzd-advice-wrapper,
    html.gzd-video-html .gzd-video-wrapper {
        display: flex;
        flex-direction: column;
        min-height: 100dvh;
    }

    html.gzd-advice-html .gzd-advice-header,
    html.gzd-video-html .gzd-video-header {
        flex-shrink: 0;
        padding:
            var(--gzd-m-pad-top)
            var(--gzd-m-pad-x-end)
            0.55rem
            var(--gzd-m-pad-x);
    }

    html.gzd-advice-html .gzd-advice-header-top,
    html.gzd-video-html .gzd-video-header-top {
        flex-wrap: wrap;
        justify-content: space-between;
        align-items: center;
        gap: 0.5rem;
        min-height: 0;
    }

    html.gzd-advice-html .gzd-advice-header-content,
    html.gzd-video-html .gzd-video-header-content {
        display: flex;
        flex-direction: column;
        align-items: center;
        width: 100%;
        text-align: center;
        gap: 0.35rem;
    }

    html.gzd-advice-html .gzd-advice-badge,
    html.gzd-video-html .gzd-video-badge {
        font-size: 0.875rem;
        letter-spacing: 0.1em;
        white-space: normal;
        max-width: calc(100% - 8rem);
        line-height: 1.3;
        text-align: center;
        margin-left: auto;
        margin-right: auto;
    }

    html.gzd-advice-html .gzd-advice-logo,
    html.gzd-video-html .gzd-video-logo {
        max-height: 2.25rem;
        max-width: min(100%, 11rem);
        margin-left: auto;
        margin-right: auto;
    }

    html.gzd-advice-html .gzd-advice-slogan,
    html.gzd-video-html .gzd-video-slogan {
        flex-wrap: wrap;
        justify-content: center;
        width: 100%;
        padding: 0.35rem 0.75rem;
    }

    html.gzd-advice-html .gzd-advice-slogan-text,
    html.gzd-video-html .gzd-video-slogan-text {
        font-size: 0.875rem;
        letter-spacing: 0.12em;
    }

    html.gzd-advice-html .gzd-advice-page-title,
    html.gzd-video-html .gzd-video-page-title {
        justify-content: center;
        width: 100%;
    }

    html.gzd-advice-html .gzd-advice-main,
    html.gzd-video-html .gzd-video-main {
        flex: 1 1 auto;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        width: 100%;
        min-height: 0;
        padding:
            0.85rem
            var(--gzd-m-pad-x-end)
            var(--gzd-m-pad-bottom)
            var(--gzd-m-pad-x);
    }

    html.gzd-advice-html .gzd-advice-container,
    html.gzd-video-html .gzd-video-container {
        width: 100%;
        max-width: var(--gzd-m-content-max-wide);
        margin: 0 auto;
    }

    html.gzd-advice-html .gzd-advice-card,
    html.gzd-video-html .gzd-video-card {
        width: 100%;
        margin-left: auto;
        margin-right: auto;
        padding: 1.15rem 0.9rem 1rem;
    }

    html.gzd-advice-html .gzd-advice-card-head,
    html.gzd-video-html .gzd-video-card-head {
        text-align: center;
    }

    html.gzd-advice-html .gzd-advice-card-title {
        font-size: 1.25rem;
        letter-spacing: 0.12em;
        text-indent: 0;
    }

    html.gzd-advice-html .gzd-advice-card-intro,
    html.gzd-video-html .gzd-video-card-intro {
        font-size: 0.875rem;
        text-align: center;
    }

    html.gzd-advice-html .gzd-advice-input,
    html.gzd-advice-html .gzd-advice-textarea {
        font-size: 16px;
        width: 100%;
    }

    html.gzd-advice-html .gzd-advice-btn {
        min-height: var(--gzd-m-touch);
    }

    html.gzd-advice-html .gzd-advice-actions {
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
    }

    html.gzd-advice-html .gzd-advice-btn {
        width: 100%;
        justify-content: center;
    }

    html.gzd-advice-html .gzd-advice-btn__label {
        white-space: normal;
        letter-spacing: 0.12em;
    }

    html.gzd-video-html .gzd-video-wrap {
        width: 100%;
        max-width: 100%;
        margin-left: auto;
        margin-right: auto;
    }

    html.gzd-video-html .gzd-video-player {
        width: 100%;
        height: auto;
        aspect-ratio: 16 / 9;
        object-fit: contain;
        background: #1a1208;
    }
}

@media (max-width: 768px) {
    html.gzd-pdf-html {
        height: 100dvh;
        height: -webkit-fill-available;
    }

    html.gzd-pdf-html,
    html.gzd-pdf-html body.gzd-pdf-page {
        overflow: hidden;
        margin: 0;
    }

    html.gzd-pdf-html .gzd-pdf-page {
        height: 100dvh;
        height: -webkit-fill-available;
        margin: 0;
    }

    html.gzd-pdf-html .gzd-pdf-wrapper {
        display: flex;
        flex-direction: column;
        min-height: 100dvh;
        height: 100dvh;
        height: -webkit-fill-available;
    }

    html.gzd-pdf-html .gzd-pdf-header {
        flex-shrink: 0;
        padding:
            var(--gzd-m-pad-top)
            var(--gzd-m-pad-x-end)
            0.45rem
            var(--gzd-m-pad-x);
    }

    html.gzd-pdf-html .gzd-pdf-header-top {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 0.5rem;
        margin-bottom: 0;
        min-height: 0;
    }

    html.gzd-pdf-html .gzd-pdf-header-content {
        display: none;
    }

    html.gzd-pdf-html .gzd-pdf-header .gzd-about-back__sub {
        display: none;
    }

    html.gzd-pdf-html .gzd-pdf-badge {
        font-size: 0.8125rem;
        max-width: 42vw;
        white-space: normal;
        line-height: 1.25;
        text-align: center;
        margin-left: auto;
    }

    html.gzd-pdf-html .gzd-pdf-viewer-shell {
        flex: 1 1 auto;
        min-height: 0;
        width: 100%;
        display: flex;
        flex-direction: column;
    }

    html.gzd-pdf-html .gzd-pdf-viewer-shell #outerContainer {
        flex: 1 1 auto;
        min-height: 0;
    }
}
