/* 手机端补充层。电脑和平板沿用 css.css / ultrawide.css 的现有布局。 */
.ky-mobile-nav-toggle,
.ky-mobile-nav-mask,
.ky-mobile-submenu-toggle,
.ky-mobile-sidebar-toggle {
    display: none;
}

@media (max-width: 768px) {
    .ky-home { height: auto; overflow: visible; }
    .ky-home .container { width: 100%; padding-left: 16px; padding-right: 16px; }
    .ky-home input,
    .ky-home select,
    .ky-home textarea { font-size: 16px; }
    .ky-header,
    .ky-header.scrolled {
        top: max(10px, env(safe-area-inset-top));
        width: calc(100% - 24px);
        max-width: none;
        height: 56px;
        padding: 0 16px;
        border-radius: 28px;
    }
    .ky-header.hidden { display: block !important; opacity: 1; visibility: visible; transform: translateX(-50%); }
    .ky-header-inner { height: 56px; padding: 8px 0; justify-content: space-between; }
    .ky-logo { height: 34px; }
    .ky-mobile-nav-toggle {
        display: flex;
        flex-direction: column;
        justify-content: center;
        gap: 5px;
        width: 44px;
        height: 44px;
        padding: 10px;
        margin-left: auto;
        border: 0;
        background: transparent;
        cursor: pointer;
    }
    .ky-mobile-nav-toggle span { display: block; height: 2px; width: 24px; border-radius: 2px; background: #fff; }
    .ky-nav-wrap {
        display: none;
        position: fixed;
        top: calc(max(10px, env(safe-area-inset-top)) + 64px);
        right: 0;
        width: min(340px, calc(100vw - 24px));
        max-height: calc(100dvh - 86px);
        overflow-y: auto;
        padding: 12px;
        border-radius: 18px;
        background: #2e2e30;
        box-shadow: 0 14px 32px rgba(0, 0, 0, .24);
        white-space: normal;
        z-index: 1002;
    }
    .ky-mobile-nav-open .ky-nav-wrap { display: block; }
    .ky-mobile-nav-open { overflow: hidden !important; }
    .ky-mobile-nav-mask {
        position: fixed;
        inset: 0;
        z-index: 999;
        width: 100%;
        height: 100%;
        border: 0;
        background: rgba(0, 0, 0, .38);
    }
    .ky-mobile-nav-open .ky-mobile-nav-mask { display: block; }
    .ky-nav,
    .ky-nav > ul { width: 100%; max-width: none; }
    .ky-nav > ul { display: block; overflow: visible; }
    .ky-nav > ul > li,
    .ky-nav > ul > li > a,
    .ky-nav > ul > li > a:not(.active),
    .ky-nav .ky-nav-hasdrop { display: block; }
    .ky-nav > ul > li { position: relative; height: auto; border-radius: 10px; }
    .ky-nav > ul > li > a { height: auto; min-height: 44px; line-height: 44px; padding: 0 48px 0 14px; white-space: normal; }
    .ky-nav .ky-nav-dropdown,
    .ky-nav .ky-nav-subdropdown {
        display: none;
        position: static;
        width: 100%;
        max-height: none;
        overflow: visible;
        padding: 0 0 8px 12px;
        border-radius: 10px;
        box-shadow: none;
        background: #38383a;
    }
    .ky-nav .ky-nav-hasdrop:hover .ky-nav-dropdown,
    .ky-nav .ky-nav-subwrap:hover .ky-nav-subdropdown { display: none; }
    .ky-nav .ky-mobile-menu-open > .ky-nav-dropdown,
    .ky-nav .ky-mobile-menu-open > .ky-nav-subdropdown { display: block !important; }
    .ky-nav-dropdown > ul { padding-top: 0; }
    .ky-nav .ky-nav-dropdown li,
    .ky-nav .ky-nav-subdropdown li { position: relative; display: block; opacity: 1; transform: none; }
    .ky-nav .ky-nav-dropdown a,
    .ky-nav .ky-nav-subdropdown a { display: block; min-height: 44px; line-height: 1.5; padding: 11px 42px 11px 12px; color: #fff; }
    .ky-mobile-submenu-toggle {
        display: block;
        position: absolute;
        top: 0;
        right: 0;
        z-index: 3;
        width: 44px;
        height: 44px;
        border: 0;
        background: transparent;
        color: #fff;
        font-size: 20px;
        cursor: pointer;
    }
    .ky-mobile-submenu-toggle::after { content: '⌄'; }
    .ky-mobile-submenu-toggle[aria-expanded="true"]::after { content: '⌃'; }

    /* 首页在手机上顺序阅读各屏；桌面整屏 Swiper 的结构和脚本保持原样。 */
    body.ky-fullpage-mode,
    html.ky-fullpage-mode { height: auto; overflow: auto; overscroll-behavior: auto; }
    .ky-fullpage,
    .ky-fullpage > .swiper-container { height: auto; overflow: visible; }
    #fullpageSwiper > .swiper-wrapper { display: block; height: auto; transform: none !important; }
    #fullpageSwiper > .swiper-wrapper > .swiper-slide { height: auto !important; width: 100% !important; overflow: visible; }
    .ky-fullpage .ky-slide-animate { opacity: 1 !important; transform: none !important; }
    .ky-banner { height: min(780px, 86svh); min-height: 520px; }
    #fullpageSwiper .ky-banner-design { --ky-banner-fit: contain; }
    #fullpageSwiper .ky-banner-design-canvas.has-shared-cover { background-color: transparent !important; }
    #fullpageSwiper .ky-banner-design-canvas .is-shared-cover { visibility: hidden; pointer-events: none; }
    .ky-swiper-box { width: 100%; padding: 110px 20px 60px; justify-content: flex-start; }
    .ky-banner-watermark { display: none; }
    .ky-banner-content { width: min(100% - 32px, 560px); }
    .ky-banner-content { padding-left: 0; }
    .ky-banner-title { font-size: clamp(28px, 8vw, 40px); }
    .ky-banner-sub { font-size: clamp(18px, 5vw, 26px); }
    .ky-banner-en { font-size: 14px; letter-spacing: .08em; }
    .ky-banner-features { flex-wrap: wrap; }
    .ky-destination,
    .ky-knowledge,
    .ky-hot-routes,
    .ky-team-types { position: relative; top: auto; height: auto; min-height: 0; max-height: none; overflow: visible; transform: none; }
    .ky-destination,
    .ky-knowledge,
    .ky-hot-routes { padding: 36px 16px; }
    .ky-destination-wrapper,
    .ky-knowledge-wrapper { width: 100%; height: auto; padding: 0; }
    .ky-dest-container { height: auto; }
    /* 地图摘要/来源移到独立底行后，手机仍按详情、摘要、地图、来源的顺序展示。 */
    .ky-destination-slide .ky-dest-container { display: flex; flex-direction: column; }
    .ky-destination-slide .ky-dest-container::before,
    .ky-destination-slide .ky-dest-container::after { display: none; }
    .ky-destination-slide .ky-dest-detail { order: 1; }
    .ky-destination-slide .ky-dest-detail-highlights { order: 2; margin: 0 0 24px; }
    .ky-destination-slide .ky-dest-map-wrapper { order: 3; }
    .ky-destination-slide .ky-dest-map-source { order: 4; position: static; max-width: 100%; margin-top: 12px; }
    .ky-dest-tabs { display: flex; justify-content: center; gap: 8px; margin-bottom: 24px; }
    .ky-dest-tab,
    .ky-dest-tab-international { margin: 0; padding: 0 14px; min-height: 44px; line-height: 42px; font-size: 16px; }
    .ky-dest-detail { float: none; width: 100%; margin: 0 0 24px; }
    .ky-dest-detail-scroll-wrapper { max-height: none !important; overflow: visible; direction: ltr; padding: 0; }
    .ky-dest-detail-list { padding-left: 12px; }
    .ky-dest-map-wrapper { width: 100%; min-height: 300px; }
    .ky-dest-map { height: 320px; min-height: 320px; }
    .ky-knowledge-header-inner { width: 100%; margin: 0; }
    .ky-knowledge-content { padding: 0; margin-top: 24px; }
    .ky-knowledge-cards { display: grid; grid-template-columns: 1fr; width: 100%; gap: 12px; }
    .ky-knowledge-card { width: 100%; min-height: 150px; margin: 0; }
    .ky-hot-routebox { position: static; transform: none; }
    .ky-hot-routes-content { padding: 20px 0 0; overflow: visible; }
    .ky-hot-routes-cities,
    .ky-hot-routes-destinations { float: none; width: 100%; padding: 0; }
    .ky-hot-routes-destinations { margin-top: 18px; }
    .ky-hot-routes-bg { display: none; }
    .ky-team-types { display: block; padding: 0 16px 36px; }
    .ky-team-left { position: static; width: 100%; height: auto; padding: 32px 0 16px; border-radius: 0; }
    .ky-team-left .ky-knowledge-header-inner { top: auto; transform: none; }
    .ky-team-cards-wrapper,
    .ky-team-cards { position: static; width: 100%; height: auto; min-height: 0; overflow: visible; }
    .ky-team-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 0; padding: 0; }
    .ky-team-card,
    .ky-team-card:first-child,
    .ky-team-card:nth-child(n) { position: relative !important; top: auto !important; left: auto !important; width: 100% !important; height: 150px !important; min-height: 0; margin: 0 !important; border-radius: 16px !important; }
    .ky-team-card-bg { right: 0; }
    .ky-team-card-name { top: auto; right: 12px; bottom: 12px; left: 12px; width: auto; font-size: 18px; font-weight: 600; letter-spacing: .08em; transform: none; }
    .ky-team-detail { position: fixed; inset: 0; height: 100dvh; z-index: 1200; }
    .ky-team-detail.active { background: #fff; }
    body:has(.ky-team-detail.active) .ky-header,
    body:has(.ky-team-detail.active) .ky-sidebar { display: none !important; }
    .ky-team-detail-container { height: 100%; overflow-y: auto; }
    .ky-team-detail-inner { top: auto; left: auto; width: 100%; padding: 72px 16px 24px; transform: none; }
    .ky-team-detail-image { height: 180px; margin-bottom: 20px; }
    .ky-team-detail-content { max-height: none; overflow: visible; }
    .ky-team-detail-close { position: fixed; }

    /* 内容页：筛选、列表、详情和个人中心按阅读顺序排布。 */
    .ky-aboutus-hero-wrap,
    .ky-aboutus-hero,
    .ky-product-list-page .ky-product-list-hero { min-height: 0; }
    .ky-aboutus-hero-wrap > .ky-aboutus-hero { height: min(620px, 70svh); min-height: 420px; }
    .ky-product-banner-swiper-wrap { height: min(72svh, 620px); min-height: 380px; }
    .ky-report-hero-collage { margin-top: 90px; }
    .ky-report-collage-inner { max-width: 100%; min-height: 190px; max-height: none; aspect-ratio: 1.4; }
    .ky-report-detail-page .ky-aboutus-section,
    .ky-product-list-section { padding: 36px 0 52px; }
    .ky-product-province-bar,
    .ky-product-list-section .ky-search-result-row,
    .ky-search-result-row { width: 100%; }
    .ky-product-province-bar { gap: 12px; margin-bottom: 24px; }
    .ky-product-list-section .ky-dest-tabs { margin-bottom: 24px; }
    .ky-product-list-search { flex-basis: 100%; width: 100%; }
    .ky-product-province-list { flex-wrap: nowrap; overflow-x: auto; gap: 8px; padding-bottom: 4px; scrollbar-width: thin; }
    .ky-product-province-list .ky-province-btn { flex: 0 0 auto; width: auto; min-width: 64px; height: 44px; line-height: 42px; padding: 0 14px; font-size: 15px; }
    .ky-product-filter-trigger-wrap { margin-left: 0; }
    .ky-product-filter-panel { position: fixed; top: auto; left: 12px; right: 12px; bottom: 12px; width: auto; max-height: min(75dvh, 640px); margin: 0; z-index: 1100; }
    .ky-product-filter-inner { padding: 20px 16px; }
    .ky-product-list-row { margin-bottom: 20px; }
    .ky-product-list-row a { flex-direction: column; }
    .ky-product-list-row-img { height: 190px; min-height: 0; }
    .ky-product-list-row-info { padding: 16px; }
    .ky-product-list-row-footer { flex-wrap: wrap; gap: 8px; }
    .ky-search-result-left,
    .ky-search-result-right { float: none; width: 100%; }
    .ky-search-result-nav { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 8px; }
    .ky-search-result-nav li { flex: 0 0 auto; margin: 0; }
    .ky-search-result-nav-item { min-height: 44px; line-height: 44px; padding: 0 42px 0 14px; font-size: 15px; }
    .ky-nav-count { line-height: 44px; font-size: 14px; right: 10px; }
    .ky-search-result-right { padding-top: 20px; }
    .ky-search-result-list { padding: 16px; }
    .ky-search-result-item { display: flex; flex-direction: column; gap: 12px; padding: 16px 0; }
    .ky-result-thumb,
    .ky-search-result-item-large .ky-result-thumb { float: none; width: 100%; height: 160px; border-radius: 14px 14px 0 0; }
    .ky-result-info { float: none; width: 100%; min-width: 0; }
    .ky-result-title { font-size: 18px; line-height: 1.5; overflow-wrap: anywhere; }
    .ky-result-meta { font-size: 14px; }
    .ky-dianping-province-wrap,
    .ky-dianping-content { width: 100%; }
    .ky-dianping-province-wrap { margin-bottom: 24px; }
    .ky-dianping-province-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .ky-dianping-province-btn { width: 100%; min-width: 0; height: 44px; line-height: 44px; font-size: 16px; letter-spacing: 0; }
    .ky-dianping-city-dropdown { min-width: 100%; max-height: 45dvh; overflow-y: auto; }
    .ky-dianping-province-item:hover .ky-dianping-city-dropdown { display: none; }
    .ky-dianping-province-item.open .ky-dianping-city-dropdown { display: block; }
    .ky-scenic-review-page .ky-roadbook-article { margin-top: 28px; }
    .ky-scenic-review-page .ky-roadbook-article-layout { grid-template-columns: minmax(0, 1fr); gap: 16px; }
    .ky-scenic-review-page .ky-roadbook-filter-column { min-height: 0; }
    .ky-scenic-review-page .ky-roadbook-filter { flex-direction: row; justify-content: flex-start; gap: 16px; overflow-x: auto; white-space: nowrap; }
    .ky-scenic-review-page .ky-roadbook-filter a { font-size: 15px; }
    .ky-scenic-review-page .ky-roadbook-filter-column .ky-roadbook-article-actions { flex-direction: row; gap: 14px; margin-top: 10px; padding-top: 12px; }
    .ky-yueyue-page .ky-yueyue-section .ky-tuanying-container { width: 100%; min-height: 0; padding: 88px 0 40px; }
    .ky-yueyue-page .ky-tuanying-bg { display: none; }
    .ky-yueyue-page .ky-yueyue-section .ky-tuanying-row { display: block; }
    .ky-yueyue-page .ky-yueyue-section .ky-tuanying-left,
    .ky-yueyue-page .ky-yueyue-section .ky-tuanying-right { float: none; width: 100%; }
    .ky-yueyue-page .ky-yueyue-section .ky-tuanying-right { padding: 20px 0 0; }
    .ky-yueyue-page .ky-tuanying-nav { display: flex; gap: 16px; overflow-x: auto; padding-bottom: 8px; }
    .ky-yueyue-page .ky-tuanying-nav li { flex: 0 0 auto; margin: 0; }
    .ky-yueyue-page .ky-tuanying-nav-item { display: block; min-height: 44px; line-height: 44px; padding: 0 2px; white-space: nowrap; }
    .ky-yueyue-page .ky-yueyue-content-title { display: block; font-size: 20px; line-height: 1.5; white-space: normal; overflow-wrap: anywhere; }
    .ky-yueyue-page .ky-yueyue-content-title .ky-yueyue-article-link { display: block; margin: 8px 0 0; }
    .ky-yueyue-page .ky-yueyue-bottom-img { height: 220px; }
    .ky-product-detail-wrap { width: 100%; }
    .ky-product-detail-left,
    .ky-product-detail-right { width: 100%; }
    .ky-product-tabs { overflow-x: auto; white-space: nowrap; }
    .ky-product-info-bar { display: flex; flex-wrap: wrap; gap: 8px 16px; }
    .ky-calendar-actions { flex-wrap: wrap; }
    .ky-cal-book { min-width: 0; }
    .ky-collection-section { padding: 16px 0 48px; }
    .ky-collection-top { width: 100%; padding: 20px 16px; margin-bottom: 20px; }
    .ky-collection-avatar { width: 58px; height: 58px; border-width: 4px; }
    .ky-collection-name { margin-left: 12px; font-size: 18px; }
    .ky-collection-name-input { margin-left: 12px; max-width: calc(100% - 70px); font-size: 18px; }
    .ky-collection-tabs { width: 100%; padding-left: 0; }
    .ky-collection-tab-group { float: none; display: flex; gap: 20px; }
    .ky-collection-tab { margin-right: 0; padding-bottom: 14px; font-size: 17px; }
    .ky-order-item { padding: 18px 16px; }
    .ky-order-no { align-items: flex-start; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; font-size: 13px; }
    .ky-order-row1 { width: 100%; flex-direction: column; gap: 12px; overflow: visible; }
    .ky-order-item-img { flex: none; width: 100%; max-width: 100%; height: 170px; }
    .ky-order-item-title { white-space: normal; overflow: visible; font-size: 17px; line-height: 1.5; }
    .ky-order-item-desc { margin-bottom: 8px; font-size: 15px; line-height: 1.5; }
    .ky-order-item-meta { margin: 0 0 10px; font-size: 13px; }
    .ky-order-row2 { width: 100%; }
    .ky-order-countdown,
    .ky-order-btns { float: none; }
    .ky-order-countdown { margin: 0 0 10px; font-size: 15px; }
    .ky-order-btns { display: flex; flex-wrap: wrap; gap: 8px; }
    .ky-order-btn { flex: 1 1 auto; width: auto; min-width: 94px; height: 44px; margin-left: 0; line-height: 40px; font-size: 15px; }
    .ky-traveler-item { padding: 16px; }
    .ky-footer-inner { width: 100%; padding: 0 16px; }
    .ky-footer-contact { margin-bottom: 28px; }

    .ky-sidebar { top: auto; right: 10px; bottom: calc(10px + env(safe-area-inset-bottom)); transform: none; }
    .ky-sidebar-wrap,
    .ky-sidebar-wrap.has-panel { flex-direction: column-reverse; align-items: flex-end; padding-left: 0; margin-left: 0; }
    .ky-mobile-sidebar-toggle { display: block; width: 48px; height: 48px; border: 0; border-radius: 24px; background: #2e2e30; color: #fff; font-size: 14px; cursor: pointer; }
    .ky-sidebar-btns { display: none; flex-direction: column; width: 44px; margin-bottom: 6px; }
    .ky-mobile-sidebar-open .ky-sidebar-btns { display: flex; }
    .ky-sidebar-btn { width: 44px; height: 44px; margin-bottom: 4px; }
    .ky-sidebar-panel,
    .ky-sidebar-panel.active { right: 0; top: auto; bottom: 56px; transform: none; }
    .ky-sidebar-panel-inner { max-width: calc(100vw - 24px); }

    /* 弹窗高度跟随可视区域，避免输入法弹出后按钮落在屏幕外。 */
    .ky-modal .ky-modal-content { width: calc(100% - 24px); max-width: none; max-height: calc(100dvh - 24px); overflow-y: auto; }
    .ky-modal-login .ky-modal-content { padding: 32px 0 20px; }
    .ky-modal-login .ky-modal-body { padding: 0 18px; }
    .ky-modal-order .ky-modal-content { overflow: hidden; }
    .ky-modal-order .ky-order-body { min-height: 0; padding: 16px; }
    .ky-modal-order .ky-order-header { padding-top: 28px; }
    .ky-modal-profile .ky-modal-content { padding: 32px 18px 20px; }
}
