/* 一键搜片：只在手机收紧布局，桌面保留原有信息层级。 */
.tanc-flow-mobile-summary,
.tanc-mobile-title-toggle,
.tanc-tab-label-mobile { display: none; }
@media (max-width: 600px), (max-width: 950px) and (max-height: 500px) {
  .tanc-search-mobile #search-popup-content {
    width: calc(100% - 16px);
    max-width: none;
    height: calc(100vh - 24px) !important;
    height: calc(100dvh - 24px) !important;
    max-height: calc(100dvh - 24px) !important;
    box-sizing: border-box;
    overflow: hidden;
  }
  .tanc-search-mobile .tanc-popup-header {
    display: block;
    flex: 0 0 auto;
    padding: 12px 44px 32px 14px !important;
  }
  .tanc-search-mobile .tanc-popup-header h4 { font-size: 0; line-height: 0; }
  .tanc-search-mobile .tanc-popup-header h4 > span { display: none; }
  .tanc-search-mobile .tanc-popup-header h4::before {
    content: attr(data-mobile-title);
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 16px;
    font-weight: 600;
    line-height: 24px;
  }
  .tanc-search-mobile .tanc-popup-header h4::after {
    content: attr(data-mobile-status);
    position: absolute;
    bottom: 10px;
    right: 14px;
    font-size: 12px;
    font-weight: 400;
    line-height: 18px;
    color: #7b8794;
  }
  .tanc-search-mobile .tanc-member-preference-hint {
    position: absolute;
    left: 14px;
    bottom: 10px;
    margin: 0 !important;
    font-size: 0 !important;
    line-height: 18px !important;
    text-align: left !important;
  }
  .tanc-search-mobile .tanc-member-preference-hint::after {
    content: attr(data-mobile-text);
    font-size: 12px;
  }
  .tanc-search-mobile .tanc-popup-close {
    top: 0 !important;
    right: 0 !important;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
  }
  .tanc-search-mobile .tanc-popup-body {
    flex: 1 1 auto;
    min-height: 0 !important;
    max-height: none !important;
    padding: 0 12px 12px;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scroll-padding-top: 56px;
  }
  .tanc-search-mobile .tanc-search-results { height: auto; max-height: none; overflow: visible; }
  .tanc-search-mobile .tanc-netdisk-tabs {
    flex-wrap: wrap;
    overflow: visible;
    gap: 4px;
    margin: 0 0 10px;
    padding: 6px 0;
    position: sticky;
    top: 0;
    z-index: 2;
    background: #fff;
    scrollbar-width: none;
  }
  .tanc-search-mobile .tanc-tab-label-desktop { display: none; }
  .tanc-search-mobile .tanc-tab-label-mobile { display: inline; }
  .tanc-search-mobile .tanc-tabs-label,
  .tanc-search-mobile .tanc-result-source { display: none; }
  .tanc-search-mobile .tanc-tab-btn {
    flex: 0 0 auto;
    min-height: 32px;
    padding: 4px 7px;
    margin: 0 !important;
    max-width: 100%;
    border-radius: 7px;
    font-size: 12px;
    line-height: 20px;
    white-space: nowrap;
  }
  .tanc-search-mobile .tanc-search-result-item {
    display: flow-root;
    margin: 0 0 10px;
    padding: 12px;
    box-shadow: none;
    transform: none;
  }
  .tanc-search-mobile .tanc-result-channel {
    font-size: 11px;
    line-height: 18px;
    margin: 0 0 6px;
    padding: 1px 5px;
  }
  .tanc-search-mobile .tanc-result-title {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    overflow: hidden;
    margin: 0 0 6px;
    font-size: 14px;
    line-height: 21px;
    font-weight: 500;
    overflow-wrap: anywhere;
  }
  .tanc-search-mobile .tanc-result-title.is-expanded {
    display: block;
    -webkit-line-clamp: unset;
  }
  .tanc-search-mobile .tanc-mobile-title-toggle {
    display: inline-block;
    min-height: 32px;
    margin: 0;
    padding: 4px 0;
    border: 0;
    background: transparent;
    color: #2785b8;
    font-size: 12px;
  }
  .tanc-search-mobile .tanc-result-datetime { font-size: 11px; margin: 0; line-height: 18px; }
  .tanc-search-mobile .tanc-result-links { display: inline-flex; float: right; margin: 2px 0 0; }
  .tanc-search-mobile .tanc-result-link { min-height: 36px; padding: 7px 12px; font-size: 13px; line-height: 22px; }
  .tanc-search-mobile .tanc-acquire-flow-card { padding: 0; }
  .tanc-search-mobile .tanc-acquire-flow { padding: 0; }
  .tanc-search-mobile .tanc-flow-mobile-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
    min-height: 52px;
    padding: 10px 12px;
    border: 0;
    text-align: left;
    background: transparent;
    color: inherit;
    line-height: 20px;
  }
  .tanc-search-mobile .tanc-flow-mobile-summary span { min-width: 0; font-size: 13px; overflow-wrap: anywhere; }
  .tanc-search-mobile .tanc-flow-mobile-summary small { flex: 0 0 auto; font-size: 12px; color: #2785b8; }
  .tanc-search-mobile .tanc-acquire-flow:not(.is-expanded) > :not(.tanc-flow-mobile-summary) { display: none; }
  .tanc-search-mobile .tanc-acquire-flow.is-expanded > :not(.tanc-flow-mobile-summary) { margin: 0 12px 12px; }
  .tanc-search-mobile .tanc-flow-header { display: none; }
  .tanc-search-mobile .tanc-flow-steps { padding: 10px 0 0; }
  .tanc-search-mobile .tanc-flow-step { padding-bottom: 14px; min-height: 48px; }
  .tanc-search-mobile .tanc-flow-marker { width: 24px; height: 24px; font-size: 14px; }
  .tanc-search-mobile .tanc-flow-step-body strong { font-size: 13px; }
  .tanc-search-mobile .tanc-flow-step-body > span:not(.tanc-sr-only) { font-size: 12px; }
  .tanc-search-mobile button:focus-visible { outline: 2px solid #2785b8; outline-offset: -2px; }
  html[data-mx-theme="black"] .tanc-search-mobile .tanc-netdisk-tabs { background: #1f1f1f; }
  html[data-mx-theme="black"] .tanc-search-mobile .tanc-flow-mobile-summary { color: #d9e2eb; }
}
