/* ============================================================================
   yyai8-shell.css —— 页面骨架契约（频道页 / 工作台页 / 入口页 / 画布页）
   ----------------------------------------------------------------------------
   上游每个页面的二级栏、参数面板、标题都是各写各的 Tailwind 工具类。这里不重写
   页面逻辑，而是由 scripts/patch-unified-shell.py 把各页对应部位的 className
   换成同一套 yy-* 契约类，外观只在这一个文件里定义。

   契约（给页面补丁用的类名，新页面照这个套）：

     频道页二级栏   .yy-subnav(.yy-subnav--dark) > .yy-subnav-head / -search / -body / -foot
                    头部：.yy-subnav-logo .yy-subnav-title .yy-subnav-sub
                          .yy-subnav-collapse[data-yy-subnav-toggle]
                    列表：.yy-subnav-group（分组标题） .yy-subnav-item(.is-active)
                          .yy-subnav-item--child  .yy-subnav-icon .yy-subnav-label
                          .yy-subnav-badge  .yy-subnav-caret
     频道顶栏       .yy-chhead  > .yy-chhead-crumb / -tabs(.yy-chhead-tab) / -extra
     工作台参数面板 .yy-panel(.yy-panel--dark) > .yy-panel-head / -body / -foot
                    .yy-panel-title  .yy-panel-section-title
     入口页标题     .yy-hero-title  .yy-hero-sub
     画布页         .yy-canvas

   尺寸约定：二级栏头、频道顶栏、参数面板头都是 56px 高 + 1px 下边线，三者在同一
   水平线上，所以「二级栏 + 顶栏」读起来是一整条工具栏，而不是两套导航。

   深色：工作台面板有 .yy-panel--dark，二级栏有 .yy-subnav--dark，两者都把
        --yy-shell-* 就地重绑一遍 —— 几何一模一样，只有配色不同。
   ============================================================================ */

:root {
  /* ★ 强调色跟着品牌令牌走，与全局侧栏（yyai8-sidebar.css 的选中态）同色。
     历史上这里写死 #0066ff（= 当时全局侧栏的硬编码 #06f），自 2026-10 全局侧栏
     改用品牌色之后，写死就变成"一级导航青绿、二级导航蓝"的新不一致。 */
  --yy-shell-accent: var(--yy-color-primary, #7C3AED);
  --yy-shell-accent-soft: rgba(124, 58, 237, 0.08);
  --yy-shell-accent-soft: color-mix(in srgb, var(--yy-shell-accent) 9%, transparent);
  --yy-shell-accent-line: rgba(124, 58, 237, 0.20);
  --yy-shell-accent-line: color-mix(in srgb, var(--yy-shell-accent) 24%, transparent);
  --yy-shell-text: #111827;
  --yy-shell-text-2: #4b5563;
  --yy-shell-text-3: #9ca3af;
  --yy-shell-line: #eef0f3;
  --yy-shell-hover: #f4f5f7;
  --yy-shell-bg: #ffffff;
  --yy-shell-bg-soft: #f7f8fa;
  --yy-shell-head-h: 56px;
  --yy-shell-subnav-w: 232px;
  --yy-shell-panel-w: 320px;
  --yy-shell-radius: 8px;
  /* ★ 内容区左右留白。上游各页各写各的：/stage 走 .main-wrapper 的百分比
     （≥1536px 时 10%，在 1128px 的内容区上就是 113px，还带一个 1536px 断崖），
     /draw 38px、/ai-education 16px、/image-editor 8px —— 同一层级差 14 倍。
     这里收成一个值：24px 正好和 .yy-chhead 的 padding 一致，
     于是面包屑和内容块落在同一条竖线上（这是页面上最容易看出齐不齐的一条线）。
     上限 1680px 是给超宽屏兜底：只给固定 padding 的话，2560px 屏上内容会拉到
     2040px 宽、一行跑 200 多字。
     ⚠️ 原来定的 1440 —— 用户 1625 的窗口下 `(1625-1440)/2+24` = 116px 留白，
     卡片网格两侧各空一大条，用户连提两次「左右间距还是那么大」。1625 的
     内容区是 1385，1440 上限本来就不该生效，但**没有二级栏的页面**内容区
     就是整个视口（1625），于是 1440 反而成了主要留白来源。
     改成 1680：1625 窗口下留白回落到 24px，1920 下 144px 仍可控。 */
  --yy-shell-content-pad: 24px;
  --yy-shell-content-max: 1680px;
  /* 内容槽：内容区宽于 --yy-shell-content-max 时，多出来的宽度平分成左右留白。
     用 `padding-inline` 而不是 `max-width + margin:auto`，是因为频道顶栏
     `.yy-chhead` 有一条通栏的 `border-bottom` —— 给它加 max-width 会把边线一起截断。
     留白走 padding，边线仍然通栏，而内容块和面包屑落在同一条竖线上。
     内容区 ≤1728px（= max + 左右各 24px）时这个 max() 恒等于
     --yy-shell-content-pad，观感不变。 */
  --yy-shell-content-gutter: max(
    var(--yy-shell-content-pad),
    calc((100% - var(--yy-shell-content-max)) / 2 + var(--yy-shell-content-pad))
  );
}

@media (max-width: 767px) {
  :root { --yy-shell-content-pad: 16px; }
}

/* ───────────────────────── 频道页二级栏 ───────────────────────── */

.yy-subnav {
  position: relative;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  flex: 0 0 var(--yy-shell-subnav-w);
  width: var(--yy-shell-subnav-w);
  min-width: var(--yy-shell-subnav-w);
  max-width: var(--yy-shell-subnav-w);
  height: 100%;
  background: var(--yy-shell-bg);
  border-right: 1px solid var(--yy-shell-line);
  box-shadow: none;
  color: var(--yy-shell-text-2);
  font-size: 14px;
  z-index: 20;
  transition: width .18s ease, min-width .18s ease, flex-basis .18s ease;
}

.yy-subnav-head {
  box-sizing: border-box;
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 var(--yy-shell-head-h);
  height: var(--yy-shell-head-h);
  min-height: var(--yy-shell-head-h);
  padding: 0 10px 0 16px;
  margin: 0;
  border-bottom: 1px solid var(--yy-shell-line);
  background: transparent;
}

.yy-subnav-logo {
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--yy-shell-accent-soft);
  color: var(--yy-shell-accent);
  font-size: 14px;
  box-shadow: none;
  overflow: hidden;
}
.yy-subnav-logo img,
.yy-subnav-logo svg { width: 18px; height: 18px; object-fit: contain; }

.yy-subnav-titles { display: flex; flex-direction: column; min-width: 0; flex: 1 1 auto; line-height: 1.25; }
.yy-subnav-title {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0;
  color: var(--yy-shell-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.yy-subnav-sub {
  margin: 1px 0 0;
  font-size: 11px;
  font-weight: 400;
  color: var(--yy-shell-text-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.yy-subnav-collapse,
.yy-panel-collapse {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  margin-left: auto;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--yy-shell-text-3);
  cursor: pointer;
}
.yy-subnav-collapse:hover,
.yy-panel-collapse:hover { background: var(--yy-shell-hover); color: var(--yy-shell-text-2); }
/* 图标统一由 CSS 画，页面里原来的图标藏掉 */
.yy-subnav-collapse > * { display: none !important; }
.yy-subnav-collapse::before {
  content: "";
  width: 16px;
  height: 16px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='16' rx='2.5'/%3E%3Cpath d='M9 4v16'/%3E%3Cpath d='M15.5 10l-2 2 2 2'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='16' rx='2.5'/%3E%3Cpath d='M9 4v16'/%3E%3Cpath d='M15.5 10l-2 2 2 2'/%3E%3C/svg%3E") center / contain no-repeat;
}

.yy-subnav-search {
  box-sizing: border-box;
  flex: 0 0 auto;
  padding: 12px 12px 4px;
  margin: 0;
  border: 0;
  background: transparent;
}
.yy-subnav-search input,
.yy-subnav-search .ant-input-affix-wrapper {
  box-sizing: border-box;
  height: 34px;
  border-radius: var(--yy-shell-radius);
  border: 1px solid transparent;
  background: var(--yy-shell-bg-soft);
  font-size: 13px;
  color: var(--yy-shell-text);
  box-shadow: none;
}
.yy-subnav-search input:focus { background: #fff; border-color: var(--yy-shell-accent-line); outline: none; }
/* 「图标 + input」型搜索框：图标压进输入框左侧 */
.yy-subnav-search { position: relative; display: flex; align-items: center; gap: 8px; }
.yy-subnav-search input { flex: 1 1 auto; width: 100%; min-width: 0; padding: 0 10px; }
.yy-subnav-search:has(> svg, > i) input { padding-left: 32px; }
.yy-subnav-search > svg,
.yy-subnav-search > i {
  position: absolute;
  left: 23px;
  top: calc(50% + 4px);
  transform: translateY(-50%);
  width: 13px;
  height: 13px;
  font-size: 13px;
  color: var(--yy-shell-text-3);
  pointer-events: none;
  z-index: 1;
}

.yy-subnav-body {
  box-sizing: border-box;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 6px 8px 12px;
  margin: 0;
  scrollbar-width: thin;
}
.yy-subnav-body > * + .yy-subnav-group { margin-top: 6px; }

.yy-subnav-group {
  box-sizing: border-box;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 12px 10px 6px;
  margin: 0;
  font-size: 12px;
  font-weight: 500;
  line-height: 16px;
  color: var(--yy-shell-text-3);
  letter-spacing: 0;
  background: transparent;
  border: 0;
}
button.yy-subnav-group { width: 100%; cursor: pointer; text-align: left; }
button.yy-subnav-group:hover { color: var(--yy-shell-text-2); }

.yy-subnav-item {
  box-sizing: border-box;
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 36px;
  padding: 7px 10px;
  margin: 1px 0;
  border: 0;
  border-radius: var(--yy-shell-radius);
  background: transparent;
  color: var(--yy-shell-text-2);
  font-size: 14px;
  font-weight: 400;
  line-height: 20px;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  box-shadow: none;
  transition: background-color .12s ease, color .12s ease;
}
.yy-subnav-item:hover { background: var(--yy-shell-hover); color: var(--yy-shell-text); }
.yy-subnav-item.is-active,
.yy-subnav-item.is-active:hover {
  background: var(--yy-shell-accent-soft);
  color: var(--yy-shell-accent);
  font-weight: 500;
}
.yy-subnav-item--child { padding-left: 38px; font-size: 13px; min-height: 34px; }
.yy-subnav-item--group { font-weight: 500; color: var(--yy-shell-text); }

.yy-subnav-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  font-size: 15px;
  color: inherit;
  opacity: .85;
  border-radius: 5px;
  overflow: hidden;
}
.yy-subnav-icon img,
.yy-subnav-icon svg { width: 18px; height: 18px; object-fit: contain; }
img.yy-subnav-icon { object-fit: cover; }
.yy-subnav-item.is-active .yy-subnav-icon { opacity: 1; }

.yy-subnav-label {
  flex: 1 1 auto;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: inherit;
  font-weight: inherit;
  color: inherit;
}

.yy-subnav-badge {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  height: 18px;
  padding: 0 6px;
  margin-left: auto;
  border-radius: 9px;
  border: 0;
  background: #fff3eb;
  color: #f2662b;
  font-size: 11px;
  font-weight: 500;
  line-height: 18px;
  font-style: normal;
  white-space: nowrap;
}

.yy-subnav-caret {
  flex: 0 0 auto;
  margin-left: auto;
  font-size: 10px;
  color: var(--yy-shell-text-3);
}

.yy-subnav-foot {
  box-sizing: border-box;
  flex: 0 0 auto;
  padding: 10px 12px 12px;
  border-top: 1px solid var(--yy-shell-line);
  background: transparent;
}
/* 底部区的小标题：.yy-subnav-group 自带 12px 上内边距，在 foot 里会叠成双份 */
.yy-subnav-foot .yy-subnav-group { padding: 0 10px 4px; }
/* 底部区里的条目：与列表里的条目同一套外观，但不再多一层圆角背景 */
.yy-subnav-foot .yy-subnav-item { margin: 0; }

/* ── 深色二级栏 ──────────────────────────────────────────────────────────────
   几何与 .yy-subnav 完全一致（同一个 flex-basis / 56px 头 / 36px 条目 / 8px 圆角），
   只是把 --yy-shell-* 就地重绑一遍 —— 和 .yy-panel--dark 同一套做法，
   这样"全站深色"只有一个定义（#141522），不会再出现"半透明黑 210px"这种第三种表达。

   用在：视频生成3.0 的 /video/create/text|image、/video/human/video、/video/audio
        （这些页面底色是 linear-gradient(135deg,#1f1f58,#3e1c1e) 的深色渐变）

   .yy-dark 是同一个变量包，单独给"不是二级栏、也不是参数面板"的深色容器用 ——
   目前只有视频页窄屏时那个 antd Drawer（抽屉里挂的是同一个导航组件）。
   ────────────────────────────────────────────────────────────────────────── */
.yy-dark,
.yy-subnav--dark {
  --yy-shell-line: rgba(255, 255, 255, .08);
  --yy-shell-text: #f3f4f6;
  --yy-shell-text-2: #c7cad1;
  --yy-shell-text-3: #8b8fa3;
  --yy-shell-hover: rgba(255, 255, 255, .06);
  --yy-shell-bg: #141522;
  --yy-shell-bg-soft: rgba(255, 255, 255, .06);
}
.yy-subnav--dark {
  background: var(--yy-shell-bg);
  color: var(--yy-shell-text-2);
}
/* 深色下选中态不能只靠浅底（本来整列就是深的）：加一条品牌色指示条，
   与全局侧栏的选中表达（3px 指示条 + 提亮背景）保持同一个语汇 */
.yy-dark .yy-subnav-item.is-active,
.yy-dark .yy-subnav-item.is-active:hover,
.yy-subnav--dark .yy-subnav-item.is-active,
.yy-subnav--dark .yy-subnav-item.is-active:hover {
  background: rgba(255, 255, 255, .10);
  color: #fff;
}
.yy-dark .yy-subnav-item.is-active::before,
.yy-subnav--dark .yy-subnav-item.is-active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 18px;
  border-radius: 0 3px 3px 0;
  background: var(--yy-shell-accent);
}
.yy-dark .yy-subnav-search input,
.yy-dark .yy-subnav-search .ant-input-affix-wrapper,
.yy-subnav--dark .yy-subnav-search input,
.yy-subnav--dark .yy-subnav-search .ant-input-affix-wrapper {
  background: var(--yy-shell-bg-soft);
  color: var(--yy-shell-text);
}
.yy-subnav--dark .yy-subnav-search input::placeholder { color: var(--yy-shell-text-3); }
.yy-subnav--dark .yy-subnav-search input:focus {
  background: rgba(255, 255, 255, .10);
  border-color: rgba(255, 255, 255, .16);
}
.yy-subnav--dark .yy-subnav-body { scrollbar-color: rgba(255, 255, 255, .22) transparent; }
.yy-subnav--dark .yy-subnav-collapse:hover { background: rgba(255, 255, 255, .10); color: #fff; }
html[data-yy-subnav-collapsed] .yy-subnav--dark .yy-subnav-collapse {
  background: #1b1c2b;
  border-color: rgba(255, 255, 255, .12);
  color: var(--yy-shell-text-2);
  box-shadow: 0 1px 2px rgba(0, 0, 0, .4);
}
/* 深色二级栏的页面（视频生成3.0）窄屏时用 antd Drawer 导航，整列要藏起来 ——
   原来由页面自己的 _sidebar_1lrtp_19{display:none} 负责，那个类名已经被契约替掉 */
@media (max-width: 900px) {
  .yy-subnav--dark { display: none; }
}

/* 收起：宽度归零，只留一颗浮在内容左上角的展开按钮 */
html[data-yy-subnav-collapsed] .yy-subnav {
  flex-basis: 0;
  width: 0;
  min-width: 0;
  max-width: 0;
  border-right: 0;
  overflow: visible;
}
html[data-yy-subnav-collapsed] .yy-subnav > :not(.yy-subnav-head) { display: none !important; }
html[data-yy-subnav-collapsed] .yy-subnav-head { border-bottom: 0; padding: 0; width: 0; }
html[data-yy-subnav-collapsed] .yy-subnav-head > :not(.yy-subnav-collapse) { display: none !important; }
html[data-yy-subnav-collapsed] .yy-subnav-collapse {
  position: absolute;
  top: 14px;
  left: 12px;
  z-index: 30;
  background: #fff;
  border: 1px solid var(--yy-shell-line);
  box-shadow: 0 1px 2px rgba(16, 24, 40, .06);
  transform: scaleX(-1);
}
html[data-yy-subnav-collapsed] .yy-chhead { padding-left: 56px; }
/* 二级栏后面紧跟的第一列是参数面板（如 AI教育进入智能体后）：由面板头让位，右边的顶栏不再让 */
html[data-yy-subnav-collapsed] .yy-subnav + * .yy-panel:first-child > .yy-panel-head { padding-left: 56px; }
html[data-yy-subnav-collapsed] .yy-panel ~ * .yy-chhead { padding-left: 24px; }

/* ───────────────────────── 频道顶栏 ───────────────────────── */

.yy-chhead {
  box-sizing: border-box;
  position: sticky;
  top: 0;
  z-index: 15;
  display: flex;
  align-items: center;
  gap: 16px;
  flex: 0 0 var(--yy-shell-head-h);
  height: var(--yy-shell-head-h);
  min-height: var(--yy-shell-head-h);
  /* 面包屑的左边线要和内容块对齐，所以顶栏用同一个内容槽，
     而不是写死 24px（超宽屏下内容会被居中，写死就对不上了）。 */
  padding: 0 var(--yy-shell-content-gutter);
  margin: 0;
  border: 0;
  border-bottom: 1px solid var(--yy-shell-line);
  background: rgba(255, 255, 255, .96);
  backdrop-filter: saturate(1.4) blur(8px);
  box-shadow: none;
  font-size: 14px;
  color: var(--yy-shell-text-2);
}
.yy-chhead-crumb {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 0 1 auto;
  min-width: 0;
  font-size: 14px;
  color: var(--yy-shell-text-3);
  white-space: nowrap;
}
.yy-chhead-crumb > :last-child { color: var(--yy-shell-text); font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
.yy-chhead-badge {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  height: 18px;
  padding: 0 6px;
  border-radius: 9px;
  background: var(--yy-shell-accent-soft);
  color: var(--yy-shell-accent);
  font-size: 11px;
  font-weight: 600;
  line-height: 18px;
}
/* 面包屑末尾是徽章时，加粗的应该是徽章前面那一节 */
.yy-chhead-crumb > .yy-chhead-badge:last-child { color: var(--yy-shell-accent); font-weight: 600; }
.yy-chhead-crumb > :nth-last-child(2):has(+ .yy-chhead-badge:last-child) { color: var(--yy-shell-text); font-weight: 600; }
.yy-chhead-tabs { display: flex; align-items: center; gap: 4px; flex: 0 1 auto; min-width: 0; }
.yy-chhead-tab {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 12px;
  border: 0;
  border-radius: var(--yy-shell-radius);
  background: transparent;
  color: var(--yy-shell-text-2);
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
}
.yy-chhead-tab:hover { background: var(--yy-shell-hover); color: var(--yy-shell-text); }
.yy-chhead-tab.is-active { background: var(--yy-shell-accent-soft); color: var(--yy-shell-accent); }
.yy-chhead-extra {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  flex: 0 1 auto;
  min-width: 0;
  font-size: 12px;
  color: var(--yy-shell-text-3);
  white-space: nowrap;
}
.yy-chhead-btn {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 10px;
  border: 0;
  border-radius: var(--yy-shell-radius);
  background: transparent;
  color: var(--yy-shell-text-2);
  font-size: 13px;
  cursor: pointer;
}
.yy-chhead-btn:hover { background: var(--yy-shell-hover); color: var(--yy-shell-text); }
/* 当前所在/强调的那一个（如音频页的「声音克隆」） */
.yy-chhead-btn--primary,
.yy-chhead-btn--primary:hover { background: var(--yy-shell-text); color: #fff; font-weight: 500; }
.yy-chhead-btn--primary:hover { opacity: .88; }

/* ───────────────────────── 工作台参数面板 ───────────────────────── */

.yy-panel {
  box-sizing: border-box;
  position: relative;
  display: flex;
  flex-direction: column;
  flex: 0 0 var(--yy-shell-panel-w);
  width: var(--yy-shell-panel-w);
  min-width: var(--yy-shell-panel-w);
  max-width: var(--yy-shell-panel-w);
  height: 100%;
  background: var(--yy-shell-bg);
  background-image: none;
  border: 0;
  border-right: 1px solid var(--yy-shell-line);
  box-shadow: none;
  color: var(--yy-shell-text-2);
  z-index: 10;
}
.yy-panel-head {
  box-sizing: border-box;
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 var(--yy-shell-head-h);
  height: var(--yy-shell-head-h);
  min-height: var(--yy-shell-head-h);
  padding: 0 10px 0 16px;
  margin: 0;
  border-bottom: 1px solid var(--yy-shell-line);
  background: transparent;
}
.yy-panel-title {
  margin: 0;
  min-width: 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--yy-shell-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.yy-panel-body {
  box-sizing: border-box;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 16px;
  scrollbar-width: thin;
}
.yy-panel-section-title {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  color: var(--yy-shell-text);
}
.yy-panel-foot {
  box-sizing: border-box;
  flex: 0 0 auto;
  padding: 12px 16px 16px;
  border-top: 1px solid var(--yy-shell-line);
  background: var(--yy-shell-bg);
}
.yy-panel-foot > button,
.yy-panel-foot > .ant-btn { width: 100%; min-height: 44px; border-radius: 10px; font-size: 15px; font-weight: 600; }

/* 深色工作台（智能图表、视频生成3.0 等原本就是深色的页面保持深色） */
.yy-panel--dark {
  --yy-shell-line: rgba(255, 255, 255, .08);
  --yy-shell-text: #f3f4f6;
  --yy-shell-text-2: #c7cad1;
  --yy-shell-text-3: #8b8fa3;
  --yy-shell-hover: rgba(255, 255, 255, .06);
  --yy-shell-bg: #141522;
  background: var(--yy-shell-bg);
  color: var(--yy-shell-text);
}

/* 浮在结果区上方的工具条（如智能图表的图表类型条）：只在参数面板右侧的结果区里居中；
   --with-aside 表示右边还有一列约占内容区 18% 的操作栏，也要让出来。超宽时用条内滚动。 */
@media (min-width: 768px) {
  .yy-floatbar {
    left: var(--yy-shell-panel-w) !important;
    max-width: calc(100% - var(--yy-shell-panel-w) - 24px) !important;
  }
  .yy-floatbar--with-aside {
    right: 18% !important;
    max-width: calc(82% - var(--yy-shell-panel-w) - 24px) !important;
  }
}

/* ───────────────────────── 入口页标题 ───────────────────────── */

.yy-hero-title {
  margin-top: 0;
  margin-bottom: 8px;
  font-size: 30px !important;
  line-height: 1.3 !important;
  font-weight: 700;
  letter-spacing: -0.01em;
}
/* 标题和图标并排在一行时，不要底边距把两者错开 */
.flex > .yy-hero-title { margin-bottom: 0; }
.yy-hero-sub {
  margin-top: 0;
  font-size: 15px !important;
  line-height: 1.6 !important;
  font-weight: 400;
}

/* ───────────────────────── 画布页 ───────────────────────── */

.yy-canvas {
  box-sizing: border-box;
  width: 100% !important;
  max-width: none !important;
  height: calc(100vh - 60px) !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  overflow: hidden;
}

/* 页面保留的 Tailwind 响应式显隐（hidden md:flex / hidden lg:flex）要压过契约里的
   display:flex —— shell 样式比主样式后加载，不补这几条显隐类会全部失效。 */
.yy-subnav.hidden, .yy-panel.hidden, .yy-chhead.hidden { display: none; }
@media (min-width: 768px) {
  .yy-subnav.md\:flex, .yy-panel.md\:flex, .yy-chhead.md\:flex { display: flex; }
}
@media (min-width: 1024px) {
  .yy-subnav.lg\:flex, .yy-panel.lg\:flex, .yy-chhead.lg\:flex { display: flex; }
}
@media (min-width: 1280px) {
  .yy-subnav.xl\:flex, .yy-panel.xl\:flex, .yy-chhead.xl\:flex { display: flex; }
}
.yy-chhead-crumb.hidden, .yy-chhead-btn.hidden, .yy-chhead-extra.hidden { display: none; }
@media (min-width: 768px) {
  .yy-chhead-crumb.md\:flex, .yy-chhead-extra.md\:flex { display: flex; }
  .yy-chhead-btn.md\:flex, .yy-chhead-btn.md\:inline-flex { display: inline-flex; }
}
@media (min-width: 1024px) {
  .yy-chhead-crumb.lg\:flex, .yy-chhead-extra.lg\:flex { display: flex; }
  .yy-chhead-btn.lg\:flex, .yy-chhead-btn.lg\:inline-flex { display: inline-flex; }
}
/* 分段标题和右侧徽标并排时不留下边距 */
.yy-panel-body .flex > .yy-panel-section-title { margin-bottom: 0; }

/* 窄屏：二级栏的显隐交给页面自己（AI绘画等有移动端抽屉），这里不强制隐藏 */
@media (max-width: 767px) {
  /* 窄屏下参数面板是盖在结果区上的抽屉（与上游原来的移动端形态一致），不挤占结果区 */
  .yy-panel {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: min(var(--yy-shell-panel-w), 86vw);
    min-width: 0;
    max-width: none;
    height: auto;
    z-index: 40;
    box-shadow: 0 12px 32px rgba(16, 24, 40, .18);
  }
  /* 抽屉要相对它所在的那一行定位，不能飘到 body 上盖住站点顶栏 */
  :where(*):has(> .yy-panel) { position: relative; }
  .yy-chhead { padding: 0 12px; overflow-x: auto; }
}

/* ───────────────────────── 股票子应用（/aistock/*）─────────────────────────
   子应用是独立打包的 SPA 片段（`StockAgentChat-*.js` + `index-B4H_DLdD.css`），
   自带 `.sidebar` / `.sidebar-header` / `.nav-item` 一整套类名，几何和契约对不上：

       实测           .sidebar 260px   .sidebar-header 72px   .nav-item 34px/圆角 6px
       契约           .yy-subnav 232px  头 56px                条目 36px/圆角 8px

   这里**只统一几何**，不碰 `--theme-*` —— 子应用自带 16 套主题，选中色是主题的
   一部分，全量收编会把它的配色体系吃掉（见 docs/SECOND-NAV-UNIFY-ANALYSIS.md §7.3）。
   作用域挂在 `.aistock-theme` 上（子应用根节点），避免误伤其它用了 `.sidebar` 的页面。

   ⚠️ `min-width: 0` 不能省：`.sidebar` 是 flex 子项（`flex: 0 0 auto`），
      `min-width: auto` 会把它卡在 min-content 宽度（实测正好 260px），
      只写 `width: 232px` 完全不生效 —— 连 `!important` 都压不下去。
   ────────────────────────────────────────────────────────────────────────── */
.aistock-theme .sidebar {
  width: var(--yy-shell-subnav-w);
  min-width: 0;
  max-width: var(--yy-shell-subnav-w);
}
.aistock-theme .sidebar .sidebar-header {
  height: var(--yy-shell-head-h);
  min-height: var(--yy-shell-head-h);
}
.aistock-theme .sidebar .nav-item {
  min-height: 36px;
  border-radius: var(--yy-shell-radius);
}
.aistock-theme .sidebar .sidebar-collapse-btn { border-radius: var(--yy-shell-radius); }

/* ─────────────────── 模型对话落地页（/newchat）────────────────────
   实测（1600x1000）暴露的三件事：
     · 输入框中心 399，可视区中心 560 → 偏上 161px
     · 内容列 800px 居中于 1360px 容器，左右各空 280px
     · 「支持图表类型」33 项挤在 800px 里 = 6 列 6 行 = 344px，
       整页 scrollHeight 1106 > 可视 940 → 166px 在折叠线下

   换布局的要点是**把内容从 800px 放开到 1200px**，不是把内容藏起来：
   放开之后 33 个缩略图变成 12 列 3 行 = 171px，整页回到一屏。
   ────────────────────────────────────────────────────────────────── */

.yy-chathome-main {
  flex: 1 1 0%;
  min-height: 0;
  /* ★ safe center 不是 center：内容装得下就垂直居中（输入框落到视线中心），
     装不下就退回顶部对齐。普通 center 在内容超高时会把顶部裁掉，
     而且因为容器 overflow-y:scroll，用户永远滚不到被裁的那部分。 */
  justify-content: safe center;
  /* ★ 左右留白用 clamp，别写 0。
     hero / 探索区都是 `max-w-[1200px] w-full mx-auto`：容器一旦窄于 1200px，
     `w-full` 就让它铺满，**左右一点缝都没有**。1250px 视口下内容区 1010px，
     输入框、chips、图表区全部从 x=240 顶到 x=1250（实测空隙 0px），
     看起来就是"挤到边上了"。窄屏原来只在 ≤900px 补 12px，中间这一大段
     （900–1440px）完全没有留白。
     clamp 下限 16px 管手机、上限 40px 管宽屏：1600px 下 2.5vw=40px，
     内容区 1360-80=1280 > 1200，所以宽屏上 hero 宽度**一点没变**。 */
  padding: 28px clamp(16px, 2.5vw, 40px) 0;
}

/* 厂商跑马灯：留在 hero 右边那条竖槽里。
   ★ 别再改成横向整行。竖着放在这里**不占纵向空间** —— 它和问候语并排，
   行高由下面的输入框决定；改成横着就是凭空多出一行，跟 chips 抢位置。
   试过两次（chips 之前 / chips 之后），两次都不对，这里记一笔。

   原来它是"没标题没边框"所以看着悬空，补一个 12px 的标签就够，不用加卡片。 */
.yy-modelwall {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 200px;
  height: 156px;
  flex: 0 0 auto;
}
.yy-modelwall-label {
  flex: 0 0 auto;
  font-size: 12px;
  line-height: 1;
  color: var(--yy-gray-400);
  white-space: nowrap;
}
/* 遮罩加在**跑马灯自己**身上，不能加在 .yy-modelwall 上 —— 加在父级会把
   「已接入 20+ 家模型」这个标签一起裁掉。竖向排列，所以是上下淡出。 */
.yy-modelwall-swiper {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 14px, #000 calc(100% - 14px), transparent);
  mask-image: linear-gradient(180deg, transparent, #000 14px, #000 calc(100% - 14px), transparent);
}
/* 原来是靠组件自己注入的 `.vertical-scale-swiper` 做"中间亮、上下淡"，
   类名换掉之后那份注入样式就成了死代码，这里补一份等价的（保留轻微缩放，
   竖向排列时缩放是好看的，横向才会显得参差）。 */
.yy-modelwall-swiper .swiper-slide {
  opacity: .4;
  transform: scale(.92);
  transition: opacity .3s ease, transform .3s ease;
}
.yy-modelwall-swiper .swiper-slide-active { opacity: 1; transform: scale(1); }

/* 首屏要装下「示例提示词 + 33 个图表类型」，底部原本有 main 的 40px
   + G 组件的 pb-20(80px) = 120px 死留白，收掉；同时把欢迎块的 mb-6(24px)
   收到 8px，两者合计让出 ~104px。只作用于这个页面。 */
.yy-chathome-main .pb-20 { padding-bottom: 12px; }
.yy-chathome-main > div:first-child { margin-bottom: 8px; }

/* ── 窄屏 ────────────────────────────────────────────────────────────
   12 列在 390px 上只剩 18px 一个（缩略图比标签还小），必须按断点降列。
   断点是按**视口**给的：全局侧栏在 1000px 出头会收成顶部横条，可用宽度
   会跳一下，所以取整到 1280 / 1024 / 768 / 480 这几档，别抠太细。
   ─────────────────────────────────────────────────────────────────── */
@media (max-width: 1279px) {
  .yy-chathome-main ul.grid-cols-12 { grid-template-columns: repeat(8, minmax(0, 1fr)); }
}
@media (max-width: 1023px) {
  .yy-chathome-main ul.grid-cols-12 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}
@media (max-width: 767px) {
  .yy-chathome-main ul.grid-cols-12 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  /* 「示例提示词」4 列在窄屏会把标题断成竖排 */
  .yy-chathome-main ul.grid-cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 479px) {
  .yy-chathome-main ul.grid-cols-12 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .yy-chathome-main ul.grid-cols-4 { grid-template-columns: minmax(0, 1fr); }
}

/* chips 一行放不下时会各自换行，把「图表报告」挤成竖排 —— 让整行换行 */
.yy-chathome-main ul.flex.items-center.justify-center.gap-3 { flex-wrap: wrap; }

/* ★ 窄屏断点取 900px，和页面自己那个 `rt`（isMobile）判断**同一个值** ——
   跑马灯的方向是 JS 属性（`direction: rt?"horizontal":"vertical"`），
   CSS 改不了；两边断点不一致就会出现"横着排但按竖槽尺寸"这种半吊子状态。 */
@media (max-width: 900px) {
  /* 手机上没有右侧竖槽可用，改成一行横条：标签在左、logo 在右，只占 40px */
  .yy-modelwall { width: 100%; height: 40px; flex-direction: row; align-items: center; gap: 10px; }
  .yy-modelwall-label { text-align: left; }
  .yy-modelwall-swiper {
    flex: 1 1 auto;
    height: 40px;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 24px, #000 calc(100% - 24px), transparent);
    mask-image: linear-gradient(90deg, transparent, #000 24px, #000 calc(100% - 24px), transparent);
  }
  .yy-modelwall-swiper .swiper-slide { transform: none; }
}

/* ============================================================================
   一秒合成语音 /aigenerate/onesynthesis
   ============================================================================ */

/* 外层滚动容器 `_wrapper_1ikmm_1` 是 `calc(100vh - header)` = 940 的定高盒子
   （`overflow-y: scroll`），里面的 flex 列原来写 `min-h-screen`（100vh = 1000），
   顶栏 `_head` 再吃掉 96px —— scrollHeight 1096 / clientHeight 940，
   什么都没多就凭空多出 156px 滚动；`flex-1` 的主区跟着算错，
   `<footer class="sticky bottom-0">` 停在 y=471，下面空 341px。
   把外层改成 flex 列，让内容列吃掉剩余高度，两个问题一起消掉。
   （和 /aisearch/index 同一个坑，见 SPEC §10；那页是单列，这页是 flex 列。） */
._wrapper_1ikmm_1 { display: flex; flex-direction: column; }
.yy-onesynth-col { flex: 1 1 auto; min-height: 0; }
/* <footer> 是 <main> 的子节点（不是兄弟）—— `<main class="flex-1">` 被撑到 829px，
   底栏却停在内容的流内位置（y=474），下面空 341px。让 main 自己也做 flex 列、
   底栏 `margin-top:auto`，它才会被推到 main 的底部。 */
.yy-onesynth-col > main { display: flex; flex-direction: column; }
.yy-onesynth-col > main > footer { margin-top: auto; }

/* antd Tabs 用的是默认蓝 #1677FF，全站品牌色是紫 #7C3AED。
   颜色层只收敛 CSS 里写死的字面色值，收敛不到 antd 的 CSS-in-JS。 */
._wrapper_1ikmm_1 .ant-tabs-ink-bar { background: var(--yy-color-primary) !important; }
._wrapper_1ikmm_1 .ant-tabs-tab.ant-tabs-tab-active .ant-tabs-tab-btn { color: var(--yy-color-primary) !important; }
._wrapper_1ikmm_1 .ant-tabs-tab:hover .ant-tabs-tab-btn { color: var(--yy-color-primary) !important; }

/* 选中音色卡片的描边写死成 #2B7AFF（蓝）。颜色层按 Tailwind 族名收敛
   （bg-blue-50 已经变成 --yy-brand-50），认不出这种任意值色号。 */
._wrapper_1ikmm_1 .border-\[\#2B7AFF\] { border-color: var(--yy-color-primary) !important; }

/* 筛选条：白条**不出血**，左右边缘和内容（「选择音色」「共 0 种音色」）对齐。
   ---------------------------------------------------------------------------
   这里换过一次方向，别再改回去：
   · 早先是「出血 + 等量内缩」（`margin: 0 -24px; padding: 12px 24px 0`），
     目的是让 tab 文字既不贴白条边线、又和标题同一条左边界。代价是白条比
     内容宽 48px（1439 视口下 472..1439，右边直接顶到视口边缘）。
   · 现在按用户要求收进去：白条 = 内容宽度（496..1415）。
   父级 `.yy-onesynth-main` 已经有 `padding-inline: 内容槽`，所以这里
   `margin: 0` 就自动对齐，不用再算出血量。
   ⚠️ 但收进来之后 tab 文字就**贴着白条左边**了（用户：「这么左侧没有间距了」）。
   白条是一条卡片，文字不该压边，所以补 16px 内边距 —— 白条仍然和内容同宽，
   只是 tab 从白条左边内缩 16px。这是「白条对齐内容 + 文字不压边」唯一同时成立的写法。 */
.yy-onesynth-filterbar {
  margin: 0;
  padding: 12px 16px 0;
}

/* antd Tabs 默认给 `.ant-tabs-nav` 加了 16px `margin-bottom`（给 tab 内容留位）。
   这页的 tab 只是音色筛选器、没有 tab 内容，那 16px 就是一条纯白死带子，
   把筛选条从 58px 撑到 87px。 */
._wrapper_1ikmm_1 .ant-tabs-nav { margin-bottom: 0; }

/* 「一键合成」是 antd `type="primary"`，底色同样是默认蓝 #1677FF。
   只收这一页（全站还有别的 antd 主按钮，动全站要单独评估）。 */
._wrapper_1ikmm_1 .ant-btn-primary:not(:disabled) {
  background: var(--yy-color-primary) !important;
  border-color: var(--yy-color-primary) !important;
}
._wrapper_1ikmm_1 .ant-btn-primary:not(:disabled):hover {
  background: var(--yy-color-primary-hover) !important;
  border-color: var(--yy-color-primary-hover) !important;
}

/* ============================================================================
   内容区左右留白统一（契约：--yy-shell-content-pad / --yy-shell-content-max）
   ----------------------------------------------------------------------------
   背景见 docs/CONTENT-GUTTER-UNIFY-PLAN.md。

   第 1 档 · bug：`.main-wrapper` 的百分比内边距
   上游 CSS（index-CRRTZ1cT.css）里：

     .main-wrapper{padding-top:1rem;padding-bottom:1rem;padding-bottom:2%}
     @media (min-width:  640px){.main-wrapper{padding-left:1%; padding-right:1% }}
     @media (min-width:  768px){.main-wrapper{padding-left:2%; padding-right:2% }}
     @media (min-width: 1024px){.main-wrapper{padding-left:3%; padding-right:3% }}
     @media (min-width: 1280px){.main-wrapper{padding-left:3%; padding-right:3% }}
     @media (min-width: 1536px){.main-wrapper{padding-left:10%;padding-right:10%}}  ← 断崖
     @media (min-width: 2200px){.main-wrapper{padding-left:15%;padding-right:15%}}

   两个问题：
   ① 百分比内边距的参照系是**包含块**，不是视口。内容区已经被「全局侧栏 240 +
      二级栏 232」砍掉 472px，1600px 视口下只剩 1128px，10% 就是 113px × 2
      = 226px，吃掉内容区的 20%。
   ② 1536px 处 3% → 10% 是断崖：1535px 时内容宽 999，1536px 时 851 ——
      **视口宽 1px，内容反而窄 74px**。

   `.main-wrapper` 全产物只有 2 个 chunk 用到（index-CUuHxfTM.js = /stage，
   index-Dho8e2j8.js = 文生图 Text2image），所以这是这两页专属的问题。

   ⚠️ 不需要 !important：本文件在托管块里最后加载，媒体查询不加权重，
   同权重下靠位置取胜，普通声明就能压过 @media 里的百分比规则。
   ============================================================================ */

.main-wrapper {
  padding-left: var(--yy-shell-content-gutter);
  padding-right: var(--yy-shell-content-gutter);
}

/* 第 2 档 · 视觉不一致：把各页自己的固定留白收到同一个值。
   `/draw` 的 38px、`/ai-education` 的 16px、`/aigenerate/onesynthesis` 的
   `px-4` 都是页面自己写死的，和 .yy-chhead 的 24px 对不上。
   `/e-commerce` 本来就是 `p-4 lg:p-6` = 24px，不用动。 */

/* /draw（画布工作台）：路由 CSS chunk `index-DjKNJk1Z.css` 里是
   `._content_1t3hj_422{padding:21px 38px 78px}`（窄屏另有一条 18px 14px 60px）。
   ⚠️ 这里**必须带 `!important`**：路由级 CSS chunk 是访问路由时才注入的，
   位置在壳层之后 —— 同权重（都是 1 个类）时后注入的赢，普通声明压不下去。
   实测：不带 `!important` 时计算值仍是 38px。
   （`.main-wrapper` 那条不用，因为它的规则在主 CSS `index-CRRTZ1cT.css` 里，
   那份是首屏加载的，在壳层之前。） */
._content_1t3hj_422 {
  padding-left: var(--yy-shell-content-gutter) !important;
  padding-right: var(--yy-shell-content-gutter) !important;
}

/* /ai-education：外层 `px-4`（内层 `px-6` 已经是 24px） */
.yy-edu-body { padding-left: var(--yy-shell-content-gutter); padding-right: var(--yy-shell-content-gutter); }

/* /image-editor：主滚动区 `p-2`（8px）太窄，页面标题、卡片都贴着边 */
.yy-imgedit-body { padding-left: var(--yy-shell-content-gutter); padding-right: var(--yy-shell-content-gutter); }

/* /aigenerate/onesynthesis：`max-w-7xl mx-auto px-4` —— 上限保留，留白收到契约值。
   两个 max-width 取小者，所以 1280 仍然生效（< 1440）。 */
.yy-onesynth-main {
  padding-left: var(--yy-shell-content-gutter);
  padding-right: var(--yy-shell-content-gutter);
}

/* ============================================================================
   ③ 入口页 / ① 频道页：外层内容容器统一用「内容槽」
   ----------------------------------------------------------------------------
   背景见 docs/CONTENT-WIDTH-UNIFY-PLAN.md。

   上一节治的是带二级栏的内容页（6 个）。这一节治剩下的：上游每个页面的
   外层容器各写各的宽度上限，实测有 10 个不同的值 ——

     /aisearch/index    max-w-4xl     896     两侧各空 232px
     /aitranslate/index width: 70%     790     两侧各空 169px   ← 百分比！
     /doc/index         max-w-6xl     960
     /newaithesis/index max-width:90% 1015     ← 百分比！
     /draw              —            1080
     /function/all      max-width   1100
     /ai-education      —            1128
     /aiapply           max-width   1200
     /newaippt/index    max-width   1200
     /newdraw           max-w-7xl    1280
     /aisound           max-w-1440   1320
     /audio/index       max-w-1440   1320
     /customagent/index max-w-1440   1360

   规则：**只统一最外层容器** —— 只写 `padding-inline: var(--yy-shell-content-gutter)`，
   不再自己写 max-width。内层居中元素（搜索框、翻译卡片）保持自己的宽度，
   那是内容设计的一部分，不是「页面留白」。

   ⚠️ 这些类在**路由 CSS chunk** 里（访问路由时才注入，位置在壳层之后），
   同权重下壳层会输 —— 必须带 `!important`。见 SPEC §13.3。
   ============================================================================ */

/* /aitranslate/index：`width:70%` —— 百分比是按**包含块**算的，
   内容区 1128 的 70% = 790，两侧各空 169px。和 /stage 的 `.main-wrapper`
   是同一种病（百分比留白 + 内容区已被侧栏压过）。 */
._content_3a935_10 {
  width: auto !important;
  padding-left: var(--yy-shell-content-gutter) !important;
  padding-right: var(--yy-shell-content-gutter) !important;
}

/* /newaithesis/index：`max-width:90%` —— 同上，90% × 1128 = 1015。 */
._AiLongThesis_mainBox_cwz2c_9 {
  max-width: none !important;
  padding-left: var(--yy-shell-content-gutter) !important;
  padding-right: var(--yy-shell-content-gutter) !important;
}

/* /function/all：`max-width:1100px; padding:48px 40px 32px` ——
   上下内边距保留，横向换成内容槽。 */
._pageInner_16jhk_13 {
  max-width: none !important;
  padding-left: var(--yy-shell-content-gutter) !important;
  padding-right: var(--yy-shell-content-gutter) !important;
}

/* /newaippt/index：`max-width:1200px; min-width:1200px` ——
   min-width 是写死的，窄屏靠 @media 兜；这里一并放开。 */
._wrap_mainBox_1mcyd_11 {
  max-width: none !important;
  min-width: 0 !important;
  padding-left: var(--yy-shell-content-gutter) !important;
  padding-right: var(--yy-shell-content-gutter) !important;
}

/* /aiapply：`max-width:1200px; margin:auto` */
._content_con_hfpfi_40 {
  max-width: none !important;
  padding-left: var(--yy-shell-content-gutter) !important;
  padding-right: var(--yy-shell-content-gutter) !important;
}

/* /aiapply 的**内层**：`_content_hfpfi_40` 自带 `padding-inline: 2rem`（32px），
   叠在外层给的 24px 上 → 实测左右各 56px。外层已经是内容槽了，内层横向归零，
   纵向的 `padding-top: .75rem` 保留。 */
._content_hfpfi_40 {
  padding-left: 0 !important;
  padding-right: 0 !important;
}

/* /aiapply「热门功能」三张卡：三个毛病叠在一起
   ---------------------------------------------------------------------------
   ① 左侧不对齐：`_list_hfpfi_107` 自带 `padding-inline: 1.5rem`（24px），
      而「热门功能」标题在行首 → 卡片比标题右缩 24px。
   ② 三张卡宽窄不一：网格是 `repeat(3, minmax(0,1fr))`，但 `<img>` 没设
      `width`，浏览器按**原始尺寸**排。第一张源图 872×214，被 `max-width:100%`
      夹到格子宽；另两张源图 436×107，就停在 436 不再放大。
   ③ 间距不等：窄的那两张被网格居中，左右各留空 → 视觉间距 57 / 78，
      右边还多空 71px。
   两条一起收：去掉内边距（①），让 img 填满格子（②③）。
   改完三张都是 498.7×122.4，间距恒为 32，左右边缘和标题、下面的 chip 行对齐。 */
._wrapper_hfpfi_31 ._content_hfpfi_40 ._hot_action_hfpfi_101 ._list_hfpfi_107 {
  padding-left: 0 !important;
  padding-right: 0 !important;
}
._wrapper_hfpfi_31 ._content_hfpfi_40 ._hot_action_hfpfi_101 ._list_hfpfi_107 > img {
  width: 100%;
  height: auto;
}

/* /aiapply 分类 chip 行：28 个分类、总宽 3099px，可视 1560px
   ---------------------------------------------------------------------------
   上游是「单行 + `overflow-x:auto` + `::-webkit-scrollbar{display:none}`」，
   页面里还有 drag-to-scroll 的 mousedown 处理器 —— 功能是通的（实测
   scrollLeft 0→400），但**没有任何可见暗示**：没有滚动条、`cursor:pointer`
   也不像能拖。用户的原话是「不能左右滑动，后面按钮无法展示」。
   试过把滚动条改回来（`::-webkit-scrollbar{display:block;height:4px}`，
   提权 + !important 都试了），macOS 的 overlay 滚动条压根不占位
   （offsetHeight === clientHeight），等于没效果。
   所以改成**换行**：一屏看全，不需要任何交互，也不依赖滚动条。
   想换回单行滚动的话，把下面两条换成 `flex-wrap: nowrap; overflow-x: auto`。 */
._wrapper_hfpfi_31 ._content_hfpfi_40 ._content_nav_hfpfi_142 {
  flex-wrap: wrap !important;
  overflow: visible !important;
}

/* 窄屏反过来：换行会把 28 个分类堆成 452px 高（半个手机屏），而手机上
   横向滑动本来就是肌肉记忆，不需要滚动条暗示。所以 ≤767 恢复单行可滚。 */
@media (max-width: 767px) {
  ._wrapper_hfpfi_31 ._content_hfpfi_40 ._content_nav_hfpfi_142 {
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
  }
}

/* ③ 入口页 / ① 频道页 里用 Tailwind 工具类定宽的那几个页面，不能全局覆盖
   工具类（`max-w-7xl`、`max-w-4xl` 满站都在用，改了会误伤），所以给容器挂一个
   标记类，把定宽换掉。用法：把 `max-w-* mx-auto px-*` 整段换成 `yy-content`。
   见 docs/CONTENT-WIDTH-UNIFY-PLAN.md §3.3。 */
.yy-content {
  max-width: none;
  margin-inline: 0;
  padding-left: var(--yy-shell-content-gutter);
  padding-right: var(--yy-shell-content-gutter);
}

/* ③ 入口页里的**单列内容页**（搜索框 / 表单）：满宽会把搜索框拉到 1500+，
   输入区一大片空白，反而比原来 896 的定宽更难看。给一个窄档：
   内容 1120px（1168 = 1120 + 24×2），两侧留白随视口平分。
   多列的卡片网格页不要用这个 —— 网格越宽越好看。 */
.yy-content--narrow {
  max-width: 1168px;
  margin-inline: auto;
}

/* /aisound（= /audio/index，后者会 302 到前者）：
   两层横向内边距叠出来的 100px ——
     `._wrapper_pfssc_1`            padding: 0 20px
     `max-w-[1440px] mx-auto`       1320（1600 视口下）
     里面的 hero / 三个区块          `px-4 md:px-8 lg:px-20` = 80px
   合计 20 + 80 = 100px，内容落在 x=340。同批 ③ 入口页现在是 24px。

   `lg:px-20` 一共 4 处（1 个 hero + 3 个区块），逐个改 JSX 要 4 条锚点，
   而且 `aisound_header.py` 也在改同一个 chunk。这里按「页面根 + 工具类」
   提高权重覆盖，一处搞定。
   ⚠️ 权重：`._wrapper_pfssc_1 .lg\:px-20` 是 0,2,0，压得过 Tailwind 的
   `.lg\:px-20`（0,1,0），所以不用 !important。
   ⚠️ 但 `._wrapper_pfssc_1` 自己的 padding 是 0,1,0，和路由 chunk 里的规则
   同权重、且路由 chunk 在壳层之后注入 —— **必须带 !important**（见 SPEC §13.3）。 */
._wrapper_pfssc_1 {
  padding-left: 0 !important;
  padding-right: 0 !important;
}
._wrapper_pfssc_1 .lg\:px-20 {
  padding-left: var(--yy-shell-content-gutter);
  padding-right: var(--yy-shell-content-gutter);
}

/* /function/all「功能大全」的分类 pill
   ---------------------------------------------------------------------------
   上游把选中色写在内联样式里（`style="background-color:#6366F1"`），文字色靠
   `._pillActive{color:#fff}`。两处都被颜色层打坏了：
   · `._pill_16jhk_130{color:var(--yy-gray-600)!important}` 的 !important
     盖过 `_pillActive` 的 `color:#fff` → 选中是**靛蓝底 + 深灰字**（对比度 2:1）。
   · `._pill_16jhk_130:hover{background:var(--yy-gray-50)!important}` 的
     !important 又盖过内联的靛蓝 → **hover 选中的 pill 会变成浅灰底**，
     字还是白的 → 白字白底，等于消失。
   选中态的底色正好等于 `--yy-color-secondary`(#6366F1)，用令牌写死，
   顺便把内联色也接管了。 */
._pill_16jhk_130._pillActive_16jhk_154 {
  color: #fff !important;
  background-color: var(--yy-color-secondary) !important;
  border-color: var(--yy-color-secondary) !important;
}
._pill_16jhk_130._pillActive_16jhk_154:hover {
  background-color: var(--yy-color-secondary) !important;
  border-color: var(--yy-color-secondary) !important;
  filter: brightness(1.08);
}


/* /aigenerate/onesynthesis 合成底栏：文本框占满一行，按钮落在「页脚」右侧
   ---------------------------------------------------------------------------
   需求演进：按钮要在提示文字右边（不是文本框下面、也不是文本框里）。直接绝对
   定位到提示行右侧后，按钮上沿离文本框只剩 2px，看着是「糊」在一起的。
   所以把提示行做成一条真正的页脚：
     文本框
     ├─ 12px 留白
     └─ 34px 页脚：左边提示文字，右边按钮（按钮和文字同一中线）
   页脚内容盒正好 34px = 按钮高度，按钮 bottom:16 就与卡片内边距对齐，
   和提示文字严格居中；文本框到按钮的净距 25px。
   用户明确不要中间的横线，所以只靠留白分层（min-height 46 = 12 内距 + 34 内容）。
   选择器 0,3,0 压过 md:flex-row / md:items-center（0,1,0），不用 !important。 */
.yy-onesynth-main .bg-gray-50.rounded-xl {
  position: relative;
}
.yy-onesynth-main .bg-gray-50.rounded-xl > .flex.md\:flex-row {
  flex-direction: column;
  align-items: stretch;
  gap: 16px;
}
.yy-onesynth-main .bg-gray-50.rounded-xl > .flex.md\:flex-row > .flex.flex-col {
  position: absolute;
  right: 16px;
  bottom: 16px;
  z-index: 2;
}
/* 页脚按钮收小一号：40px 的大按钮压不住 16px 的提示行 */
.yy-onesynth-main .bg-gray-50.rounded-xl > .flex.md\:flex-row > .flex.flex-col .ant-btn {
  height: 34px;
  padding: 0 18px;
  font-size: 13px;
  border-radius: 8px;
}
.yy-onesynth-main .bg-gray-50.rounded-xl > .mt-2\.5 {
  margin-top: 12px;
  padding: 12px 180px 0 0;
  min-height: 46px;   /* 12 内距 + 34 内容（不再有分隔线） */
  display: flex;
  align-items: center;
}

/* 窄屏：绝对定位会压住提示文字，恢复「文本框 → 按钮 → 提示」的堆叠 */
@media (max-width: 767px) {
  .yy-onesynth-main .bg-gray-50.rounded-xl > .flex.md\:flex-row > .flex.flex-col {
    position: static;
    align-self: flex-end;
  }
  .yy-onesynth-main .bg-gray-50.rounded-xl > .mt-2\.5 {
    margin-top: 12px;
    padding: 12px 0 0;
    min-height: 0;
    display: block;
  }
}

/* 百宝箱工具页（/aigenerate/*）：左右留白统一成骨架契约的 24px
   ---------------------------------------------------------------------------
   这些页是不同时期拼进来的，各写各的：px-4(16)、p-6/p-8(32)、18.5px，
   再各自套一个 max-w-4xl / max-w-6xl / max-w-7xl / max-w-[1440px]，
   于是每个页面内容的左右边界都不一样（16 / 18.5 / 32），宽屏下还各自封顶。
   统一口径：横向内边距 = --yy-shell-content-gutter（此处解析成 24px），
   宽度上限交给骨架（1680），页面自己不再封顶。
   选择器都是「页面外壳 + 具体容器」，不会波及内部的小列（如 max-w-3xl）。 */

/* 彩票预测：main.container.mx-auto.px-4（内层还有一层 container，一并处理）
   卡片自己还套了一层 max-w-4xl（896），窗口一宽左右就空出两百多像素 —— 去掉。 */
._wrapper_1ciny_1 .container.mx-auto {
  padding-left: var(--yy-shell-content-gutter) !important;
  padding-right: var(--yy-shell-content-gutter) !important;
  max-width: none !important;
}
._wrapper_1ciny_1 .max-w-4xl.mx-auto {
  max-width: none !important;
}

/* 理想伴侣 / 短视频分镜：两者共用 _wrapper_1fy6r_1，但内层结构不同 */
._wrapper_1fy6r_1 > main > div,
._wrapper_1fy6r_1 > div.min-h-screen {
  padding-left: var(--yy-shell-content-gutter) !important;
  padding-right: var(--yy-shell-content-gutter) !important;
}
._wrapper_1fy6r_1 .max-w-\[1440px\],
._wrapper_1fy6r_1 .max-w-6xl {
  max-width: none !important;
}

/* 土味情话 */
._wrapper_1xkdl_1 {
  padding-left: var(--yy-shell-content-gutter) !important;
  padding-right: var(--yy-shell-content-gutter) !important;
}
._wrapper_1xkdl_1 .max-w-6xl { max-width: none !important; }

/* 法律咨询 */
._wrapper_k03lp_1 {
  padding-left: var(--yy-shell-content-gutter) !important;
  padding-right: var(--yy-shell-content-gutter) !important;
}
._wrapper_k03lp_1 .max-w-6xl { max-width: none !important; }

/* 语音克隆：外壳 18.5px + 内层 _clonePage 26.6px，双层叠加到 45px */
._wrapper_3ps47_3 ._wrap_3ps47_3 {
  padding-left: var(--yy-shell-content-gutter) !important;
  padding-right: var(--yy-shell-content-gutter) !important;
}
._wrapper_3ps47_3 ._clonePage_3ps47_151 {
  padding-left: 0 !important;
  padding-right: 0 !important;
}

/* 考试题库 */
._wrapper_wf4uo_1 .max-w-7xl.mx-auto {
  padding-left: var(--yy-shell-content-gutter) !important;
  padding-right: var(--yy-shell-content-gutter) !important;
  max-width: none !important;
}

/* 小红书笔记：这一页没有二级栏（不走 _wrapper_msctk_1），外壳直接铺满 */
._wrapper_jbdgf_1 .max-w-7xl.mx-auto {
  padding-left: var(--yy-shell-content-gutter) !important;
  padding-right: var(--yy-shell-content-gutter) !important;
  max-width: none !important;
}

/* 小红书笔记：这一页自带一个「← 返回」的悬浮按钮，但页面本来就在导航里，
   返回没有去处（点了也是回上一页），和全站其它工具页不一致 —— 去掉。 */
._wrapper_jbdgf_1 > .absolute.left-5.top-5 {
  display: none !important;
}

/* 小红书笔记页补上二级栏后，页面外壳要变成「左栏 + 内容」的横向布局 */
._wrapper_jbdgf_1.yy-has-subnav {
  display: flex;
  align-items: stretch;
}
._wrapper_jbdgf_1.yy-has-subnav > .yy-subnav {
  flex: none;
  align-self: stretch;
}
._wrapper_jbdgf_1.yy-has-subnav > main {
  flex: 1 1 auto;
  min-width: 0;
}
/* 彩票预测里 main.container 套了两层，横向内边距会叠成 48 —— 内层清零 */
._wrapper_1ciny_1 > main.container > main.container {
  padding-left: 0 !important;
  padding-right: 0 !important;
}

/* /aiGenerate/aiAuspicious 的 tab 内容用的是 `.tab-content`，而论文助手页的全局
   CSS 里有一条 `.tab-content{display:none}`（只认 `.active`）。SPA 里样式不会随
   路由卸载，从论文页切到择吉日页时这条规则会把表单整块藏掉，只剩 tab 栏。
   页面本身已经给当前 tab 加了 `.active`，这里再做一层兜底：只放行没有 `.hidden`
   的那一块，避免任何页面级 `.tab-content` 规则再把它误伤。 */
#tab-content-wedding:not(.hidden),
#tab-content-business:not(.hidden) {
  display: block !important;
}

/* 论文助手（/newaithesis/lunwen）：滚动容器 p-6 已经给了 24，里面的 yy-content
   又给 24，两层叠成 48 —— 卡片左右各空 48px。这里把 yy-content 的横向内边距归零，
   留白只由外层出。 */
._wrapper_12gm5_1 .overflow-y-auto > .yy-content {
  padding-left: 0 !important;
  padding-right: 0 !important;
}

/* =============================================================================
   /aigc/newaigc 落地页：归队品牌色 + 首屏改两栏
   -----------------------------------------------------------------------------
   这个页面（以及 AIGC 检测/降AIGC/相似度、股票、策略中心等 16 个 chunk）用的是
   页面自带的第二套主题 `.theme-b`：--tb-primary 是橙红 hsl(10 90% 55%)，
   --tb-secondary 是米色，--tb-accent 是黄。所以它整体是暖色的，和品牌紫完全两套。

   改法不是去追每个 class，而是**把 .theme-b 的变量整体指回品牌令牌**：
   一处改动，CTA / 边框 / focus ring / 底色 / muted 全部归队。

   另外几处颜色是写死的（不走变量），单独补规则：
     · 大按钮 !bg-[#f44725] / hover:!bg-[#d83a1c]
     · 促销条 bg-gradient-to-r from-primary to-orange-500
     · 首屏底色 bg-gradient-to-br via-orange-50 to-yellow-50
     · 标题 .gradient-text（橙→黄渐变）

   布局：原来是单栏居中，上传卡片只有 576 宽，在 1376 的内容区里左右各空 400。
   改成两栏（左文案 + 右上传卡片），并去掉 max-w-5xl（1024）的宽度上限，
   改用 --yy-shell-content-gutter，和全站留白对齐。窄屏（<1024）回到单栏居中。
   ============================================================================= */

/* ⚠️ 写成 .theme-b.theme-b（0,2,0）：页面自己的 chunk 在 shell 之后加载，
   同权重会被它盖掉，必须提高权重。 */
.theme-b.theme-b {
  --tb-primary: var(--yy-brand-500);
  --tb-primary-foreground: #FFFFFF;
  --tb-secondary: var(--yy-brand-50);
  --tb-secondary-foreground: var(--yy-brand-900);
  --tb-accent: var(--yy-magenta-500);
  --tb-accent-foreground: #FFFFFF;
  --tb-muted: var(--yy-gray-50);
  --tb-muted-foreground: var(--yy-gray-500);
  --tb-ring: var(--yy-brand-500);
  --tb-border: var(--yy-gray-200);
}

/* 写死的橙 */
.theme-b [class*="bg-[#f44725]"] {
  background-color: var(--yy-brand-500) !important;
  border-color: var(--yy-brand-500) !important;
}
.theme-b [class*="bg-[#f44725]"]:hover {
  background-color: var(--yy-brand-600) !important;
  border-color: var(--yy-brand-600) !important;
}
.theme-b [class*="to-orange-500"] {
  background-image: linear-gradient(90deg, var(--yy-brand-500), var(--yy-magenta-500)) !important;
}
/* 顶部促销条（theme-b 的直接子 div）单独处理。
   演进：饱和紫通栏（太跳）→ 浅紫条（和首屏糊在一起）→ 白底独立一行（还是两行两套对齐）。
   最终：**抬到页头那一行，右对齐，收成一个胶囊**，整页顶部只剩一行。
   底部 CTA 是 section，仍是紫→品红渐变，不受影响。 */
.theme-b > div[class*="to-orange-500"] {
  position: static !important;
  display: flex !important;
  justify-content: flex-end !important;
  padding: 12px max(24px, calc((100% - 1280px) / 2 + 24px)) 0 !important;
  background-image: none !important;
  background-color: var(--yy-hero-band, #F7F5FF) !important;
  border: 0 !important;
  color: var(--yy-brand-700) !important;
}
/* 促销行现在在色带顶部，首屏那一段的上下 padding 收紧一点，色带不至于太高 */
/* 窄屏下标题会把最后一个字挤成孤字（"…检测 / 出"），用 balance 让两行长度接近 */
.theme-b .yy-hero-title {
  text-wrap: balance;
}

.theme-b > section:first-of-type {
  padding-top: 32px !important;
  padding-bottom: 48px !important;
}

.theme-b > div[class*="to-orange-500"] > div {
  display: inline-flex !important;
  width: auto !important;
  max-width: none !important;
  margin: 0 0 0 auto !important;
  justify-content: flex-end !important;
  gap: 8px !important;
  background: #FFFFFF !important;
  border: 1px solid var(--yy-brand-100) !important;
  border-radius: 999px !important;
  padding: 5px 14px !important;
}
@media (max-width: 1099px) {
  /* 窄屏放不下一行，促销让位（底部 CTA 仍在） */
  .theme-b > div[class*="to-orange-500"] { display: none !important; }
}
.theme-b > div[class*="to-orange-500"] .text-white,
.theme-b > div[class*="to-orange-500"] [class*="bg-white/20"],
.theme-b > div[class*="to-orange-500"] [class*="text-yellow-200"] {
  color: var(--yy-brand-800) !important;
}
.theme-b > div[class*="to-orange-500"] [class*="bg-white/20"] {
  background-color: var(--yy-brand-100) !important;
}
/* 首屏底色：原来是一条淡紫→白→淡品红的渐变，和上面的促销行对不齐会留接缝。
   改成纯色，促销行用同一个色号，两块连成一片。 */
.theme-b [class*="via-orange-50"] {
  background-image: none !important;
  background-color: var(--yy-hero-band, #F7F5FF) !important;
}
.theme-b [class*="text-yellow-200"] {
  color: rgba(255, 255, 255, .85) !important;
}
.theme-b .gradient-text {
  background-image: linear-gradient(135deg, var(--yy-brand-500), var(--yy-magenta-500)) !important;
}

/* 页面自带一条 sticky 胶囊导航（class 里带 xl:hidden，<1280 才出现），
   和 shell 的 .yy-chhead-tabs 完全重复，而且它是 sticky 又没留白，
   滚动时直接盖在内容上。shell 已经提供了同一组入口，这条隐藏掉。 */
.theme-b .sticky.top-0.z-40.xl\:hidden {
  display: none !important;
}

/* 页头：这条 .yy-chhead 只有面包屑 + 4 个灰字 tab，没有任何选中态，
   看起来像一行散落的文字。把 crumb 做成品牌胶囊（当前页），其余做成次级入口。
   作用域用 :has(> .theme-b) 锁住，不影响其他页面。 */
.bg-slate-100:has(.yy-hero-title) > .yy-chhead {
  height: 52px !important;
  border-bottom: 0 !important;
  /* 页头内容缩进到和首屏同一个 1280 容器，胶囊和下面的徽标左边缘对齐 */
  padding-left: max(24px, calc((100% - 1280px) / 2 + 24px)) !important;
  padding-right: max(24px, calc((100% - 1280px) / 2 + 24px)) !important;
}
/* 顶部导航：**和 tab 的选中态用同一套样式**。
   之前这里做成了实心紫胶囊，而 /ai-thesis 上页面的选中 tab 是「浅紫底 + 紫字 + 8px 圆角」，
   两个页面并排看就不一致了。现在当前页（文章AIGC）也统一成这个浅紫胶囊。 */
.bg-slate-100:has(.yy-hero-title) > .yy-chhead .yy-chhead-crumb {
  display: inline-flex !important;
  align-items: center !important;
  height: 32px !important;
  padding: 0 12px !important;
  margin-right: 4px !important;
  border-radius: 8px !important;
  border-bottom: 0 !important;
  background: rgba(124, 58, 237, .09) !important;
  color: var(--yy-brand-500) !important;
  font-size: 13px !important;
  font-weight: 600 !important;
}
.bg-slate-100:has(.yy-hero-title) > .yy-chhead .yy-chhead-tabs {
  height: 52px !important;
  align-items: center !important;
  gap: 2px !important;
  margin-left: 4px !important;
}
.bg-slate-100:has(.yy-hero-title) > .yy-chhead .yy-chhead-tab {
  display: inline-flex !important;
  align-items: center !important;
  height: 32px !important;
  padding: 0 12px !important;
  border-radius: 8px !important;
  border-bottom: 0 !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  color: var(--yy-gray-600) !important;
}
.bg-slate-100:has(.yy-hero-title) > .yy-chhead .yy-chhead-tab:hover {
  background: var(--yy-gray-100) !important;
  color: var(--yy-gray-900) !important;
}

/* antd 主按钮：统一成「品牌紫底 + 白字」，且默认 / hover / focus / active / disabled
   全部一个样，不随状态变色。
   起因：禁用态 antd 给的是 rgba(0,0,0,.25) 深色字，压在品牌紫底上等于看不见。 */
.ant-btn-primary:not(.ant-btn-dangerous),
.ant-btn-primary:not(.ant-btn-dangerous):hover,
.ant-btn-primary:not(.ant-btn-dangerous):focus,
.ant-btn-primary:not(.ant-btn-dangerous):focus-visible,
.ant-btn-primary:not(.ant-btn-dangerous):active,
.ant-btn-primary:not(.ant-btn-dangerous):disabled,
.ant-btn-primary:not(.ant-btn-dangerous)[disabled],
.ant-btn-primary:not(.ant-btn-dangerous).ant-btn-disabled {
  background: var(--yy-brand-500, #7C3AED) !important;
  border-color: var(--yy-brand-500, #7C3AED) !important;
  color: #FFFFFF !important;
  box-shadow: none !important;
  opacity: 1 !important;
}
.ant-btn-primary:not(.ant-btn-dangerous) .anticon,
.ant-btn-primary:not(.ant-btn-dangerous):disabled .anticon {
  color: #FFFFFF !important;
}
.ant-btn-primary:not(.ant-btn-dangerous):disabled,
.ant-btn-primary:not(.ant-btn-dangerous)[disabled],
.ant-btn-primary:not(.ant-btn-dangerous).ant-btn-disabled {
  cursor: not-allowed !important;
}

/* /ai-thesis（论文写作）：这页自带一套绿色主题 —— ._wrapper_9rols_1 上定义了
   --primary-color: #00b278，全页 39 处 var(--primary-color) 都跟着它走，背景也是薄荷绿渐变。
   整组 AIGC 页面里只有它是绿的，所以这里把主色和底色一起换成品牌紫。 */
._wrapper_9rols_1 {
  --primary-color: var(--yy-brand-500) !important;
  --primary-color2: var(--yy-magenta-500) !important;
  --bg-cover: linear-gradient(180deg, #F7F5FF, #FFFFFF 97.41%) !important;
}
/* 这页内容比视口高 87px，会在内容区里滚一条竖条。底部那条
   "还在犹豫? 限时优惠即将结束" 的推广条占 98px（含 mt-12 的 48px），
   去掉它正好放下 —— 页面本身已经有"点击生成"这个主 CTA 了。
   顺带把主区上下内边距从 32/32 收到 24/16，留出余量，视口 820 以上都不滚。 */
/* 底部推广条要贴底：wrapper 改成纵向 flex，主区不伸缩，footer 用 margin-top:auto 顶到底部。
   否则它会紧跟在卡片下面，底下留一大块空白，看着像"跑错位置"。 */
._wrapper_9rols_1 {
  display: flex !important;
  flex-direction: column !important;
  padding-bottom: 0 !important;
}
._wrapper_9rols_1 ._main_9rols_11 {
  flex: 0 0 auto !important;
}
._wrapper_9rols_1 > .border-t.mt-12 {
  margin-top: auto !important;
}
._wrapper_9rols_1 > .border-t.mt-12 .container {
  padding-top: 4px !important;
  padding-bottom: 4px !important;
}
._wrapper_9rols_1 ._main_9rols_11 {
  padding-top: 16px !important;
  padding-bottom: 4px !important;
}

/* 圆点里的数字：antd 未激活项是 rgba(0,0,0,.65) 深色，但圆点底已经被我们统一成品牌紫，
   深色数字压在紫底上看不清 —— 统一改成白色。 */
._wrapper_9rols_1 ._thesisStep_107z8_1 .ant-steps-item-icon .ant-steps-icon {
  color: #FFFFFF !important;
}

/* 步骤说明那列也是 fixed、按全宽算的 left，视口 1632 时正好被卡片压住 16px，
   圆点被裁掉一半。改成贴右边距，卡片右侧永远留出空隙。 */
@media (min-width: 1600px) {
  ._wrapper_9rols_1 ._thesisStep_107z8_1 {
    position: absolute !important;
    left: auto !important;
    right: 32px !important;
    top: var(--yy-thesis-col-top, 132px) !important;
    height: auto !important;
  }
}

/* 视口矮的时候（<=860）纵向压缩：标题 48→36、说明上间距 16→8、卡片上间距 24→16、
   卡片内边距 24/16→16/12、主区上边距 16→8。合计约 50px，794 高也能放下、不出现滚动条。 */
@media (max-height: 860px) {
  ._wrapper_9rols_1 {
    --yy-thesis-col-top: 96px;
  }
  ._wrapper_9rols_1 ._main_9rols_11 {
    padding-top: 8px !important;
  }
  ._wrapper_9rols_1 [class*="_thesisHead_title_"] {
    font-size: 36px !important;
  }
  ._wrapper_9rols_1 [class*="_thesisHead_desc_"] {
    padding-top: 8px !important;
    font-size: 18px !important;
  }
  ._wrapper_9rols_1 [class*="_thesisCreate_"] {
    margin-top: 16px !important;
  }
  ._wrapper_9rols_1 [class*="_thesisCreate_box_"] {
    padding-top: 16px !important;
    padding-bottom: 12px !important;
  }
}

/* 右侧步骤说明：antd 默认把未激活项压到 rgba(0,0,0,.45)（≈#8C8C8C），
   在浅紫底上只有 3:1，看着发虚。标题提到 gray-700、说明提到 gray-500。 */
._wrapper_9rols_1 ._thesisStep_107z8_1 .ant-steps-item-title {
  color: var(--yy-gray-700, #374151) !important;
  font-weight: 500;
}
._wrapper_9rols_1 ._thesisStep_107z8_1 .ant-steps-item-description {
  color: var(--yy-gray-500, #6B7280) !important;
}
._wrapper_9rols_1 ._thesisStep_107z8_1 .ant-steps-item-active .ant-steps-item-title,
._wrapper_9rols_1 ._thesisStep_107z8_1 .ant-steps-item-process .ant-steps-item-title {
  color: var(--yy-gray-900, #111827) !important;
  font-weight: 600;
}

/* 右侧那列步骤说明 `_thesisStep_*` 也是 fixed 定位、按全宽算的位置，
   视口 <1600 时会顶到卡片右边并被窗口裁掉半截，直接收起来（卡片里的步骤本身是完整的）。 */
@media (max-width: 1599px) {
  ._wrapper_9rols_1 ._thesisStep_107z8_1 {
    display: none !important;
  }
}

/* 那张示意图挂在 `position:fixed; left:300px` 上（页面按"没有侧边栏"的全宽设计的）。
   我们的外壳有 240px 侧边栏，视口 ≥1536 时它会压到中间的表单上。
   改成绝对定位、锚定在「内容区中线往左 462px」，即表单卡片的左边再留 12px，
   再缩到 76% 塞进侧边栏和表单之间的空隙；侧边栏收起时中线右移，它也跟着走。
   <1536 时页面本来就有自己的内联版本，这里不动。 */
@media (min-width: 1536px) and (max-width: 2199px) {
  ._wrapper_9rols_1 div.fixed.z-50.left-\[300px\] {
    position: absolute !important;
    /* 左贴侧边栏、右贴卡片，宽度自适应：侧边栏收起时自动变宽，文字就不用折行了 */
    left: 24px !important;
    right: calc(50% + 462px) !important;
    margin-inline: auto !important;
    max-width: 300px !important;
    top: var(--yy-thesis-col-top, 132px) !important;
    display: block !important;
  }
  /* 原图从第一帧起就隐藏，避免"先看到旧图、再被 JS 换成新面板"的闪烁。
     对应的 DOM 面板由 yyai8-thesis-panel.js 注入；万一脚本没跑，容器会是空的。 */
  ._wrapper_9rols_1 div.fixed.z-50.left-\[300px\] > img {
    display: none !important;
  }
}

/* 左栏「3 步说明」的 DOM 版本（yyai8-thesis-panel.js 注入，原图隐藏）。
   原图文字烤死、只能缩到 76%，正文只有 9px；这里用真实字号 11–12.5px，配色直接走品牌紫。 */
.yy-tp {
  width: 100%;
  color: var(--yy-gray-700, #374151);
}
.yy-tp-head {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 18px;
}
.yy-tp-pill {
  align-self: flex-start;
  padding: 3px 10px;
  border-radius: 6px;
  background: var(--yy-brand-500);
  color: #FFFFFF;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.5;
}
.yy-tp-input {
  padding: 6px 10px;
  border: 1px solid rgba(124, 58, 237, .13);
  border-radius: 6px;
  background: rgba(255, 255, 255, .8);
  color: var(--yy-gray-500);
  font-size: 11.5px;
  line-height: 1.5;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.yy-tp-step {
  position: relative;
  display: flex;
  gap: 10px;
  padding-bottom: 14px;
}
.yy-tp-step:not(:last-child)::before {
  content: "";
  position: absolute;
  left: 9.5px;
  top: 24px;
  bottom: 0;
  border-left: 1px dashed var(--yy-brand-200, #DDD6FE);
}
.yy-tp-num {
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1px solid var(--yy-brand-300, #C4B5FD);
  background: #FFFFFF;
  color: var(--yy-brand-500);
  font-size: 11px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.yy-tp-body {
  flex: 1 1 auto;
  min-width: 0;
}
.yy-tp-title {
  margin: 0 0 8px;
  color: var(--yy-gray-900);
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.4;
}
.yy-tp-card {
  padding: 10px 12px;
  border: 1px solid rgba(124, 58, 237, .13);
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(124, 58, 237, .055), rgba(255, 255, 255, .55));
  box-shadow: 0 1px 2px rgba(124, 58, 237, .05);
}
.yy-tp-card--row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 12px;
}
.yy-tp-card-title {
  margin: 0 0 6px;
  color: var(--yy-brand-600);
  font-size: 11.5px;
  line-height: 1.5;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.yy-tp-list {
  margin: 0;
  padding: 0;
  list-style: none;
}
.yy-tp-list li {
  color: var(--yy-gray-600);
  font-size: 11px;
  line-height: 1.7;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.yy-tp-chip {
  color: var(--yy-brand-600);
  font-size: 11.5px;
}
.yy-tp-strong {
  color: var(--yy-gray-700);
  font-size: 11.5px;
}
.yy-tp-tags {
  display: flex;
  gap: 6px;
  margin-top: 8px;
}
.yy-tp-tags span {
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(124, 58, 237, .10);
  color: var(--yy-brand-600);
  font-size: 10px;
  line-height: 1.6;
  white-space: nowrap;
}

/* 左栏那块「输入论文标题 / AI生成论文 / 毕业论文支持查重」的示意图是一张 300×673 的 PNG，
   整块绿色设计烤在图片里，DOM 里没有颜色可改。用 hue-rotate 把绿(~160°)转到品牌紫(~265°)，
   实测 140deg 落在紫色区间（165/190 会偏品红）。灰阶文字不受 hue-rotate 影响。 */
._wrapper_9rols_1 img.w-\[300px\] {
  filter: hue-rotate(140deg) saturate(1.02);
}

/* 页面背景里有两块柠檬绿的装饰光斑（rgba(186,255,145,.6) / rgba(207,255,179,.6)，
   302×302），是整页泛绿的主要来源，换成品牌紫的低透明度光斑。 */
._wrapper_9rols_1 ._bg_filter_item_9rols_36 {
  background-color: rgba(124, 58, 237, .10) !important;
}

/* 页内还有一些 emerald/green 的浅底卡片、描边和文字（步骤面板、标签），一起换成品牌紫 */
._wrapper_9rols_1 [class*="bg-emerald-50"],
._wrapper_9rols_1 [class*="bg-green-50"],
._wrapper_9rols_1 [class*="bg-emerald-100"],
._wrapper_9rols_1 [class*="bg-green-100"] {
  background-color: var(--yy-brand-50) !important;
}
._wrapper_9rols_1 [class*="border-emerald"],
._wrapper_9rols_1 [class*="border-green"] {
  border-color: var(--yy-brand-100) !important;
}
._wrapper_9rols_1 [class*="text-emerald"],
._wrapper_9rols_1 [class*="text-green"] {
  color: var(--yy-brand-500) !important;
}

/* 这页的 antd 组件走的是 ConfigProvider 的 colorPrimary: #00b278，
   生成的 CSS-in-JS 类是写死的 rgb(0,178,120)，改 CSS 变量管不到，只能按类名覆盖。 */
._wrapper_9rols_1 .ant-btn-primary:not(.ant-btn-dangerous) {
  background-color: var(--yy-brand-500) !important;
  border-color: var(--yy-brand-500) !important;
}
._wrapper_9rols_1 .ant-btn-primary:not(.ant-btn-dangerous):hover {
  background-color: var(--yy-brand-600) !important;
  border-color: var(--yy-brand-600) !important;
}
._wrapper_9rols_1 .ant-radio-checked .ant-radio-inner,
._wrapper_9rols_1 .ant-radio-wrapper:hover .ant-radio-inner {
  background-color: var(--yy-brand-500) !important;
  border-color: var(--yy-brand-500) !important;
}
._wrapper_9rols_1 .ant-steps-item-icon,
._wrapper_9rols_1 .ant-steps-item-process .ant-steps-item-icon {
  background-color: var(--yy-brand-500) !important;
  border-color: var(--yy-brand-500) !important;
}
._wrapper_9rols_1 .ant-checkbox-checked .ant-checkbox-inner,
._wrapper_9rols_1 .ant-switch-checked,
._wrapper_9rols_1 .ant-slider-track,
._wrapper_9rols_1 .ant-progress-bg {
  background-color: var(--yy-brand-500) !important;
  border-color: var(--yy-brand-500) !important;
}

.bg-\[\#00b278\], .bg-\[\#00B278\],
.\!bg-\[\#00b278\], .\!bg-\[\#00B278\] {
  background-color: var(--yy-brand-500) !important;
}
.text-\[\#00b278\], .text-\[\#00B278\] {
  color: var(--yy-brand-500) !important;
}
.border-\[\#00b278\], .border-\[\#00B278\] {
  border-color: var(--yy-brand-500) !important;
}

/* 相似度页的步骤序号用了 bg-orange-500（①紫②橙），和品牌色不搭 */
.theme-b .bg-orange-500 {
  background-color: var(--yy-brand-500) !important;
}

/* 首屏两栏：左文案 + 右上传卡片（只作用于带 .yy-hero-title 的那一栏） */
@media (min-width: 1024px) {
  .theme-b .container.max-w-5xl:has(> .text-center.space-y-5 > .yy-hero-title) {
    /* 首屏内容整体收在 1280 里居中：卡片不再无限变宽（1632 无侧栏时曾被拉到 1045），
       文字栏也能拿到 ~650，不再被挤。 */
    max-width: 1280px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding-left: 24px !important;
    padding-right: 24px !important;
  }
  .theme-b .text-center.space-y-5:has(> .yy-hero-title) {
    display: grid !important;
    /* 卡片宽度自适应：最小 420，最大 620，中间由 1fr 吃掉。
       原来固定 520 时，1623 宽下文字栏 950、卡片贴右，中间空 ~390。 */
    /* 卡片吃掉剩余宽度：原来上限 620，1623 宽下文字栏 659、卡片 620，
       两者之间仍留 ~390 的空当。现在文字栏封顶 480，卡片铺满剩下的空间。 */
    grid-template-columns: minmax(0, 1fr) minmax(0, 560px) !important;
    column-gap: 56px !important;
    align-items: center !important;
    text-align: left !important;
  }
  .theme-b .text-center.space-y-5:has(> .yy-hero-title) > *:nth-child(-n + 5) {
    grid-column: 1 !important;
    justify-self: start !important;
    width: auto !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }
  /* 上传卡片：进右栏，跨满 5 行，垂直居中 */
  .theme-b .text-center.space-y-5:has(> .yy-hero-title) > *:last-child {
    grid-column: 2 !important;
    grid-row: 1 / 6 !important;
    align-self: center !important;
    width: 100% !important;
    max-width: none !important;
    padding-top: 0 !important;
    margin: 0 !important;
  }
  .theme-b .text-center.space-y-5:has(> .yy-hero-title) > *:last-child > div {
    width: 100% !important;
  }
  /* 行距：必须先把 space-y-5 给的 margin-top 清掉，否则是「20 + 我的 margin-bottom」
     叠加（实测 38/28/46/46），整块被拉散。清掉后只用 margin-bottom 控制节奏。 */
  .theme-b .text-center.space-y-5:has(> .yy-hero-title) > * {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
  }
  .theme-b .text-center.space-y-5:has(> .yy-hero-title) > *:nth-child(1) { margin-bottom: 18px !important; }
  .theme-b .text-center.space-y-5:has(> .yy-hero-title) > *:nth-child(2) { margin-bottom: 16px !important; }
  .theme-b .text-center.space-y-5:has(> .yy-hero-title) > *:nth-child(3) { margin-bottom: 24px !important; }
  .theme-b .text-center.space-y-5:has(> .yy-hero-title) > *:nth-child(4) { margin-bottom: 26px !important; }
  /* CTA 外面那层 pt-2 在 grid 里是多余的 8px */
  .theme-b .text-center.space-y-5:has(> .yy-hero-title) > *:nth-child(5) { padding-top: 0 !important; }
  /* 标题里「AI 生成!」那行自带 !mt-5（20px），两行之间不需要那么大 */
  .theme-b .text-center.space-y-5:has(> .yy-hero-title) .yy-hero-title .gradient-text {
    margin-top: 2px !important;
  }
  /* 「已有 23,847 人」这一行原本居中，左栏里改成左对齐 */
  .theme-b .text-center.space-y-5:has(> .yy-hero-title) > *:nth-child(4) > div {
    justify-content: flex-start !important;
  }
}
