/* ==================== 首页 ====================
   用户 2026-09-20 给的参考图是铺满整屏的营销页；要求是「不要全屏，像套餐订阅那样在中间一部分显示，两边留空」。
   所以整页收在一栏里（和套餐订阅、设置同一个宽度 --page-column-width，2026-10-07 起 1440px），从上到下四段：轮播、快速创作、精选作品、底部（一块话 + 题材标签）。

   颜色照「浅色标准模板」那五档走（页面底 --bg → 卡片 --surface → 卡里的条目 --surface-soft），两套主题不另写色值。
   例外只有两块**自带底图 / 底色的深色块**：轮播和底部那块话。它们是压在画面上的字，浅色主题下也保持深底白字——
   和「掏钱按钮写死深底白字」是同一个道理，不跟着主题翻。

   按钮照全站的规矩：悬浮、聚焦不换样子，只有独立的操作按钮（轮播上的「开始创作」、底部那颗）按下缩小；
   入口卡、作品卡、题材标签、轮播圆点是导航，不缩——排除名单在 styles.css 顶部那条 button:active 上。 */

.home-inner {
  display: flex;
  flex-direction: column;
  gap: 24px;
  max-width: var(--page-column-width, 1440px);
  margin: 0 auto;
  padding-bottom: 8px;
}

/* ---- 轮播 ---- */
.home-hero {
  position: relative;
  flex: none;
  height: clamp(300px, 26vw, 372px);
  border-radius: 18px;
  background: #0d1015;
  color: #fff;
  overflow: hidden;
  isolation: isolate;
}
.home-hero-track { position: absolute; inset: 0; }
.home-hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity .6s ease, visibility 0s linear .6s;
}
.home-hero-slide.active { opacity: 1; visibility: visible; transition: opacity .6s ease, visibility 0s; }

/* 第一张图的虚化放大版垫在最底下，给这一张定色调；上面再压一层从左到右变透的暗幕，左边的字才压得住。 */
.home-hero-backdrop {
  position: absolute;
  inset: -12%;
  background-position: center;
  background-size: cover;
  filter: blur(42px) saturate(1.25);
  opacity: .6;
}
.home-hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(9, 11, 15, .94) 0%, rgba(9, 11, 15, .78) 40%, rgba(9, 11, 15, .2) 100%);
}

.home-hero-copy {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 56px;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  width: min(50%, 540px);
  /* 底下留给圆点 */
  padding-bottom: 26px;
}
.home-hero-eyebrow {
  margin: 0 0 10px;
  color: #5fd3ff;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .06em;
}
.home-hero-title {
  margin: 0;
  font-size: clamp(30px, 3vw, 42px);
  font-weight: 800;
  line-height: 1.18;
  letter-spacing: .01em;
}
.home-hero-subtitle { margin: 10px 0 0; font-size: clamp(16px, 1.5vw, 20px); font-weight: 600; color: rgba(255, 255, 255, .94); }
.home-hero-body { margin: 10px 0 0; max-width: 480px; font-size: 14px; line-height: 1.7; color: rgba(255, 255, 255, .7); white-space: normal; }

.home-cta {
  min-height: 44px;
  margin-top: 22px;
  padding: 0 30px;
  border: 0;
  border-radius: 10px;
  background: var(--gradient-primary);
  color: #fff;
  font-size: 15px;
  font-weight: 650;
}
.home-cta.is-quiet {
  margin-top: 0;
  border: 1px solid rgba(255, 255, 255, .38);
  background: rgba(255, 255, 255, .1);
}

/* 右边的画面。竖图排成一扇海报：第一张居中在前，二、三张退后半步、向两边各歪一点。 */
.home-hero-art {
  position: absolute;
  top: 0;
  right: 40px;
  bottom: 0;
  z-index: 1;
  width: 46%;
}
.home-hero-frame {
  position: absolute;
  top: 50%;
  left: 50%;
  height: 84%;
  aspect-ratio: 9 / 16;
  border-radius: 12px;
  background: rgba(255, 255, 255, .06);
  box-shadow: 0 18px 40px rgba(0, 0, 0, .5);
  overflow: hidden;
  transform: translate(-50%, -50%);
}
.home-hero-frame img { display: block; width: 100%; height: 100%; object-fit: cover; }
.home-hero-frame[data-order="0"] { z-index: 3; }
.home-hero-frame[data-order="1"],
.home-hero-frame[data-order="2"] { z-index: 2; height: 72%; filter: brightness(.82); }
/* 两边那两张往上提一点（-55% 不是 -50%）：歪过去的下角正好压在右下角的翻页键上，提上来就让开了。 */
.home-hero-frame[data-order="1"] { transform: translate(calc(-50% - var(--home-fan, 128px)), -55%) rotate(-5deg); }
.home-hero-frame[data-order="2"] { transform: translate(calc(-50% + var(--home-fan, 128px)), -55%) rotate(5deg); }
/* 只有两张时整扇往右挪半步，别让它歪在一边 */
.home-hero-art[data-count="2"] .home-hero-frame[data-order="0"] { transform: translate(calc(-50% + 56px), -50%); }
.home-hero-art[data-count="2"] .home-hero-frame[data-order="1"] { transform: translate(calc(-50% - 72px), -50%) rotate(-5deg); }

/* 横图不排扇面：只摆第一张，铺成一块宽画面，左边渐隐进暗幕里。 */
.home-hero-art.is-landscape { right: 0; width: 58%; }
.home-hero-art.is-landscape .home-hero-frame { display: none; }
.home-hero-art.is-landscape .home-hero-frame[data-order="0"] {
  display: block;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
  border-radius: 0;
  box-shadow: none;
  transform: none;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 38%);
  mask-image: linear-gradient(90deg, transparent 0%, #000 38%);
}

.home-hero-controls {
  position: absolute;
  right: 28px;
  bottom: 20px;
  left: 56px;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: space-between;
  pointer-events: none;
}
.home-hero-dots, .home-hero-pager { display: flex; align-items: center; gap: 8px; pointer-events: auto; }
.home-hero-dot {
  width: 8px;
  min-width: 0;
  height: 8px;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, .34);
  transition: width .28s cubic-bezier(.22, .61, .36, 1), background-color .28s;
}
.home-hero-dot.active { width: 24px; background: #5fd3ff; }
.home-hero-counter { min-width: 58px; color: rgba(255, 255, 255, .82); font-size: 13px; font-variant-numeric: tabular-nums; text-align: center; }
.home-hero-arrow, .home-row-arrow {
  position: relative;
  width: 30px;
  min-width: 0;
  height: 30px;
  min-height: 0;
  padding: 0;
  border-radius: 999px;
}
.home-hero-arrow { border: 1px solid rgba(255, 255, 255, .3); background: rgba(0, 0, 0, .28); color: #fff; }
.home-row-arrow { border: 1px solid var(--line); background: var(--surface); color: var(--text); }
/* 箭头用两条边画：一个转 45 度的小方块，只留朝外的两条边 */
.home-hero-arrow::before, .home-row-arrow::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 7px;
  height: 7px;
  border-top: 1.6px solid currentColor;
  border-right: 1.6px solid currentColor;
}
.home-hero-arrow.is-next::before, .home-row-arrow.is-next::before { transform: translate(-70%, -50%) rotate(45deg); }
.home-hero-arrow.is-previous::before, .home-row-arrow.is-previous::before { transform: translate(-30%, -50%) rotate(-135deg); }

/* ---- 轮播 · 影院横幅（用户 2026-10-06 从三个方案里选的方案一，演示站在 Assets\首页改版-1006） ----
   横图和视频铺满整块（.is-wide）；竖图那一张照旧排成上面那扇海报（居中，左边没有字了）。
   画面上只留右上角那一组（片名角标 + 声音、暂停）和左右两侧的切换箭头（用户 2026-10-07：「只保留右上角的内容，其余的移除。
   新增加左右切换的箭头，放到横幅左右两侧」）——字、按钮、缩略图、压字用的暗幕都撤了。
   只挂在新首页（data-layout="cinema"）上：旧页面 home.js 画的轮播照旧是字 + 圆点 + 翻页键。 */
/* 最高 520：一栏放到 1440 宽之后，还是 470 的话画面压得太扁（3 : 1）。 */
.home-hero[data-layout="cinema"] { height: clamp(340px, 34vw, 520px); }
.home-hero[data-layout="cinema"] .home-hero-art { right: 0; left: 0; width: auto; }
.home-hero-media { position: absolute; inset: 0; z-index: 0; overflow: hidden; background: #0d1015; }
/* 横幅比 16:9 扁（大屏约 2.8 : 1），居中裁会把人头顶切掉（《孤城剑影》女剑客的额头）：偏上裁，脸一般在上三分之一。 */
.home-hero-media img, .home-hero-media video { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; }
/* 右上角：片名角标 + 声音、暂停两颗键 */
.home-hero-tools { position: absolute; top: 18px; right: 20px; z-index: 5; display: flex; align-items: center; gap: 8px; }
.home-hero-caption {
  display: flex;
  align-items: center;
  height: 30px;
  margin: 0;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(0, 0, 0, .42);
  color: rgba(255, 255, 255, .9);
  font-size: 12.5px;
  line-height: 30px;
  white-space: nowrap;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
/* 角标里的作者名：竖线隔开，前面一个小人（2026-10-07）。 */
.home-hero-author { display: inline-flex; align-items: center; gap: 5px; }
.home-hero-caption > span + .home-hero-author { margin-left: 10px; padding-left: 10px; border-left: 1px solid rgba(255, 255, 255, .28); line-height: 14px; }
.home-hero-author::before {
  content: "";
  width: 12px;
  height: 12px;
  background: currentColor;
  -webkit-mask: var(--icon-account) center / contain no-repeat;
  mask: var(--icon-account) center / contain no-repeat;
}
.home-hero-tool {
  display: grid;
  place-items: center;
  width: 30px;
  min-width: 0;
  height: 30px;
  min-height: 0;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, .3);
  border-radius: 999px;
  background: rgba(0, 0, 0, .32);
  color: #fff;
}
.home-hero-tool svg { width: 15px; height: 15px; }
/* 左右两侧的切换箭头：竖直居中用 top + 负外边距，别用 translate（全站按钮按下是 scale，两个变换会打架）。 */
.home-hero-nav {
  position: absolute;
  top: 50%;
  z-index: 5;
  width: 44px;
  min-width: 0;
  height: 44px;
  min-height: 0;
  margin-top: -22px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, .28);
  border-radius: 999px;
  background: rgba(0, 0, 0, .36);
  color: #fff;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.home-hero-nav.is-previous { left: 18px; }
.home-hero-nav.is-next { right: 18px; }
/* 箭头照翻页键那样用两条边画 */
.home-hero-nav::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 10px;
  height: 10px;
  border-top: 2px solid currentColor;
  border-right: 2px solid currentColor;
}
.home-hero-nav.is-next::before { transform: translate(-70%, -50%) rotate(45deg); }
.home-hero-nav.is-previous::before { transform: translate(-30%, -50%) rotate(-135deg); }

/* ---- 小节标题 ---- */
.home-section { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.home-section-head { display: flex; align-items: center; gap: 12px; min-height: 30px; }
.home-section-head h3, .home-tags-card h3 { margin: 0; font-size: 18px; font-weight: 700; color: var(--text); }
.home-section-tools { display: flex; gap: 8px; margin-left: auto; }

/* ---- 快速创作 ---- */
.home-quick {
  display: grid;
  grid-template-columns: repeat(var(--home-quick-count, 5), minmax(0, 1fr));
  gap: 14px;
}
/* 新首页只留两张（2026-10-07），窄屏那几条按三列排的规则压不住它，点名两张排两列。 */
.home-quick[data-count="2"] { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.home-quick-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 96px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  color: var(--text);
  text-align: left;
  white-space: normal;
}
.home-quick-text { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.home-quick-text strong { font-size: 16px; font-weight: 700; }
.home-quick-text span { color: var(--muted); font-size: 12.5px; line-height: 1.55; }
.home-icon {
  display: grid;
  flex: none;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 13px;
  background: var(--accent-soft);
  color: var(--accent);
}
.home-icon svg { width: 24px; height: 24px; }
/* Minimo3D 那张换成琥珀色（用户 2026-09-25：「Minimo3D的入口给一个别的颜色」），和侧栏那颗同一组变量（styles.css）。 */
.home-quick-card[data-entry="model3d"] .home-icon { background: var(--model3d-soft); color: var(--model3d-color); }
.home-quick-card[data-entry="model3d"] .home-quick-text strong { color: var(--model3d-text); }

/* ---- 精选作品 ---- */
.home-works {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
}
.home-works::-webkit-scrollbar { display: none; }
/* 循环的时候不要吸附：翻页和拖动都要把位置平移一份，吸附会把它拽回去。 */
.home-works[data-looped="1"] { scroll-snap-type: none; cursor: grab; }
/* 按住拖（用户 2026-09-21）：拖的时候别让浏览器顺手选中卡片上的字。 */
.home-works.dragging { cursor: grabbing; user-select: none; }
.home-works.dragging img { pointer-events: none; }
/* 纯展示，不是按钮：鼠标是普通箭头，点了不做事（用户 2026-09-21）。
   下面这一排横向滚动的是旧页面 home.js 画的；新首页是再往下那个 .home-works-grid。 */
.home-work-card {
  display: flex;
  flex: none;
  cursor: default;
  flex-direction: column;
  gap: 10px;
  /* 一屏七张：六道间距摊到七张上 */
  width: calc((100% - 84px) / 7);
  min-width: 120px;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  color: var(--text);
  text-align: left;
  scroll-snap-align: start;
}
.home-work-frame {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 9 / 16;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-soft);
  overflow: hidden;
}
.home-work-frame img { display: block; width: 100%; height: 100%; object-fit: cover; }
.home-work-tag {
  position: absolute;
  top: 8px;
  left: 8px;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(0, 0, 0, .58);
  color: #fff;
  font-size: 12px;
  line-height: 1.5;
}
.home-work-meta { display: flex; flex-direction: column; gap: 3px; min-width: 0; padding: 0 2px; }
.home-work-meta strong, .home-work-meta span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.home-work-meta strong { font-size: 14px; font-weight: 650; }
.home-work-meta span { color: var(--muted); font-size: 12.5px; }

/* 新首页的精选作品（用户 2026-10-07：「精选作品全部使用16:9的构图，每行固定4个，不需要左右滚动了，做8行」）：
   一律 16:9、每行四张，最多二十行（WORK_LIMIT），不滚动、不翻页；竖图放进来按中间裁成横的。手机上一行两张（四张挤一行字看不清）。 */
.home-works-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px 14px; }
.home-works-grid .home-work-card { width: auto; min-width: 0; }
.home-works-grid .home-work-frame { aspect-ratio: 16 / 9; }
/* 署名（用户 2026-10-07：「精选作品下方要显示用户的名字」）：官方那批写 MinimoTV，用户投稿的写作者起的名字；前面一个小人。 */
.home-work-meta .home-work-author { font-size: 12px; }
.home-work-author::before {
  content: "";
  display: inline-block;
  width: 12px;
  height: 12px;
  margin-right: 5px;
  vertical-align: -1px;
  background: currentColor;
  -webkit-mask: var(--icon-account) center / contain no-repeat;
  mask: var(--icon-account) center / contain no-repeat;
}
/* 用户投稿审过的那几张带着成片：鼠标变手、悬浮时封面压暗一点、右下角一颗播放角标（和上传作品页卡片那颗一个样子）。 */
.home-works-grid .home-work-card.is-playable { cursor: pointer; }
.home-work-card.is-playable .home-work-frame img { transition: filter .16s ease; }
.home-work-card.is-playable:hover .home-work-frame img { filter: brightness(.82); }
.home-work-card.is-playable:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 60%, transparent); outline-offset: 3px; border-radius: 12px; }
.home-work-play { position: absolute; right: 8px; bottom: 8px; width: 30px; height: 30px; border-radius: 50%; background: rgba(0, 0, 0, .58); }
.home-work-play::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 3px;
  width: 0;
  height: 0;
  margin: auto;
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
  border-left: 10px solid #fff;
}
/* 往下滑再接着画的那一小格（HomePage.tsx 的 Works）：1 像素高、负外边距抵掉 .home-section 的 gap，有它没它版面一样 */
.home-works-more { height: 1px; margin-top: -15px; pointer-events: none; }

/* ---- 底部：一块话 + 题材标签 ---- */
.home-bottom { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 14px; }
.home-bottom.is-single { grid-template-columns: minmax(0, 1fr); }
.home-promo {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 148px;
  padding: 26px 32px;
  border-radius: 14px;
  background: linear-gradient(120deg, #0f1c2e 0%, #10395a 58%, #0f6287 100%);
  color: #fff;
}
.home-promo-copy { min-width: 0; }
.home-promo h3 { margin: 0; font-size: 22px; font-weight: 750; color: #fff; }
.home-promo-subtitle { margin: 6px 0 0; font-size: 16px; font-weight: 600; color: rgba(255, 255, 255, .94); }
.home-promo-body { margin: 10px 0 0; font-size: 13px; line-height: 1.7; color: rgba(255, 255, 255, .72); white-space: normal; }
.home-promo .home-cta { flex: none; }

.home-tags-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 22px 24px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
}
.home-tags { display: flex; flex-wrap: wrap; gap: 10px; }
.home-tag {
  min-height: 34px;
  padding: 0 15px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--text);
  font-size: 13px;
}

/* ---- 控制台「首页」页 ---- */
.console-home-actions { display: flex; gap: 8px; margin-left: auto; }
#consoleHomeStatus { margin: 0; }
.console-home-list { display: flex; flex-direction: column; gap: 12px; }
.console-home-row {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-soft);
}
.console-home-row.is-work { flex-direction: row; align-items: flex-start; gap: 16px; }
.console-home-work-body { display: flex; flex: 1; flex-direction: column; gap: 12px; min-width: 0; }
.console-home-row-head { display: flex; align-items: center; gap: 12px; }
.console-home-row-tools { display: flex; gap: 6px; margin-left: auto; }
.console-home-row-tools button { min-height: 30px; padding: 4px 10px; background: var(--surface); }
.console-home-fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px 14px; align-items: end; }
.console-home-fields .field { min-width: 0; }
.console-home-image { position: relative; flex: none; }
.console-home-image-replace {
  display: block;
  width: 72px;
  min-height: 0;
  height: 128px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  overflow: hidden;
}
.console-home-image-replace img { display: block; width: 100%; height: 100%; object-fit: cover; }
.console-home-hint { margin: 0; }
.console-home-library { max-width: 260px; }
.console-home-tags { width: 100%; max-width: 420px; resize: vertical; }
@media (max-width: 1100px) { .console-home-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---- 窄屏 ---- */
@media (max-width: 1320px) {
  .home-quick[data-count="6"] { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .home-hero-art { --home-fan: 108px; }
  .home-hero-frame[data-order="1"], .home-hero-frame[data-order="2"] { height: 68%; }
  .home-work-card { width: calc((100% - 70px) / 6); }
}
@media (max-width: 1100px) {
  .home-quick { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .home-hero-frame[data-order="2"] { display: none; }
  .home-hero-art { --home-fan: 96px; }
  .home-work-card { width: calc((100% - 56px) / 5); }
  .home-bottom { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 800px) {
  .home-hero { height: auto; min-height: 300px; }
  .home-hero-track { position: relative; inset: auto; }
  .home-hero-copy { position: relative; left: 0; width: auto; padding: 32px 24px 64px; }
  .home-hero-slide { position: absolute; }
  .home-hero-slide.active { position: relative; }
  .home-hero-art { right: 0; width: 100%; opacity: .28; }
  .home-hero-controls { left: 24px; right: 16px; }
  /* 新首页的轮播上没有字了：手机上就是一整块 16:9 画面，每张照旧叠在一起（上面那几条是给旧页面字在流里排的）。 */
  .home-hero[data-layout="cinema"] { height: auto; min-height: 0; aspect-ratio: 16 / 9; }
  .home-hero[data-layout="cinema"] .home-hero-track { position: absolute; inset: 0; }
  .home-hero[data-layout="cinema"] .home-hero-slide,
  .home-hero[data-layout="cinema"] .home-hero-slide.active { position: absolute; }
  .home-hero[data-layout="cinema"] .home-hero-art { opacity: 1; }
  .home-hero-tools { top: 10px; right: 10px; }
  .home-hero-nav { width: 34px; height: 34px; margin-top: -17px; }
  .home-hero-nav.is-previous { left: 10px; }
  .home-hero-nav.is-next { right: 10px; }
  .home-hero-nav::before { width: 8px; height: 8px; }
  .home-quick { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .home-work-card { width: 32%; }
  .home-promo { flex-direction: column; align-items: flex-start; padding: 24px; }
}
@media (max-width: 480px) {
  .home-quick { grid-template-columns: minmax(0, 1fr); }
}
/* 手机（2026-10-01 屏幕适配）：快速创作两列、图标挪到字的上面——一列六张太长，一行三张字竖着排。
   上面 1320 那条带 [data-count] 的规则优先级更高（六张时排三列），这里一起点名才压得住。 */
@media (max-width: 767px) {
  .home-works-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 10px; }
  .home-quick, .home-quick[data-count] { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .home-quick-card { flex-direction: column-reverse; align-items: flex-start; gap: 10px; padding: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  .home-hero-slide, .home-hero-slide.active, .home-hero-dot { transition: none; }
}

/* ==================== 首页改版（2026-10-08）：创作卡、画风面板、最近项目、精选作品分类 ====================
   用户：「我重新给首页设计布局，移除顶部的影院横幅，保留下方的精选作品，在顶部增加一个文本框，用户可以选择上传剧本或者输入文本来创作」，
   在演示站 Assets\首页方案-1008 里选了方案二「页签卡」（照小云雀），之后十几轮细调的结论都在这一块的注释里。
   只挂在新外壳专属的 .home-create-page 和这几块自己的类名上：回退用的旧页面（home.js 画的那一版）一个像素不动。
   颜色一律用主题变量，深浅两套不另写色值；例外是画风卡、项目封面上压着的字（压在图上，两套主题下都是白字）。 */

/* 首页那层滚动一直给滚动条留着位置（用户：「首页右侧出现滚动条时，也会压缩内容区域」）：精选作品切到作品少的分类、
   作品还没画出来时内容短到不用滚，滚动条一没整栏就往右挪半个滚动条宽。只加在首页自己这层滚动上——根上别加。 */
#homePage.home-create-page { scrollbar-gutter: stable; }

/* ---- 顶上一块：标题 + 创作卡 ---- */
/* isolation 给标题后面那片光（z-index -1）垫底，光不会掉到页面底色下面去。别换成 z-index：这一块会被单独合成一层，
   里面的字从彩色亚像素抗锯齿掉成灰度（1.5 倍屏上看着发虚，2026-10-08 对着演示站逐像素比出来的）。
   比例、改编集数、画风面板这几个弹层因此不挂在这一块里，挂在外面那一栏（.home-inner）上，才盖得住下面的最近项目和精选作品 */
.home-create { position: relative; display: flex; flex-direction: column; align-items: center; gap: 24px; min-width: 0; padding: 44px 0 20px; isolation: isolate; }
.home-create-page .home-inner { position: relative; }
/* 标题后面一抹很淡的品牌青蓝（用户：「顶部的标题也要用方案一的光晕效果」）。画在这一块自己身上、上沿淡出：
   画在页面滚动层上的话，滚动层的上沿（顶栏底下）会切出一道硬边。 */
.home-create::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: 0;
  right: 0;
  left: 0;
  height: 500px;
  background: radial-gradient(ellipse 46% 60% at 50% 18%, color-mix(in srgb, var(--accent) 17%, transparent), transparent 72%);
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 90px, #000 55%, transparent);
  mask-image: linear-gradient(to bottom, transparent 0, #000 90px, #000 55%, transparent);
  pointer-events: none;
}
:root:not([data-theme="dark"]) .home-create::before {
  background: radial-gradient(ellipse 46% 60% at 50% 18%, color-mix(in srgb, var(--accent) 11%, transparent), transparent 72%);
}
.home-create-head { display: flex; flex-direction: column; align-items: center; gap: 12px; max-width: 100%; text-align: center; }
.home-create-title { margin: 0; color: var(--text); font-size: 40px; font-weight: 700; line-height: 1.2; letter-spacing: .04em; text-wrap: balance; }
.home-create-title em { font-style: normal; color: var(--accent); }
.home-create-sub { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.6; text-wrap: balance; }
.line-icon { flex: none; width: 16px; height: 16px; }

/* 两个页签里那一块一样高、换状态也不变（用户：「首页切换上传剧本和剧本创作的时候，这个面板的高度不能变」） */
.home-create { --home-create-strip: var(--surface-soft); --home-create-pane-h: 176px; }
:root[data-theme="dark"] .home-create { --home-create-strip: color-mix(in srgb, var(--surface) 40%, var(--bg)); }
.home-create-card {
  position: relative;
  width: min(100%, 920px);
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--surface);
  box-shadow: 0 14px 44px rgba(0, 0, 0, .2);
  overflow: hidden;
}
:root:not([data-theme="dark"]) .home-create-card { box-shadow: 0 10px 34px rgba(20, 30, 26, .07); }
.home-create-tabs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); background: var(--home-create-strip); }
.home-create-tab {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 50px;
  min-height: 0;
  padding: 0 16px;
  border: 0;
  border-radius: 18px 18px 0 0;
  background: transparent;
  color: var(--muted);
  font-size: 14px;
}
.home-create-tab:hover:not(.is-on) { background: transparent; color: var(--text); }
.home-create-tab.is-on { z-index: 1; background: var(--surface); color: var(--text); font-weight: 600; }
/* 选中的那一格两边各一个反向的小圆角，和下面的卡片连成一块（小云雀那种文件夹页签） */
.home-create-tab.is-on::before, .home-create-tab.is-on::after { content: ""; position: absolute; bottom: 0; width: 18px; height: 18px; pointer-events: none; }
.home-create-tab.is-on::before { left: -18px; background: radial-gradient(circle at 0 0, transparent 17.5px, var(--surface) 18px); }
.home-create-tab.is-on::after { right: -18px; background: radial-gradient(circle at 100% 0, transparent 17.5px, var(--surface) 18px); }
.home-create-tab.is-on .line-icon { color: var(--accent); }
/* 「上传剧本」后面那枚 i（悬浮看版权和字数的说明）：跟着页签的字色、淡一点 */
.home-create-tab-info { display: inline-flex; align-items: center; margin-left: -2px; color: var(--muted); cursor: help; opacity: .85; }
.home-create-tab-info .line-icon { width: 14px; height: 14px; }
.home-create-tab.is-on .home-create-tab-info .line-icon { color: var(--muted); }
.home-create-tab-info:hover { color: var(--text); opacity: 1; }
/* 那句说明一行放得下：站里的提示框限宽 280，这一句会断在「总字 / 数」中间 */
.hover-tip:has(> .home-create-tip) { max-width: min(460px, calc(100vw - 24px)); }

.home-create-pane { padding: 18px 20px 4px; }
.home-create-drop {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: var(--home-create-pane-h);
  min-height: 0;
  padding: 16px 22px;
  border: 1.5px dashed var(--line-strong);
  border-radius: 16px;
  background: transparent;
  cursor: pointer;
  text-align: center;
  transition: border-color .15s ease, background-color .15s ease;
}
/* 悬浮效果只给有鼠标的设备：触屏上点过一下 :hover 会一直挂着，虚线框就一直是亮的 */
@media (hover: hover) { .home-create-drop:hover { border-color: color-mix(in srgb, var(--accent) 60%, var(--line-strong)); } }
.home-create-drop:focus-visible { border-color: color-mix(in srgb, var(--accent) 60%, var(--line-strong)); outline: none; }
.home-create-drop.is-dragging { border-color: var(--accent); background: var(--accent-soft); }
.home-create-drop.is-filled { align-items: stretch; cursor: default; }
.home-create-drop-art { width: 58px; height: 51px; margin-bottom: 2px; }
.home-create-drop-art .art-back { fill: var(--surface-soft); stroke: var(--line-strong); stroke-width: 1.2; }
.home-create-drop-art .art-front { fill: var(--surface); stroke: var(--line-strong); stroke-width: 1.2; }
.home-create-drop-art .art-lines { fill: none; stroke: var(--line-strong); stroke-width: 2; stroke-linecap: round; }
.home-create-drop-art .art-badge { fill: var(--accent); }
.home-create-drop-art .art-plus { stroke: #fff; stroke-width: 2; stroke-linecap: round; }
.home-create-drop-title { display: flex; align-items: center; gap: 12px; margin: 0; font-size: 15px; font-weight: 600; }
.home-create-drop-link { color: var(--text); cursor: pointer; }
.home-create-drop-link:hover { color: var(--accent-text); }
.home-create-drop-sep { width: 1px; height: 14px; background: var(--line-strong); }
.home-create-drop-hint { margin: 0; color: var(--muted); font-size: 12.5px; line-height: 1.65; }
.home-create-drop.is-filled .home-create-drop-hint { margin-top: 10px; }
.home-create-link {
  flex: none;
  min-height: 0;
  height: auto;
  margin: 0 3px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  color: var(--accent-text);
  font-size: inherit;
  cursor: pointer;
}
.home-create-link:hover { background: none; text-decoration: underline; text-underline-offset: 3px; }

/* 写灵感那个框：外面一层定高的底（和虚线框一样高），正文在上面滚、热门题材和字数在底下一小条，不压在字上、也不另占一行把这个页签撑高 */
.home-create-brief { display: flex; flex-direction: column; height: var(--home-create-pane-h); border-radius: 16px; background: var(--surface-soft); overflow: hidden; }
textarea.home-create-text {
  display: block;
  flex: 1 1 auto;
  width: 100%;
  height: auto;
  min-height: 0;
  max-height: none;
  margin: 0;
  padding: 14px 16px 4px;
  border: 0;
  border-radius: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-size: 15px;
  line-height: 1.75;
  resize: none;
  box-shadow: none;
  overflow-y: auto;
  /* 字多到出滚动条时别整段重新换行：滚动条的位置一直留着 */
  scrollbar-gutter: stable;
}
/* 聚焦时不描边（用户：「剧本创作的输入框，不需要边框高亮的描边」；粘贴文本那个框同一身，一起不描） */
textarea.home-create-text:focus { border: 0; outline: 0; box-shadow: none; }
textarea.home-create-text::placeholder { color: var(--muted); opacity: .78; }
.home-create-brief-foot { display: flex; flex: none; align-items: center; gap: 12px; min-width: 0; padding: 4px 12px 10px 12px; }
.home-create-count { flex: none; margin-left: auto; color: var(--muted); font-size: 12.5px; font-variant-numeric: tabular-nums; }
/* 热门题材：一排胶囊，前面一张对得上的精选作品封面；一行排开，放不下就横着滑，右边淡出提示还能滑 */
.home-create-topics { display: flex; flex: 1; align-items: center; gap: 6px; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.home-create-topics::-webkit-scrollbar { display: none; }
.home-create-topics.is-overflow:not(.is-end) { -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 40px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 40px), transparent); }
.home-create-topics-label { flex: none; margin-right: 2px; color: var(--muted); font-size: 12.5px; }
.home-topic {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 6px;
  height: 28px;
  min-height: 0;
  padding: 0 10px 0 3px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  font-size: 12.5px;
}
.home-topic img { display: block; width: 22px; height: 22px; border-radius: 50%; object-fit: cover; }
.home-topic:not(:has(img)) { padding-left: 10px; }
.home-topic:hover { border-color: var(--line-strong); background: var(--surface-soft); }

/* 文件卡片（传好的剧本） */
.home-create-file { position: relative; display: flex; align-items: center; gap: 12px; min-width: 0; padding: 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-soft); overflow: hidden; text-align: left; }
.home-create-file-type { display: grid; flex: none; place-items: center; width: 42px; height: 48px; border-radius: 9px; background: var(--accent-soft); color: var(--accent-text); font-size: 11px; font-weight: 700; letter-spacing: .04em; }
.home-create-file-meta { display: flex; flex: 1; flex-direction: column; gap: 4px; min-width: 0; }
.home-create-file-meta b { overflow: hidden; color: var(--text); font-size: 14px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.home-create-file-meta small { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; color: var(--muted); font-size: 12.5px; }
.home-create-file-meta small i { width: 1px; height: 10px; background: var(--line-strong); }
.home-create-file-clear { display: inline-grid; flex: none; place-items: center; width: 30px; height: 30px; min-height: 0; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--muted); }
.home-create-file-clear:hover:not(:disabled) { background: var(--surface-hover); color: var(--text); }
/* 粘贴的文本那张卡片上多一颗「编辑」：再打开粘贴文本的弹窗改 */
.home-create-file-edit { flex: none; height: 30px; min-height: 0; padding: 0 10px; border: 0; border-radius: 999px; background: transparent; color: var(--accent-text); font-size: 13px; }
.home-create-file-edit:hover { background: var(--surface-hover); }
.home-create-file.is-busy::after { content: ""; position: absolute; left: 0; bottom: 0; width: 36%; height: 2px; background: var(--accent); animation: home-create-busy 1s linear infinite; }
.home-create-file-warn { display: flex; align-items: center; gap: 6px; margin: 8px 2px 0; color: var(--orange); font-size: 12.5px; }
@keyframes home-create-busy { from { translate: -100% 0; } to { translate: 280% 0; } }

/* 底下一排：画风、比例（小说多一颗改编集数）、走哪条路、开始创作 */
.home-create-actions { display: flex; align-items: center; gap: 10px; padding: 12px 20px 18px; }
.home-create-chips { display: flex; flex: none; align-items: center; gap: 8px; }
.home-create-chip {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 6px;
  height: 34px;
  min-height: 0;
  padding: 0 9px 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
}
.home-create-chip:hover, .home-create-chip[aria-expanded="true"] { border-color: var(--control-hover-border); background: var(--surface-soft); color: var(--text); }
.home-create-chip.is-set { color: var(--text); }
.home-create-chip.is-missing { border-color: var(--danger); color: var(--danger); }
.home-create-chip > span:not(.ratio-box) { max-width: 168px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.home-create-caret { width: 14px; height: 14px; opacity: .72; }
.ratio-box { display: inline-block; flex: none; box-sizing: border-box; border: 1.6px solid currentColor; border-radius: 3px; }
/* 画风按钮上那个小方块：选了画风就换成那一种的示意图 */
.style-mini { flex: none; width: 18px; height: 18px; border-radius: 5px; object-fit: cover; }
.home-create-route { display: flex; flex: 1; align-items: center; justify-content: flex-end; gap: 10px; min-width: 0; color: var(--muted); font-size: 12.5px; }
.home-create-route-text { display: inline-flex; align-items: center; gap: 6px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.home-create-route-text .line-icon { width: 14px; height: 14px; color: var(--accent); }
.home-create-start { display: inline-flex; flex: none; align-items: center; justify-content: center; height: 40px; min-height: 0; padding: 0 24px; border-radius: 999px; font-size: 14px; }
.home-create-spin { display: inline-block; width: 14px; height: 14px; margin-right: 8px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: home-create-rotate .7s linear infinite; }
@keyframes home-create-rotate { to { rotate: 360deg; } }
/* 文件拖进来时整张卡罩一层；拖到空着的虚线框上只亮虚线框 */
.home-create-mask {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1.5px dashed var(--accent);
  border-radius: inherit;
  background: color-mix(in srgb, var(--surface) 86%, var(--accent));
  color: var(--accent-text);
  font-size: 14px;
  font-weight: 600;
  pointer-events: none;
}
.home-create-card.is-dragging .home-create-mask { display: flex; }
.home-create-card.is-dragging:has(.home-create-drop:not(.is-filled)) .home-create-mask { display: none; }
.home-create-mask .line-icon { width: 26px; height: 26px; }
.home-create-error { display: flex; align-items: center; gap: 6px; margin: -12px 0 0; color: var(--danger); font-size: 13px; }

/* 「粘贴文本」弹窗（用户：「点击粘贴文本弹出一个窗口，用户粘贴文本」）、「修改封面」弹窗的标题区：标题下面一行灰字说明 */
.home-dialog-heading h2 { margin: 0; font-size: 18px; font-weight: 650; }
.home-dialog-heading p { margin: 6px 0 0; color: var(--muted); font-size: 13px; font-weight: 400; }
.home-paste-dialog { width: min(760px, calc(100vw - 32px)); max-width: none; padding: 0; color: var(--text); }
.home-paste-dialog .home-paste-head { align-items: flex-start; padding: 20px 18px 16px 24px; }
.home-paste-body { padding: 18px 24px; }
textarea.home-paste-text { display: block; width: 100%; height: min(52vh, 460px); padding: 14px 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-soft); color: var(--text); font-size: 14px; line-height: 1.75; resize: none; scrollbar-gutter: stable; }
textarea.home-paste-text:focus { border-color: var(--line); outline: 0; box-shadow: none; }
.home-paste-dialog .home-paste-foot { align-items: center; padding-left: 24px; }
.home-paste-stat { flex: 1; min-width: 0; color: var(--muted); font-size: 12.5px; }
.home-paste-stat.is-over { color: var(--danger); }

/* ---- 比例、改编集数两个小弹层（挂在创作卡那一块里，跟着页面滚） ---- */
.home-create-pop, .style-panel {
  position: absolute;
  z-index: 40;
  border-radius: 18px;
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 0 0 1px var(--dialog-ring), 0 22px 54px rgba(0, 0, 0, .34);
  animation: home-create-pop-in .14s ease-out;
  transform-origin: top left;
}
:root:not([data-theme="dark"]) :is(.home-create-pop, .style-panel) { box-shadow: 0 0 0 1px var(--dialog-ring), 0 18px 44px rgba(20, 30, 26, .16); }
.style-panel[data-side="up"] { transform-origin: bottom left; }
@keyframes home-create-pop-in { from { opacity: 0; scale: .98; } }
.home-create-pop { padding: 14px; }
.home-create-pop-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.home-create-pop-head strong { font-size: 14px; font-weight: 650; }
.home-create-pop-note { margin: 10px 2px 0; color: var(--muted); font-size: 12px; }
.home-create-pop.is-ratio { width: 210px; padding: 6px; }
.home-ratio { display: grid; grid-template-columns: 24px minmax(0, 1fr) 16px; align-items: center; gap: 8px; width: 100%; height: 36px; min-height: 0; padding: 0 10px; border: 0; border-radius: 10px; background: transparent; color: var(--text); font-size: 13px; text-align: left; }
.home-ratio:hover { background: var(--surface-soft); }
.home-ratio.is-on { color: var(--accent-text); }
.home-ratio small { margin-left: 8px; color: var(--muted); font-size: 12px; }
.home-ratio-cell { display: grid; place-items: center; }
.home-ratio-check { width: 16px; height: 16px; }
.home-create-pop.is-episodes { width: 290px; }
.home-create-episodes { display: flex; align-items: center; gap: 8px; }
.home-create-episodes input { width: 96px; height: 36px; text-align: center; }
.home-create-episodes .primary-command { height: 36px; min-height: 0; margin-left: auto; padding: 0 18px; }

/* ---- 画风面板（用户：「点击画风后的弹窗太丑了，重新设计」） ----
   推荐 / 真人 / 3D / 2D 四个页签（下划线那种，不是滑轨）+ 搜索 + 一种画风一张示意图卡。卡面是「画」，两套主题下都是深底白字。 */
.style-panel { display: flex; flex-direction: column; width: 820px; max-width: calc(100vw - 32px); padding: 0; border-radius: 20px; overflow: hidden; }
.style-panel[data-side="center"] { position: fixed; inset: 0; z-index: 96; height: fit-content; margin: auto; animation-name: home-style-center-in; }
@keyframes home-style-center-in { from { opacity: 0; scale: .97; } }
.home-style-backdrop { position: fixed; inset: 0; z-index: 95; background: rgba(0, 0, 0, .4); animation: home-style-fade .18s ease-out; }
.home-style-backdrop.is-sheet { background: rgba(0, 0, 0, .5); }
/* 新建项目里「风格设定」「更多」打开的「画面风格」弹窗（2026-10-11，VisualStyle.tsx）：一层透明、铺满的模态框叠在新建项目上面，
   里面照首页画蒙版（上面这一条）和画风面板（居中 / 手机底部抽屉）。全站弹窗的底色、描边、宽高、阴影都摘掉；
   开合动画里的 transform 也摘掉：有 transform 的那 160 毫秒，里面 position: fixed 的蒙版和面板会按弹窗定位、跟着缩放。 */
.style-panel-dialog, .style-panel-dialog[open] { width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; overflow: visible; transform: none; }
.style-panel-dialog::backdrop { background: transparent; }
@starting-style { .style-panel-dialog[open] { transform: none; } }
@keyframes home-style-fade { from { opacity: 0; } }
.style-panel-head { position: relative; display: flex; flex: none; align-items: center; gap: 14px; padding: 18px 14px 14px 22px; }
.style-panel-heading { display: flex; flex: 1; flex-direction: column; gap: 3px; min-width: 0; }
.style-panel-heading strong { font-size: 16px; font-weight: 650; line-height: 1.3; }
.style-panel-heading span { color: var(--muted); font-size: 12.5px; }
.style-panel-search { display: flex; flex: none; align-items: center; gap: 7px; width: 240px; height: 36px; padding: 0 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface-soft); color: var(--muted); cursor: text; transition: border-color .15s ease; }
.style-panel-search .line-icon { width: 15px; height: 15px; }
.style-panel-search input { flex: 1; width: auto; min-width: 0; height: 100%; padding: 0; border: 0; border-radius: 0; outline: 0; background: transparent; color: var(--text); font-size: 13px; box-shadow: none; }
.style-panel-search input:focus { border: 0; outline: 0; box-shadow: none; }
.style-panel-search input::-webkit-search-cancel-button { display: none; }
.style-panel-close { display: inline-grid; flex: none; place-items: center; width: 34px; height: 34px; min-height: 0; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--muted); }
.style-panel-close:hover { background: var(--surface-soft); color: var(--text); }
.style-panel-close .line-icon { width: 18px; height: 18px; }
.style-panel-tabs { position: relative; display: flex; flex: none; gap: 28px; padding: 0 22px; border-bottom: 1px solid var(--line); }
.style-panel-tab { position: relative; height: 42px; min-height: 0; padding: 0 1px; border: 0; border-radius: 0; background: transparent; color: var(--muted); font-size: 14px; }
.style-panel-tab:hover { background: transparent; color: var(--text); }
.style-panel-tab.is-on { color: var(--text); font-weight: 600; }
/* 下划线是一个单独的元素，换页签时滑到新的那颗底下（打开面板那一刻先摆好、不滑） */
.style-panel-ink { position: absolute; bottom: -1px; left: 0; z-index: 1; width: 0; height: 2px; border-radius: 2px; background: var(--accent); pointer-events: none; }
.style-panel-tabs.ink-ready .style-panel-ink { transition: transform .26s cubic-bezier(.2, .8, .2, 1), width .26s cubic-bezier(.2, .8, .2, 1), opacity .15s ease; }
/* 行高按卡片自己的高（max-content）：面板限了高、网格是被压出来的定高，auto 行会被压成一行字高、卡片叠在一起。
   滚动条的位置一直留着、左右对称（推荐页不用滚、别的页要滚，不留的话切页签时卡片会被滚动条挤窄一点） */
.style-panel-grid { position: relative; display: grid; flex: 1 1 auto; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: max-content; align-content: start; gap: 14px; min-height: 0; padding: 18px 12px 22px; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-gutter: stable both-edges; }
.style-panel-empty { grid-column: 1 / -1; margin: 40px 0; color: var(--muted); font-size: 13px; text-align: center; }
.style-panel-foot { display: flex; flex: none; justify-content: space-between; gap: 12px; padding: 11px 22px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.style-card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  /* 不拉伸：网格项默认按行高拉伸，拉伸时宽高比不参与算行高，行会被压成一行字那么高、卡片叠在一起 */
  align-self: start;
  aspect-ratio: 16 / 11;
  min-width: 0;
  min-height: 0;
  padding: 0 12px 11px;
  border: 0;
  border-radius: 14px;
  /* 底下不铺颜色：圆角抗锯齿那一圈会把底色透出来，看着像一道线框（2026-10-08 用户：「为什么精选作品的图片边缘感觉有线框？」，同一个问题） */
  background: transparent;
  color: #fff;
  text-align: left;
  white-space: normal;
  overflow: hidden;
  isolation: isolate;
  cursor: pointer;
  transition: translate .18s ease, box-shadow .18s ease;
}
/* 卡片一次全画好，不在这一类 / 没搜到的藏起来（StylePanel.tsx）：上面写了 display: flex，会盖过 hidden */
.style-card[hidden] { display: none; }
.style-card:hover { translate: 0 -2px; box-shadow: 0 10px 24px rgba(0, 0, 0, .32); }
:root:not([data-theme="dark"]) .style-card:hover { box-shadow: 0 10px 24px rgba(20, 30, 26, .22); }
.style-card.is-on, .style-card.is-on:hover { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--accent); }
.style-card:focus-visible { outline: 0; box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--btn-ring); }
.style-card-art { position: absolute; inset: 0; z-index: -2; overflow: hidden; transition: scale .35s ease; }
.style-card-art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
/* 示意图取不到：垫这一种画风自带的那道渐变 */
.style-card.is-broken .style-card-art { background: radial-gradient(130% 100% at 0% 0%, rgba(255, 255, 255, .22), transparent 55%), linear-gradient(135deg, var(--c1), var(--c2)); }
.style-card:hover .style-card-art { scale: 1.05; }
.style-card::after { content: ""; position: absolute; right: 0; bottom: 0; left: 0; z-index: -1; height: 52%; background: linear-gradient(transparent, rgba(0, 0, 0, .62)); }
.style-card-name { display: -webkit-box; overflow: hidden; font-size: 13.5px; font-weight: 600; line-height: 1.4; text-shadow: 0 1px 8px rgba(0, 0, 0, .5); -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.style-card-tag { position: absolute; top: 9px; left: 9px; padding: 0 7px; border-radius: 999px; background: rgba(0, 0, 0, .42); color: rgba(255, 255, 255, .92); font-size: 11px; line-height: 19px; }
.style-card-check, .cover-option-check { position: absolute; top: 9px; right: 9px; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--accent); color: #fff; box-shadow: 0 2px 8px rgba(0, 0, 0, .3); }
.style-card-check .line-icon, .cover-option-check .line-icon { width: 14px; height: 14px; stroke-width: 2.6; }
/* 手机：底部抽屉 */
.style-panel[data-side="sheet"] { position: fixed; top: auto; right: 0; bottom: 0; left: 0; z-index: 96; width: auto; max-width: none; height: 84vh; max-height: 84vh; padding-bottom: env(safe-area-inset-bottom); border-radius: 22px 22px 0 0; animation: home-style-sheet-in .22s cubic-bezier(.2, .8, .2, 1); }
@keyframes home-style-sheet-in { from { translate: 0 48px; opacity: .4; } }
.style-panel[data-side="sheet"] .style-panel-head { flex-wrap: wrap; gap: 10px; padding: 24px 12px 12px 18px; }
.style-panel[data-side="sheet"] .style-panel-head::before { content: ""; position: absolute; top: 9px; right: 0; left: 0; width: 38px; height: 4px; margin: 0 auto; border-radius: 2px; background: var(--line-strong); }
.style-panel[data-side="sheet"] .style-panel-heading span { display: none; }
.style-panel[data-side="sheet"] .style-panel-search { order: 3; flex: 1 0 100%; width: auto; }
.style-panel[data-side="sheet"] .style-panel-tabs { gap: 24px; padding: 0 18px; overflow-x: auto; scrollbar-width: none; }
.style-panel[data-side="sheet"] .style-panel-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding: 14px 14px 18px; }
.style-panel[data-side="sheet"] .style-panel-foot { display: none; }

/* ---- 最近项目（用户：「精选作品上方还需要显示一个最近项目，在用户登录后才显示」） ----
   和精选作品对齐（同一栏宽、同一种小节标题），卡片小一点、一排六张（「最新项目卡片尺寸可以小一点，可以多放几张」）；
   平板只露前四张，手机横着滑。卡片本身的样子在 styles.css「项目卡」那一块（我的项目页也用它）。
   「查看全部」紧跟在标题后面、靠左（用户 2026-10-08：「我的项目后面的查看全部，靠左对齐」），原来 margin-left: auto 推到了最右边。 */
.home-section-more { display: inline-flex; align-items: center; gap: 2px; height: 30px; min-height: 0; padding: 0 6px 0 10px; border: 0; border-radius: 999px; background: transparent; color: var(--muted); font-size: 13px; }
.home-section-more:hover { background: var(--surface-soft); color: var(--text); }
.home-section-more .line-icon { width: 15px; height: 15px; rotate: -90deg; }
.home-recent-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 14px; }
.home-recent-grid .project-card { gap: 8px; }
.home-recent-grid .project-card-cover { border-radius: 10px; }
.home-recent-grid .project-card-title { font-size: 13.5px; }
.home-recent-grid .project-card-time { margin-top: -4px; font-size: 12px; }
.home-recent-grid .project-card-tag { top: 6px; left: 6px; height: 22px; padding: 0 8px; font-size: 11.5px; }
.home-recent-grid .project-card-more { top: 5px; right: 5px; width: 26px; height: 26px; }
.home-recent-grid .project-card-more .line-icon { width: 16px; height: 16px; }

/* ---- MinimoTV 精选作品（用户：「精选作品改为：MinimoTV 精选作品」，中英文之间一个空格） ----
   和最近项目拉开一截（「精选作品可以往下挪一点，和上面的最近项目分割开」）；标题后面一排分类，点了只看这一类。 */
.home-works-section { margin-top: 18px; }
/* 往下滚时标题和分类那一行吸在顶上（「我希望往下滚动的时候，分类栏能固定在顶部」）：一层页面底色盖住滚上来的作品；
   吸住时底下一层淡影子（不画线）。上下各铺 10 像素底色（这一节的上外边距相应从 28 减到 18，字的位置不变）。
   top 是 -12：首页那层滚动顶上有 12 像素内边距，吸在 0 的话作品会从这道缝里露出来 */
.home-works-head {
  position: sticky;
  top: -12px;
  z-index: 6;
  flex-wrap: wrap;
  row-gap: 10px;
  padding: 10px 0;
  background: var(--bg);
  transition: box-shadow .2s ease;
}
.home-works-head.is-stuck { box-shadow: 0 14px 16px -14px rgba(0, 0, 0, .55); }
:root:not([data-theme="dark"]) .home-works-head.is-stuck { box-shadow: 0 14px 16px -14px rgba(20, 30, 26, .22); }
/* 紧跟在标题后面、靠左（「分类……靠左对齐」）。不要灰色底槽（「重新设计一下配色，并且不要背景的底色」）：没选中的是灰字、
   悬浮只把字提亮（「不需要悬浮的按钮样式，悬浮时给字体高亮就行了」）；选中的一枚胶囊，和全站主按钮一个配色（深色白底黑字、浅色黑底白字），
   切换时胶囊滑过去。这一排因此不是「滑轨页签」那一身（带底槽、滑块是青蓝），别把它登记进 styles.css 那个共用块。 */
.home-works-tabs { position: relative; display: flex; gap: 2px; margin-left: 10px; padding: 0; background: none; }
.home-works-thumb { position: absolute; top: 0; bottom: 0; left: 0; width: 0; border-radius: 999px; background: var(--command-create-bg); pointer-events: none; }
.home-works-tabs.thumb-ready .home-works-thumb { transition: transform .24s cubic-bezier(.2, .8, .2, 1), width .24s cubic-bezier(.2, .8, .2, 1); }
.home-works-tab { position: relative; z-index: 1; height: 32px; min-height: 0; padding: 0 15px; border: 0; border-radius: 999px; background: transparent; color: var(--muted); font-size: 13.5px; font-weight: 500; transition: color .2s, background-color .2s; }
.home-works-tab:hover:not(.active) { background: transparent; color: var(--text); }
.home-works-tab.active { color: var(--command-create-text); font-weight: 600; }
.home-works-empty { margin: 8px 0 24px; color: var(--muted); font-size: 13px; text-align: center; }
/* 行距、左右间距放大（「项目之间的高度间隔可以多一点，包括首页的精选作品也是」「项目左右的间距也可以多一点」） */
.home-works-section .home-works-grid { row-gap: 30px; column-gap: 24px; }
/* 卡片上只留作品名和作者，作者前面一个圆头像；鼠标停上去整张卡衬一块圆角底色（用户给了参考图）。
   卡片四周常驻内边距、用同样大的负外边距抵掉：底色出来时图片不缩、不挪，网格的位置也不变。左右和顶上 6、底下 10
   （「悬浮时，两侧的顶部的背景宽度可以少一点」）；外圆角 20 = 图片的 14 + 6，和图片同心 */
.home-works-section .home-work-card { margin: -6px -6px -10px; padding: 6px 6px 10px; border-radius: 20px; transition: background-color .18s ease; }
.home-works-section .home-work-card:hover, .home-works-section .home-work-card:focus-visible { background: var(--surface); }
:root:not([data-theme="dark"]) .home-works-section .home-work-card:hover { box-shadow: 0 8px 24px rgba(20, 30, 26, .08); }
.home-works-section .home-work-card.is-playable:focus-visible { outline-offset: 0; border-radius: 20px; }
/* 图片外框不描边（用户：「为什么精选作品的图片边缘感觉有线框？」——上面 .home-work-frame 那条 1px 的 --line 描边，衬了悬浮底色更显眼）；
   底色也透明，圆角抗锯齿的那一圈不透出杂色 */
.home-works-section .home-work-frame { border: 0; border-radius: 14px; background: transparent; }
.home-works-section .home-work-meta {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  grid-template-areas: "avatar title" "avatar author";
  column-gap: 10px;
  row-gap: 2px;
  align-items: center;
  padding: 2px 2px 0;
}
.home-works-section .home-work-meta > strong { grid-area: title; font-size: 14.5px; font-weight: 650; line-height: 1.35; }
.home-works-section .home-work-meta > .home-work-author { grid-area: author; color: var(--muted); font-size: 12.5px; line-height: 1.35; }
.home-works-section .home-work-meta > .home-work-author::before { display: none; }
/* 头像里那个字是白的、和作者名一样大（上面 .home-work-meta span 那条灰字比它优先，得把这条写得更具体：演示站就是被它盖成了灰字，
   浅色主题下深灰字压深色圆底看不清） */
.home-works-section .home-work-meta > .home-work-avatar { grid-area: avatar; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; color: #fff; font-size: 12.5px; font-weight: 700; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12); }

@media (prefers-reduced-motion: reduce) {
  .style-panel-tabs.ink-ready .style-panel-ink, .home-works-tabs.thumb-ready .home-works-thumb { transition: none; }
}

/* ---- 屏幕适配（分档和全站一样：手机 ≤ 767、平板 768–1199、笔记本 1200–1599、台式 ≥ 1600） ---- */
@media (max-width: 1599px) {
  .home-create { padding-top: 36px; }
  .home-create-title { font-size: 36px; }
}
@media (max-width: 1199px) {
  .home-create { gap: 20px; padding-top: 26px; }
  .home-create-title { font-size: 32px; }
}
@media (min-width: 768px) and (max-width: 1199px) {
  .home-recent-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .home-recent-grid .project-card:nth-child(n + 5) { display: none; }
  .home-works-section .home-works-grid { column-gap: 18px; }
}
@media (max-width: 767px) {
  .home-create { --home-create-pane-h: 164px; gap: 16px; padding: 14px 0 12px; }
  .home-create-head { gap: 8px; }
  .home-create-title { font-size: 24px; letter-spacing: .02em; }
  .home-create-sub { font-size: 13px; }
  .home-create-card { border-radius: 18px; }
  .home-create-tab { height: 44px; font-size: 13.5px; }
  .home-create-pane { padding: 12px 12px 2px; }
  .home-create-drop { padding: 12px 14px; }
  .home-create-drop-hint { font-size: 12px; }
  .home-create-brief-foot { padding: 4px 10px 8px; }
  .home-create-actions { flex-wrap: wrap; gap: 8px; padding: 10px 12px 14px; }
  .home-create-chips { flex: 1 1 100%; min-width: 0; overflow-x: auto; scrollbar-width: none; }
  .home-create-chip { padding: 0 8px 0 10px; }
  .home-create-chip > span:not(.ratio-box) { max-width: 92px; }
  .home-create-actions .home-create-route { display: none; }
  .home-create-start { flex: 1 0 100%; }
  .home-paste-dialog .home-paste-head { padding: 16px 12px 12px 18px; }
  .home-paste-body { padding: 14px 16px; }
  textarea.home-paste-text { height: 48vh; }
  .home-paste-dialog .home-paste-foot { flex-wrap: wrap; padding-left: 16px; }
  .home-paste-stat { flex: 1 0 100%; }
  .home-recent-grid { display: flex; gap: 10px; margin: 0 -14px; padding: 0 14px 2px; overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: none; }
  .home-recent-grid::-webkit-scrollbar { display: none; }
  .home-recent-grid .project-card { flex: none; width: 150px; scroll-snap-align: start; }
  .home-works-section { margin-top: 16px; }
  .home-works-tabs { flex: 0 1 auto; max-width: 100%; margin-left: 0; overflow-x: auto; scrollbar-width: none; }
  .home-works-tabs::-webkit-scrollbar { display: none; }
  .home-works-tab { flex: none; padding: 0 13px; }
  .home-works-section .home-works-grid { row-gap: 22px; column-gap: 12px; }
  .home-works-section .home-work-card { margin: -4px -4px -8px; padding: 4px 4px 8px; border-radius: 15px; }
  .home-works-section .home-work-frame { border-radius: 11px; }
  .home-works-section .home-work-meta { grid-template-columns: 28px minmax(0, 1fr); column-gap: 8px; }
  .home-works-section .home-work-meta > .home-work-avatar { width: 28px; height: 28px; }
}
