/* home.css — 应用首页（工作台 Hero + 生成卡片 + 推荐功能区 + 发现灵感瀑布流）样式
 * 说明：本文件由 style.css 拆出，供前台首页与后台「页面装修 · 应用首页模板」共用。
 * 类名与官方一致；变量在 style.css 的 :root 定义，这里为后台搭建器场景做同值兜底。
 */

/* 变量兜底（后台搭建器页面未加载 style.css 时使用；值与原站一致）
   注意：不能用 :root —— admin.html 也加载本文件，:root 的 RGB 三元组会覆盖
   admin.css 的同名变量（--panel/--line/--ink 为完整颜色值），导致后台弹窗、
   面板等所有 background: var(--panel) 失效变透明。因此收窄到实际需要兜底的
   容器：前台首页根 / 装修画布 / 装修渲染根 / 页脚容器。 */
.home-page, .dc-home-canvas, .dc-root, .home-footer-holder {
  --page: 247 247 248; --panel: 255 255 255; --line: 226 226 228; --line-strong: 199 200 204;
  --ink: 24 24 26; --ink-secondary: 86 86 92; --ink-faint: 145 145 151;
  --brand-50: 245 245 246; --brand-100: 235 235 237; --brand-200: 215 216 219; --brand-300: 184 185 190;
}
/* =====================================================================================
   首页 —— 严格复刻官方门户（工作台 Hero + 生成卡片 + 推荐功能区 + 发现灵感瀑布流）
   类名与官方一致，数值取自官方线上 CSS
   ===================================================================================== */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.no-scrollbar { scrollbar-width: none; -ms-overflow-style: none; }
.no-scrollbar::-webkit-scrollbar { display: none; }
.home-page svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
/* 整页一屏显示：压缩纵向留白（页面间距 / Hero / 输入卡），保证 1080p 视口下热门推荐完整可见 */
.home-page { display: flex; flex-direction: column; gap: 16px; padding: 18px 28px 28px; background: rgb(var(--page)); color: rgb(var(--ink)); }
/* 第二十五批：首页等比例缩放 —— 内容按 1920 窗口的设计宽（1864px）封顶并居中。
   浏览器缩小（Ctrl-）会拉宽 CSS 视口，不封顶时整页会被拉伸、卡片变成宽扁条（比例失调）；
   封顶后缩放只让整页等比例变小，布局与 100% 时完全一致。 */
.home-page { max-width: 1864px; margin-left: auto; margin-right: auto; }
/* 等比例缩放模式（JS 在可用宽度不足 1864 时施加 CSS zoom 并挂上 .home-fit）：
   布局锁死为 1864 设计宽，一切「随视口宽度重排」的断点全部失效 —— 缩放只改变整体大小，UI 不变 */
.home-page.home-fit { width: 1864px; }
.home-page.home-fit .home-function-module { margin-left: -16px; margin-right: -24px; }
/* 缩放模式下卡片一律保持 ≥1680 的横排设计（与 1920 窗口 100% 缩放时逐像素一致） */
.home-page.home-fit .home-function-app-card { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1fr); align-items: center; gap: 12px; padding: 12px 12px 12px 20px; }
.home-page.home-fit .home-function-app-copy > strong { font-size: 16px; }
.home-page.home-fit .home-function-app-copy > span { display: -webkit-box; margin-top: 10px; font-size: 12px; line-height: 18px; white-space: normal; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.home-page.home-fit .home-function-app-visual { height: 107px; margin-top: 0; }
.home-page.home-fit .home-function-app-visual img { object-position: center; }

/* ---------------- 工作台 Hero ---------------- */
.home-workbench-hero { position: relative; z-index: 20; isolation: isolate; overflow: visible; margin: -18px -28px 0; padding: 16px clamp(24px, 5.2vw, 88px) 14px; background: linear-gradient(180deg, #fff 0, rgba(255, 255, 255, .96) 54%, rgb(var(--page)) 100%); }
.hw-ambient { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.home-workbench-ambient { position: absolute; inset: 0; background: radial-gradient(ellipse 48% 68% at 8% 28%, rgba(181, 235, 255, .34), transparent 73%), radial-gradient(ellipse 44% 64% at 91% 24%, rgba(255, 241, 166, .3), transparent 76%); -webkit-mask-image: linear-gradient(180deg, #000 0, #000 66%, transparent); mask-image: linear-gradient(180deg, #000 0, #000 66%, transparent); }
.home-workbench-dots { position: absolute; inset: 0; opacity: .76; background-image: radial-gradient(circle, rgba(77, 188, 255, .34) 1px, transparent 1.2px); background-position: top; background-size: 16px 16px; -webkit-mask-image: linear-gradient(180deg, #000 0, #000 70%, transparent); mask-image: linear-gradient(180deg, #000 0, #000 70%, transparent); }
.hw-inner { position: relative; max-width: 1180px; margin: 0 auto; }
.home-workbench-header { position: relative; max-width: 896px; margin: 0 auto; text-align: center; }
.home-workbench-title { display: flex; align-items: baseline; justify-content: center; gap: 10px; color: #090909; font-size: clamp(30px, 3.4vw, 44px); font-weight: 900; line-height: 1.06; letter-spacing: -.055em; text-wrap: balance; }
.home-workbench-title-accent { color: #0586ff; background: linear-gradient(90deg, #0586ff, #00a9ef 52%, #05cce7); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.home-workbench-underline { display: block; width: min(560px, 58vw); height: auto; margin: 2px auto 0; color: #03d5df; }
.home-workbench-composer-wrap { margin-top: 10px; }
.pixpix-home-section { position: relative; width: 100%; max-width: 800px; margin: 0 auto; }

/* ---------------- 生成器：Tab / 面板 / 输入行 / 工具条 ---------------- */
.pixpix-home-composer { padding-top: 0; }
.pixpix-home-composer .home-generate-tabs { position: relative; z-index: 3; display: flex; width: 100%; height: 56px; align-items: center; overflow: hidden; padding: 6px; border: 1px solid #e1e2e5; border-bottom: 0; border-radius: 24px 24px 0 0; background: rgba(255, 255, 255, .96); box-shadow: 0 -4px 18px rgba(15, 23, 42, .025); isolation: isolate; }
.pixpix-home-composer .home-generate-tab-slider { position: absolute; z-index: 0; top: 6px; bottom: 6px; left: 6px; width: calc((100% - 12px) / 3); border-radius: 16px; background: #18191c; box-shadow: 0 6px 16px rgba(15, 23, 42, .16); pointer-events: none; transform: translateX(0); transition: transform .38s cubic-bezier(.22, 1, .36, 1), box-shadow .26s ease; will-change: transform; }
.pixpix-home-composer .home-generate-tabs[data-mode=image] .home-generate-tab-slider { transform: translateX(100%); }
.pixpix-home-composer .home-generate-tabs[data-mode=video] .home-generate-tab-slider { transform: translateX(200%); }
.pixpix-home-composer .home-generate-tab { position: relative; z-index: 1; display: inline-flex; width: calc(100% / 3); min-width: 0; height: 44px; flex: 1 1 0; align-items: center; justify-content: center; gap: 7px; margin: 0; padding: 0 14px; border: 0; border-radius: 16px; background: transparent; color: #74767c; font-size: 13.5px; font-weight: 600; line-height: 20px; transition: color .26s ease, transform .26s cubic-bezier(.22, 1, .36, 1); }
.pixpix-home-composer .home-generate-tab[data-active=true] { color: #fff; }
.pixpix-home-composer .home-generate-tab[data-active=false]:hover { color: #222327; transform: translateY(-1px); }
.pixpix-home-composer .home-generate-tab svg { width: 16px; height: 16px; transition: transform .28s cubic-bezier(.22, 1, .36, 1); }
.pixpix-home-composer .home-generate-tab[data-active=true] svg { transform: scale(1.08); }
.pixpix-home-panel { display: flex; min-height: 150px; flex-direction: column; gap: 0; overflow: visible; border: 1px solid #e1e2e5; border-top: 0; border-radius: 0 0 28px 28px; padding: 14px 16px; background: #fff; box-shadow: 0 24px 54px -20px rgba(15, 23, 42, .2), 0 8px 22px rgba(15, 23, 42, .045); }
/* z-index 需高于 .home-generate-tabs(3)：本元素因动画 transform 自成 stacking context，否则内部弹层(z-index:90)会被页签盖住 */
.pixpix-home-mode-content { position: relative; z-index: 4; display: flex; min-width: 0; flex-direction: column; gap: 14px; animation: pixpix-home-mode-content-in .32s cubic-bezier(.22, 1, .36, 1) both; transform-origin: top center; }
@keyframes pixpix-home-mode-content-in { 0% { opacity: .35; transform: translateY(6px) scale(.997); } to { opacity: 1; transform: translateY(0) scale(1); } }
.pixpix-home-input-row { display: flex; width: 100%; min-height: 72px; align-items: flex-start; gap: 10px; padding: 6px 4px; }
.pixpix-home-upload-zone { position: relative; width: 64px; flex: 0 0 64px; }
.pixpix-home-upload { position: relative; display: flex; width: 64px; height: 80px; flex: 0 0 64px; align-items: center; justify-content: center; border: 0; padding: 0; background: transparent; color: #0ea5e9; }
.pixpix-home-upload-card { position: relative; display: flex; width: 56px; height: 72px; align-items: center; justify-content: center; overflow: hidden; border: 1px solid #c2e9ff; border-radius: 8px; background: #f7fcff; transform: rotate(-6deg); transition: transform .18s ease, background-color .18s ease; }
.pixpix-home-upload:hover .pixpix-home-upload-card { background: #eefaff; transform: rotate(-3deg) scale(1.04); }
.pixpix-home-upload-card svg { width: 20px; height: 20px; }
.pixpix-home-product-trigger { position: absolute; top: calc(100% + 1px); left: 50%; z-index: 4; display: inline-flex; height: 22px; align-items: center; justify-content: center; gap: 3px; border: 0; padding: 0; color: #6f6f6f; background: transparent; font-size: 10px; font-weight: 500; line-height: 1; white-space: nowrap; transform: translateX(-50%); transition: color .16s ease; }
.pixpix-home-product-trigger:hover { color: #0586ff; }
.pixpix-home-product-trigger svg { width: 12px; height: 12px; }
.pixpix-home-prompt { display: flex; min-width: 180px; flex: 1; flex-direction: column; justify-content: flex-start; padding: 4px; }
.pixpix-home-textarea { display: block; width: 100%; min-height: 72px; max-height: 168px; resize: none; overflow-x: hidden; overflow-y: auto; border: 0; padding: 0; color: #252525; background: transparent; font-size: 16px; font-weight: 400; line-height: 24px; outline: none; white-space: pre-wrap; overflow-wrap: anywhere; }
.pixpix-home-textarea:focus { border: 0; outline: none; box-shadow: none; }
.pixpix-home-textarea::placeholder { color: #777; opacity: 1; }
.pixpix-home-reference-list { display: flex; flex-wrap: wrap; gap: 8px; width: 100%; padding-bottom: 2px; }
.hp-ref { position: relative; width: 56px; height: 72px; overflow: hidden; border: 1px solid #e3e5e9; border-radius: 8px; background: #f7f8fa; }
.hp-ref img { display: block; width: 100%; height: 100%; object-fit: cover; }
.hp-ref-x { position: absolute; top: 3px; right: 3px; display: grid; place-items: center; width: 16px; height: 16px; border-radius: 50%; background: rgba(0, 0, 0, .55); color: #fff; font-size: 9px; line-height: 1; }
.pixpix-home-toolbar { position: relative; display: flex; width: 100%; height: 36px; flex: 0 0 36px; align-items: center; gap: 8px; }
.hp-rel { position: relative; min-width: 0; }
.pixpix-home-pill { display: inline-flex; height: 36px; min-width: 0; align-items: center; justify-content: center; gap: 4px; border: 1px solid #e5e5e5; border-radius: 999px; padding: 0 16px; color: rgba(23, 23, 23, .82); background: transparent; font-size: 14px; font-weight: 500; line-height: 20px; white-space: nowrap; transition: border-color .16s ease, color .16s ease, background-color .16s ease; }
.pixpix-home-pill:hover:not(:disabled) { border-color: #d4d4d4; color: #171717; background: #f7f7f7; }
.pixpix-home-pill:disabled { cursor: default; opacity: .55; }
.pixpix-home-model-pill { max-width: 220px; justify-content: flex-start; }
.hp-ico { display: inline-flex; flex: 0 0 auto; }
.pixpix-home-pill svg, .pixpix-home-submit svg { flex: 0 0 auto; }
.pixpix-home-pill .hp-ico svg { width: 16px; height: 16px; }
.pixpix-home-pill .hp-chev svg { width: 14px; height: 14px; }
.hp-grow { flex: 1; min-width: 0; overflow: hidden; text-align: left; text-overflow: ellipsis; white-space: nowrap; }
.hp-chev { display: inline-flex; flex: 0 0 auto; }
.pixpix-home-submit { display: inline-flex; width: 80px; height: 36px; flex: 0 0 80px; align-items: center; justify-content: center; gap: 8px; margin-left: auto; border: 1px solid transparent; border-radius: 999px; padding: 0 16px; color: #fff; background: #171717; box-shadow: 0 1px 2px rgba(0, 0, 0, .05); font-size: 14px; font-weight: 500; line-height: 20px; transition: transform .16s ease, background-color .16s ease; }
.pixpix-home-submit:hover { background: #050505; transform: translateY(-1px); }
.pixpix-home-submit svg { width: 16px; height: 16px; }
.hp-dd { position: absolute; z-index: 90; bottom: calc(100% + 8px); left: 0; min-width: 288px; max-height: 420px; overflow: auto; padding: 14px; border: 1px solid #e6e7ea; border-radius: 16px; background: #fff; box-shadow: 0 18px 44px rgba(15, 23, 42, .16); }
#hp-model-dd { width: 300px; padding: 6px; }
.hp-mi { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; padding: 10px 12px; border-radius: 10px; font-size: 13.5px; color: #232529; }
.hp-mi:hover { background: #f6f7f9; }
.hp-mi.on { background: #f1f2f4; font-weight: 700; }
.hp-mi b { flex: 0 0 auto; font-weight: 600; color: #7a8195; }
.hp-mi span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hp-empty { padding: 14px; text-align: center; font-size: 13px; color: #9aa1ad; }

/* ---------------- 推荐功能区（海报 + 快捷卡 + 热门推荐） ---------------- */
.home-function-module { display: grid; grid-template-columns: minmax(0, 592px) minmax(0, 1fr); gap: 20px; min-width: 0; }
/* 左列高度决定整个模块：150×2 + 16 间距 = 316px，右列热门推荐自动等高拉伸，不再写死高度导致裁切 */
.home-function-left { display: grid; grid-template-rows: 150px 150px; gap: 16px; min-width: 0; }
.home-function-banner-slot, .home-function-banner-carousel, .home-function-banner-card { width: 100%; height: 100%; min-width: 0; }
.home-function-banner-card { position: relative; overflow: hidden; border: 1px solid rgba(230, 233, 239, .92); border-radius: 16px; background: #edf2ff; box-shadow: 0 8px 24px rgba(33, 52, 92, .06); animation: home-banner-in .34s cubic-bezier(.22, 1, .36, 1) both; }
@keyframes home-banner-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.home-function-banner-slide { position: absolute; z-index: 1; inset: 0; }
.home-function-banner-slide img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center; }
.home-function-banner-arrows { pointer-events: none; position: absolute; z-index: 20; inset: 0 10px; display: flex; align-items: center; justify-content: space-between; opacity: 0; transition: opacity .18s ease; }
.home-function-banner-card:hover .home-function-banner-arrows { opacity: 1; }
.home-function-banner-arrows button { pointer-events: auto; display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border: 1px solid rgba(255, 255, 255, .48); border-radius: 50%; color: #fff; background: rgba(23, 29, 43, .28); box-shadow: 0 5px 14px rgba(24, 31, 48, .16); backdrop-filter: blur(10px); transition: background-color .16s ease, transform .16s ease; }
.home-function-banner-arrows button:hover:not(:disabled) { background: rgba(23, 29, 43, .46); transform: scale(1.04); }
.home-function-banner-arrows button:disabled { cursor: default; opacity: .58; }
.home-function-banner-arrows svg { width: 18px; height: 18px; stroke-width: 2.2; }
.home-function-quick-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; min-width: 0; }
.home-function-quick-card { position: relative; display: block; overflow: hidden; min-width: 0; height: 150px; padding: 32px 0 0 28px; border: 1px solid #eef0f3; border-radius: 16px; color: #222; background: #fff; box-shadow: inset 0 3px 30px #fff; isolation: isolate; transition: border-color .18s ease; }
.home-function-quick-card::before { position: absolute; z-index: -2; inset: 0; content: ""; opacity: .62; transition: opacity .3s ease; }
.home-function-quick-card[data-tone=blue]::before { background: radial-gradient(circle at 88% 100%, rgba(190, 236, 255, .78), transparent 54%); }
.home-function-quick-card[data-tone=violet]::before { background: radial-gradient(circle at 88% 100%, rgba(242, 214, 255, .72), transparent 54%); }
.home-function-quick-card:hover { border-color: #e2e6ed; }
.home-function-quick-card:hover::before { opacity: 1; }
.home-function-quick-icon { position: relative; z-index: 2; display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; color: #24282d; transition: opacity .26s ease; }
.home-function-quick-icon svg { width: 23px; height: 23px; stroke-width: 1.8; }
.home-function-quick-card > strong { position: relative; z-index: 2; display: block; margin-top: 10px; font-size: 18px; font-weight: 700; line-height: 24px; transition: transform .3s ease; }
.home-function-quick-card > p { position: relative; z-index: 2; max-width: calc(100% - 28px); margin: 12px 0 0; color: #596065; font-size: 12px; line-height: 16px; transform-origin: top; transition: opacity .22s ease, transform .3s ease; }
.home-function-quick-arrow { position: absolute; z-index: 3; bottom: 24px; left: 28px; display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border: 0; border-radius: 50%; color: #30363d; background: #fff; box-shadow: 0 3px 6px rgba(0, 113, 180, .1); opacity: 0; transform: translateY(8px); transition: opacity .26s ease, transform .3s ease; }
.home-function-quick-arrow svg { width: 17px; height: 17px; stroke-width: 1.9; }
.home-function-quick-visual { position: absolute; z-index: 1; right: 0; bottom: 0; overflow: hidden; width: 60%; height: 74%; border-radius: 20px 0 0; opacity: 0; transition: opacity .3s ease; }
.home-function-quick-visual img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; object-position: right bottom; }
.home-function-quick-card:hover .home-function-quick-icon, .home-function-quick-card:hover > p { opacity: 0; }
.home-function-quick-card:hover > strong { transform: translateY(-44px); }
.home-function-quick-card:hover > p { transform: translateY(-53px) scaleY(0); }
.home-function-quick-card:hover .home-function-quick-arrow { opacity: 1; transform: translateY(0); }
.home-function-quick-card:hover .home-function-quick-visual { opacity: 1; }
/* 高度由左列（150×2+16=316px）决定，grid 默认拉伸等高；内部 flex:1 自适应，两行网格永不裁切 */
.home-function-recommend { display: flex; flex-direction: column; overflow: hidden; min-width: 0; height: auto; padding: 18px 20px; border-radius: 16px; background: #fff; }
.home-function-recommend-header { display: flex; align-items: center; justify-content: space-between; gap: 18px; min-width: 0; min-height: 21px; }
.home-function-recommend-title { position: relative; z-index: 1; flex: 0 0 auto; margin: 0; color: #222; font-size: 16px; font-weight: 750; line-height: 21px; }
.home-function-recommend-title::after { position: absolute; z-index: -1; right: 5px; bottom: -2px; left: 5px; height: 7px; border-radius: 999px 3px 999px 4px; background: linear-gradient(90deg, rgba(121, 223, 244, .34), rgba(178, 135, 255, .36)); content: ""; transform: rotate(-4deg); }
.home-function-more { display: inline-flex; flex: 0 0 auto; align-items: center; gap: 3px; color: #8e939c; font-size: 12px; line-height: 17px; transition: color .16s ease; }
.home-function-more:hover { color: #30353b; }
.home-function-more svg { width: 14px; height: 14px; stroke-width: 1.8; }
/* 高度不再写死：由 flex 撑满「推荐」卡剩余空间，避免第二行被 overflow:hidden 裁切
   （旧写法 height:312px + margin-top:24px 需要 357px，而内容区只有 320px，第二行底部被切 17px） */
.home-function-app-grid { flex: 1 1 auto; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-template-rows: repeat(2, minmax(0, 1fr)); gap: 8px; min-height: 0; margin-top: 16px; }
.home-function-app-card { position: relative; display: flex; flex-direction: column; overflow: hidden; min-width: 0; min-height: 0; padding: 12px; border-radius: 16px; color: #222; background: #f7f8fa; isolation: isolate; }
.home-function-app-card::before { position: absolute; z-index: 0; inset: 0; border-radius: inherit; background: linear-gradient(89.35deg, #d9f5ff 10.77%, #e6ccff 98%); content: ""; opacity: 0; transition: opacity .3s ease; }
.home-function-app-card:hover::before { opacity: 1; }
.home-function-app-copy { position: relative; z-index: 1; display: block; flex: 0 0 auto; min-width: 0; }
.home-function-app-copy > strong { display: block; overflow: hidden; color: #222; font-size: 15px; font-weight: 750; line-height: 21px; text-overflow: ellipsis; white-space: nowrap; }
.home-function-app-copy > span { display: block; overflow: hidden; margin-top: 4px; color: #91959d; font-size: 11px; line-height: 17px; text-overflow: ellipsis; white-space: nowrap; }
.home-function-app-visual { position: relative; z-index: 1; display: block; flex: 1 1 auto; overflow: hidden; width: 100%; min-height: 0; margin-top: 8px; border-radius: 10px; background: #eef0f4; }
/* 第十三批追补：卡片封面恢复参考站原版 object-fit:cover（填满裁切）——
   contain 会把宽图缩成小细条、竖版长图缩成细缝，即用户反馈的「比例失调、挤在一起」；
   cover 对任意比例封面都输出完整的缩略块，视觉比例恒定 */
.home-function-app-visual img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center; }
/* 工具卡（无封面图）：渐变缩略图 + 线性图标 */
.home-function-app-visual.is-ico { display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, #7cb0ff, #2f6bff); box-shadow: inset 0 0 0 1px rgba(255,255,255,.18); }
.home-function-app-visual.is-ico svg { width: 32px; height: 32px; stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.home-function-app-card[data-kind="tool"] .home-function-app-visual.is-ico { background: linear-gradient(135deg, #8f8dff, #5b4bff); }
@media (min-width: 1680px) {
  .home-function-app-card { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1fr); align-items: center; gap: 12px; padding: 12px 12px 12px 20px; }
  .home-function-app-copy > strong { font-size: 16px; }
  .home-function-app-copy > span { display: -webkit-box; margin-top: 10px; font-size: 12px; line-height: 18px; white-space: normal; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
  .home-function-app-visual { height: 107px; margin-top: 0; }
  .home-function-app-visual img { object-position: center; }
}

/* ---------------- 发现灵感（分类 + 瀑布流） ---------------- */
.home-showcase { display: flex; flex-direction: column; gap: 20px; }
.hs-title-row { display: flex; align-items: center; gap: 8px; }
.hs-title-row svg { width: 24px; height: 24px; flex-shrink: 0; }
.hs-title-row h2 { font-size: 18px; font-weight: 500; line-height: 28px; color: rgb(var(--ink)); }
.hs-cats { display: flex; min-width: 0; gap: 8px; overflow-x: auto; padding-bottom: 4px; }
.hs-cat { display: inline-flex; flex-shrink: 0; align-items: center; justify-content: center; height: 36px; min-height: 36px; padding: 0 16px; border: 1px solid rgb(var(--line)); border-radius: 999px; background: transparent; color: rgba(24, 24, 26, .8); font-size: 14px; font-weight: 400; line-height: 20px; white-space: nowrap; transition: .18s; }
.hs-cat:hover { background: rgb(var(--page)); color: rgb(var(--ink)); }
.hs-cat[aria-pressed=true] { border-color: transparent; background: rgb(var(--ink)); color: #fff; font-weight: 500; box-shadow: 0 1px 2px rgba(0, 0, 0, .08); }
/* 瀑布流：JS 按列轮转分桶（.hs-col 每列一个容器），数量均衡不出现整列空白 */
.hs-masonry { display: flex; align-items: flex-start; gap: 12px; }
/* 列等宽（对齐 market：约 244px 一列），卡片按原始比例显示、最高 470px（参考站实测最大高度） */
.hs-masonry .mk-col { flex: 1 1 0; }
.hs-masonry .mk-media img, .hs-masonry .mk-media video { max-height: 470px; object-fit: cover; }
.hs-col { flex: 1 1 0; min-width: 0; }
@media (min-width: 640px) { .hs-masonry { gap: 16px; } }
@media (min-width: 1280px) { .hs-masonry { gap: 20px; } }
.hs-item { break-inside: avoid; margin-bottom: 12px; animation: hs-float-in .48s cubic-bezier(.2, .8, .2, 1) both; }
@media (min-width: 640px) { .hs-item { margin-bottom: 16px; } }
@media (min-width: 1280px) { .hs-item { margin-bottom: 20px; } }
@keyframes hs-float-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.hs-tile { display: block; width: 100%; overflow: hidden; border-radius: 12px; text-align: left; background: rgb(var(--panel)); box-shadow: 0 1px 2px rgba(17, 24, 39, .04), 0 0 0 1px rgba(0, 0, 0, .05); transition: box-shadow .3s; }
.hs-tile:hover { box-shadow: 0 1px 2px rgba(17, 24, 39, .04), 0 0 0 1px rgba(0, 0, 0, .05), 0 10px 28px rgba(15, 23, 42, .12); }
.hs-media { position: relative; display: block; width: 100%; overflow: hidden; background: linear-gradient(135deg, #f5f7ff, rgb(var(--page)) 45%, #e8ecf3); }
.hs-media img { display: block; width: 100%; height: auto; background: rgb(var(--page)); object-fit: contain; transition: transform .5s; }
.hs-tile:hover .hs-media img { transform: scale(1.015); }
.hs-vbadge { position: absolute; left: 10px; top: 10px; display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: 999px; background: rgba(0, 0, 0, .6); color: #fff; font-size: 11px; font-weight: 600; backdrop-filter: blur(6px); }
.hs-vbadge svg { width: 13px; height: 13px; }
.hs-overlay { position: absolute; left: 0; right: 0; bottom: 0; display: block; padding: 32px 12px 12px; pointer-events: none; background: linear-gradient(to top, rgba(2, 6, 23, .75), rgba(2, 6, 23, .25) 55%, transparent); opacity: 0; transition: opacity .2s; }
.hs-tile:hover .hs-overlay { opacity: 1; }
.hs-orow { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 11px; font-weight: 500; color: rgba(255, 255, 255, .75); }
.hs-ocat { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hs-ostats { display: flex; flex-shrink: 0; align-items: center; gap: 10px; color: rgba(255, 255, 255, .85); }
.hs-ostats > span { display: inline-flex; align-items: center; gap: 4px; }
.hs-ostats svg { width: 12px; height: 12px; }

/* ---------------- 响应式 ---------------- */
/* 矮视口（笔记本 / 半屏窗口）：进一步压缩 Hero 与功能区，保证热门推荐完整入屏 */
/* 矮视口压缩仅在「未进入等比例缩放模式」时生效（缩放模式下整页已按比例变小，再压缩会改变 UI） */
@media (min-width: 901px) and (max-height: 840px) {
  .home-page:not(.home-fit) { gap: 12px; padding-top: 12px; }
  .home-page:not(.home-fit) .home-workbench-hero { margin-top: -12px; padding-top: 10px; padding-bottom: 10px; }
  .home-page:not(.home-fit) .home-workbench-title { font-size: clamp(26px, 2.6vw, 36px); }
  .home-page:not(.home-fit) .home-workbench-underline { width: min(430px, 44vw); }
  .home-page:not(.home-fit) .home-workbench-composer-wrap { margin-top: 6px; }
  .home-page:not(.home-fit) .pixpix-home-panel { min-height: 130px; }
  .home-page:not(.home-fit) .pixpix-home-textarea { min-height: 52px; }
  .home-page:not(.home-fit) .home-function-left { grid-template-rows: 132px 132px; gap: 12px; }
  .home-page:not(.home-fit) .home-function-quick-card { height: 132px; padding-top: 24px; }
  .home-page:not(.home-fit) .home-function-quick-card > strong { margin-top: 7px; font-size: 16px; }
  .home-page:not(.home-fit) .home-function-module { gap: 14px; }
}
/* ≤1200 塌单列仅对「未缩放」的窄视口生效；缩放模式下布局锁死不重排 */
@media (max-width: 1200px) { .home-page:not(.home-fit) .home-function-module { grid-template-columns: minmax(0, 1fr); } }
@media (min-width: 1201px) { .home-function-module { margin-left: -16px; margin-right: -24px; } }
@media (max-width: 900px) {
  .home-function-recommend { height: auto; }
  .home-function-app-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: repeat(4, 131px); height: auto; }
  .home-function-app-card { display: grid; grid-template-columns: minmax(0, 1fr) minmax(108px, .82fr); align-items: center; gap: 12px; padding: 12px 12px 12px 18px; }
  .home-function-app-copy > span { display: -webkit-box; margin-top: 8px; font-size: 12px; line-height: 18px; white-space: normal; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
  .home-function-app-visual { height: 107px; margin-top: 0; }
  .home-function-app-visual img { object-position: center; }
}
@media (max-width: 680px) {
  .home-page { gap: 22px; padding: 16px 14px 40px; }
  .home-workbench-hero { margin: -16px -14px 0; padding: 28px 20px 26px; }
  .home-workbench-title { display: block; font-size: 32px; line-height: 1.12; }
  .home-workbench-title > span { display: block; }
  .home-workbench-underline { width: 310px; max-width: 90vw; margin-top: 0; }
  .home-workbench-composer-wrap { margin-top: 26px; }
  .pixpix-home-composer .home-generate-tabs { height: 50px; padding: 5px; border-radius: 18px 18px 0 0; }
  .pixpix-home-composer .home-generate-tab-slider { top: 5px; bottom: 5px; left: 5px; width: calc((100% - 10px) / 3); border-radius: 13px; }
  .pixpix-home-composer .home-generate-tab { height: 40px; gap: 4px; padding: 0 7px; font-size: 11px; }
  .pixpix-home-composer .home-generate-tab svg { width: 13px; height: 13px; }
  .pixpix-home-panel { min-height: 158px; border-radius: 0 0 20px 20px; padding: 12px; box-shadow: 0 18px 34px -16px rgba(15, 23, 42, .18); }
  .pixpix-home-mode-content { gap: 14px; }
  .pixpix-home-input-row { min-height: 88px; gap: 8px; padding: 8px 2px 6px; }
  .pixpix-home-upload, .pixpix-home-upload-zone { width: 44px; flex-basis: 44px; }
  .pixpix-home-upload { height: 56px; }
  .pixpix-home-upload-card { width: 40px; height: 52px; border-radius: 6px; }
  .pixpix-home-upload-card svg { width: 14px; height: 14px; }
  .pixpix-home-product-trigger { top: calc(100% + 2px); height: 16px; gap: 2px; font-size: 9px; }
  .pixpix-home-textarea { font-size: 13px; line-height: 20px; }
  .pixpix-home-toolbar { height: auto; flex-basis: auto; min-height: 32px; gap: 6px; }
  .pixpix-home-pill { height: 32px; gap: 3px; padding: 0 10px; font-size: 11px; line-height: 16px; }
  .pixpix-home-pill svg { width: 12px; height: 12px; }
  .pixpix-home-model-pill { max-width: 120px; }
  .pixpix-home-submit { width: 64px; height: 32px; flex-basis: 64px; gap: 4px; padding: 0 10px; font-size: 11px; line-height: 16px; }
  .pixpix-home-submit svg { width: 12px; height: 12px; }
  .hp-dd { left: auto; right: 0; min-width: 260px; }
  .home-function-left, .home-function-module, .home-function-quick-grid { gap: 12px; }
  .home-function-left { grid-template-rows: 136px 148px; }
  .home-function-quick-card { height: 148px; padding: 20px; }
  .home-function-quick-card > strong { margin-top: 7px; font-size: 16px; }
  .home-function-quick-card > p { max-width: 74%; margin-top: 5px; }
  .home-function-quick-arrow { bottom: 14px; left: 20px; }
  .home-function-recommend { height: auto; padding: 16px; }
  .home-function-app-grid { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; height: auto; margin-top: 16px; }
  .home-function-app-card { min-height: 112px; }
  .home-function-app-visual { height: 88px; }
}
@media (max-width: 500px) {
  .home-function-left { display: flex; flex-direction: column; }
  .home-function-banner-slot { height: 132px; }
  .home-function-quick-grid { grid-template-columns: minmax(0, 1fr); }
  .home-function-quick-card { height: 132px; }
}

/* ---------------- 首页页脚 ---------------- */
.home-footer { padding: 26px 0 4px; text-align: center; font-size: 12.5px; color: rgb(var(--ink-faint)); }
.home-footer a { color: rgb(var(--ink-faint)); text-decoration: none; }
.home-footer a:hover { color: rgb(var(--ink)); }
.hf-line { display: inline-flex; align-items: center; flex-wrap: wrap; justify-content: center; gap: 8px; }
.hf-sep { width: 1px; height: 10px; background: rgb(var(--ink-faint)); opacity: .4; display: inline-block; }

/* ---------------- 生成外壳（旧版基线，当前首页仍复用） ---------------- */
/* ---------- 左栏：生成外壳（Tab 条 + 白色面板） ---------- */
.home-generate-shell { position: relative; padding-top: 46px; }
.home-generate-tabs {
  position: absolute; top: 0; left: 0; z-index: 2;
  display: flex; width: 100%; max-width: 100%; height: 47px; align-items: stretch;
  overflow: hidden; padding-right: 0;
  border: 1px solid #dedfe3; border-bottom: 0; border-radius: 18px 18px 0 0;
  background: #fff; box-shadow: 0 8px 24px rgba(17, 18, 20, .035);
}
.home-generate-tab {
  position: relative; z-index: 1;
  display: inline-flex; min-width: 168px; height: 46px; flex: 0 0 auto;
  align-items: center; justify-content: flex-start; gap: 8px; padding: 0 20px;
  border: 0; background: transparent; color: var(--gw-ink);
  font-size: 13px; font-weight: 750; white-space: nowrap;
}
.home-generate-tab svg { width: 16px; height: 16px; flex-shrink: 0; }
.home-generate-tab-indicator {
  position: absolute; right: 20px; bottom: 0; left: 20px; height: 2px;
  border-radius: 2px 2px 0 0; background: #18191c;
}
.home-generate-panel {
  /* z-index 需高于 .home-generate-tabs(3)：本元素是 stacking context，过低会导致内部参数弹层被页签盖住 */
  position: relative; z-index: 4;
  border: 1px solid #dedfe3; border-top: 0; border-radius: 0 0 18px 18px;
  background: #fff; box-shadow: 0 12px 34px rgba(17, 18, 20, .045);
  padding: 20px;
}
.home-generate-panel > * + * { margin-top: 16px; }
@media (max-width: 639px) {
  .home-generate-shell { padding-top: 44px; }
  .home-generate-tabs { height: 45px; border-radius: 14px 14px 0 0; }
  .home-generate-tab { min-width: 154px; height: 44px; padding: 0 16px; font-size: 12px; }
  .home-generate-tab-indicator { right: 16px; left: 16px; }
  .home-generate-panel { border-radius: 0 0 14px 14px; padding: 16px; }
}

/* ================= 第四十五批：首页 H5（移动端）可用性 =================
   ① .hs-cat「精选/商品/写真/…」分类标签实测 62×36px，抬到 40px；
   ② #hp-product（.pixpix-home-product-trigger「选择商品图片」）实测只有 68×16px，
      字号 9px —— 手机上几乎不可点、也读不清。抬到 26px + 11px 字，
      并用 ::after 把热区扩到 42px 高（**只向下扩**，避免盖住上方 56px 的
      参考图上传按钮 —— 两者是不同用途，误触会选错图片）；
   ③ 生成工具条上的模型/尺寸/张数胶囊与「生成」按钮实测 32px，抬到 40px；。
   ④ 函数横幅（.home-function-banner-arrows）左右翻页箭头实测 32×32px，抬到 40px。 */
@media (max-width: 767px) {
  .hs-cat { height: 40px; min-height: 40px; }
  .pixpix-home-product-trigger { height: 26px; font-size: 11px; gap: 3px; }
  .pixpix-home-product-trigger::after {
    content: ''; position: absolute; left: 0; right: 0; top: 0; bottom: -16px;
  }
  .pixpix-home-pill, .pixpix-home-submit { height: 40px; }
  .pixpix-home-pill { font-size: 12px; }
  .pixpix-home-submit { font-size: 12px; }
  .home-function-banner-arrows button { width: 40px; height: 40px; }
}
