/* Mobile shared responsive fixes; loaded after each page-specific stylesheet. */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { min-width: 0; overflow-x: hidden; overflow-wrap: break-word; }
img, video, iframe { max-width: 100%; }
button, input, select, textarea { font-family: inherit; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
    outline: 2px solid #1b8bd1;
    outline-offset: 2px;
}

/* Keep legacy compact metadata readable on 320px phones. */
@media (max-width: 340px) {
    .search-txt, .sur-info, .software-tj-tit, .add-more-mod, .page-root,
    .footer-info p, .time-span, .classify-list a, .zt_cont, .zt_label,
    .zt_down, .zt-head-top-cont, .ztdown_type, .zt-data, .label-txt,
    .label-more, .ztdown_r, .soft-info-b span, .source-info span,
    .summary-count p, .like-list li h5, .addmore, .hot-top-r p,
    .recom-count, .recom-b-list li span, .dr-tit, .dr-more,
    .related-time, .related-item-info, .zthead span, .fc-list li span,
    .mv-down-list .soft-info span {
        font-size: 12px;
    }
    .soft-label em, .ztdown_type b { font-size: 11px; }
    .sur-info, .ztdown_type, .zt-data, .related-time, .zthead span,
    .mv-down-list .soft-info span { height: auto; min-height: 12px; line-height: 1.2; }
}

/* The old rem formula kept growing on tablets and made cards wider than the page. */
@media (min-width: 480px) {
    html { background: #f5f5f5; }
    body { max-width: 768px; margin-right: auto; margin-left: auto; }
    body:not(.page-coll-item-ranking) { background: #fff; }
}

/* Ranking also has the legacy desktop presentation; it cannot use the phone shell. */
@media (min-width: 992px) {
    body.page-coll-item-ranking { max-width: none; }
}

/* Footer blocks come from shared CMS markup and must also fit narrow phones. */
.footer { display: flex; }
.footer-left { flex-shrink: 0; }
.footer-info { min-width: 0; flex: 1; margin-right: .5rem; }
.footer-info p { height: auto; min-height: .6rem; line-height: .6rem; overflow-wrap: anywhere; }
@media (max-width: 340px) {
    .footer-info p { line-height: 1.4; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
