/* ══════════════════════════════════════════════════════════════
   /tools 工具清单页专属样式（2026-11-09 工具清单页优化）
   只作用于本页，不改动全局 style.css / eco-mobile.css / portal-mobile.css
   ══════════════════════════════════════════════════════════════ */

/* ---- 顶部：搜索 + 可用端筛选 ---- */
body.eco-portal .tools-bar{
  display:flex;flex-wrap:wrap;align-items:center;gap:10px;margin-bottom:14px;
}
.tb-search{
  position:relative;display:flex;align-items:center;gap:10px;
  flex:1 1 300px;min-width:0;min-height:46px;padding:0 14px;
  border:1px solid var(--border);border-radius:12px;background:rgba(0,0,0,.28);
  transition:border-color .2s,background .2s;
}
.tb-search:focus-within{border-color:var(--border-hi);background:rgba(0,0,0,.38)}
.tb-search .ic{width:16px;height:16px;flex:0 0 auto;color:var(--gold-hi)}
.tb-search input{
  flex:1;min-width:0;min-height:44px;background:none;border:none;outline:none;
  color:var(--text);font-size:14px;font-family:inherit;
}
.tb-search input::placeholder{color:var(--muted)}
.tb-search input::-webkit-search-cancel-button{cursor:pointer}
.tb-count{font-size:12px;color:var(--muted);white-space:nowrap}
.tb-count b{color:var(--gold-hi);font-size:13.5px}

.tb-filters{display:flex;flex-wrap:wrap;gap:8px}
.tf-chip{
  min-height:42px;padding:0 15px;border-radius:999px;cursor:pointer;
  border:1px solid var(--border);background:rgba(255,255,255,.02);color:var(--muted);
  font-size:13px;font-family:inherit;transition:all .2s;
}
.tf-chip:hover{color:var(--gold-hi);border-color:var(--border-hi);background:var(--card-hi)}
.tf-chip.is-on{color:#2a1035;background:var(--gold-grad);border-color:transparent;font-weight:700}
.tf-chip:focus-visible{outline:2px solid var(--gold-hi);outline-offset:2px}

body.eco-portal .tools-stats{display:flex;flex-wrap:wrap;gap:8px;margin:0 0 14px}
body.eco-portal .tools-stats .tl-chip{padding:5px 13px;font-size:12.5px}

/* ---- 排序说明：折叠成一行，默认收起（原为 400px 高的竖排文字块） ---- */
body.eco-portal .sort-help{
  margin:0 0 22px;padding:0 14px;border:1px dashed var(--border);border-radius:10px;
  background:rgba(255,255,255,.02);
}
.sort-help>summary{
  display:flex;align-items:center;gap:8px;min-height:44px;cursor:pointer;
  list-style:none;font-size:13px;color:var(--muted);
}
.sort-help>summary::-webkit-details-marker{display:none}
.sort-help>summary::before{
  content:"▸";color:var(--gold);font-size:11px;line-height:1;transition:transform .2s;flex:0 0 auto;
}
.sort-help[open]>summary::before{transform:rotate(90deg)}
.sort-help>summary .ic{width:15px;height:15px;flex:0 0 auto;color:var(--gold-hi)}
.sort-help>summary .sh-title{flex:1 1 auto;min-width:0}
.sort-help>summary b{color:var(--text)}
.sort-help .sh-body{padding:0 0 13px;font-size:12.5px;line-height:1.9;color:var(--muted)}
.sort-help .sh-body b{color:var(--text)}
.sort-help .sh-body a{color:var(--gold-hi);text-decoration:underline}

/* ---- 卡片正面：关键字段一目可见 ---- */
body.eco-portal .tool-facts{
  display:flex;flex-wrap:wrap;gap:6px 12px;margin:-2px 0 10px;
  font-size:11.5px;line-height:1.7;color:var(--muted);
}
.tool-facts>span{display:inline-flex;align-items:center;gap:4px;white-space:nowrap}
.tool-facts .ic{width:13px;height:13px;flex:0 0 auto;opacity:.85}

/* 可用端徽章 */
.tool-ends{display:flex;flex-wrap:wrap;gap:6px;margin:0 0 12px}
.end{
  font-size:11px;line-height:1.6;padding:2px 9px;border-radius:999px;
  border:1px solid var(--border);color:var(--muted);background:rgba(0,0,0,.18);
}
.end.on{color:#8ef0c4;border-color:rgba(110,231,183,.4);background:rgba(110,231,183,.10)}

/* 详情里的作者与联系方式（站点规范要求可见） */
.pmore-author{
  display:flex;flex-wrap:wrap;gap:4px 16px;margin-top:2px;padding-top:10px;
  border-top:1px dashed var(--border);font-size:12px;color:var(--muted);
}

/* 无结果空状态 */
.tool-empty{
  border:1px dashed var(--border);border-radius:var(--radius);
  padding:34px 22px;text-align:center;color:var(--muted);font-size:13.5px;line-height:1.9;
  background:rgba(255,255,255,.02);
}
.tool-empty b{color:var(--text)}
.tool-empty .btn{margin-top:14px}

/* 隐藏卡片/列表项用 hidden 属性，避免内联 style 触发 CSP */
body.eco-portal .tool-card[hidden],
body.eco-portal .pcard[hidden],
body.eco-portal .tn-list li[hidden]{display:none!important}

/* ---- 窄屏：悬浮钮改为页内按钮，不再压住内容 ---- */
@media (max-width:820px){
  /* 英文名只是装饰，窄屏去掉以节省一行高度 */
  body.eco-portal .tool-en{display:none}
  body.eco-portal .tool-nav-toggle{
    position:static!important;transform:none!important;
    width:auto!important;height:44px!important;min-height:44px!important;
    padding:0 15px!important;margin:0 0 12px!important;
    display:inline-flex!important;align-items:center!important;gap:8px!important;
    border:1px solid var(--border)!important;border-radius:12px!important;
    background:rgba(0,0,0,.28)!important;box-shadow:none!important;
    writing-mode:horizontal-tb!important;font-size:13px!important;
  }
  body.eco-portal .tool-nav-toggle .tnt-txt{display:inline!important;letter-spacing:1px!important}
  body.eco-portal .tool-nav-toggle .tnt-ic{font-size:15px!important}
  body.eco-portal .tb-search{flex:1 1 100%}
  body.eco-portal .tf-chip{min-height:40px;padding:0 13px;font-size:12.5px}
}

/* ---- 320px 级极旧小屏：标题不裁切、控件不挤压 ---- */
@media (max-width:420px){
  body.eco-portal .tools-hero{padding:18px 16px!important;border-radius:18px!important}
  body.eco-portal .page-head h1,
  body.eco-portal .tools-hero h1{
    font-size:22px!important;line-height:1.35!important;letter-spacing:0!important;
  }
  body.eco-portal .page-head h1 .ic{width:22px;height:22px}
  body.eco-portal .page-head p{font-size:15px!important;line-height:1.8!important;margin-top:10px!important}
  body.eco-portal .tools-stats{gap:6px}
  body.eco-portal .tools-stats .tl-chip{padding:4px 10px;font-size:12px}
  body.eco-portal .sort-help{padding:0 11px}
  .sort-help>summary{font-size:12.5px;gap:6px}
  /* 第三批：这条原本写死 padding:16px!important，把定稿 18/16/16 盖掉了，
     320 下的卡片和其余四档内距不一致；改回定稿值，只留 2px 上内距差异 */
  body.eco-portal .tool-card{padding:18px 16px 16px!important}
  body.eco-portal .pbtn{font-size:13px!important;padding:10px 4px!important}
  .tb-filters{gap:6px}
  body.eco-portal .tf-chip{min-height:40px;padding:0 11px;font-size:12px}
  /* 320 级：统计行收紧成一行，筛选单行横滑，给卡片让出首屏空间 */
  body.eco-portal .tools-stats{gap:6px;flex-wrap:nowrap;overflow-x:auto;margin-bottom:10px}
  body.eco-portal .tools-stats .tl-chip{flex:0 0 auto;padding:4px 9px;font-size:11.5px}
  body.eco-portal .tools-stats .btn{flex:0 0 auto;min-height:32px;padding:4px 9px;font-size:11.5px;border-style:dashed;color:var(--muted)}
  body.eco-portal .tb-filters{flex-wrap:nowrap;overflow-x:auto;padding-bottom:2px;-webkit-overflow-scrolling:touch}
  body.eco-portal .tb-filters::-webkit-scrollbar{display:none}
  body.eco-portal .tf-chip{flex:0 0 auto}
  body.eco-portal .tool-nav-toggle{margin-bottom:8px!important;height:40px!important;min-height:40px!important}
}

/* ══════════════════════════════════════════════════════════════
   页面顶部横幅：与工具清单页同一套视觉语言（products / wishes 等页共用）
   只影响引用了本文件的页面，不改变 tools-hero（它有自己的横幅图）
   ══════════════════════════════════════════════════════════════ */
body.eco-portal .page-head:not(.tools-hero){
  position:relative;isolation:isolate;border-radius:24px;overflow:hidden;
  padding:34px 34px 30px;margin-bottom:26px;
  border:1px solid rgba(251,191,36,.14);
  background:linear-gradient(135deg,rgba(56,34,80,.92) 0%,rgba(26,16,37,.88) 62%,rgba(38,22,56,.9) 100%);
}
body.eco-portal .page-head:not(.tools-hero)::after{
  content:"";position:absolute;inset:0;z-index:-1;pointer-events:none;
  background:radial-gradient(115% 130% at 94% -12%,rgba(244,114,182,.18),transparent 58%),
             radial-gradient(80% 110% at 4% 108%,rgba(168,139,250,.16),transparent 62%);
}
body.eco-portal .page-head:not(.tools-hero) h1{
  font-size:34px;line-height:1.25;letter-spacing:.5px;
}
body.eco-portal .page-head:not(.tools-hero) p{max-width:74ch}

@media (max-width:820px){
  body.eco-portal .page-head:not(.tools-hero){padding:24px 20px 22px;border-radius:20px;margin-bottom:18px}
  body.eco-portal .page-head:not(.tools-hero) h1{font-size:24px!important;line-height:1.32!important}
  body.eco-portal .page-head:not(.tools-hero) p{font-size:15px!important;line-height:1.85!important;margin-top:9px!important}
}
@media (max-width:420px){
  body.eco-portal .page-head:not(.tools-hero){padding:18px 16px;border-radius:18px}
  body.eco-portal .page-head:not(.tools-hero) h1{font-size:22px!important}
}

/* ---- 产品速览（/products 顶部图标条）：宽屏默认展开，手机默认收起 ---- */
body.eco-portal .p-rail-wrap .p-rail-head{list-style:none;cursor:pointer;align-items:center}
body.eco-portal .p-rail-wrap .p-rail-head::-webkit-details-marker{display:none}
body.eco-portal .p-rail-wrap .p-rail-head::after{
  content:"▾";margin-left:8px;color:var(--gold);font-size:12px;line-height:1;transition:transform .2s;
}
body.eco-portal .p-rail-wrap[open] .p-rail-head::after{transform:rotate(180deg)}
body.eco-portal .p-rail-wrap .p-rail-head:focus-visible{outline:2px solid var(--gold-hi);outline-offset:3px}

@media (max-width:640px){
  body.eco-portal .p-rail-wrap{padding:10px 0 8px;margin-bottom:16px}
  body.eco-portal .p-rail-head{padding:0 12px 6px}
  body.eco-portal .prh-hint{display:none}
  body.eco-portal .p-rail{padding:4px 10px 8px;gap:6px}
  body.eco-portal .rail-item{padding:8px 6px 7px;min-height:0;gap:5px}
  body.eco-portal .rail-ic{width:26px;height:26px}
  body.eco-portal .rail-st{display:none}
  body.eco-portal .rail-name{font-size:11px;line-height:1.3;max-width:52px}
}

/* ---- 法务页（联系我们 / 隐私政策 / 用户协议 / 关于）表格：320 下整表横滑，不再挤成竖排 ---- */
@media (max-width:640px){
  body.eco-portal .legal-body table{
    display:block;width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch;
    white-space:nowrap;font-size:12.5px;
  }
  body.eco-portal .legal-body th,
  body.eco-portal .legal-body td{padding:8px 10px}
  body.eco-portal .legal-meta{margin:-8px 0 16px;gap:6px}
  body.eco-portal .legal-meta span{font-size:11.5px;padding:4px 10px}
}

/* ---------- 2026-11-10 p3：许愿墙编辑态内联样式改类（CSP 收敛） ---------- */
.wi-ta{width:100%;box-sizing:border-box;background:rgba(0,0,0,.3);border:1px solid var(--border);
  border-radius:10px;color:var(--text);font-family:inherit;font-size:14px;line-height:1.7;padding:9px 11px;resize:vertical}
.wi-ta:focus{outline:none;border-color:var(--border-hi)}
.wi-taops{margin-top:6px;display:flex;gap:8px;flex-wrap:wrap}

/* 2026-11-11 W1：工具清单顶部「去工作台」按钮补到 44px 触控高度（320 下仍可横向滚动） */
body.eco-portal .tools-stats .btn{min-height:44px;padding-top:0;padding-bottom:0;display:inline-flex;align-items:center}


/* ---- 工作台卡片：BP / 讲解 状态角标（文字 + 符号，不只靠颜色） ---- */
.tool-assets{display:flex;flex-wrap:wrap;gap:6px;margin:8px 0 2px}
.tool-asset{
  display:inline-flex;align-items:center;gap:5px;height:22px;padding:0 8px;
  border-radius:999px;border:1px solid var(--border);
  font-size:11px;line-height:1;font-weight:600;letter-spacing:.02em;
  background:rgba(255,255,255,.02);color:var(--muted);
}
.tool-asset i{font-style:normal;font-size:10px;line-height:1;display:inline-grid;place-items:center}
.tool-asset b{font-weight:600}
.tool-asset.on{color:var(--gold-hi);border-color:var(--border-hi);background:rgba(233,196,124,.08)}
.tool-asset.off{color:var(--muted);border-color:var(--border);background:transparent}
@media (max-width:520px){.tool-asset{font-size:10.5px;height:21px;padding:0 7px}}


/* 卡片补充标注：T25「与 T20/T21 同源」、T42「暂无讲解」+ 直开入口 */
.tool-chip-line{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin:0 0 10px}
.tool-chip-line .p-status{font-size:11px;height:20px;line-height:1;padding:0 8px}
.tool-chip-link{display:inline-flex;align-items:center;gap:3px;font-size:12px;color:var(--gold-hi);text-decoration:none;border-bottom:1px dashed var(--border-hi);padding-bottom:1px}
.tool-chip-link:hover{color:#fff;border-bottom-color:var(--gold-hi)}
.tool-chip-link .ic{width:12px;height:12px}
