/*
 * 校准线手机端紧凑排版 v1
 * 仅在手机宽度生效；不定义桌面样式，不改颜色，不触碰企业数据 iframe。
 */
@media (max-width: 767px) {
  /* 通用：减少无效留白，保留触控热区与表单 16px 字号。 */
  .cal-mobile-repository,
  .cal-mobile-definition,
  .cal-mobile-topic,
  .cal-mobile-strategy,
  .cal-mobile-monthly,
  .cal-mobile-weekly,
  .cal-mobile-creator,
  .cal-mobile-adtool {
    font-size: 13px;
  }

  .cal-mobile-repository h1,
  .cal-mobile-definition h1,
  .cal-mobile-topic h1,
  .cal-mobile-strategy h1,
  .cal-mobile-monthly h1,
  .cal-mobile-weekly h1,
  .cal-mobile-creator h1 {
    font-size: 23px !important;
    line-height: 1.28 !important;
  }

  .cal-mobile-repository h2,
  .cal-mobile-definition h2,
  .cal-mobile-topic h2,
  .cal-mobile-strategy h2,
  .cal-mobile-monthly h2,
  .cal-mobile-weekly h2,
  .cal-mobile-creator h2 {
    font-size: 17px !important;
    line-height: 1.4 !important;
  }

  .cal-mobile-repository h3,
  .cal-mobile-definition h3,
  .cal-mobile-topic h3,
  .cal-mobile-strategy h3,
  .cal-mobile-monthly h3,
  .cal-mobile-weekly h3,
  .cal-mobile-creator h3 {
    font-size: 15px !important;
    line-height: 1.45 !important;
  }

  .cal-mobile-repository p,
  .cal-mobile-definition p,
  .cal-mobile-topic p,
  .cal-mobile-strategy p,
  .cal-mobile-monthly p,
  .cal-mobile-weekly p,
  .cal-mobile-creator p {
    font-size: 12px;
    line-height: 1.58;
  }

  /* 我的工作台：只改明确的普通功能页，不改 #enterprise-data。 */
  .cal-mobile-customer #workbench .workbench-shell,
  .cal-mobile-customer #marketing .v5-shell,
  .cal-mobile-customer #brands,
  .cal-mobile-customer #team,
  .cal-mobile-customer #feishu-config,
  .cal-mobile-customer #data-access {
    gap: 12px;
  }

  .cal-mobile-customer #workbench .workbench-welcome {
    padding: 18px 16px;
  }

  .cal-mobile-customer #workbench .workbench-greeting {
    margin: 5px 0 3px;
    font-size: 25px;
    line-height: 1.25;
  }

  .cal-mobile-customer #workbench .workbench-intro,
  .cal-mobile-customer #workbench .weekly-more {
    font-size: 12px;
    line-height: 1.55;
  }

  .cal-mobile-customer #workbench .workbench-weekly-modules,
  .cal-mobile-customer #workbench .weekly-goals {
    gap: 8px;
  }

  .cal-mobile-customer #workbench .weekly-goal {
    min-height: 0;
    padding: 10px 12px;
  }

  .cal-mobile-customer #marketing .v5-context-bar,
  .cal-mobile-customer #marketing .v5-tool-card,
  .cal-mobile-customer #team .staff-band,
  .cal-mobile-customer #feishu-config .fs-connection,
  .cal-mobile-customer #feishu-config .fs-template-card,
  .cal-mobile-customer #data-access .da-card {
    padding: 14px;
  }

  .cal-mobile-customer #marketing .v5-tools,
  .cal-mobile-customer #feishu-config .fs-card-grid,
  .cal-mobile-customer #data-access .da-app-grid {
    grid-template-columns: 1fr !important;
    gap: 10px;
  }

  .cal-mobile-customer #marketing .v5-tool-card {
    min-height: 0;
  }

  .cal-mobile-customer #marketing .v5-tool-head {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) auto;
    align-items: center;
    gap: 9px;
  }

  .cal-mobile-customer #marketing .v5-tool-head h3,
  .cal-mobile-customer #feishu-config .fs-template-copy strong,
  .cal-mobile-customer #data-access .da-app-name {
    font-size: 14px !important;
    line-height: 1.35;
    writing-mode: horizontal-tb;
    word-break: normal;
  }

  .cal-mobile-customer #marketing .v5-tool-head > .v5-pill {
    position: static;
  }

  .cal-mobile-customer #marketing .v5-tool-desc,
  .cal-mobile-customer #data-access .da-app-desc {
    margin: 8px 0;
    font-size: 12px;
    line-height: 1.5;
  }

  .cal-mobile-customer #data-access .da-app-thumb {
    min-height: 92px;
  }

  .cal-mobile-customer #team .staff-band,
  .cal-mobile-customer #feishu-config .fs-connection-row,
  .cal-mobile-customer #feishu-config .fs-library-head,
  .cal-mobile-customer #feishu-config .fs-template-title-row {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .cal-mobile-customer #feishu-config .fs-connection-actions,
  .cal-mobile-customer #feishu-config .fs-card-actions {
    width: 100%;
  }

  /* 营销仓库首页。 */
  .cal-mobile-repository .main,
  .cal-mobile-definition .workspace,
  .cal-mobile-topic .main,
  .cal-mobile-strategy .main,
  .cal-mobile-monthly .main,
  .cal-mobile-weekly .main,
  .cal-mobile-creator .main {
    padding: 16px 14px 40px !important;
  }

  .cal-mobile-repository .topbar,
  .cal-mobile-definition .topbar,
  .cal-mobile-topic .topbar,
  .cal-mobile-strategy .topbar,
  .cal-mobile-monthly .topbar,
  .cal-mobile-weekly .topbar,
  .cal-mobile-creator .topbar {
    min-height: 52px;
    height: auto;
    padding: 8px 12px;
  }

  .cal-mobile-repository .page-head,
  .cal-mobile-repository .hero-row,
  .cal-mobile-repository .brand-summary-head,
  .cal-mobile-repository .brand-summary-main {
    gap: 10px;
  }

  .cal-mobile-repository .card,
  .cal-mobile-repository .definition,
  .cal-mobile-repository .brand-summary {
    padding: 15px;
  }

  .cal-mobile-repository .definition-grid,
  .cal-mobile-repository .status-grid {
    grid-template-columns: 1fr !important;
    gap: 10px;
  }

  /* 品牌 / 产品定义：报告仍完整，缩短封面和章节留白。 */
  .cal-mobile-definition .product-profile-hero,
  .cal-mobile-definition .approved-cover {
    min-height: 0 !important;
    padding: 18px 16px 0 !important;
  }

  .cal-mobile-definition .profile-identity h1,
  .cal-mobile-definition .approved-brand-cover h1 {
    font-size: 28px !important;
  }

  .cal-mobile-definition .approved-brand-definition,
  .cal-mobile-definition .approved-brand-value,
  .cal-mobile-definition .approved-keyline,
  .cal-mobile-definition .approved-mind {
    font-size: 18px !important;
    line-height: 1.48 !important;
  }

  .cal-mobile-definition .approved-report-content,
  .cal-mobile-definition .product-profile-content {
    padding-left: 16px !important;
    padding-right: 16px !important;
  }

  .cal-mobile-definition .approved-chapter,
  .cal-mobile-definition .profile-section {
    padding-block: 24px !important;
  }

  .cal-mobile-definition .approved-field,
  .cal-mobile-definition .profile-capabilities article,
  .cal-mobile-definition .profile-customer-grid article {
    padding-block: 14px !important;
  }

  .cal-mobile-definition .quiet-rail,
  .cal-mobile-definition .page-toolbar {
    gap: 8px;
  }

  /* 选题、日常策略、月/周计划：单列、短卡片、紧凑分区。 */
  .cal-mobile-topic .panel,
  .cal-mobile-topic .strategy-sheet-intro,
  .cal-mobile-topic .result-section,
  .cal-mobile-strategy .panel,
  .cal-mobile-strategy .result-section,
  .cal-mobile-strategy .wizard-panel,
  .cal-mobile-monthly .panel,
  .cal-mobile-weekly .panel,
  .cal-mobile-creator .panel {
    padding: 15px !important;
  }

  .cal-mobile-topic .page-head,
  .cal-mobile-topic .result-page-head,
  .cal-mobile-strategy .page-head,
  .cal-mobile-monthly .page-head,
  .cal-mobile-weekly .page-head,
  .cal-mobile-creator .page-head {
    margin-bottom: 14px;
  }

  .cal-mobile-topic .strategy-audience-tab,
  .cal-mobile-topic .choice-card,
  .cal-mobile-strategy .choice-card,
  .cal-mobile-monthly .answer-card,
  .cal-mobile-monthly .choice-card,
  .cal-mobile-weekly .goal-row,
  .cal-mobile-weekly .result-row {
    min-height: 0;
    padding: 11px 12px;
  }

  .cal-mobile-strategy .strategy-card-grid,
  .cal-mobile-monthly .month-card-grid,
  .cal-mobile-weekly .history-grid,
  .cal-mobile-weekly .team-week-grid,
  .cal-mobile-weekly .aggregate-grid {
    gap: 10px;
  }

  .cal-mobile-strategy .strategy-record,
  .cal-mobile-strategy .empty-strategy-card,
  .cal-mobile-strategy .new-strategy-card,
  .cal-mobile-monthly .month-card,
  .cal-mobile-weekly .history-card,
  .cal-mobile-weekly .team-week-card {
    min-height: 0 !important;
    padding: 15px !important;
  }

  .cal-mobile-monthly .form-section,
  .cal-mobile-weekly .form-section {
    margin-top: 10px;
  }

  /* 达人数据：摘要优先，表格可横向滑动。 */
  .cal-mobile-creator .summary-grid,
  .cal-mobile-creator .overview-grid,
  .cal-mobile-creator .attention-list {
    gap: 10px;
  }

  .cal-mobile-creator .outcome-value,
  .cal-mobile-creator .asset-progress > div,
  .cal-mobile-creator .paid-head {
    padding: 13px 14px;
  }

  .cal-mobile-creator .toolbar {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .cal-mobile-creator .toolbar .search,
  .cal-mobile-creator .toolbar .result-count {
    grid-column: 1 / -1;
  }

  .cal-mobile-creator .paid-table-wrap,
  .cal-mobile-creator .creator-table-wrap,
  .cal-mobile-creator .table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* 投流工具：手机导航保持横向；计划卡默认只露出决策摘要，详情页看完整指标。 */
  .cal-mobile-adtool .main {
    padding: 18px 12px 36px;
  }

  .cal-mobile-adtool .view-h,
  .cal-mobile-adtool .plan-page-title {
    font-size: 20px;
    line-height: 1.3;
  }

  .cal-mobile-adtool .view-h::before {
    width: 24px;
    margin-bottom: 10px;
  }

  .cal-mobile-adtool .view-sub,
  .cal-mobile-adtool .plan-page-desc {
    margin-bottom: 14px;
    font-size: 12px;
    line-height: 1.55;
  }

  .cal-mobile-adtool .summary,
  .cal-mobile-adtool .toolbar,
  .cal-mobile-adtool .live-note {
    margin-bottom: 10px;
    padding: 11px 12px;
  }

  .cal-mobile-adtool .plan-group {
    margin-bottom: 10px;
  }

  .cal-mobile-adtool .plan-gh,
  .cal-mobile-adtool .target-ph {
    gap: 7px;
    padding: 10px 12px;
  }

  .cal-mobile-adtool .plan-gt {
    font-size: 14px;
  }

  .cal-mobile-adtool .plan-gd {
    display: none;
  }

  .cal-mobile-adtool .plan-gc {
    margin-left: auto;
    font-size: 10px;
  }

  .cal-mobile-adtool .plan-body {
    padding-top: 8px;
  }

  .cal-mobile-adtool .plan-body .sug {
    margin-left: 0;
  }

  .cal-mobile-adtool .sug,
  .cal-mobile-adtool .live-decision {
    margin-bottom: 8px;
    padding: 11px 12px;
    border-radius: 10px;
  }

  .cal-mobile-adtool .sug .top {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 6px 8px;
    margin-bottom: 6px;
  }

  .cal-mobile-adtool .sug .pname {
    grid-column: 1 / -1;
    min-width: 0;
    font-size: 13px;
    line-height: 1.45;
  }

  .cal-mobile-adtool .sug .top .tag,
  .cal-mobile-adtool .sug .top .statpill {
    justify-self: start;
    padding: 2px 7px;
    font-size: 10px;
  }

  .cal-mobile-adtool .sug .advice {
    margin-bottom: 6px;
    font-size: 13px;
    line-height: 1.5;
  }

  .cal-mobile-adtool .live-decision:not(.cf-compact-card) > .advice {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .cal-mobile-adtool .live-decision .noteclass,
  .cal-mobile-adtool .live-decision .why,
  .cal-mobile-adtool .live-decision .meta,
  .cal-mobile-adtool .live-decision .live-reason,
  .cal-mobile-adtool .live-decision .live-metrics,
  .cal-mobile-adtool .live-decision .live-meta,
  .cal-mobile-adtool .live-decision .live-readonly {
    display: none;
  }

  /* 手机计划列表只展示摘要；所有处理按钮移到“计划详情”内。 */
  .cal-mobile-adtool .live-decision:not(.cf-compact-card) > .live-plan-status,
  .cal-mobile-adtool .live-decision:not(.cf-compact-card) > .live-plan-flow,
  .cal-mobile-adtool .live-decision:not(.cf-compact-card) > .live-actions {
    display: none;
  }

  .cal-mobile-adtool .live-decision:not(.cf-compact-card) > .live-result-status {
    max-height: 42px;
    overflow: hidden;
  }

  .cal-mobile-adtool .live-decision:not(.cf-compact-card) .plan-id-chip {
    grid-column: 1;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .cal-mobile-adtool .live-decision:not(.cf-compact-card) .live-detail-toggle {
    grid-column: 2;
    align-self: end;
  }

  .cal-mobile-adtool .mobile-detail-actions {
    display: block !important;
    margin: 0 0 12px;
    padding: 11px 12px;
    border: 1px solid var(--line-soft);
    border-radius: var(--radius);
    background: var(--bg-warm);
  }

  .cal-mobile-adtool .mobile-detail-actions > strong {
    display: block;
    margin-bottom: 8px;
    font-size: 13px;
  }

  .cal-mobile-adtool .mobile-detail-actions .live-actions {
    display: flex;
    margin-top: 0;
  }

  .cal-mobile-adtool .mobile-detail-actions .live-action-main {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
  }

  .cal-mobile-adtool .mobile-detail-actions .live-bid-adjust {
    grid-column: 1 / -1;
  }

  .cal-mobile-adtool .mobile-detail-actions .live-action-close {
    width: 100%;
  }

  .cal-mobile-adtool .mobile-detail-actions .live-action-close .btn {
    width: 100%;
  }

  .cal-mobile-adtool .plan-list-toolbar {
    gap: 6px;
    margin-bottom: 8px;
    padding: 8px 10px;
  }

  .cal-mobile-adtool .plan-list-summary {
    display: none;
  }

  .cal-mobile-adtool .plan-search-toolbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    flex-basis: 100%;
    width: 100%;
    gap: 8px;
  }

  .cal-mobile-adtool .plan-search-toolbar input {
    width: 100%;
    min-height: 40px;
    padding: 7px 10px;
    font-size: 13px;
  }

  .cal-mobile-adtool .plan-search-toolbar [role="status"] {
    font-size: 11px;
  }

  .cal-mobile-adtool .plan-search-pager {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin: 10px 0 2px;
    padding: 8px 0;
    font-size: 12px;
  }

  .cal-mobile-adtool .plan-search-pager[hidden] {
    display: none;
  }

  .cal-mobile-adtool .plan-search-pager .btn {
    min-height: 36px;
    padding: 7px 12px;
    font-size: 12px;
  }

  .cal-mobile-adtool .live-plan-flow,
  .cal-mobile-adtool .live-result-status {
    margin: 6px 0;
    padding: 7px 9px;
    font-size: 11px;
    line-height: 1.45;
  }

  .cal-mobile-adtool .sug-action-row,
  .cal-mobile-adtool .live-actions {
    align-items: center;
    margin-top: 7px;
  }

  .cal-mobile-adtool .sug-action-main,
  .cal-mobile-adtool .live-action-main {
    gap: 6px;
  }

  .cal-mobile-adtool .sug-action-row .btn,
  .cal-mobile-adtool .live-actions .btn,
  .cal-mobile-adtool .live-detail-toggle {
    min-height: 36px;
    padding: 7px 10px;
    font-size: 11px;
  }

  .cal-mobile-adtool .live-detail-toggle {
    margin-left: 0;
    justify-self: end;
  }

  .cal-mobile-adtool .sug-action-close,
  .cal-mobile-adtool .live-action-close {
    margin-left: 0;
  }

  .cal-mobile-adtool .live-detail-modal-backdrop {
    padding: 0;
  }

  .cal-mobile-adtool .live-detail-modal {
    width: 100vw;
    height: 100dvh;
    max-height: none;
    border-radius: 0;
  }

  .cal-mobile-adtool .live-detail-modal-head {
    position: sticky;
    top: 0;
    z-index: 2;
    min-height: 48px;
    padding: calc(9px + env(safe-area-inset-top)) 12px 9px;
    box-sizing: border-box;
  }

  .cal-mobile-adtool .live-detail-modal-title h3 {
    display: -webkit-box;
    margin-right: 4px;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    font-size: 15px;
    line-height: 1.35;
  }

  .cal-mobile-adtool .live-detail-modal-title p,
  .cal-mobile-adtool .live-detail-sub {
    font-size: 11px;
    line-height: 1.45;
  }

  .cal-mobile-adtool .live-detail-panel {
    padding: 10px 12px calc(18px + env(safe-area-inset-bottom));
  }

  .cal-mobile-adtool .live-detail-close {
    width: 40px;
    height: 40px;
    font-size: 22px;
  }

  .cal-mobile-adtool .live-detail-desktop-copy,
  .cal-mobile-adtool .live-detail-panel.has-keywords > .live-detail-head,
  .cal-mobile-adtool .live-detail-panel.has-keywords > .live-detail-tools {
    display: none;
  }

  .cal-mobile-adtool .live-detail-keywords > .live-detail-head.small {
    margin: 0 0 8px;
    font-size: 15px;
  }

  .cal-mobile-adtool .live-detail-keywords > .live-detail-sub {
    margin: 0 0 8px !important;
    padding: 7px 9px;
    border: 1px solid var(--line-soft);
    border-radius: var(--radius);
    background: var(--bg-warm);
    color: var(--muted);
  }

  .cal-mobile-adtool .live-detail-keyword-wrap {
    overflow: visible;
    border: 0;
    border-radius: 0;
    background: transparent;
  }

  .cal-mobile-adtool .live-detail-keyword-table,
  .cal-mobile-adtool .live-detail-keyword-table tbody {
    display: block;
    width: 100%;
    min-width: 0;
  }

  .cal-mobile-adtool .live-detail-keyword-table thead {
    display: none;
  }

  .cal-mobile-adtool .live-detail-keyword-table tbody {
    display: grid;
    gap: 8px;
  }

  .cal-mobile-adtool .live-detail-keyword-table tr {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0 8px;
    padding: 9px 11px;
    border: 1px solid var(--line-soft);
    border-radius: var(--radius);
    background: var(--paper);
    box-shadow: var(--shadow-sm);
  }

  .cal-mobile-adtool .live-detail-keyword-table td,
  .cal-mobile-adtool .live-detail-keyword-table td.sticky-col {
    position: static;
    min-width: 0;
    max-width: none;
    padding: 4px 0;
    overflow: visible;
    border: 0;
    box-shadow: none;
    background: transparent;
    white-space: normal;
    text-overflow: clip;
    font-size: 12px;
    line-height: 1.35;
    overflow-wrap: anywhere;
  }

  .cal-mobile-adtool .live-detail-keyword-table td::before {
    display: block;
    margin-bottom: 1px;
    color: var(--hint);
    font-size: 10px;
    font-weight: 500;
    line-height: 1.25;
  }

  .cal-mobile-adtool .live-detail-keyword-table td:first-child {
    grid-column: 1 / -1;
    padding: 1px 0 7px;
    border-bottom: 1px solid var(--line-soft);
    font-size: 14px;
    line-height: 1.4;
    overflow-wrap: anywhere;
  }

  .cal-mobile-adtool .live-detail-keyword-table td:first-child::before {
    display: none;
  }

  .cal-mobile-adtool .live-detail-keyword-table.is-shared-bid td:nth-child(2)::before,
  .cal-mobile-adtool .live-detail-keyword-table.is-per-keyword td:nth-child(2)::before { content: "关键词 ID"; }
  .cal-mobile-adtool .live-detail-keyword-table.is-shared-bid td:nth-child(3)::before,
  .cal-mobile-adtool .live-detail-keyword-table.is-per-keyword td:nth-child(6)::before { content: "今日消耗"; }
  .cal-mobile-adtool .live-detail-keyword-table.is-shared-bid td:nth-child(4)::before,
  .cal-mobile-adtool .live-detail-keyword-table.is-per-keyword td:nth-child(7)::before { content: "点击量"; }
  .cal-mobile-adtool .live-detail-keyword-table.is-shared-bid td:nth-child(5)::before,
  .cal-mobile-adtool .live-detail-keyword-table.is-per-keyword td:nth-child(8)::before { content: "点击单价"; }
  .cal-mobile-adtool .live-detail-keyword-table.is-shared-bid td:nth-child(6)::before,
  .cal-mobile-adtool .live-detail-keyword-table.is-per-keyword td:nth-child(9)::before { content: "点击率"; }
  .cal-mobile-adtool .live-detail-keyword-table.is-per-keyword td:nth-child(3)::before { content: "行业搜索量"; }
  .cal-mobile-adtool .live-detail-keyword-table.is-per-keyword td:nth-child(4)::before { content: "系统建议出价"; }
  .cal-mobile-adtool .live-detail-keyword-table.is-per-keyword td:nth-child(5)::before { content: "当前出价"; }
  .cal-mobile-adtool .live-detail-keyword-table.is-per-keyword td:nth-child(10)::before { content: "建议"; }

  .cal-mobile-adtool .live-detail-keyword-table.is-per-keyword td:nth-child(5),
  .cal-mobile-adtool .live-detail-keyword-table.is-per-keyword td:nth-child(10) {
    grid-column: 1 / -1;
  }

  .cal-mobile-adtool .live-detail-keyword-table td.mobile-data-missing {
    display: none;
  }

  .cal-mobile-adtool .live-detail-keyword-table tr.keyword-data-pending {
    gap: 0 8px;
    padding-top: 8px;
    padding-bottom: 8px;
  }

  .cal-mobile-adtool .live-detail-keyword-table tr.keyword-data-pending td:first-child {
    padding-bottom: 6px;
  }

  .cal-mobile-adtool .live-detail-keyword-table tr.keyword-data-pending td:nth-child(2) {
    grid-column: 1 / -1;
  }

  .cal-mobile-adtool .live-detail-keyword-table .mobile-keyword-status {
    display: inline-flex !important;
    align-items: center;
    margin-left: 8px;
    color: var(--hint);
    font-size: 11px;
    font-weight: 500;
    line-height: 1.3;
  }

  .cal-mobile-adtool .live-detail-keyword-table .keyword-bid-cell {
    grid-template-columns: minmax(42px, auto) minmax(0, 1fr) 58px;
    min-width: 0;
    max-width: none;
  }

  .cal-mobile-adtool .live-detail-keyword-table .keyword-bid-input {
    width: 100%;
    min-width: 0;
  }

  .cal-mobile-adtool .live-detail-grid,
  .cal-mobile-adtool .live-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .cal-mobile-adtool .live-metric,
  .cal-mobile-adtool .live-detail-card {
    min-height: 0;
    padding: 10px;
  }

  .cal-mobile-adtool .live-detail-table-wrap:not(.live-detail-keyword-wrap) {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .cal-mobile-adtool .live-detail-official-table-hint,
  .cal-mobile-adtool .live-detail-official-table-wrap {
    display: none;
  }

  .cal-mobile-adtool .live-mobile-official-fields {
    display: grid !important;
    gap: 10px;
  }

  .cal-mobile-adtool .live-mobile-official-section {
    padding: 11px;
    border: 1px solid var(--line-soft);
    border-radius: var(--radius);
    background: var(--paper);
    box-shadow: var(--shadow-sm);
  }

  .cal-mobile-adtool .live-mobile-official-section h4 {
    margin: 0 0 8px;
    padding-bottom: 7px;
    border-bottom: 1px solid var(--line-soft);
    color: var(--ink);
    font-size: 13px;
    line-height: 1.35;
  }

  .cal-mobile-adtool .live-mobile-official-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 12px;
  }

  .cal-mobile-adtool .live-mobile-official-item {
    min-width: 0;
  }

  .cal-mobile-adtool .live-mobile-official-item span,
  .cal-mobile-adtool .live-mobile-official-item strong {
    display: block;
    overflow-wrap: anywhere;
  }

  .cal-mobile-adtool .live-mobile-official-item span {
    margin-bottom: 2px;
    color: var(--hint);
    font-size: 10px;
    line-height: 1.3;
  }

  .cal-mobile-adtool .live-mobile-official-item strong {
    color: var(--ink);
    font-size: 12px;
    line-height: 1.35;
  }

  .cal-mobile-adtool .live-mobile-official-empty,
  .cal-mobile-adtool .live-mobile-missing-fields {
    padding: 10px 11px;
    border: 1px solid var(--line-soft);
    border-radius: var(--radius);
    background: var(--paper);
    color: var(--muted);
    font-size: 11px;
    line-height: 1.45;
  }

  .cal-mobile-adtool .live-mobile-missing-fields summary {
    cursor: pointer;
    color: var(--muted);
    font-weight: 600;
  }

  .cal-mobile-adtool .live-mobile-missing-fields > div {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 10px;
    margin-top: 9px;
    color: var(--hint);
  }

  .cal-mobile-adtool .cf-auto-board,
  .cal-mobile-adtool .cf-plan-intro,
  .cal-mobile-adtool .cf-fold,
  .cal-mobile-adtool .plugin-update-alert,
  .cal-mobile-adtool .plugin-updater-card,
  .cal-mobile-adtool .plugin-download-card,
  .cal-mobile-adtool .plugin-guide-card {
    padding: 13px;
  }

  .cal-mobile-adtool .cf-auto-grid,
  .cal-mobile-adtool .plugin-guide-grid {
    gap: 9px;
  }

  .cal-mobile-adtool .plugin-updater-actions,
  .cal-mobile-adtool .plugin-download-actions {
    align-items: stretch;
    width: 100%;
  }

  .cal-mobile-adtool .plugin-updater-actions .btn,
  .cal-mobile-adtool .plugin-download-actions .btn {
    width: 100%;
    justify-content: center;
  }

  /* 宽表：手机端改为字段卡片；桌面端不命中本媒体规则。 */
  .cal-mobile-table-cards .mobile-card-table-wrap {
    max-height: none !important;
    overflow: visible !important;
    -webkit-overflow-scrolling: auto;
  }

  .cal-mobile-table-cards table.mobile-card-table {
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    table-layout: auto !important;
    border-collapse: separate !important;
    border-spacing: 0 !important;
    border: 0 !important;
    background: transparent !important;
  }

  .cal-mobile-table-cards table.mobile-card-table colgroup {
    display: none !important;
  }

  .cal-mobile-table-cards table.mobile-card-table thead {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    clip-path: inset(50%) !important;
    white-space: nowrap !important;
  }

  .cal-mobile-table-cards table.mobile-card-table.mobile-card-table-sortable thead {
    position: static !important;
    display: block !important;
    width: 100% !important;
    height: auto !important;
    margin: 0 0 8px;
    padding: 0 0 3px !important;
    overflow-x: auto !important;
    clip: auto !important;
    clip-path: none !important;
    white-space: normal !important;
    -webkit-overflow-scrolling: touch;
  }

  .cal-mobile-table-cards table.mobile-card-table.mobile-card-table-sortable thead tr {
    display: flex !important;
    width: max-content !important;
    min-width: 100% !important;
    gap: 6px !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
  }

  .cal-mobile-table-cards table.mobile-card-table.mobile-card-table-sortable thead th {
    position: static !important;
    display: inline-flex !important;
    align-items: center;
    flex: none;
    min-width: 0 !important;
    max-width: none !important;
    padding: 6px 9px !important;
    border: 1px solid var(--line) !important;
    border-radius: var(--r-pill, 999px) !important;
    background: var(--paper) !important;
    color: var(--muted) !important;
    font-size: 11px !important;
    line-height: 1.25 !important;
    white-space: nowrap !important;
  }

  .cal-mobile-table-cards table.mobile-card-table tbody {
    display: grid !important;
    width: 100% !important;
    gap: 8px !important;
  }

  .cal-mobile-table-cards table.mobile-card-table tbody tr {
    display: grid !important;
    width: 100% !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 0 8px !important;
    padding: 9px 11px !important;
    border: 1px solid var(--line-soft, var(--line)) !important;
    border-radius: var(--radius, 8px) !important;
    background: var(--paper) !important;
    box-shadow: var(--shadow-sm) !important;
  }

  .cal-mobile-table-cards table.mobile-card-table tbody tr:hover td,
  .cal-mobile-table-cards table.mobile-card-table tbody tr:nth-child(even) td {
    background: transparent !important;
  }

  .cal-mobile-table-cards table.mobile-card-table tbody td {
    position: static !important;
    display: block !important;
    min-width: 0 !important;
    max-width: none !important;
    width: auto !important;
    padding: 4px 0 !important;
    overflow: visible !important;
    border: 0 !important;
    box-shadow: none !important;
    background: transparent !important;
    color: var(--ink) !important;
    white-space: normal !important;
    text-align: left !important;
    text-overflow: clip !important;
    overflow-wrap: anywhere !important;
    font-size: 12px !important;
    line-height: 1.35 !important;
  }

  .cal-mobile-table-cards table.mobile-card-table tbody td::before {
    content: attr(data-mobile-label);
    display: block;
    margin: 0 0 1px;
    color: var(--hint, var(--muted));
    font-size: 10px;
    font-weight: 500;
    line-height: 1.25;
  }

  .cal-mobile-table-cards table.mobile-card-table tbody td[data-mobile-primary="true"] {
    grid-column: 1 / -1 !important;
    padding: 1px 0 7px !important;
    border-bottom: 1px solid var(--line-soft, var(--line)) !important;
    font-size: 14px !important;
    font-weight: 700 !important;
  }

  .cal-mobile-table-cards table.mobile-card-table tbody td[data-mobile-primary="true"]::before {
    display: none;
  }

  .cal-mobile-table-cards table.mobile-card-table tbody td[data-mobile-wide="true"] {
    grid-column: 1 / -1 !important;
  }

  .cal-mobile-table-cards table.mobile-card-table tbody tr.mobile-card-empty-row {
    display: block !important;
  }

  .cal-mobile-table-cards table.mobile-card-table tbody td.mobile-card-empty-cell {
    width: 100% !important;
    padding: 18px 10px !important;
    text-align: center !important;
    color: var(--muted) !important;
  }

  .cal-mobile-table-cards table.mobile-card-table tbody td.mobile-card-empty-cell::before {
    display: none;
  }

  .cal-mobile-table-cards table.mobile-card-table tbody td button,
  .cal-mobile-table-cards table.mobile-card-table tbody td input,
  .cal-mobile-table-cards table.mobile-card-table tbody td select {
    max-width: 100%;
  }
}
