/* ========================================
   响应式：≤768px 移动端 / ≤480px 小屏 / 横屏低高度
   topbar 高度与内容间距通过变量随断点联动，不出现散落的魔法数值
   ======================================== */

/* ===== 移动端适配 (≤768px)：微信导航栏 + 底部 TabBar 壳 ===== */
@media (max-width: 768px) {
  :root {
    /* 2026-09-11 顶栏全端隐藏：原 --topbar-height: var(--wx-nav-height) 覆盖已移除，
       沿用 tokens.css 的 0px（否则移动端会残留 44px 空白） */
    --content-pad: 14px;
  }

  html { font-size: 14px; }

  /* 汉堡菜单按钮退役（2026-09-10 P4）：「我」页 cell 组已接管全部 12 个入口
     （排行/积分/论坛走 TabBar+页级分段，个人配置/接口文档/我的积分/管理×2
     收进「我」页 cell），微信无抽屉形态故移动端隐藏按钮。
     抽屉 DOM（#sidebar/#sidebar-overlay/menu-toggle 绑定）保留——桌面侧边栏
     仍用同一 DOM，勿删。侧边栏底部的连接状态灯移动端随按钮一并不可见，
     Sman 连接异常以执行报错提示兜底 */
  .menu-toggle { display: none; }

  /* 侧边栏遮罩（微信黑遮罩） */
  .sidebar-overlay {
    display: none;
    position: fixed;
    top: var(--topbar-height);
    left: 0;
    right: 0;
    bottom: 0;
    z-index: calc(var(--z-sidebar) - 1);
    background: var(--color-mask);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    animation: fadeIn 0.25s ease;
  }

  .sidebar-overlay.active { display: block; }

  /* 移动端侧边栏浮层抽屉模式（含安全区避让；过渡期仍用汉堡菜单可达全部入口）。
     抽屉需压住底部 TabBar（两者 z-index 变量同为 100，靠抬高一层 + DOM 顺序双保险） */
  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: 260px;
    min-width: 260px;
    background: var(--color-surface);
    transform: translateX(-100%);
    box-shadow: 4px 0 28px rgba(0, 0, 0, 0.18);
    transition: transform var(--transition-smooth);
    z-index: calc(var(--z-tabbar) + 1);
    padding-top: env(safe-area-inset-top);
    padding-bottom: env(safe-area-inset-bottom);
  }

  .sidebar.open { transform: translateX(0); }

  /* 顶部导航栏：微信式白底 + 底部 hairline（含刘海屏安全区） */
  .topbar {
    background: var(--color-surface);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    justify-content: space-between;
    padding: 0 calc(12px + env(safe-area-inset-right)) 0 calc(12px + env(safe-area-inset-left));
    gap: 8px;
    z-index: calc(var(--z-sidebar) + 1);
  }

  /* 标题绝对居中：左右留白给 menu-toggle 与 auth-status */
  .page-title {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    max-width: 50%;
    font-size: 17px;
    font-weight: 600;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .topbar-actions { gap: 2px; flex-shrink: 0; }

  /* 页级分段条（契约2）：显示并吸附在滚动容器顶部
     （topbar 是 .content-panels 的 flex 兄弟节点、在滚动容器外，
     sticky 相对 .content-panels 吸附，top:0 即视觉上紧贴导航栏下沿）
     2026-09-11 共享排序页该行合并为「4 分段 + 排序 + 搜索」单行工具条：
     sticky 吸附仍由本规则提供，results.css 只负责 display:flex（桌面端） */
  .wx-seg--page {
    display: flex;
    position: sticky;
    top: 0;
    z-index: var(--z-sticky);
  }

  /* 共享排序页单行工具条紧凑参数：保证 375px 下 4 个分段 + 排序 + 搜索一行
     放得下不溢出（2026-09-11 刷新按钮移除后按钮位由搜索放大镜承接，宽度相当；
     改动后须按 coding-standards #30 在 375px 实测默认态与搜索展开态）。
     字号一律绝对 px——本断点 html font-size 为 14/13px，用 rem 会缩到 10px 级
     （2026-09-11 浏览器实测：0.75rem 在 375px 下仅 9.75px）。
     排序下拉 16px 防 iOS 聚焦缩放（项目既有口径，见 results.css 排序下拉注释） */
  #rank-seg-global,
  #rank-seg-personal {
    /* gap 3px（2026-09-11 搜索上线 375px 实测收敛：行自然宽 374 > 真机可用宽
       （375 - .content-panels 左右 --content-pad 10~12px）≈351~355，溢出 ~20px；
       gap 4→3 + 分段项 padding 6→4 + 排序 max-width 96→88 三项共省 ~30px。
       改前后均须 scrollWidth<=clientWidth 实测断言（coding-standards #30） */
    gap: 3px;
    padding: 0 8px;
  }

  #rank-seg-global .wx-seg-item,
  #rank-seg-personal .wx-seg-item {
    height: 40px;
    padding: 0 4px;
    font-size: 13px;
    font-weight: 400;
  }

  #rank-seg-global .tree-sort-select,
  #rank-seg-personal .tree-sort-select {
    /* 2026-09-11 用户拍板：与分段项一致（13px/40px 行高），不再用 16px 防缩放口径
       （iOS 聚焦可能自动放大；要恢复防缩放改回 16px） */
    font-size: 13px;
    min-height: 40px;
    max-width: 88px;
    padding: 0 6px;
  }

  /* 树搜索输入框（2026-09-11）：≤768 升 16px 防 iOS 聚焦自动放大——与排序下拉
     13px「视觉一致」口径的区别：输入框是打字焦点件，走项目「防缩放口径」先例
     （coding-standards #29 两条口径的取舍已分别注释在两处） */
  #rank-seg-global.is-searching .tree-search-input,
  #rank-seg-personal.is-searching .tree-search-input {
    font-size: 16px;
    min-height: 40px;
  }

  /* 清空/关闭按钮移动端触摸区保持 ≥40px（放大镜由 .btn-icon-sm 的 34px 紧凑规则
     提供，见 responsive.css:288 附近） */
  #rank-seg-global .tree-search-clear,
  #rank-seg-personal .tree-search-clear,
  #rank-seg-global .tree-search-close,
  #rank-seg-personal .tree-search-close {
    min-height: 40px;
  }

  /* 移动端认证状态：紧凑但可读（旧版 0.6rem 级字号 + 30-50px 宽度过分压缩） */
  .auth-status {
    margin-left: 4px;
    font-size: 0.78rem;
    gap: 4px;
    max-width: 140px;
    overflow: hidden;
  }

  .auth-status > span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: inline-block;
    max-width: 100px;
  }

  .auth-status a {
    display: inline-flex;
    align-items: center;
    min-height: 36px;
  }

  .auth-status span:not(:first-child) { display: none; }

  .btn-primary {
    padding: 7px 12px;
    font-size: 0.78rem;
    gap: 4px;
  }

  .btn-primary svg { width: 15px; height: 15px; }

  .btn-secondary { padding: 7px 10px; font-size: 0.78rem; }
  .btn-secondary svg { width: 15px; height: 15px; }

  .btn-icon { width: 36px; height: 36px; }
  .btn-icon svg { width: 18px; height: 18px; }

  .btn-warning span { display: none; }
  .btn-warning { padding: 7px 8px; }

  .btn-schedule span { display: none; }
  .btn-schedule { padding: 7px 8px; }

  /* 内容面板（含安全区：底部 TabBar + 底部横条 / 左右刘海） */
  .content-panels {
    padding: 0 calc(12px + env(safe-area-inset-right))
      calc(var(--wx-tabbar-height) + env(safe-area-inset-bottom) + 16px)
      calc(12px + env(safe-area-inset-left));
    -webkit-overflow-scrolling: touch;
  }

  /* 2026-09-11 用户反馈「吸顶条上方透出滚动内容的缝隙」修复：
     成因 = 滚动容器顶部内边距把粘性停靠线下推（停靠偏移 = padding-top + 固定 8px，
     浏览器实测 18px @ --content-pad:10px）。处理：顶部内边距归零（上面已改）
     + 粘性 top 抵消那 8px 固定残留（实测 top:-8px 时停靠偏移为 0，见下方
     .wx-seg--page 覆盖）；无分段条的面板用 margin 补回原顶部间距，视觉不变 */
  .panel > .panel-inner:first-child { margin-top: var(--content-pad); }

  /* 覆盖上面的 .wx-seg--page{top:0}：抵消固定 8px 残留，使条紧贴容器顶部 */
  .wx-seg--page { top: -8px; }

  .panel-inner {
    padding: 20px 16px;
    border-radius: var(--radius-md);
    max-width: 100%;
  }

  #panel-config .panel-inner,
  #panel-api-documentation .panel-inner { max-width: 100%; }

  .panel-header { margin-bottom: 20px; }
  .panel-header h2 { font-size: 1.15rem; }
  .panel-desc { font-size: 0.8rem; }

  .panel-header-row { flex-wrap: wrap; gap: 10px; }

  .panel-actions { margin-top: 18px; padding-top: 14px; }

  .section-divider { margin: 22px 0; }

  /* 表单：两列变单列 */
  .form-grid { grid-template-columns: 1fr; gap: 14px; }

  .form-field.span-2 { grid-column: span 1; }

  .form-field label { font-size: 0.72rem; margin-bottom: 4px; }

  .form-field input,
  .form-field textarea,
  .form-field select {
    padding: 11px 12px;
    font-size: 0.9rem;
  }

  .field-header { flex-wrap: wrap; gap: 8px; }

  .field-header .btn-secondary { font-size: 0.72rem; padding: 5px 10px; }

  .form-field .input-with-icon input { padding-left: 36px; }
  .form-field .input-with-icon svg { left: 11px; width: 16px; height: 16px; }

  .form-field .input-with-suffix input { padding-right: 40px; }

  .input-suffix-btn { right: 2px; width: 34px; height: 34px; }

  .concurrency-btn { width: 40px; height: 40px; }
  .concurrency-btn svg { width: 18px; height: 18px; }

  .concurrency-control input { width: 44px; font-size: 1rem; padding: 11px 4px !important; }

  /* 进度概览 */
  .progress-overview { padding: 14px; margin-bottom: 14px; }

  .progress-stats { gap: 14px; flex-wrap: wrap; }

  .stat-value { font-size: 1.1rem; }
  .stat-item.current .stat-value { font-size: 1.3rem; }
  .stat-label { font-size: 0.65rem; }

  /* 任务列表 */
  .task-list { gap: 8px; }

  .task-item-header { padding: 10px 12px; gap: 8px; flex-wrap: nowrap; }

  /* 积分任务领取卡片行2 缩进对齐（序号 20px + gap 8px） */
  .taskpool-claim-card .task-item-row-meta { padding-left: 28px; }

  .task-index { font-size: 0.7rem; min-width: 20px; }

  .task-target-input { width: 80px; font-size: 0.85rem; }

  .task-status-badge { font-size: 0.68rem; padding: 3px 7px; }

  .task-runid-label { font-size: 0.62rem; padding: 1px 5px; }

  .task-item-detail { padding: 0 10px 10px 36px; font-size: 0.72rem; }

  .task-item-btn { width: 32px; height: 32px; }
  .task-item-btn svg { width: 15px; height: 15px; }

  .task-item-continue-btn { padding: 3px 7px; font-size: 0.65rem; }

  .task-item-actions { gap: 2px; }

  /* 日志 */
  .log-viewport {
    max-height: 280px;
    font-size: 0.7rem;
    padding: 12px;
  }

  .log-placeholder { min-height: 140px; }
  .log-time { font-size: 0.65rem; }

  .log-actions { gap: 2px; }

  .btn-icon-sm { width: 34px; height: 34px; }
  .btn-icon-sm svg { width: 17px; height: 17px; }

  /* 结果页：移动端单栏「列表 ↔ 详情」导航。
     默认只显示数据树；JS（_isMobileView 守卫，见 ranking_ui.js）在用户选中
     数据项后给 .results-layout 加 .mobile-detail-open，切到整屏详情 + 返回按钮。 */
  .results-layout { display: block; height: auto; max-height: none; }

  .results-tree-panel {
    width: 100%;
    min-width: 0;
    max-width: none;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
  }

  .results-detail-panel { display: none; }

  .results-layout.mobile-detail-open .results-tree-panel { display: none; }

  .results-layout.mobile-detail-open .results-detail-panel {
    display: flex;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
  }

  /* 移动端返回按钮（桌面基础样式 display:none，见 layout.css） */
  .mobile-back-btn { display: flex; }

  .results-tree-header { padding: 12px 14px 10px; }
  .results-tree-header h2 { font-size: 0.9rem; letter-spacing: -0.01em; }

  /* 2026-09-11 用户要求内容靠左：容器内边距 6px→4px（与 ≤480 档一致） */
  .results-tree { padding: 4px; overflow-x: hidden; }

  /* 树节点：恢复可读字号与 ≥40px 触摸区（旧版压到 0.48-0.72rem 基本不可读）。
     2026-09-11 紧凑化：与 results.css 口径对齐（分类行 12px/7-8px 内边距），
     字号改绝对 px（html font-size 本断点 14px，rem 会被缩小——见规范 #29）；
     min-height 40px 保留（移动端触摸友好） */
  .tree-node-header {
    padding: 7px 8px;
    font-size: 12px;
    gap: 5px;
    min-height: 40px;
  }

  .tree-arrow { width: 16px; height: 16px; }
  .tree-arrow svg { width: 12px; height: 12px; }

  .tree-node-icon { width: 18px; height: 18px; }
  .tree-node-icon svg { width: 14px; height: 14px; }

  .tree-node-name { min-width: 0; }

  /* 2026-09-11 与 results.css 口径同步：缩进 22px→12px/级（内容靠左） */
  .tree-children { margin-left: 6px; padding-left: 6px; }

  .tree-node-runid { font-size: 10px; max-width: 120px; padding: 1px 6px; }

  .detail-content { padding: 12px; }

  .detail-header {
    flex-direction: column;
    gap: 10px;
    padding-bottom: 12px;
    margin-bottom: 14px;
  }

  .detail-header h2 { font-size: 1.05rem; }

  .detail-meta { gap: 8px; margin-bottom: 16px; }

  .detail-meta-item { padding: 5px 10px; font-size: 0.72rem; }

  .detail-meta-item.detail-description { padding: 12px 14px; }
  .detail-meta-item.detail-description .value { line-height: 1.75; }

  .detail-section { margin-bottom: 16px; }

  .detail-section-title { font-size: 0.72rem; margin-bottom: 8px; }
  .detail-section-title svg { width: 14px; height: 14px; }

  .detail-images {
    display: flex;
    flex-direction: column;
    gap: 8px;
  }

  .detail-image-card { width: 100%; max-width: 100%; }

  .detail-image-card img {
    width: 100%;
    height: auto;
    max-height: none;
    object-fit: contain;
    background: var(--color-surface-sunken);
  }

  .detail-image-card .image-label { padding: 6px 8px; font-size: 0.72rem; }
  .detail-image-card .image-label .type-badge { font-size: 0.65rem; padding: 2px 5px; }

  /* 历史卡片 */
  .history-card-header { padding: 8px 10px; gap: 6px; font-size: 0.72rem; flex-wrap: wrap; }
  .history-card-date { font-size: 0.72rem; min-width: 70px; }
  .history-card-cat { margin-left: 0; width: 100%; white-space: normal; }
  .history-card-thumb-grid { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 8px; }
  .history-card-thumb-grid img { height: 80px; }

  /* 接口文档 */
  .view-toggle-bar { padding: 10px 12px; gap: 6px; flex-wrap: wrap; }

  .view-toggle-btn { padding: 6px 10px; font-size: 0.72rem; gap: 4px; }
  .view-toggle-btn .icon { font-size: 1rem; }

  /* 接口文档：与结果页同一套「列表 ↔ 详情」单栏导航。
     .api-docs-content 的 display:flex 来自 JS 内联（updateViewToggleButtons），
     这里只改方向；选中接口后 JS 加 .mobile-detail-open 切到整屏详情。 */
  .api-docs-layout { height: auto; max-height: none; overflow: visible; align-items: stretch; }

  .api-docs-content { flex-direction: column; overflow: visible; width: 100%; }

  .api-docs-sidebar {
    width: 100%;
    min-width: 0;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    overflow-y: visible;
  }

  .api-docs-detail { display: none; padding: 16px; border: 1px solid var(--color-border); border-radius: var(--radius-md); }

  /* 文档返回按钮：仅详情打开时显示（列表态需压住通用的 .mobile-back-btn{display:flex}） */
  #btn-mobile-back-docs { display: none; }

  .api-docs-content.mobile-detail-open .api-docs-sidebar { display: none; }
  .api-docs-content.mobile-detail-open .api-docs-detail { display: block; }
  .api-docs-content.mobile-detail-open #btn-mobile-back-docs { display: flex; margin-bottom: 10px; }

  .api-list { padding: 8px 6px; gap: 2px; }
  .api-list-item { padding: 12px 14px; font-size: 0.88rem; min-height: 40px; display: flex; align-items: center; }

  .api-docs-detail { padding: 14px; }

  .api-detail-content h2 { font-size: 1.15rem; margin-bottom: 14px; }

  .api-endpoint { padding: 10px 12px; font-size: 0.75rem; gap: 4px; }

  .api-description { padding: 12px; margin-bottom: 16px; }

  .params-table th,
  .params-table td { padding: 8px 10px; font-size: 0.72rem; }

  .api-example-section pre { padding: 12px; max-height: 300px; }
  .api-example-section code { font-size: 0.72rem; }

  .raw-md-view { padding: 14px; }
  .raw-md-view .md-content { font-size: 0.72rem; }

  /* 空状态 */
  .empty-state { padding: 32px 16px; }
  .empty-state svg { width: 36px; height: 36px; margin-bottom: 12px; }
  .empty-state h3 { font-size: 0.88rem; }
  .empty-state p { font-size: 0.76rem; }

  /* Toast（微信深色底，移动端保持紧凑） */
  #toast-container {
    left: calc(10px + env(safe-area-inset-left));
    right: calc(10px + env(safe-area-inset-right));
    top: calc(10px + env(safe-area-inset-top));
  }

  .toast {
    min-width: auto;
    max-width: none;
    padding: 12px 16px;
    font-size: 14px;
  }

  /* 模态框（微信确认弹窗：actions 通栏需与容器水平 padding 同步负 margin） */
  .modal-dialog {
    padding: 28px 20px 0;
    width: 92%;
    max-width: 380px;
    border-radius: var(--radius-lg);
  }

  .modal-actions { margin: 0 -20px; }

  .modal-title { font-size: 17px; }
  .modal-body { font-size: 14px; }

  /* 图片预览 */
  .image-preview-overlay img { max-width: 95vw; max-height: 85vh; }

  .image-preview-close {
    width: 36px;
    height: 36px;
    top: calc(10px + env(safe-area-inset-top));
    right: calc(10px + env(safe-area-inset-right));
  }
}

/* ===== 小屏手机 (≤480px) ===== */
@media (max-width: 480px) {
  :root {
    --content-pad: 12px; /* 导航栏保持微信 44px（768px 断点已设，不覆盖） */
  }

  html { font-size: 13px; }

  .sidebar { width: 85vw; min-width: 85vw; max-width: 300px; }

  .topbar { padding: 0 8px; gap: 4px; }

  .page-title { font-size: 16px; }

  .topbar-actions { gap: 1px; }

  /* 小屏手机：auth-status 紧凑但保持可读与可点（≥36px 触摸区） */
  .auth-status {
    margin-left: 2px;
    font-size: 0.72rem;
    max-width: 96px;
    gap: 3px;
  }

  .auth-status .auth-greeting { max-width: 52px !important; }

  .auth-status .auth-logout-link {
    font-size: 0.72rem;
    padding: 6px 8px;
    border-radius: var(--radius-sm);
    background: var(--color-brand-subtle);
  }

  .auth-status .auth-login-link { font-size: 0.75rem; padding: 6px 8px; }

  .btn-primary { padding: 6px 10px; font-size: 0.72rem; }
  .btn-primary svg { width: 14px; height: 14px; }

  .btn-icon { width: 34px; height: 34px; }
  .btn-icon svg { width: 17px; height: 17px; }

  .btn-secondary { padding: 6px 8px; font-size: 0.72rem; }

  /* 顶部内边距 0（与 ≤768 档一致，修复分段条吸顶缝隙；顶部间距由
     .panel > .panel-inner:first-child 的 margin-top 补回） */
  .content-panels { padding: 0 8px 8px; }

  .panel-inner { padding: 16px 12px; border-radius: var(--radius-sm); }

  .panel-header h2 { font-size: 1.05rem; }

  .form-field input,
  .form-field textarea { font-size: 0.9rem; padding: 10px 12px; }

  .task-target-input { width: 60px; font-size: 0.8rem; }

  .task-index { min-width: 18px; font-size: 0.62rem; }

  .task-item-header { padding: 8px 10px; gap: 6px; }

  /* 积分任务领取卡片行2 缩进对齐（序号 18px + gap 6px） */
  .taskpool-claim-card .task-item-row-meta { padding-left: 24px; }

  .task-item-detail { padding: 0 8px 10px 30px; font-size: 0.68rem; }

  .task-item-btn { width: 30px; height: 30px; }
  .task-item-btn svg { width: 14px; height: 14px; }

  .task-status-badge { font-size: 0.62rem; padding: 2px 6px; }

  .progress-stats { gap: 10px; }
  .stat-value { font-size: 1rem; }
  .stat-item.current .stat-value { font-size: 1.15rem; }

  .log-viewport { max-height: 240px; font-size: 0.65rem; }

  /* 小屏手机：树节点仍保持可读（单栏化后无需再压缩宽度） */
  .results-tree-header { padding: 10px 12px 8px; }

  .results-tree { padding: 4px; }

  /* 2026-09-11 紧凑化：与 results.css 口径对齐 + 字号改绝对 px（见规范 #29） */
  .tree-node-header { padding: 7px 8px; font-size: 12px; }

  .tree-node-runid { font-size: 10px; max-width: 96px; }

  .detail-content { padding: 10px; }
  .detail-header h2 { font-size: 0.95rem; }

  .detail-images { display: flex; flex-direction: column; gap: 6px; }

  .detail-image-card { width: 100%; max-width: 100%; }

  .detail-image-card img {
    width: 100%;
    height: auto;
    max-height: none;
    object-fit: contain;
    background: var(--color-surface-sunken);
  }

  .detail-image-card .image-label { padding: 5px 6px; font-size: 0.65rem; }
  .detail-image-card .image-label .type-badge { font-size: 0.6rem; padding: 1px 4px; }

  .history-card-date { min-width: 60px; font-size: 0.68rem; }
  .history-card-thumb-grid { grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)); }

  .api-list-item { padding: 11px 12px; font-size: 0.85rem; }

  .view-toggle-btn { padding: 5px 8px; font-size: 0.68rem; }

  .modal-dialog { padding: 24px 16px 0; width: 94%; }

  .modal-actions { margin: 0 -16px; }

  #toast-container { left: 6px; right: 6px; top: 6px; }

  .toast { padding: 10px 14px; font-size: 14px; gap: 8px; }
  .toast-icon { width: 18px; height: 18px; }
}

/* ===== 横屏手机 (高度较小) ===== */
@media (max-height: 500px) and (orientation: landscape) {
  :root {
    /* 2026-09-11 顶栏全端隐藏：原 --topbar-height: 44px 覆盖已移除（同上） */
    --content-pad: 10px;
  }

  /* 横屏宽度足够，恢复左右分栏（覆盖 ≤768px 的单栏规则；同优先级靠后生效）。
     注：.mobile-detail-open 的隐藏规则优先级更高，窄屏横屏选中数据项后
     仍会切成整屏详情——这正是想要的交互。 */
  .results-layout {
    display: flex;
    flex-direction: row;
    height: calc(100dvh - var(--topbar-height) - var(--content-pad) * 2);
    max-height: calc(100dvh - var(--topbar-height) - var(--content-pad) * 2);
  }

  .results-tree-panel {
    display: flex;
    width: 28%;
    min-width: 140px;
    max-width: 200px;
    max-height: none;
    border: 1px solid var(--color-border);
    border-right: none;
    border-radius: var(--radius-sm) 0 0 var(--radius-sm);
  }

  /* 横屏下树面板宽度锁定 28%（覆盖 CSS 变量），拖拽无效果——隐藏把手防误导 */
  .col-resizer { display: none; }

  .results-detail-panel {
    display: flex;
    flex: 1;
    min-width: 0;
    min-height: 0;
    border-left: none;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  }

  .log-viewport { max-height: 160px; }
  .panel-inner { padding: 14px 16px; }
}
