/* ============================================================
   晓之俱乐部 · AI 应用（apps）视觉层  apps.css
   ------------------------------------------------------------------
   版式严格对齐参考站 aitudou.cn 的 AI 应用（ToolsView / ToolDetailView）：
     列表页：品牌横幅 → 精选 Hero 大卡 → 双排筛选栏（分类 chips / 搜索 + 网格·列表切换 / 类型 chips）
            → 三列卡片网格 / 列表视图 → 空状态
     详情页：面包屑 → hero（左文案 + 右封面）→ 成果图集 → 应用说明 → 访问信息面板 → 获取弹层
     6 个应用共用同一模板与同一套类，界面完全一致。
   配色沿用傻牛「奶油 + 棕褐 + 暖橙」令牌（theme.css / pet.css）。
   ============================================================ */

/* 🔴 2026-10-07 inline SVG 尺寸守卫（apps 页巨大 spinner 修复）
 * 根因：JS 里的 ICON.* 都是 <svg viewBox="0 0 24 24">，没有 width/height 属性。
 *  inline SVG 无显式尺寸时按容器拉伸 → .xa-feat-eyebrow 里的 spark 图标实测涨到
 *  474x474px，视觉上像一个占满半屏的 loading 转圈。
 *  给「无 width 属性」的 inline SVG 一个默认 1em 尺寸；需要更大/更小的组件
 *  自行设 width/height 覆盖即可（选择器优先级更高）。 */
svg:not([width]):not([class*="logo"]) {
  width: 1em; height: 1em;
  flex: 0 0 auto;
  display: inline-block; vertical-align: -0.14em;
}

/* ---------- 品牌横幅（对齐 BrandBanner variant=tools） ---------- */
.xa-banner {
  position: relative; overflow: hidden;
  border: 1px solid var(--hair, #e6dcc8);
  background: linear-gradient(135deg, color-mix(in srgb, var(--amber, #f3a94b) 14%, var(--paper, #fff)) 0%, var(--paper, #fff) 62%);
  border-radius: 10px;
  padding: 26px 28px;
  margin: 4px 0 22px;
}
.xa-banner .xa-eyebrow {
  font-family: var(--mono, ui-monospace, monospace); font-size: 10.5px; letter-spacing: .2em;
  color: var(--accent, #e2861f); font-weight: 700; margin-bottom: 8px;
}
.xa-banner h1 { font-size: clamp(28px, 4.4vw, 44px); line-height: 1.04; margin: 0 0 8px; color: var(--ink, #2c2419); }
.xa-banner h1 em { font-style: normal; color: var(--accent, #e2861f); }
.xa-banner p { margin: 0; color: var(--muted, #6b6257); font-size: 14.5px; line-height: 1.7; max-width: 640px; }

/* ---------- 精选 Hero 大卡 ---------- */
.xa-featured {
  display: grid; grid-template-columns: 1fr; gap: 0;
  border: 1px solid var(--hair, #e6dcc8); border-radius: 12px; overflow: hidden;
  background: var(--paper, #fff); margin-bottom: 22px;
}
@media (min-width: 900px) { .xa-featured { grid-template-columns: 1.05fr 1fr; } }
.xa-feat-media { position: relative; min-height: 240px; background: color-mix(in srgb, var(--ink, #2c2419) 8%, var(--paper, #fff)); }
.xa-feat-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.xa-feat-badge {
  position: absolute; top: 16px; left: 16px;
  padding: 5px 12px; border-radius: 30px; font-size: 11px; font-weight: 800;
  background: rgba(20, 15, 8, .62); color: #fff; letter-spacing: .04em;
}
.xa-feat-copy { display: flex; flex-direction: column; justify-content: center; padding: 24px 26px; gap: 12px; }
.xa-feat-eyebrow { display: flex; align-items: center; gap: 7px; color: var(--accent, #e2861f); font-size: 12.5px; font-weight: 800; letter-spacing: .02em; }
.xa-feat-title { font-size: clamp(24px, 3.2vw, 32px); line-height: 1.1; margin: 0; color: var(--ink, #2c2419); }
.xa-feat-desc { margin: 0; color: var(--muted, #6b6257); font-size: 14px; line-height: 1.75; }
.xa-feat-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 2px; }

/* ---------- 价格 ---------- */
.xa-price { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.xa-price .xa-pl { font-size: 12.5px; color: var(--mute-2, #9a9083); }
.xa-price .xa-pl b { font-size: 15px; color: var(--muted, #6b6257); text-decoration: line-through; text-decoration-thickness: 1px; font-weight: 700; }
.xa-price .xa-pm { font-size: 12.5px; color: var(--accent, #e2861f); font-weight: 800; }
.xa-price .xa-pm b { font-size: 22px; letter-spacing: -.01em; }
.xa-price .xa-pfree { font-size: 13px; font-weight: 800; color: #178a4c; }

/* ---------- 按钮 ---------- */
.xa-btn {
  appearance: none; display: inline-flex; align-items: center; gap: 7px; justify-content: center;
  height: 40px; padding: 0 16px; border-radius: 7px; cursor: pointer; text-decoration: none;
  border: 1px solid var(--hair-2, #d8ccb4); background: var(--paper, #fff); color: var(--ink, #2c2419);
  font-size: 13.5px; font-weight: 700; transition: .16s ease;
}
.xa-btn:hover { border-color: var(--accent, #e2861f); color: var(--accent, #e2861f); }
.xa-btn.xa-btn-primary { background: var(--accent, #e2861f); border-color: var(--accent, #e2861f); color: #fff; }
.xa-btn.xa-btn-primary:hover { filter: brightness(1.06); color: #fff; }
.xa-btn svg { width: 15px; height: 15px; }

/* ---------- 筛选栏：双排（分类 chips / 搜索 + 视图切换 / 类型 chips） ---------- */
.xa-bar { display: flex; flex-direction: column; gap: 12px; margin: 0 0 20px; }
.xa-bar-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.xa-bar-label { font-size: 12.5px; font-weight: 800; color: var(--mute-2, #9a9083); white-space: nowrap; margin-right: 2px; }
.xa-chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; }
.xa-chips::-webkit-scrollbar { display: none; }
.xa-chip {
  appearance: none; border: 1px solid var(--hair, #e6dcc8); background: var(--paper, #fff); color: var(--ink-2, #4a4034);
  height: 32px; padding: 0 14px; border-radius: 30px; font-size: 12.5px; font-weight: 700; cursor: pointer; white-space: nowrap; transition: .15s;
}
.xa-chip:hover { border-color: var(--accent, #e2861f); color: var(--accent, #e2861f); }
.xa-chip.on { background: var(--accent, #e2861f); border-color: var(--accent, #e2861f); color: #fff; }

.xa-tools { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.xa-search { position: relative; }
.xa-search svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--mute-2, #9a9083); }
.xa-search input {
  width: 240px; max-width: 62vw; height: 38px; padding: 0 12px 0 36px; border-radius: 7px;
  border: 1px solid var(--hair, #e6dcc8); background: var(--paper, #fff); color: var(--ink, #2c2419);
  font-size: 13px; outline: none; transition: .15s;
}
.xa-search input:focus { border-color: var(--accent, #e2861f); }
.xa-vtoggle { display: flex; gap: 3px; border: 1px solid var(--hair, #e6dcc8); border-radius: 9px; padding: 3px; background: color-mix(in srgb, var(--paper, #fff) 88%, var(--ink, #2c2419)); }
.xa-vbtn { appearance: none; border: 0; background: none; width: 32px; height: 32px; border-radius: 7px; cursor: pointer; color: var(--mute-2, #9a9083); display: inline-flex; align-items: center; justify-content: center; }
.xa-vbtn svg { width: 18px; height: 18px; }
.xa-vbtn.on { background: color-mix(in srgb, var(--accent, #e2861f) 14%, transparent); color: var(--accent, #e2861f); }

/* ---------- 卡片网格 / 列表 ---------- */
/* 🔴 2026-10-07 对齐参考站卡片密度：1920 屏从 3 列（每列 483px 过大）→ 4 列。
 *   参考站 aitudou.cn 卡片约 310px 宽，1920 屏一屏 8~9 张。 */
.xa-grid { display: grid; grid-template-columns: 1fr; gap: 20px; }
@media (min-width: 620px) { .xa-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .xa-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1500px) { .xa-grid { grid-template-columns: repeat(4, 1fr); gap: 18px; } }
.xa-list { display: flex; flex-direction: column; gap: 14px; }

.xa-card {
  border: 1px solid var(--hair, #e6dcc8); border-radius: 10px; overflow: hidden; background: var(--paper, #fff);
  display: flex; flex-direction: column; transition: .18s ease; height: 100%;
}
.xa-card:hover { border-color: var(--accent, #e2861f); box-shadow: 0 6px 20px -14px color-mix(in srgb, var(--ink, #2c2419) 60%, transparent); transform: translateY(-2px); }
.xa-cover { position: relative; aspect-ratio: 16 / 9; background: color-mix(in srgb, var(--ink, #2c2419) 8%, var(--paper, #fff)); overflow: hidden; }
.xa-cover img { width: 100%; height: 100%; object-fit: cover; display: block; transition: .3s ease; }
.xa-card:hover .xa-cover img { transform: scale(1.03); }
.xa-cover .xa-type { position: absolute; top: 12px; left: 12px; padding: 4px 10px; border-radius: 7px; font-size: 11px; font-weight: 800; background: rgba(20, 15, 8, .6); color: #fff; }
.xa-cover .xa-vip { position: absolute; top: 12px; right: 12px; padding: 4px 9px; border-radius: 30px; font-size: 10.5px; font-weight: 800; background: color-mix(in srgb, var(--accent, #e2861f) 92%, #000); color: #fff; display: inline-flex; align-items: center; gap: 4px; }
.xa-cover .xa-vip svg { width: 11px; height: 11px; }
.xa-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 9px; flex: 1; }
.xa-meta { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.xa-cat { font-size: 11.5px; font-weight: 800; color: var(--accent, #e2861f); }
.xa-tag { padding: 2px 9px; border-radius: 30px; background: color-mix(in srgb, var(--ink, #2c2419) 6%, transparent); color: var(--mute-2, #9a9083); font-size: 11px; font-weight: 700; }
.xa-title { font-size: 16.5px; font-weight: 800; margin: 0; color: var(--ink, #2c2419); line-height: 1.3; }
.xa-desc { margin: 0; font-size: 12.8px; line-height: 1.65; color: var(--muted, #6b6257); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.xa-card-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-top: 6px; }
.xa-cta { display: inline-flex; align-items: center; gap: 4px; font-size: 12.8px; font-weight: 800; color: var(--accent, #e2861f); text-decoration: none; transition: gap .15s; }
.xa-cta:hover { gap: 9px; }
.xa-cta svg { width: 14px; height: 14px; }

/* 列表视图 */
.xa-row { display: flex; gap: 14px; border: 1px solid var(--hair, #e6dcc8); border-radius: 10px; overflow: hidden; background: var(--paper, #fff); padding: 12px; transition: .16s; }
.xa-row:hover { border-color: var(--accent, #e2861f); }
.xa-row-cover { width: 132px; aspect-ratio: 16 / 10; border-radius: 7px; overflow: hidden; flex-shrink: 0; background: color-mix(in srgb, var(--ink, #2c2419) 8%, var(--paper, #fff)); }
.xa-row-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.xa-row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 7px; }

.xa-empty { text-align: center; padding: 56px 20px; color: var(--mute-2, #9a9083); }
.xa-empty b { display: block; font-size: 16px; color: var(--ink, #2c2419); margin-bottom: 6px; }

/* ---------- 详情页 ---------- */
.xa-detail { width: var(--content-w, min(91.3%, 1280px)); margin-inline: auto; }
.xa-crumb { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--mute-2, #9a9083); padding: 4px 0 20px; }
.xa-crumb a { color: var(--muted, #6b6257); text-decoration: none; }
.xa-crumb a:hover { color: var(--accent, #e2861f); }
.xa-dhero { display: grid; grid-template-columns: 1fr; gap: 26px; align-items: start; }
@media (min-width: 900px) { .xa-dhero { grid-template-columns: 1.1fr 1fr; } }
.xa-dmeta { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.xa-dtype { font-size: 12.5px; font-weight: 800; color: var(--accent, #e2861f); border: 1px solid color-mix(in srgb, var(--accent, #e2861f) 40%, transparent); border-radius: 30px; padding: 3px 12px; }
.xa-dvip { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 800; color: #fff; background: var(--accent, #e2861f); border-radius: 30px; padding: 3px 11px; }
.xa-dvip svg { width: 12px; height: 12px; }
.xa-dtitle { font-size: clamp(28px, 4.6vw, 42px); line-height: 1.08; margin: 0 0 12px; color: var(--ink, #2c2419); }
.xa-ddesc { margin: 0 0 16px; color: var(--muted, #6b6257); font-size: 15px; line-height: 1.8; }
.xa-dtags { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; }
.xa-dtags span { padding: 4px 12px; border-radius: 30px; background: color-mix(in srgb, var(--ink, #2c2419) 6%, transparent); color: var(--ink-2, #4a4034); font-size: 12px; font-weight: 700; }
.xa-daction { display: flex; flex-direction: column; gap: 10px; }
.xa-dnote { font-size: 12.5px; color: var(--mute-2, #9a9083); line-height: 1.6; }
.xa-dmedia { border: 1px solid var(--hair, #e6dcc8); border-radius: 12px; overflow: hidden; background: var(--paper, #fff); }
.xa-dmedia img { width: 100%; display: block; }

.xa-panel { border: 1px solid var(--hair, #e6dcc8); border-radius: 12px; background: var(--paper, #fff); padding: 22px 24px; margin-top: 26px; }
.xa-panel h2 { font-size: 19px; margin: 0 0 14px; color: var(--ink, #2c2419); }
.xa-panel .xa-plist { margin: 0; padding-left: 20px; color: var(--muted, #6b6257); font-size: 14px; line-height: 1.9; }
.xa-panel .xa-plist li { margin-bottom: 4px; }
.xa-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.xa-gitem { border: 1px solid var(--hair, #e6dcc8); border-radius: 8px; overflow: hidden; cursor: zoom-in; background: color-mix(in srgb, var(--ink, #2c2419) 6%, var(--paper, #fff)); display: flex; flex-direction: column; }
.xa-gitem img { width: 100%; display: block; aspect-ratio: 16 / 10; object-fit: cover; object-position: center top; background: color-mix(in srgb, var(--ink, #2c2419) 8%, var(--paper, #fff)); }
.xa-gcap { display: block; padding: 7px 10px; font-size: 12px; line-height: 1.5; color: var(--muted, #6b6257); border-top: 1px solid var(--hair, #e6dcc8); background: var(--paper, #fff); }
.xa-meta-table { display: flex; flex-direction: column; }
.xa-meta-row { display: flex; justify-content: space-between; gap: 16px; padding: 11px 0; border-bottom: 1px dashed var(--hair, #e6dcc8); font-size: 13.5px; }
.xa-meta-row:last-child { border-bottom: 0; }
.xa-meta-row .k { color: var(--mute-2, #9a9083); flex-shrink: 0; }
.xa-meta-row .v { color: var(--ink, #2c2419); font-weight: 700; text-align: right; }
.xa-meta-row .v.pm { color: var(--accent, #e2861f); }

/* ---------- 获取弹层（个人二维码） ---------- */
.xa-modal-backdrop { position: fixed; inset: 0; background: rgba(24, 18, 10, .5); z-index: 90; opacity: 0; pointer-events: none; transition: .2s; }
.xa-modal-backdrop.on { opacity: 1; pointer-events: auto; }
.xa-modal {
  position: fixed; left: 50%; top: 50%; transform: translate(-50%, -46%); z-index: 91;
  width: min(92vw, 420px); background: var(--paper, #fff); border: 1px solid var(--hair, #e6dcc8);
  border-radius: 14px; padding: 24px; opacity: 0; pointer-events: none; transition: .2s;
  box-shadow: 0 30px 70px -30px rgba(20, 14, 6, .6);
}
.xa-modal.on { opacity: 1; pointer-events: auto; transform: translate(-50%, -50%); }
.xa-modal .xa-modal-close { position: absolute; top: 12px; right: 12px; border: 0; background: none; font-size: 18px; cursor: pointer; color: var(--mute-2, #9a9083); line-height: 1; }
.xa-modal .xa-modal-head { text-align: center; margin-bottom: 16px; }
.xa-modal .xa-modal-eyebrow { font-family: var(--mono, monospace); font-size: 10.5px; letter-spacing: .2em; color: var(--accent, #e2861f); font-weight: 700; }
.xa-modal h3 { margin: 6px 0 6px; font-size: 19px; color: var(--ink, #2c2419); }
.xa-modal .xa-modal-sub { font-size: 12.8px; color: var(--muted, #6b6257); line-height: 1.65; }
.xa-qr { display: flex; justify-content: center; margin: 6px 0 14px; }
.xa-qr-box { width: 200px; height: 200px; border-radius: 10px; border: 1px solid var(--hair, #e6dcc8); background: #fff; display: flex; align-items: center; justify-content: center; padding: 8px; box-sizing: border-box; }
.xa-qr-box img { width: 100%; height: 100%; display: block; image-rendering: pixelated; }
.xa-qr-ph { font-size: 12px; color: var(--mute-2, #9a9083); text-align: center; line-height: 1.5; word-break: break-all; padding: 0 6px; }
.xa-modal-price { display: flex; justify-content: center; gap: 14px; align-items: baseline; padding: 12px; border-radius: 9px; background: color-mix(in srgb, var(--amber, #f3a94b) 12%, transparent); margin-bottom: 12px; }
.xa-modal-price .l { font-size: 13px; color: var(--muted, #6b6257); }
.xa-modal-price .l b { text-decoration: line-through; }
.xa-modal-price .m { font-size: 15px; font-weight: 800; color: var(--accent, #e2861f); }
.xa-modal-rows { display: flex; flex-direction: column; gap: 7px; margin-bottom: 10px; }
.xa-modal-rows .row { display: flex; justify-content: space-between; font-size: 12.5px; }
.xa-modal-rows .row .k { color: var(--mute-2, #9a9083); }
.xa-modal-rows .row .v { color: var(--ink, #2c2419); font-weight: 700; }
.xa-modal-foot { font-size: 12px; color: var(--mute-2, #9a9083); text-align: center; line-height: 1.6; }

@media (max-width: 620px) {
  .xa-banner { padding: 20px; }
  .xa-feat-copy { padding: 20px; }
  .xa-row-cover { width: 96px; }
}

/* ---------- 图片放大（Lightbox） ---------- */
.xa-lightbox {
  position: fixed; inset: 0; z-index: 95; background: rgba(18, 13, 6, .86);
  display: flex; align-items: center; justify-content: center; padding: 28px;
  opacity: 0; pointer-events: none; transition: .18s ease;
}
.xa-lightbox.on { opacity: 1; pointer-events: auto; }
.xa-lightbox .xa-lb-img {
  max-width: min(96vw, 1400px); max-height: 86vh; width: auto; height: auto;
  display: block; border-radius: 8px; box-shadow: 0 24px 70px -24px rgba(0,0,0,.8);
}
.xa-lightbox .xa-lb-close {
  position: absolute; top: 16px; right: 18px; width: 38px; height: 38px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,.28); background: rgba(255,255,255,.12); color: #fff;
  font-size: 17px; cursor: pointer; line-height: 1;
}
.xa-lightbox .xa-lb-cap {
  position: absolute; left: 0; right: 0; bottom: 18px; text-align: center;
  color: rgba(255,255,255,.82); font-size: 12.5px; letter-spacing: .02em;
}
.xa-ghint { margin: 10px 0 0; font-size: 12px; color: var(--mute-2, #9a9083); }
.xa-gitem { cursor: zoom-in; }
.xa-dmedia { cursor: zoom-in; }

/* ============ 价格与方案（分档） ============ */
.xa-plans{margin:26px 0 0;padding:22px;border:1px solid var(--hair);border-radius:12px;background:var(--bg2)}
.xa-plans-t{margin:0 0 6px;font-size:15px;font-weight:800;letter-spacing:.01em}
.xa-plans-intro{margin:0 0 16px;font-size:13px;line-height:1.7;color:var(--txt2)}
.xa-plans-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:14px}
.xa-plan{padding:16px;border:1px solid var(--hair);border-radius:10px;background:var(--bg1)}
.xa-plan-head{display:flex;align-items:baseline;justify-content:space-between;gap:10px;margin-bottom:4px}
.xa-plan-name{font-size:14px;font-weight:800}
.xa-plan-price{font-size:15px;font-weight:800;color:var(--acc);white-space:nowrap}
.xa-plan-target{margin-bottom:10px;font-size:12px;color:var(--txt3)}
.xa-plan-items{margin:0;padding-left:18px;font-size:12.5px;line-height:1.75;color:var(--txt2)}
.xa-plan-items li{margin:2px 0}
.xa-plans-note{margin:14px 0 0;padding-top:12px;border-top:1px dashed var(--hair);font-size:12px;line-height:1.7;color:var(--txt3)}
