/**
 * ASAIGC 主页模块样式（v2 · 品牌化重构）
 *
 * 全部基于 pc/css/ui.css :root 的 5551 设计令牌
 * 命名空间：.lsah-* (LightSNS ASAIGC Home)
 *
 * 三风格容器：
 *   .ls-asaigc-style-waterfall  方案 A 瀑布流
 *   .ls-asaigc-style-workspace  方案 B 工作台优先
 *   .ls-asaigc-style-curated    方案 C 策展分块
 *
 * 品牌动机：
 *   - 主色单蓝 var(--ls-primary)
 *   - 火花 motif（RemixIcon ri-sparkling-2-* + .lsah-spark 动效）
 *   - 边框/阴影/圆角全部走 token
 *   - hover 行为统一：translateY(-2px) + shadow-md
 */

/* ==================== 容器 ==================== */
.ls-asaigc-home {
    max-width: var(--ls-width, 1280px);
    margin: 0 auto;
    padding: 16px 12px 96px;
}

/* ==================== 通用动效 ==================== */
@keyframes lsah-spin   { to { transform: rotate(360deg); } }
@keyframes lsah-twinkle {
    0%, 100% { transform: rotate(0deg)   scale(1);    opacity: 1; }
    50%      { transform: rotate(180deg) scale(1.12); opacity: 0.85; }
}
@keyframes lsah-pulse  {
    0%, 100% { box-shadow: 0 0 0 0   rgba(var(--ls-primary-rgb), 0.45); }
    50%      { box-shadow: 0 0 0 14px rgba(var(--ls-primary-rgb), 0); }
}
@keyframes lsah-shimmer {
    0%   { background-position: -360px 0; }
    100% { background-position: 360px 0; }
}
@keyframes lsah-fade-in {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}

.lsah-spin { display: inline-block; animation: lsah-spin 0.8s linear infinite; }

/* 火花字符占位（inline 文本用） */
.lsah-spark {
    display: inline-block;
    color: var(--ls-primary);
}
.lsah-spark.is-spin { animation: lsah-twinkle 2s ease-in-out infinite; }

/* ==================== Banner 区 ==================== */
.lsah-banner {
    position: relative;
    background: var(--ls-card-bg);
    border: 1px solid var(--ls-border-light);
    border-radius: var(--ls-radius-xl);
    overflow: hidden;
    margin-bottom: 16px;
    min-height: 200px;
    box-shadow: var(--ls-shadow-xs);
}
.lsah-banner::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 14% 18%, rgba(var(--ls-primary-rgb), 0.10), transparent 35%),
        radial-gradient(circle at 92% 88%, rgba(139, 92, 246, 0.06), transparent 40%);
    pointer-events: none;
    z-index: 0;
}
.lsah-banner-slide {
    display: none;
    align-items: center;
    height: 200px;
    padding: 0 48px;
    position: relative;
    z-index: 1;
    animation: lsah-fade-in 0.4s ease;
}
.lsah-banner-slide.on { display: flex; }
/* 有跳转链接时整 slide 可点（#7） */
.lsah-banner-slide[data-link]:not([data-link=""]) { cursor: pointer; }

/* 四种主题统一蓝色系基调，主题色仅作微妙 accent */
.lsah-banner-slide.lsah-theme-blue   { background: linear-gradient(115deg, #eff6ff 0%, #f8fafc 55%, #ffffff 100%); }
.lsah-banner-slide.lsah-theme-amber  { background: linear-gradient(115deg, #fff7ed 0%, #f8fafc 55%, #ffffff 100%); }
.lsah-banner-slide.lsah-theme-purple { background: linear-gradient(115deg, #f5f3ff 0%, #f8fafc 55%, #ffffff 100%); }
.lsah-banner-slide.lsah-theme-green  { background: linear-gradient(115deg, #ecfdf5 0%, #f8fafc 55%, #ffffff 100%); }

.lsah-banner-content { flex: 1; max-width: 520px; z-index: 1; }
.lsah-banner-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    background: var(--ls-primary-light);
    color: var(--ls-primary);
    border-radius: var(--ls-radius-full);
    font-size: 11px;
    font-weight: 600;
    margin-bottom: 12px;
    letter-spacing: 0.3px;
}
.lsah-banner-badge::before {
    content: "✦";
    font-size: 10px;
}
.lsah-theme-amber  .lsah-banner-badge { background: #fff1d6; color: #b45309; }
.lsah-theme-purple .lsah-banner-badge { background: #ede9fe; color: #6d28d9; }
.lsah-theme-green  .lsah-banner-badge { background: #dcfce7; color: #047857; }

.lsah-banner-title {
    font-size: 24px;
    font-weight: 800;
    color: var(--ls-text);
    margin: 0 0 8px;
    line-height: 1.25;
    letter-spacing: -0.3px;
}
.lsah-banner-desc {
    font-size: 13px;
    color: var(--ls-text-secondary);
    margin: 0 0 16px;
    line-height: 1.6;
}
.lsah-banner-cta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    background: var(--ls-primary);
    color: #fff;
    border-radius: var(--ls-radius);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: var(--ls-transition);
    box-shadow: 0 2px 8px rgba(var(--ls-primary-rgb), 0.25);
}
.lsah-banner-cta:hover {
    background: var(--ls-primary-hover);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(var(--ls-primary-rgb), 0.35);
}
.lsah-banner-cta i { transition: transform 0.2s ease; }
.lsah-banner-cta:hover i { transform: translateX(2px); }

.lsah-banner-img {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 50%;
    background-size: cover;
    background-position: center;
    opacity: 0.95;
    mask-image: linear-gradient(to left, #000 60%, transparent 100%);
    -webkit-mask-image: linear-gradient(to left, #000 60%, transparent 100%);
}

.lsah-banner-ctrl {
    position: absolute;
    bottom: 14px;
    right: 18px;
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 2;
}
.lsah-banner-dots { display: flex; gap: 6px; }
.lsah-banner-dots span {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--ls-border);
    cursor: pointer;
    transition: var(--ls-transition);
}
.lsah-banner-dots span.on {
    width: 22px;
    border-radius: var(--ls-radius-full);
    background: var(--ls-primary);
}
.lsah-banner-arr {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--ls-card-bg);
    border: 1px solid var(--ls-border);
    color: var(--ls-text-muted);
    cursor: pointer;
    font-size: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: var(--ls-transition);
}
.lsah-banner-arr:hover {
    color: var(--ls-primary);
    border-color: var(--ls-primary);
    background: var(--ls-primary-light);
}

/* ==================== AI 工具区（Banner 下方） ==================== */
.lsah-tools {
    margin: 16px 0 12px;
}
.lsah-tools-head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    padding: 0 2px;
}
.lsah-tools-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    font-size: 17px;
    font-weight: 600;
    color: var(--ls-text);
}
.lsah-tools-title i { color: var(--ls-primary); }
.lsah-tools-sub {
    color: var(--ls-text-muted);
    font-size: 12px;
    background: var(--ls-primary-light);
    padding: 2px 10px;
    border-radius: var(--ls-radius-full);
}
.lsah-tools-ctrl {
    margin-left: auto;
    display: flex;
    gap: 6px;
}
.lsah-tools-arr {
    width: 32px;
    height: 32px;
    border: 1px solid var(--ls-border);
    background: var(--ls-card-bg);
    color: var(--ls-text-secondary);
    border-radius: 50%;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: var(--ls-transition);
}
.lsah-tools-arr:hover {
    color: var(--ls-primary);
    border-color: var(--ls-primary);
}
.lsah-tools-arr i { font-size: 18px; }
.lsah-tools-no-scroll .lsah-tools-ctrl { display: none; }
.lsah-tools-at-start .lsah-tools-arr[data-dir="-1"],
.lsah-tools-at-end   .lsah-tools-arr[data-dir="1"] {
    opacity: 0.4;
    pointer-events: none;
}

.lsah-tools-rail {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    padding: 4px 2px 12px;
    scrollbar-width: none;
}
.lsah-tools-rail::-webkit-scrollbar { display: none; }

.lsah-tool-card {
    position: relative;
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 240px;
    max-width: 280px;
    padding: 14px 16px;
    background: var(--ls-card-bg);
    border: 1px solid var(--ls-border);
    border-radius: var(--ls-radius-lg);
    cursor: pointer;
    text-decoration: none;
    color: var(--ls-text);
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.lsah-tool-card:hover {
    transform: translateY(-2px);
    border-color: var(--ls-primary);
    box-shadow: 0 6px 18px rgba(var(--ls-primary-rgb), 0.14);
}
.lsah-tool-icon {
    flex: 0 0 auto;
    width: 40px;
    height: 40px;
    border-radius: var(--ls-radius);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--ls-primary);
    background: var(--ls-primary-light);
    font-size: 22px;
}
.lsah-tool-icon i { line-height: 1; }
/* 封面图模式：替代 icon 块，左侧 80×80 缩略，仿图 2「快捷工具」效果 */
.lsah-tool-cover {
    flex: 0 0 auto;
    width: 80px;
    height: 80px;
    border-radius: var(--ls-radius);
    background-size: cover;
    background-position: center;
    background-color: var(--ls-bg-secondary, #f5f6f7);
}
.lsah-tool-has-cover { padding: 10px 14px 10px 10px; min-width: 280px; max-width: 320px; }
.lsah-tool-body { flex: 1; min-width: 0; }
.lsah-tool-name {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.lsah-tool-desc {
    margin-top: 4px;
    font-size: 12px;
    color: var(--ls-text-muted);
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
}
.lsah-tool-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    padding: 2px 8px;
    font-size: 11px;
    font-weight: 600;
    border-radius: var(--ls-radius-full);
    background: var(--ls-danger, #ef4444);
    color: #fff;
    line-height: 1.4;
    letter-spacing: 0.4px;
}

/* —— "完整"风格：主题色背景 + 更强视觉 —— */
.lsah-tools-full .lsah-tool-card {
    background: linear-gradient(135deg, var(--lsah-tool-bg-from), var(--lsah-tool-bg-to));
    border-color: transparent;
}
.lsah-tools-full .lsah-tool-card:hover {
    box-shadow: 0 8px 22px rgba(0,0,0,0.08);
    border-color: transparent;
}
.lsah-tools-full .lsah-tool-icon {
    background: rgba(255,255,255,0.75);
}
.lsah-tools-full .lsah-tool-desc { color: var(--ls-text-secondary); }

/* 四个配色主题（与 banner 主题同源） */
.lsah-tool-card.lsah-theme-blue {
    --lsah-tool-bg-from: #eaf2ff;
    --lsah-tool-bg-to:   #dbe7ff;
}
.lsah-tool-card.lsah-theme-amber {
    --lsah-tool-bg-from: #fff5e0;
    --lsah-tool-bg-to:   #ffe6b8;
}
.lsah-tool-card.lsah-theme-purple {
    --lsah-tool-bg-from: #f1ebff;
    --lsah-tool-bg-to:   #e0d4ff;
}
.lsah-tool-card.lsah-theme-green {
    --lsah-tool-bg-from: #e8f7ee;
    --lsah-tool-bg-to:   #d2efdf;
}

/* —— "简洁"风格：透明背景、单线边框 —— */
.lsah-tools-compact .lsah-tool-card {
    background: var(--ls-card-bg);
}
.lsah-tools-compact .lsah-tool-card .lsah-tool-icon {
    background: var(--ls-primary-light);
    color: var(--ls-primary);
}

/* 响应式：窄屏卡片宽度收紧，箭头缩小 */
@media (max-width: 768px) {
    .lsah-tools-head { gap: 8px; }
    .lsah-tools-title { font-size: 15px; }
    .lsah-tools-sub { display: none; }
    .lsah-tool-card { min-width: 200px; max-width: 220px; padding: 10px 12px; gap: 10px; }
    .lsah-tool-has-cover { min-width: 240px; max-width: 260px; }
    .lsah-tool-cover { width: 64px; height: 64px; }
    .lsah-tool-icon { width: 36px; height: 36px; font-size: 19px; }
    .lsah-tool-name { font-size: 13px; }
    .lsah-tool-desc { font-size: 11px; }
}

/* ==================== 分类滚动条（向下滚动时吸顶） ==================== */
.lsah-cats {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    margin: 0 -12px 8px;
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    scrollbar-width: none;
    position: sticky;
    top: var(--ls-header-height, 64px);
    z-index: 20;
    background: linear-gradient(180deg, var(--ls-bg, #f8fafc) 0%, var(--ls-bg, #f8fafc) 70%, rgba(248, 250, 252, 0.92) 100%);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}
.lsah-cats::-webkit-scrollbar { display: none; }
.lsah-cat {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 36px;
    padding: 0 16px;
    line-height: 1;
    border-radius: var(--ls-radius-full);
    cursor: pointer;
    font-size: 13px;
    color: var(--ls-text-secondary);
    background: var(--ls-card-bg);
    border: 1px solid var(--ls-border-light);
    transition: var(--ls-transition);
    user-select: none;
    flex-shrink: 0;
    vertical-align: middle;
}
.lsah-cat:hover {
    background: var(--ls-bg-hover);
    color: var(--ls-text);
    border-color: var(--ls-border);
}
.lsah-cat.on {
    background: var(--ls-primary);
    color: #fff;
    border-color: var(--ls-primary);
    font-weight: 600;
    box-shadow: 0 2px 6px rgba(var(--ls-primary-rgb), 0.25);
}
.lsah-cat.on i { color: #fff; }
.lsah-cat > i {
    font-size: 15px;
    line-height: 1;
    color: var(--ls-text-muted);
    display: inline-flex;
    align-items: center;
}
.lsah-cat > span {
    line-height: 1;
    display: inline-flex;
    align-items: center;
}

/* ==================== 筛选条 ==================== */
.lsah-filters {
    background: var(--ls-card-bg);
    border: 1px solid var(--ls-border-light);
    border-radius: var(--ls-radius-lg);
    padding: 10px 14px;
    margin-bottom: 16px;
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    align-items: center;
    row-gap: 6px;
}
.lsah-filter-group {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
    min-height: 28px;
}
/* 工具条已移除，排序条独占，靠左排列 */
.lsah-filter-label {
    font-size: 12px;
    color: var(--ls-text-muted);
    margin-right: 6px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    line-height: 1;
}
.lsah-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 28px;
    padding: 0 12px;
    line-height: 1;
    border-radius: var(--ls-radius);
    font-size: 12px;
    cursor: pointer;
    color: var(--ls-text-secondary);
    transition: var(--ls-transition);
    user-select: none;
    background: transparent;
    border: 1px solid transparent;
    white-space: nowrap;
}
.lsah-chip:hover {
    background: var(--ls-bg-hover);
    color: var(--ls-text);
}
.lsah-chip.on {
    background: var(--ls-primary-light);
    color: var(--ls-primary);
    border-color: rgba(var(--ls-primary-rgb), 0.18);
    font-weight: 600;
}

/* ==================== 主体 ==================== */
.lsah-main { min-height: 400px; }
.lsah-loading {
    text-align: center;
    padding: 80px 0;
    color: var(--ls-text-muted);
    font-size: 14px;
}
.lsah-loading i { color: var(--ls-primary); }
.lsah-empty {
    text-align: center;
    padding: 80px 20px;
    color: var(--ls-text-muted);
    background: var(--ls-card-bg);
    border: 1px dashed var(--ls-border);
    border-radius: var(--ls-radius-xl);
}
.lsah-empty i {
    font-size: 40px;
    display: block;
    margin-bottom: 12px;
    color: var(--ls-primary);
    opacity: 0.6;
    animation: lsah-twinkle 3s ease-in-out infinite;
}
.lsah-empty-text {
    font-size: 14px;
    color: var(--ls-text-secondary);
    margin-bottom: 6px;
}
.lsah-empty-sub {
    font-size: 12px;
    color: var(--ls-text-muted);
}
.lsah-load-more,
.lsah-no-more {
    text-align: center;
    padding: 24px;
    color: var(--ls-text-muted);
    font-size: 12px;
}
.lsah-no-more::before {
    content: "✦";
    color: var(--ls-primary);
    margin-right: 6px;
    opacity: 0.6;
}

/* ==================== 方案 A：瀑布流 ==================== */
/* column-count 走 CSS 变量，AdminX「PC 列数」可动态注入 */
.ls-asaigc-style-waterfall .lsah-wf {
    column-count: var(--lsah-cols, 4);
    column-gap: 18px;
}
@media (max-width: 1100px) { .ls-asaigc-style-waterfall .lsah-wf { column-count: 3; column-gap: 16px; } }
@media (max-width: 768px)  { .ls-asaigc-style-waterfall .lsah-wf { column-count: 2; column-gap: 12px; } }

/* ==================== 共用卡片（白卡片 + 边框 + 圆角，原始样式） ==================== */
.lsah-card {
    break-inside: avoid;
    background: var(--ls-card-bg);
    border: 1px solid var(--ls-border-light);
    border-radius: var(--ls-radius-lg);
    overflow: hidden;
    margin-bottom: 24px;
    cursor: pointer;
    display: block;
    color: inherit;
    text-decoration: none;
    position: relative;
    transition: transform 0.22s cubic-bezier(.32, .72, 0, 1), box-shadow 0.22s ease;
}
.lsah-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px -8px rgba(15, 23, 42, 0.12),
                0 3px 8px -4px rgba(15, 23, 42, 0.06);
}

/* 封面：图片直接占满卡片顶部（card 已 overflow:hidden + radius），无自身 radius/shadow */
.lsah-card-img {
    width: 100%;
    position: relative;
    overflow: hidden;
    background: #f5f5f5;     /* 加载前占位灰 */
    min-height: 120px;       /* CLS 防护：图片未载入时卡片不塌缩 */
}
.lsah-card-img img {
    width: 100%;
    display: block;
    height: auto;
    opacity: 0;
    transition: opacity 0.4s ease, transform 0.35s ease;
}
.lsah-card-img img.lsah-loaded { opacity: 1; }
.lsah-card:hover .lsah-card-img img.lsah-loaded { transform: scale(1.03); }
/* 图片加载失败 → 退化为占位底色（JS capture error 监听加 .lsah-img-broken） */
.lsah-img-broken { min-height: 160px; }
.lsah-img-broken img { display: none; }
.lsah-img-broken::after {
    content: "\ee4b"; /* ri-image-line */
    font-family: "remixicon";
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    color: var(--ls-text-muted);
    opacity: 0.45;
}
/* 无封面：仿小红书 quote-card —— 彩色背景 + 引号 + 标题/正文预览
   不强制 aspect-ratio，由内容决定高度（min-height 兜底防过短） */
.lsah-card-img.lsah-no-img {
    min-height: 140px;
    background: linear-gradient(135deg, var(--ls-primary-light), #e0e7ff);
    padding: 18px 16px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
}
.lsah-card-quote-icon {
    font-size: 22px;
    color: var(--ls-primary);
    opacity: 0.55;
    margin-bottom: 8px;
    line-height: 1;
}
.lsah-card-quote-text {
    font-size: 14px;
    line-height: 1.55;
    color: var(--ls-text);
    word-break: break-word;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 5;
    -webkit-box-orient: vertical;
}
.lsah-vid-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    padding: 3px 7px;
    border-radius: var(--ls-radius-sm);
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    font-size: 11px;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}
.lsah-tool-badge {
    position: absolute;
    bottom: 8px;
    left: 8px;
    padding: 3px 8px;
    border-radius: var(--ls-radius-sm);
    background: rgba(255, 255, 255, 0.92);
    color: var(--ls-text);
    border: 1px solid rgba(255, 255, 255, 0.6);
    font-size: 11px;
    font-weight: 500;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

/* .lsah-card-hover 遮层已移除：用户反馈卡片悬停额外的点赞/标题遮层多余 */

/* 信息区：标题 + 底部行（卡片内边距对齐 12px） */
.lsah-card-meta {
    padding: 12px;
}
.lsah-card-title {
    font-size: 14px;
    line-height: 1.4;
    color: var(--ls-text);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-break: break-word;
    margin-bottom: 8px;
}
.lsah-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}
.lsah-card-avatar {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: linear-gradient(135deg, #93c5fd, var(--ls-primary));
    flex-shrink: 0;
    overflow: hidden;
}
.lsah-card-avatar img { width: 100%; height: 100%; object-fit: cover; }
.lsah-card-author {
    font-size: 12px;
    color: var(--ls-text-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    line-height: 1.4;
}
/* 作者整块可点（头像 + 名称 + 认证图标），不触发卡片打开 modal */
.lsah-card-author-link {
    flex: 1;
    min-width: 0;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    color: inherit;
}
.lsah-card-verify {
    font-size: 13px;
    color: var(--ls-primary);
    flex-shrink: 0;
}

/* 卡片心形点赞按钮（替代之前只读的 .lsah-card-likes） */
.lsah-card-like {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    background: transparent;
    border: 0;
    padding: 0;
    color: var(--ls-text-muted);
    font-size: 12px;
    cursor: pointer;
    flex-shrink: 0;
    line-height: 1;
}
.lsah-card-like i { font-size: 14px; transition: var(--ls-transition); }
/* 已点赞态：红心 */
.lsah-card-like.lsah-liked,
.lsah-card-like.lsah-liked i { color: var(--ls-danger); }
/* 鼠标按下时给个 0.85 透明度提示反馈，不再用红底块 hover */
.lsah-card-like:active { opacity: 0.85; }

.lsah-like-pop i {
    animation: lsah-like-pop 0.38s cubic-bezier(.34, 1.56, .64, 1);
}
@keyframes lsah-like-pop {
    0%   { transform: scale(1); }
    40%  { transform: scale(1.35); }
    100% { transform: scale(1); }
}

/* 卡片现在用 <div role="button">（不是 <a>），加 cursor + 与 a 一致的样式 */
.lsah-card { cursor: pointer; }

/* ==================== 方案 B：工作台优先（v2） ==================== */
.lsah-ws-hero {
    background:
        radial-gradient(circle at 8% 0%,   rgba(var(--ls-primary-rgb), 0.12), transparent 45%),
        radial-gradient(circle at 92% 100%, rgba(139, 92, 246, 0.10), transparent 55%),
        linear-gradient(135deg, var(--ls-primary-light) 0%, #ffffff 65%);
    border: 1px solid var(--ls-border-light);
    border-radius: var(--ls-radius-xl);
    padding: 32px 36px;
    margin-bottom: 18px;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    min-height: 180px;
}
.lsah-ws-hero-content {
    flex: 1;
    min-width: 0;
    position: relative;
    z-index: 1;
}
.lsah-ws-hero-deco {
    position: absolute;
    right: 36px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 140px;
    color: var(--ls-primary);
    opacity: 0.12;
    animation: lsah-twinkle 4s ease-in-out infinite;
    line-height: 1;
    user-select: none;
    pointer-events: none;
    z-index: 0;
}
@media (max-width: 700px) {
    .lsah-ws-hero { padding: 24px 22px; }
    .lsah-ws-hero-deco { font-size: 100px; right: 16px; opacity: 0.08; }
}

.lsah-ws-hero-cta {
    display: flex;
    gap: 10px;
    margin-top: 16px;
    flex-wrap: wrap;
}
.lsah-ws-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 38px;
    padding: 0 18px;
    border-radius: var(--ls-radius);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    line-height: 1;
    transition: var(--ls-transition);
    border: 1px solid transparent;
    cursor: pointer;
}
.lsah-ws-btn-primary {
    background: var(--ls-primary);
    color: #fff;
    box-shadow: 0 2px 8px rgba(var(--ls-primary-rgb), 0.30);
}
.lsah-ws-btn-primary:hover {
    background: var(--ls-primary-hover);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(var(--ls-primary-rgb), 0.40);
}
.lsah-ws-btn-ghost {
    background: var(--ls-card-bg);
    color: var(--ls-text);
    border-color: var(--ls-border);
}
.lsah-ws-btn-ghost:hover {
    border-color: var(--ls-primary);
    color: var(--ls-primary);
    background: var(--ls-primary-light);
}
.lsah-ws-btn i { font-size: 16px; }
.lsah-ws-greeting {
    font-size: 13px;
    color: var(--ls-text-secondary);
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.lsah-ws-tag {
    padding: 2px 10px;
    background: var(--ls-card-bg);
    border: 1px solid var(--ls-border);
    border-radius: var(--ls-radius-full);
    font-size: 11px;
    color: var(--ls-text-secondary);
}
.lsah-ws-h1 {
    font-size: 26px;
    font-weight: 800;
    color: var(--ls-text);
    margin: 0 0 6px;
    letter-spacing: -0.4px;
}
.lsah-ws-h1 .lsah-spark {
    font-size: 22px;
    margin-left: 4px;
    vertical-align: 2px;
}
.lsah-ws-sub {
    font-size: 13px;
    color: var(--ls-text-secondary);
    line-height: 1.6;
}

.lsah-ws-tools {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    margin-bottom: 18px;
}
@media (max-width: 900px) { .lsah-ws-tools { grid-template-columns: repeat(2, 1fr); } }

.lsah-ws-tool {
    background: var(--ls-card-bg);
    border: 1px solid var(--ls-border-light);
    border-radius: var(--ls-radius-lg);
    padding: 18px;
    cursor: pointer;
    transition: var(--ls-transition);
    position: relative;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    overflow: hidden;
}
.lsah-ws-tool::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--ls-primary);
    transform: translateX(-100%);
    transition: transform 0.3s ease;
}
.lsah-ws-tool:hover {
    border-color: var(--ls-primary);
    transform: translateY(-2px);
    box-shadow: var(--ls-shadow-md);
}
.lsah-ws-tool:hover::before { transform: translateX(0); }

.lsah-ws-tool-ic {
    width: 44px;
    height: 44px;
    border-radius: var(--ls-radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    margin-bottom: 12px;
    background: var(--ls-primary-light);
    color: var(--ls-primary);
}
/* 用统一蓝色系深浅而非异色 —— 保持品牌单一 */
.lsah-ws-tool.t-img .lsah-ws-tool-ic { background: #dbeafe; color: #1d4ed8; }
.lsah-ws-tool.t-vid .lsah-ws-tool-ic { background: #e0e7ff; color: #4338ca; }
.lsah-ws-tool.t-txt .lsah-ws-tool-ic { background: #ede9fe; color: #6d28d9; }
.lsah-ws-tool.t-pmt .lsah-ws-tool-ic { background: #cffafe; color: #0e7490; }

.lsah-ws-tool h4 {
    font-size: 15px;
    font-weight: 700;
    color: var(--ls-text);
    margin: 0 0 4px;
}
.lsah-ws-tool p {
    font-size: 12px;
    color: var(--ls-text-muted);
    margin: 0;
    line-height: 1.5;
    min-height: 32px;
}
.lsah-ws-tool .arrow {
    position: absolute;
    right: 16px;
    top: 22px;
    color: var(--ls-text-muted);
    font-size: 16px;
    transition: var(--ls-transition);
}
.lsah-ws-tool:hover .arrow {
    color: var(--ls-primary);
    transform: translateX(2px);
}
.lsah-ws-tool .badge-new {
    position: absolute;
    top: 14px;
    right: 16px;
    padding: 2px 7px;
    background: var(--ls-danger);
    color: #fff;
    font-size: 9px;
    font-weight: 700;
    border-radius: var(--ls-radius-sm);
    letter-spacing: 0.5px;
}

.lsah-ws-community-title {
    font-size: 17px;
    font-weight: 700;
    color: var(--ls-text);
    margin: 28px 0 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.lsah-ws-community-title i {
    color: var(--ls-primary);
    font-size: 20px;
}

/* ==================== 方案 C：策展分块 ==================== */
.lsah-curated-section {
    margin-bottom: 32px;
    animation: lsah-fade-in 0.4s ease;
}
.lsah-curated-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}
.lsah-curated-head-left {
    display: flex;
    align-items: center;
    gap: 10px;
}
.lsah-curated-head h2 {
    font-size: 18px;
    font-weight: 800;
    color: var(--ls-text);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    letter-spacing: -0.2px;
}
.lsah-curated-head h2 i {
    color: var(--ls-primary);
    font-size: 20px;
}
.lsah-curated-head .badge {
    padding: 2px 10px;
    background: var(--ls-bg);
    color: var(--ls-text-muted);
    border-radius: var(--ls-radius-full);
    font-size: 11px;
}
.lsah-curated-head .more {
    font-size: 12px;
    color: var(--ls-text-muted);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 2px;
    transition: var(--ls-transition);
}
.lsah-curated-head .more:hover { color: var(--ls-primary); }
.lsah-curated-head .more i { transition: transform 0.2s ease; }
.lsah-curated-head .more:hover i { transform: translateX(2px); }

.lsah-curated-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
}
@media (max-width: 1100px) { .lsah-curated-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 768px)  { .lsah-curated-grid { grid-template-columns: repeat(2, 1fr); } }

.lsah-curated-card {
    background: var(--ls-card-bg);
    border: 1px solid var(--ls-border-light);
    border-radius: var(--ls-radius-lg);
    overflow: hidden;
    cursor: pointer;
    transition: var(--ls-transition);
    text-decoration: none;
    color: inherit;
    display: block;
}
.lsah-curated-card {
    transition: transform 0.22s cubic-bezier(.32, .72, 0, 1),
                box-shadow 0.22s ease,
                border-color 0.22s ease;
}
.lsah-curated-card:hover {
    /* 去蓝边（与瀑布流卡片一致），只保留上抬 + 柔阴影 */
    transform: translateY(-2px);
    box-shadow: 0 8px 20px -8px rgba(15, 23, 42, 0.12), 0 3px 8px -4px rgba(15, 23, 42, 0.06);
}
.lsah-curated-card-img {
    width: 100%;
    aspect-ratio: 4 / 5;
    position: relative;
    overflow: hidden;
    background: var(--ls-bg);
}
.lsah-curated-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}
.lsah-curated-card:hover .lsah-curated-card-img img { transform: scale(1.04); }

.lsah-curated-card-img.no-img {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--ls-bg-hover), var(--ls-border-light));
}
.lsah-curated-card-img.no-img i {
    font-size: 28px;
    color: var(--ls-text-muted);
    opacity: 0.5;
}
.lsah-curated-rank {
    position: absolute;
    top: 8px;
    left: 8px;
    padding: 3px 9px;
    border-radius: var(--ls-radius-full);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    letter-spacing: 0.3px;
}
.lsah-curated-rank.r-1 { background: linear-gradient(135deg, #f59e0b, #d97706); box-shadow: 0 2px 6px rgba(217, 119, 6, 0.35); }
.lsah-curated-rank.r-2 { background: linear-gradient(135deg, #cbd5e1, #64748b); box-shadow: 0 2px 6px rgba(100, 116, 139, 0.3); }
.lsah-curated-rank.r-3 { background: linear-gradient(135deg, #fb923c, #ea580c); box-shadow: 0 2px 6px rgba(234, 88, 12, 0.3); }
.lsah-curated-rank.r-default { background: rgba(15, 23, 42, 0.7); }

/* Top 创作者 */
.lsah-creators-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
}
@media (max-width: 1100px) { .lsah-creators-grid { grid-template-columns: repeat(2, 1fr); } }
.lsah-creator-card {
    background: var(--ls-card-bg);
    border: 1px solid var(--ls-border-light);
    border-radius: var(--ls-radius-lg);
    padding: 16px;
    cursor: pointer;
    transition: var(--ls-transition);
}
.lsah-creator-card:hover {
    border-color: var(--ls-primary);
    box-shadow: var(--ls-shadow-sm);
    transform: translateY(-1px);
}
.lsah-creator-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}
.lsah-creator-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, #93c5fd, var(--ls-primary));
    flex-shrink: 0;
    overflow: hidden;
}
.lsah-creator-avatar img { width: 100%; height: 100%; object-fit: cover; }
.lsah-creator-info { flex: 1; min-width: 0; }
.lsah-creator-name {
    font-size: 14px;
    font-weight: 700;
    color: var(--ls-text);
    display: flex;
    align-items: center;
    gap: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.lsah-creator-meta {
    font-size: 11px;
    color: var(--ls-text-muted);
    margin-top: 2px;
}
.lsah-creator-follow {
    padding: 5px 14px;
    border-radius: var(--ls-radius);
    background: var(--ls-primary-light);
    color: var(--ls-primary);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    border: 0;
    transition: var(--ls-transition);
}
.lsah-creator-follow:hover {
    background: var(--ls-primary);
    color: #fff;
}
.lsah-creator-works {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
}
.lsah-creator-works > div {
    aspect-ratio: 1;
    border-radius: var(--ls-radius-sm);
    background: var(--ls-bg-hover);
    background-size: cover;
    background-position: center;
}

/* 通用 stub（异常态） */
.lsah-stub {
    background: var(--ls-card-bg);
    border: 1px dashed var(--ls-border);
    border-radius: var(--ls-radius-xl);
    padding: 60px 20px;
    text-align: center;
    color: var(--ls-text-muted);
}
.lsah-stub i {
    font-size: 36px;
    color: var(--ls-primary);
    opacity: 0.5;
    display: block;
    margin-bottom: 12px;
}
.lsah-stub h3 { color: var(--ls-text); font-size: 17px; margin: 0 0 8px; font-weight: 700; }
.lsah-stub p { margin: 4px 0; font-size: 13px; }

/* ==================== 悬浮创作按钮（FAB · 火花化） ==================== */
.lsah-fab {
    position: fixed;
    right: 24px;
    bottom: 24px;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: var(--ls-primary);
    color: #fff;
    border: 0;
    cursor: pointer;
    box-shadow:
        0 6px 16px rgba(var(--ls-primary-rgb), 0.35),
        0 2px 4px rgba(var(--ls-primary-rgb), 0.2);
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 50;
    transition: transform 0.25s cubic-bezier(.34, 1.56, .64, 1), background 0.2s ease;
}
.lsah-fab::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 50%;
    /* 仅进入页面时脉冲 3 次引导注意，之后停止，避免长时间分散注意 / 耗电 */
    animation: lsah-pulse 2.4s ease-out 3;
}
.lsah-fab:hover::after { animation: none; }
.lsah-fab:hover {
    background: var(--ls-primary-hover);
    transform: scale(1.06) rotate(90deg);
}
.lsah-fab.on {
    transform: scale(1.1) rotate(135deg);
    background: var(--ls-primary-hover);
}
.lsah-fab i { line-height: 1; }

/* FAB 菜单：从 FAB 左侧横向展开，避开站点右侧浮动栏（聊天/搜索/置顶等） */
.lsah-fab-menu {
    position: fixed;
    right: 88px;       /* FAB 宽 52 + 间距 12 + viewport 边距 24 ≈ 88 */
    bottom: 24px;      /* 与 FAB 视觉对齐底部 */
    background: var(--ls-card-bg);
    border: 1px solid var(--ls-border-light);
    border-radius: var(--ls-radius-lg);
    padding: 6px;
    box-shadow: var(--ls-shadow-elevated);
    min-width: 160px;
    z-index: 50;
    opacity: 0;
    transform: translateX(12px) scale(0.96);
    transform-origin: bottom right;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s cubic-bezier(.34, 1.56, .64, 1);
}
.lsah-fab-menu.on {
    opacity: 1;
    transform: translateX(0) scale(1);
    pointer-events: auto;
}
.lsah-fab-item {
    padding: 10px 12px;
    border-radius: var(--ls-radius);
    text-decoration: none;
    color: var(--ls-text);
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    cursor: pointer;
    transition: var(--ls-transition);
}
.lsah-fab-item:hover {
    background: var(--ls-primary-light);
    color: var(--ls-primary);
}
.lsah-fab-item i {
    font-size: 17px;
    color: var(--ls-text-muted);
    width: 20px;
    text-align: center;
    transition: var(--ls-transition);
}
.lsah-fab-item:hover i { color: var(--ls-primary); }

/* ==================== Workspace v2 · trends rail ==================== */
.lsah-ws-rail {
    margin-bottom: 22px;
}
.lsah-ws-rail-head {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    font-size: 14px;
    font-weight: 700;
    color: var(--ls-text);
}
.lsah-ws-rail-head i {
    color: #f97316;
    font-size: 18px;
}
.lsah-ws-rail-track {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 4px 0 8px;
    scrollbar-width: thin;
    scrollbar-color: var(--ls-border) transparent;
}
.lsah-ws-rail-track::-webkit-scrollbar { height: 4px; }
.lsah-ws-rail-track::-webkit-scrollbar-thumb { background: var(--ls-border); border-radius: 2px; }
.lsah-ws-rail-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
    height: 36px;
    padding: 0 14px;
    line-height: 1;
    border-radius: var(--ls-radius-full);
    background: var(--ls-card-bg);
    border: 1px solid var(--ls-border-light);
    color: var(--ls-text-secondary);
    font-size: 13px;
    text-decoration: none;
    transition: var(--ls-transition);
    user-select: none;
}
.lsah-ws-rail-pill:hover {
    background: var(--ls-primary-light);
    color: var(--ls-primary);
    border-color: rgba(var(--ls-primary-rgb), 0.25);
    transform: translateY(-1px);
}
.lsah-ws-rail-pill i { font-size: 14px; line-height: 1; }
.lsah-ws-rail-pill[data-kind="tool"] i { color: var(--ls-primary); }

/* ==================== Workspace v2 · community grid ==================== */
.lsah-ws-community { margin-top: 26px; }
.lsah-ws-community-more {
    margin-left: auto;
    font-size: 12px;
    color: var(--ls-text-muted);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 2px;
    transition: var(--ls-transition);
}
.lsah-ws-community-more:hover { color: var(--ls-primary); }
.lsah-ws-community-more i { transition: transform 0.2s ease; }
.lsah-ws-community-more:hover i { transform: translateX(2px); }

.lsah-ws-community-grid {
    display: grid;
    grid-template-columns: repeat(var(--lsah-cols, 4), 1fr);
    gap: 24px 18px;     /* 与瀑布流上下/左右间距一致 */
}
@media (max-width: 1100px) { .lsah-ws-community-grid { grid-template-columns: repeat(3, 1fr); gap: 22px 16px; } }
@media (max-width: 700px)  { .lsah-ws-community-grid { grid-template-columns: repeat(2, 1fr); gap: 20px 12px; } }
/* community 内的 .lsah-card 在 grid 里要去掉 margin-bottom 避免错位 */
.lsah-ws-community-grid .lsah-card { margin-bottom: 0; }

/* ==================== Curated v2 · 首屏 Hero（1 大 3 小） ==================== */
.lsah-curated-hero-section { margin-bottom: 36px; }
.lsah-curated-hero-grid {
    display: grid;
    grid-template-columns: 1.6fr 1fr;
    gap: 14px;
}
@media (max-width: 900px) { .lsah-curated-hero-grid { grid-template-columns: 1fr; } }

.lsah-curated-hero-main {
    position: relative;
    border-radius: var(--ls-radius-xl);
    overflow: hidden;
    background: var(--ls-card-bg);
}
.lsah-curated-hero-card {
    display: block;
    color: inherit;
    text-decoration: none;
    background: var(--ls-card-bg);
    border: 1px solid var(--ls-border-light);
    border-radius: var(--ls-radius-xl);
    overflow: hidden;
    transition: transform 0.22s cubic-bezier(.32, .72, 0, 1),
                box-shadow 0.22s ease,
                border-color 0.22s ease;
    height: 100%;
}
.lsah-curated-hero-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px -8px rgba(15, 23, 42, 0.14), 0 3px 8px -4px rgba(15, 23, 42, 0.06);
}
.lsah-curated-hero-main-img {
    width: 100%;
    aspect-ratio: 16 / 11;
    position: relative;
    overflow: hidden;
    background: var(--ls-bg);
}
.lsah-curated-hero-main-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}
.lsah-curated-hero-card:hover .lsah-curated-hero-main-img img { transform: scale(1.03); }
.lsah-curated-hero-main-img.no-img {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--ls-bg-hover), var(--ls-border-light));
}
.lsah-curated-hero-main-img.no-img i {
    font-size: 36px;
    color: var(--ls-text-muted);
    opacity: 0.5;
}

.lsah-curated-hero-info {
    padding: 16px 18px;
}
.lsah-curated-hero-title {
    font-size: 17px;
    font-weight: 700;
    color: var(--ls-text);
    margin: 0 0 10px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.lsah-curated-hero-meta {
    display: flex;
    align-items: center;
    gap: 8px;
}

.lsah-curated-hero-side {
    display: grid;
    grid-template-rows: repeat(3, 1fr);
    gap: 14px;
}
.lsah-curated-hero-side-card {
    display: grid;
    grid-template-columns: 36% 1fr;
    gap: 12px;
    background: var(--ls-card-bg);
    border: 1px solid var(--ls-border-light);
    border-radius: var(--ls-radius-lg);
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: transform 0.22s cubic-bezier(.32, .72, 0, 1),
                box-shadow 0.22s ease,
                border-color 0.22s ease;
}
.lsah-curated-hero-side-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px -8px rgba(15, 23, 42, 0.14);
}
.lsah-curated-hero-side-img {
    position: relative;
    overflow: hidden;
    background: var(--ls-bg);
    aspect-ratio: 4 / 3;
}
.lsah-curated-hero-side-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}
.lsah-curated-hero-side-card:hover .lsah-curated-hero-side-img img { transform: scale(1.04); }
.lsah-curated-hero-side-img.no-img {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--ls-bg-hover), var(--ls-border-light));
}
.lsah-curated-hero-side-img.no-img i {
    font-size: 22px;
    color: var(--ls-text-muted);
    opacity: 0.5;
}
.lsah-curated-hero-side-info {
    padding: 10px 14px 10px 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
}
.lsah-curated-hero-side-info h4 {
    font-size: 13px;
    font-weight: 600;
    color: var(--ls-text);
    margin: 0 0 6px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.lsah-curated-hero-side-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 11px;
    color: var(--ls-text-muted);
}
.lsah-curated-hero-side-meta i {
    color: var(--ls-danger);
    margin-right: 2px;
}

/* ==================== Curated v2 · 创作者 横滚 rail ==================== */
.lsah-creators-rail-section { /* hook：创作者 rail 容器，沿用 .lsah-curated-section 默认 margin-bottom */ }
.lsah-rail-ctrl { display: flex; gap: 6px; }
.lsah-rail-arr {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--ls-card-bg);
    border: 1px solid var(--ls-border);
    color: var(--ls-text-secondary);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: var(--ls-transition);
    padding: 0;
    font-size: 16px;
}
.lsah-rail-arr:hover {
    border-color: var(--ls-primary);
    color: var(--ls-primary);
    background: var(--ls-primary-light);
}

.lsah-creators-rail {
    display: flex;
    gap: 14px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    padding: 4px 2px 10px;
    scrollbar-width: none;
}
.lsah-creators-rail::-webkit-scrollbar { display: none; }
.lsah-creators-rail .lsah-creator-card {
    flex-shrink: 0;
    width: 240px;
}
@media (max-width: 700px) {
    .lsah-creators-rail .lsah-creator-card { width: 200px; }
}

/* ==================== 骨架屏 ==================== */
.lsah-skeleton { pointer-events: none; }
.lsah-sk-banner,
.lsah-sk-cat,
.lsah-sk-card {
    background: linear-gradient(
        100deg,
        var(--ls-border-light) 30%,
        var(--ls-bg-hover) 50%,
        var(--ls-border-light) 70%
    );
    background-size: 720px 100%;
    animation: lsah-shimmer 1.4s ease-in-out infinite;
    border-radius: var(--ls-radius-lg);
}
.lsah-sk-banner {
    height: 200px;
    border-radius: var(--ls-radius-xl);
    margin-bottom: 16px;
}
.lsah-sk-cats {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}
.lsah-sk-cat {
    width: 88px;
    height: 36px;
    border-radius: var(--ls-radius-full);
    flex-shrink: 0;
}
.lsah-sk-grid {
    column-count: var(--lsah-cols, 4);
    column-gap: 18px;
}
@media (max-width: 1100px) { .lsah-sk-grid { column-count: 3; column-gap: 16px; } }
@media (max-width: 768px)  { .lsah-sk-grid { column-count: 2; column-gap: 12px; } }
.lsah-sk-card {
    width: 100%;
    margin-bottom: 24px;
    break-inside: avoid;
    border-radius: 16px;       /* 与正式卡片对齐 */
}

/* ==================== 键盘可达性（focus-visible） ==================== */
.lsah-card:focus-visible,
.lsah-curated-card:focus-visible,
.lsah-curated-hero-card:focus-visible,
.lsah-curated-hero-side-card:focus-visible,
.lsah-cat:focus-visible,
.lsah-chip:focus-visible,
.lsah-ws-tool:focus-visible,
.lsah-ws-rail-pill:focus-visible,
.lsah-ws-btn:focus-visible,
.lsah-banner-cta:focus-visible,
.lsah-banner-arr:focus-visible,
.lsah-rail-arr:focus-visible,
.lsah-fab:focus-visible,
.lsah-fab-item:focus-visible,
.lsah-creator-follow:focus-visible {
    outline: 2px solid var(--ls-primary);
    outline-offset: 2px;
}
/* 鼠标点击不显示 outline（仅键盘 Tab 时显示），:focus-visible 已天然满足 */

/* ==================== 窄屏响应式（平板 / 分屏 / 缩放 / 模拟器） ====================
   注意：手机端 UA 通常会被 PageRouter 重定向到 MB SPA，本节主要服务
   非手机但视口较窄的场景（平板横屏 / 桌面分屏 / 浏览器调试模式 / 大字号用户）
*/

@media (max-width: 768px) {
    .ls-asaigc-home { padding: 12px 8px 80px; }

    /* Banner */
    .lsah-banner { min-height: auto; }
    .lsah-banner-slide {
        height: auto;
        min-height: 180px;
        padding: 22px 20px;
    }
    .lsah-banner-content { max-width: 100%; }
    .lsah-banner-img {
        width: 38%;
        opacity: 0.55;
    }
    .lsah-banner-title { font-size: 19px; }
    .lsah-banner-desc { font-size: 12px; margin-bottom: 12px; }
    .lsah-banner-ctrl { bottom: 10px; right: 12px; gap: 8px; }

    /* 分类条 */
    .lsah-cats { padding: 8px; margin: 0 -8px 8px; }
    .lsah-cat { height: 32px; padding: 0 12px; font-size: 12px; }

    /* 筛选条 */
    .lsah-filters {
        padding: 8px 12px;
        gap: 12px;
        row-gap: 4px;
    }
    .lsah-filter-sort { margin-left: 0; }

    /* 卡片 meta */
    .lsah-card-meta { padding: 8px 10px; gap: 6px; }

    /* Workspace hero */
    .lsah-ws-hero {
        padding: 22px 20px;
        min-height: auto;
    }
    .lsah-ws-h1 { font-size: 20px; }
    .lsah-ws-sub { font-size: 12px; }
    .lsah-ws-hero-deco { display: none; }
    .lsah-ws-hero-cta { margin-top: 14px; gap: 8px; }
    .lsah-ws-btn { height: 36px; padding: 0 14px; font-size: 12px; }

    /* Workspace tools */
    .lsah-ws-tools { gap: 10px; }
    .lsah-ws-tool { padding: 14px; }
    .lsah-ws-tool-ic { width: 38px; height: 38px; font-size: 18px; margin-bottom: 8px; }
    .lsah-ws-tool h4 { font-size: 14px; }
    .lsah-ws-tool p { font-size: 11px; min-height: 28px; }

    /* Workspace rail */
    .lsah-ws-rail-pill { height: 32px; padding: 0 12px; font-size: 12px; }

    /* Curated 大标题 */
    .lsah-curated-head h2 { font-size: 16px; }

    /* Curated hero side card：缩小图片占比 */
    .lsah-curated-hero-side-card {
        grid-template-columns: 40% 1fr;
        gap: 10px;
    }
    .lsah-curated-hero-side-info { padding: 8px 12px 8px 0; }

    /* FAB 缩到屏边缘 */
    .lsah-fab {
        right: 16px;
        bottom: 16px;
        width: 48px;
        height: 48px;
        font-size: 22px;
    }
    .lsah-fab-menu { right: 76px; bottom: 16px; }
}

@media (max-width: 480px) {
    /* 极窄屏（≤480px）：Workspace 工具卡 1 列、Curated grid 减到 1 列时太空，保持 2 列但更紧凑 */
    .ls-asaigc-home { padding: 10px 6px 80px; }

    /* Banner 极简化 */
    .lsah-banner-slide { min-height: 160px; padding: 18px 14px; }
    .lsah-banner-img { width: 0; display: none; }
    .lsah-banner-content { max-width: 100%; }
    .lsah-banner-title { font-size: 17px; }
    .lsah-banner-cta { padding: 7px 14px; font-size: 12px; }

    /* 卡片：列内间距压缩 */
    .ls-asaigc-style-waterfall .lsah-wf { column-gap: 8px; }
    .lsah-card { margin-bottom: 8px; }

    /* hero CTA 改竖排 */
    .lsah-ws-hero-cta { flex-direction: column; align-items: stretch; }
    .lsah-ws-btn { justify-content: center; }

    /* 工具卡 1 列 */
    .lsah-ws-tools { grid-template-columns: 1fr; }

    /* FAB 菜单宽度收紧 */
    .lsah-fab-menu { min-width: 160px; }
}

/* ==================== 仿小红书 · 详情弹窗 ==================== */
/* 设计取舍：不锁 body / html 滚动 ——
   过去 3 次尝试（padding 补偿 / scrollbar-gutter / 隐藏滚动条）
   都在某些环境下导致背景横向重排。最稳妥的做法是不动背景布局，
   滚动穿透由 module.js 在 modal 上 wheel/touchmove preventDefault 拦截 */

.lsah-modal {
    position: fixed;
    inset: 0;
    /* 站点 .ls-header 是 z-index:10000，必须高于它才能盖住顶栏（与红书探索模块一致） */
    z-index: 10001;
    opacity: 0;
    transition: opacity 0.22s ease;
    pointer-events: none;
}
.lsah-modal.lsah-show { opacity: 1; pointer-events: auto; }

.lsah-modal-mask {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.72);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

/* 尺寸 1:1 对齐红书探索模块（jinsom-pc-page-redbook-explore） */
.lsah-modal-panel {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.985);
    width: min(880px, calc(100vw - 48px));
    height: min(84vh, 760px);
    background: var(--ls-card-bg);
    border-radius: 20px;
    overflow: hidden;
    display: flex;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.2);
    transition: transform 0.24s cubic-bezier(0.22, 1, 0.36, 1);
}
.lsah-modal.lsah-show .lsah-modal-panel { transform: translate(-50%, -50%) scale(1); }
/* 无媒体（纯文本帖）：panel 变窄 */
.lsah-modal-panel.lsah-no-media {
    width: min(440px, calc(100vw - 48px));
}

/* 关闭按钮：浮在 modal 蒙层右上角（panel 外部），与作者栏「关注」按钮无重叠 */
.lsah-modal-close {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 10010;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: #fff;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: var(--ls-transition);
}
.lsah-modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.45);
    transform: scale(1.06);
}

/* 媒体区（左）：与右侧 50:50 对齐红书 */
.lsah-modal-media {
    flex: 0 0 50%;
    width: 50%;
    min-width: 0;
    background: #f7f7f7;       /* 图片底色（红书同款灰白） */
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
}
.lsah-modal-media:has(.lsah-modal-video) {
    background: #000;          /* 视频底色 */
    padding: 0;
}
/* 不支持 :has() 的浏览器兜底：JS 在初始化时给 video 父节点加 .lsah-modal-media-video */
.lsah-modal-media-video {
    background: #000;
    padding: 0;
}
.lsah-modal-video {
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    background: #000;
    border-radius: 12px;
}
.lsah-modal-video-fallback {
    width: 100%;
    height: 100%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
    text-decoration: none;
    overflow: hidden;
}
.lsah-modal-video-fallback img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    opacity: 0.65;
}
.lsah-modal-video-fallback-cta {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    color: #fff;
    background: rgba(0, 0, 0, 0.3);
    transition: var(--ls-transition);
}
.lsah-modal-video-fallback-cta i { font-size: 48px; }
.lsah-modal-video-fallback-cta span { font-size: 13px; }
.lsah-modal-video-fallback:hover .lsah-modal-video-fallback-cta {
    background: rgba(0, 0, 0, 0.5);
}
.lsah-modal-gallery {
    width: 100%;
    height: 100%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f7f7f7;
}
.lsah-modal-gallery-stage {
    width: 100%;
    height: 100%;
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    background: #f7f7f7;
}
.lsah-modal-gallery-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    opacity: 0;
    transition: opacity 0.25s ease;
}
.lsah-modal-gallery-img.on { opacity: 1; }
.lsah-modal-gallery-arr {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.4);
    border: 0;
    color: #fff;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: var(--ls-transition);
    z-index: 2;
}
.lsah-modal-gallery-arr:hover { background: rgba(0, 0, 0, 0.7); }
.lsah-modal-gallery-prev { left: 12px; }
.lsah-modal-gallery-next { right: 12px; }
.lsah-modal-gallery-dots {
    position: absolute;
    bottom: 14px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
    z-index: 2;
}
.lsah-modal-gallery-dots span {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: var(--ls-transition);
}
.lsah-modal-gallery-dots span.on {
    width: 20px;
    border-radius: var(--ls-radius-full);
    background: #fff;
}

/* 底部缩略图条 */
.lsah-modal-gallery-thumbs {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
    padding: 6px 8px;
    background: rgba(0, 0, 0, 0.42);
    border-radius: var(--ls-radius-md);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    max-width: 90%;
    overflow-x: auto;
    scrollbar-width: none;
    z-index: 2;
}
.lsah-modal-gallery-thumbs::-webkit-scrollbar { display: none; }
.lsah-modal-thumb {
    width: 44px;
    height: 44px;
    object-fit: cover;
    border-radius: var(--ls-radius-sm);
    cursor: pointer;
    opacity: 0.55;
    transition: opacity 0.2s ease, border 0.2s ease;
    border: 2px solid transparent;
    flex-shrink: 0;
}
.lsah-modal-thumb:hover { opacity: 0.85; }
.lsah-modal-thumb.on {
    opacity: 1;
    border-color: #fff;
}

/* 内容侧（右）：与媒体 50:50 */
.lsah-modal-side {
    flex: 0 0 50%;
    width: 50%;
    min-width: 0;
    border-left: 1px solid var(--ls-border-light);
    display: flex;
    flex-direction: column;
    background: var(--ls-card-bg);
    overflow: hidden;
}
.lsah-modal-side-wide {
    /* 没有媒体时全宽 */
    flex: 1;
    width: 100%;
    border-left: none;
}

.lsah-modal-author-bar {
    height: 68px;                       /* 红书固定高度 */
    padding: 0 20px;
    border-bottom: 1px solid var(--ls-border-light);
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}
.lsah-modal-follow {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    height: 30px;
    padding: 0 14px;
    border-radius: var(--ls-radius-full);
    background: var(--ls-primary);
    color: #fff;
    border: 0;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--ls-transition);
    flex-shrink: 0;
    line-height: 1;
}
.lsah-modal-follow:hover {
    background: var(--ls-primary-hover);
}
.lsah-modal-follow.lsah-followed,
.lsah-modal-follow.ls-followed {
    background: var(--ls-bg-hover);
    color: var(--ls-text-secondary);
}
.lsah-modal-follow.lsah-followed:hover,
.lsah-modal-follow.ls-followed:hover {
    background: var(--ls-danger-light);
    color: var(--ls-danger);
}
.lsah-modal-author {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: inherit;
    transition: var(--ls-transition);
    border-radius: var(--ls-radius);
    padding: 4px 8px;
    margin: -4px -8px;
}
.lsah-modal-author:hover { background: var(--ls-bg-hover); }
.lsah-modal-author-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: linear-gradient(135deg, #93c5fd, var(--ls-primary));
    overflow: hidden;
    flex-shrink: 0;
}
.lsah-modal-author-avatar img { width: 100%; height: 100%; object-fit: cover; }
.lsah-modal-author-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--ls-text);
}
.lsah-modal-author:hover .lsah-modal-author-name { color: var(--ls-primary); }
.lsah-modal-author-verify {
    color: var(--ls-primary);
    font-size: 16px;
}

.lsah-modal-scroll {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 18px 20px;
    scrollbar-width: none;
}
.lsah-modal-scroll::-webkit-scrollbar { width: 0; height: 0; background: transparent; }

.lsah-modal-title {
    font-size: 17px;
    font-weight: 700;
    color: var(--ls-text);
    margin: 0 0 10px;
    line-height: 1.45;
    letter-spacing: -0.2px;
}
.lsah-modal-content {
    font-size: 14px;
    color: var(--ls-text-secondary);
    line-height: 1.75;
    word-break: break-word;
    white-space: pre-wrap;
    position: relative;
}
/* 内容折叠：超过阈值高度时由 JS 加这个类 */
.lsah-modal-content.lsah-content-collapsed {
    max-height: 300px;
    overflow: hidden;
}
.lsah-modal-content.lsah-content-collapsed::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 80px;
    background: linear-gradient(to bottom, transparent, var(--ls-card-bg) 92%);
    pointer-events: none;
}
.lsah-modal-content-toggle {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin: 12px 12px 0 0;       /* 与同行 .lsah-modal-time 统一 margin-top */
    padding: 6px 14px;
    background: transparent;
    border: 1px solid var(--ls-border);
    border-radius: var(--ls-radius-full);
    color: var(--ls-primary);
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    transition: var(--ls-transition);
    vertical-align: middle;       /* 与同行内联元素中线对齐 */
}
.lsah-modal-content-toggle:hover {
    background: var(--ls-primary-light);
    border-color: rgba(var(--ls-primary-rgb), 0.3);
}
.lsah-modal-content-toggle i { font-size: 14px; line-height: 1; }
.lsah-modal-content img { max-width: 100%; height: auto; border-radius: var(--ls-radius); margin: 8px 0; }
.lsah-modal-content a { color: var(--ls-primary); text-decoration: none; }
.lsah-modal-content a:hover { text-decoration: underline; }
.lsah-modal-content p { margin: 0 0 8px; }

.lsah-modal-tool {
    margin-top: 14px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    background: var(--ls-primary-light);
    color: var(--ls-primary);
    border-radius: var(--ls-radius-full);
    font-size: 12px;
    font-weight: 500;
}
.lsah-modal-tags {
    margin-top: 14px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.lsah-modal-tag {
    color: var(--ls-primary);
    font-size: 12px;
    text-decoration: none;
    padding: 3px 8px;
    border-radius: var(--ls-radius);
    background: var(--ls-primary-light);
    transition: var(--ls-transition);
}
.lsah-modal-tag:hover { background: var(--ls-primary); color: #fff; }
.lsah-modal-time {
    margin-top: 12px;             /* 与 .lsah-modal-content-toggle 同 margin-top 对齐 */
    font-size: 12px;
    color: var(--ls-text-muted);
    display: inline-flex;
    align-items: center;
    gap: 4px;
    vertical-align: middle;       /* 与同行 toggle 按钮中线对齐 */
}

/* 互动栏（现在在 scroll 内部，与评论同滚，匹配小红书布局） */
.lsah-modal-bar {
    padding: 14px 0 12px;
    margin-top: 18px;
    border-top: 1px solid var(--ls-border-light);
    display: flex;
    align-items: center;
    gap: 12px;
}
/* 评论容器：LSComment 注入的 .ls-comment-box 进来后会自然渲染 */
.lsah-modal-comments {
    margin-top: 8px;
    /* 给 LSComment 留位置，无内容时不撑高 */
}
.lsah-modal-like-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: transparent;
    border: 1px solid var(--ls-border);
    color: var(--ls-text-secondary);
    padding: 6px 12px;
    border-radius: var(--ls-radius-full);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--ls-transition);
}
.lsah-modal-like-btn i { font-size: 16px; }
.lsah-modal-like-btn:hover {
    background: var(--ls-danger-light);
    border-color: var(--ls-danger);
    color: var(--ls-danger);
}
.lsah-modal-like-btn.lsah-liked {
    background: var(--ls-danger);
    border-color: var(--ls-danger);
    color: #fff;
}
.lsah-modal-comment-num {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: var(--ls-text-secondary);
    font-size: 13px;
}
.lsah-modal-comment-num i { font-size: 16px; }
.lsah-modal-open {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--ls-text-muted);
    font-size: 12px;
    text-decoration: none;
    transition: var(--ls-transition);
}
.lsah-modal-open:hover { color: var(--ls-primary); }

/* loading 提示 */
.lsah-modal-loading {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--ls-text);
    color: #fff;
    padding: 10px 18px;
    border-radius: var(--ls-radius-full);
    font-size: 13px;
    z-index: 10020;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* 移动端 / 窄屏：上下堆叠 */
@media (max-width: 900px) {
    .lsah-modal-panel {
        flex-direction: column;
        width: 96vw;
        height: 92vh;
    }
    .lsah-modal-media {
        flex: 0 0 45%;
        width: 100%;
    }
    .lsah-modal-side {
        width: 100%;
        flex: 1;
    }
    .lsah-modal-author-bar { padding: 12px 16px; }
    .lsah-modal-scroll { padding: 14px 16px; }
    .lsah-modal-bar { padding: 12px 16px; }
}

/* ==================== 降低动效偏好（无障碍） ==================== */
@media (prefers-reduced-motion: reduce) {
    .lsah-spin,
    .lsah-spark.is-spin,
    .lsah-ws-hero-deco,
    .lsah-empty i,
    .lsah-fab::after,
    .lsah-sk-banner,
    .lsah-sk-cat,
    .lsah-sk-card {
        animation: none !important;
    }
    .lsah-card,
    .lsah-curated-card,
    .lsah-curated-hero-card,
    .lsah-curated-hero-side-card,
    .lsah-ws-tool {
        transition: none !important;
    }
}
