/* Mobile measurements from dushe04.com layout/template.css, 2026-11-03.
   Phones use the normal viewport; touch landscape retains the phone layout. */

@media (max-width: 560px), (max-width: 960px) and (hover: none) and (pointer: coarse) {
    :root {
        --sidebar: 0px;
        --section-space: 16px;
        --viewport-width: 100vw;
        --viewport-height: 100vh;
        --viewport-dynamic-height: 100dvh;
        zoom: 1;
        -webkit-text-size-adjust: 100%;
        text-size-adjust: 100%;
    }
    body { min-width: 320px; font-size: 16px; }
    body::before, .sidebar, .floating-tools, .topbar > .search, .topbar > .top-actions { display: none; }
    .page { margin-left: 0; padding-top: 50px; }
    .topbar { position: fixed; inset: 0 0 auto; width: 100%; height: 64px; padding: 12px 0; gap: 16px; }
    .mobile-top-links { display: flex; flex: 1; width: auto; min-width: 0; height: 40px; gap: 0; padding: 0; font-size: 16px; }
    .mobile-top-links a { position: relative; display: flex; align-items: center; justify-content: center; height: 40px; padding: 0 10px; }
    .mobile-top-links a.active { color: #666; font-weight: 700; }
    .mobile-top-links a.active::after { content: ""; position: absolute; bottom: 1px; left: calc(50% - 8px); width: 16px; height: 4px; border-radius: 4px; background: var(--yellow); }
    .mobile-actions { display: flex; flex: none; align-items: center; gap: 16px; padding-right: 16px; font-size: 14px; white-space: nowrap; }
    .mobile-actions button { display: flex; align-items: center; justify-content: center; width: 96px; height: 36px; padding: 0; color: var(--ink); }
    .mobile-actions span { display: flex; align-items: center; gap: 4px; }
    .mobile-actions .isax-clock { font-size: 20px; }
    .mobile-actions .avatar { width: 36px; height: 36px; }
    .content { width: 100%; padding: 0 16px; }
    .mobile-search-block { display: grid; grid-template-rows: 64px 40px; place-content: initial; gap: 12px; height: 116px; margin: 16px 0 0; }
    .mobile-search-block > img { width: 120px; height: 40px; margin: auto; object-fit: contain; }
    .mobile-search-block form { width: 100%; height: 40px; border: 2px solid #ddd; border-radius: 40px; background: #fff; }
    .mobile-search-block input { padding: 0 2px 0 12px; font-size: 14px; color: var(--ink); }
    .mobile-search-block input::placeholder { color: #ccc; }
    .mobile-search-block form button { flex: none; width: 36px; height: 36px; padding: 0; }
    .mobile-search-block .search-panel { top: 116px; }
    .search-tag a { max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .hero { height: 180px; padding-bottom: 0; margin: 16px 0; border-radius: 4px; }
    .hero-copy { text-align: center; }
    .hero-copy h1 { font-size: 20px; line-height: 21px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .hero-copy .hero-tags { margin: 8px 16px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
    .hero-copy p { font-size: 14px; line-height: 21px; }
    .hero-arrow { display: block; }
    .section, .channel-section, .channel-tabs { margin: 16px 0; }
    .section-head { min-width: 0; gap: 8px; }
    .section-head h2, .channel-section h2 { font-size: 24px; line-height: 32px; }
    .section-head > a { flex-shrink: 0; font-size: 14px; }
    .poster-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
    .poster-card h3 { height: 20px; margin-top: 8px; font-size: 14px; line-height: 20px; }
    .channel-tabs { justify-content: center; }
    .channel-tabs a { font-size: 16px; }
    .channel-filter { overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; }
    .channel-filter a { flex-shrink: 0; }
    .search-result-list { grid-template-columns: 1fr; gap: 16px; }
    .catalog-results .channel-title { margin: 32px 16px; }
    .catalog-results .channel-title h1 { font-size: 14px; overflow-wrap: anywhere; }
    .search-result-item-side { width: 115px; height: 163.1296296296px; }
    .search-result-item-pic img { object-fit: cover; }
    .detail-content .detail-poster { float: none; width: 40%; min-width: 160px; margin: 32px auto 16px; }
    .detail-content .detail-poster img { width: 100%; height: auto; }
    .detail-content .detail-title { height: auto; margin: 20px 0 0; text-align: center; font-size: 24px; line-height: 36px; }
    .detail-content .tags { justify-content: center; gap: 12px; height: auto; margin: 16px 0; }
    .detail-content .mobile-detail-controls { display: flex; justify-content: center; gap: 16px; margin-bottom: 16px; }
    .detail-content .detail-main-panel { margin: 0; padding: 16px; }
    .detail-content .detail-main-panel .controls { display: none; }
    .detail-content .description { max-height: none; overflow-wrap: anywhere; }
    .detail-content .detail-card + .section .section-head,
    .detail-content .detail-card + .section + .section .section-head { height: auto; min-height: 46px; gap: 12px; }
    .detail-content .section-head h2 { flex-shrink: 0; white-space: nowrap; }
    .detail-content .section-note { flex: 1; min-width: 0; font-size: 12px; line-height: 18px; text-align: right; }
    .detail-content .source-grid .source { flex: 1 1 calc(50% - 12px); min-width: 0; }
    .detail-content .source strong { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
    .detail-content .episodes { flex-wrap: wrap; }
    .play-view .watch { grid-template-columns: minmax(0, 1fr); height: auto; margin: 16px 0; }
    .play-view .player { width: 100%; height: auto; aspect-ratio: 16 / 9; }
    .play-view .watch-side { height: auto; padding: 16px; overflow: visible; }
    .watch-side .source-grid, .watch-side .episode-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); max-height: none; }
    .watch-side .source { min-width: 0; }
    .watch-detail-link { display: block; margin-top: 18px; padding: 10px; border-radius: 5px; text-align: center; background: #3b3b3d; color: #fff; }
    .footer { width: calc(100% + 32px); margin: 0 -16px; padding: 16px 0; text-align: center; overflow-wrap: anywhere; }
    .footer img { margin: 0 auto 16px; }

}
