/* NETA Core Tokens · tokens.css — generated by build.py
   一个文件包含：01 颜色与阴影 → 02 文字、间距与尺寸 → 03 图标与组件。
   图标脚本另外引入：icons.js（彩色像素）、line-icons.js（线性）、dropdown.js（下拉菜单）。 */


/* ════════════════════════════════════════════════════════════
   01 颜色与阴影 · 全局 Token + 组件 Token + 阴影
   ════════════════════════════════════════════════════════════ */
/* NETA Core Tokens · 01 颜色与阴影 — 全局 Token + 组件 Token + 阴影。generated by build_colors.py */
:root {
  /* ── 1 · 全局 Token · Palette ── */
  /* 灰阶 Gray */
  --neta-gray-100: #161718;
  --neta-gray-90: #2D2E2F;
  --neta-gray-60: #737474;
  --neta-gray-30: #B9B9BA;
  --neta-gray-18: #D5D5D5;
  --neta-gray-12: #E3E3E3;
  --neta-gray-8: #ECECED;
  --neta-gray-4: #F6F6F6;
  --neta-white: #FFFFFF;
  /* 深色 Dark */
  --neta-dark-1: #34343B;
  --neta-dark-2: #4C4C55;
  /* 品牌青 Cyan */
  --neta-cyan: #1BD5E6;
  --neta-cyan-bright: #2FF1FF;
  --neta-cyan-text: #007A92;
  --neta-cyan-tint: #E4FAFC;
  /* 红 Red */
  --neta-red: #FF7088;
  --neta-red-text: #D11F45;
  --neta-red-soft: #FFC9D3;
  --neta-red-tint: #FFEEF1;
  /* 黄 Yellow */
  --neta-yellow: #FFD54F;
  --neta-yellow-text: #946600;
  --neta-yellow-tint: #FFFAEA;
  /* 绿 Green */
  --neta-green: #5BDC93;
  --neta-green-text: #0B7F3E;
  --neta-green-tint: #EBFBF2;
  /* 积分 Credit */
  --neta-credit: #8F6934;
  /* 作品类型 */
  --neta-type-blue: #5BB7E5;
  --neta-type-blue-text: #0B5E80;
  --neta-type-blue-tint: var(--neta-cyan-tint);
  --neta-type-red: #E58A8A;
  --neta-type-red-text: #9A2F2F;
  --neta-type-red-tint: var(--neta-red-tint);
  --neta-type-violet: #AE93DD;
  --neta-type-violet-text: #573A8A;
  --neta-type-violet-tint: #F2ECFB;
  --neta-type-amber: #D9A85A;
  --neta-type-amber-text: #7A4A12;
  --neta-type-amber-tint: var(--neta-yellow-tint);
  --neta-type-green: #93C29D;
  --neta-type-green-text: #2F6640;
  --neta-type-green-tint: var(--neta-green-tint);

  /* ── 1 · 全局 Token · Semantic ── */
  /* 文字 */
  --neta-text-strong: var(--neta-gray-100);  /* 标题、链接、选择项、按键文字 */
  --neta-text: var(--neta-gray-90);  /* 正文 */
  --neta-text-secondary: var(--neta-gray-60);  /* 说明、时间、表头、空状态 */
  --neta-text-disabled: var(--neta-gray-30);  /* 禁用、Placeholder */
  --neta-text-inverse: var(--neta-white);  /* 深色面上的主文字 */
  --neta-text-inverse-secondary: var(--neta-gray-30);  /* 深色面上的次要文字 */
  --neta-text-accent: var(--neta-cyan-text);  /* 小面积强调文字（Trending now） */
  /* 描边 */
  --neta-border: var(--neta-gray-8);  /* 面板、弹窗、分割线、浅框、Tooltip；输入框默认描边 */
  --neta-border-frame: var(--neta-gray-12);  /* 像素选择项框、画板网格点 */
  --neta-border-strong: var(--neta-gray-18);  /* 像素搜索框、产物外框；输入框 / 标签 Hover */
  --neta-border-focus: var(--neta-gray-30);  /* 输入框聚焦；像素搜索框 Hover；内容卡片当前项 */
  --neta-border-inverse: var(--neta-dark-2);  /* 深色面上的描边、分割线 */
  /* 背景 */
  --neta-bg: var(--neta-white);  /* 页面、卡片、弹窗、输入框 */
  --neta-bg-subtle: var(--neta-gray-4);  /* Hover 预选中、弱底（积分标签）、Board 画布底 */
  --neta-bg-selected: var(--neta-gray-8);  /* 选中、图片占位、禁用底 */
  --neta-bg-inverse: var(--neta-gray-100);  /* Toast、重点标题、余额卡、深色卡 */
  --neta-bg-inverse-raised: var(--neta-gray-90);  /* 深色面里的浮起层 */
  --neta-bg-inverse-hover: var(--neta-dark-1);  /* 深色面里的悬停 */
  /* 强调（品牌青） */
  --neta-accent: var(--neta-cyan);  /* 选中框、进度、勾选、运行中、开启、信息状态点 */
  --neta-accent-bright: var(--neta-cyan-bright);  /* AI 光标 / 生成中；深色面上的强调 */
  --neta-accent-bg: var(--neta-cyan-tint);  /* 选中 / 开启的浅底、信息浅底 */
  /* 状态 */
  --neta-danger: var(--neta-red);  /* 状态点、错误描边 */
  --neta-danger-text: var(--neta-red-text);  /* 错误文字 */
  --neta-danger-border: var(--neta-red-soft);  /* 危险区域浅描边（删除确认框）、危险次要按键底部 */
  --neta-danger-bg: var(--neta-red-tint);  /* 错误浅底 */
  --neta-warning: var(--neta-yellow);  /* 状态点、强调卡片描边 */
  --neta-warning-text: var(--neta-yellow-text);  /* 警告文字 */
  --neta-warning-bg: var(--neta-yellow-tint);  /* 警告浅底、强调卡片 */
  --neta-success: var(--neta-green);  /* 状态点、勾选 */
  --neta-success-text: var(--neta-green-text);  /* 成功文字（+150 bonus） */
  --neta-success-bg: var(--neta-green-tint);  /* 成功浅底 */
  /* 积分 */
  --neta-credit-text: var(--neta-credit);  /* 积分数字、侧栏积分标签 */

  /* ── 2 · 组件 Token ── */
  /* 主按键 · New chat、发送、确认、购买 */
  --neta-primary-key-shell: var(--neta-gray-100);  /* 外壳 2px */
  --neta-primary-key-face: var(--neta-gray-90);  /* 按键面 */
  --neta-primary-key-face-hover: var(--neta-dark-1);  /* 悬浮按键面 */
  --neta-primary-key-highlight: var(--neta-dark-2);  /* 顶部高光 */
  --neta-primary-key-depth: var(--neta-gray-100);  /* 底部体积（与外壳同色） */
  --neta-primary-key-content: var(--neta-text-inverse);  /* 文字 / 图标 */
  --neta-primary-key-disabled-shell: var(--neta-border-frame);  /* 禁用 · 外壳 */
  --neta-primary-key-disabled-face: var(--neta-bg-selected);  /* 禁用 · 按键面 */
  --neta-primary-key-disabled-highlight: var(--neta-bg-subtle);  /* 禁用 · 顶部高光 */
  --neta-primary-key-disabled-depth: var(--neta-border-frame);  /* 禁用 · 底部体积 */
  --neta-primary-key-disabled-content: var(--neta-text-disabled);  /* 禁用 · 文字 / 图标 */
  /* 次要按键 · Fork、取消、Billing & Credits */
  --neta-secondary-key-shell: var(--neta-gray-100);  /* 外壳 */
  --neta-secondary-key-face: var(--neta-bg);  /* 按键面 */
  --neta-secondary-key-face-hover: var(--neta-bg-subtle);  /* 悬浮 */
  --neta-secondary-key-depth: var(--neta-border-frame);  /* 底部体积 */
  --neta-secondary-key-content: var(--neta-text-strong);
  --neta-secondary-key-disabled-shell: var(--neta-text-secondary);  /* 禁用 · 外壳 */
  --neta-secondary-key-disabled-face: var(--neta-bg);  /* 禁用 · 按键面 */
  --neta-secondary-key-disabled-depth: var(--neta-border-frame);  /* 禁用 · 底部体积 */
  --neta-secondary-key-disabled-content: var(--neta-text-secondary);  /* 禁用 · 文字 */
  /* 深色面按键 · 深色卡里的按键（Creator「Available at renewal」） */
  --neta-inverse-key-shell: var(--neta-dark-2);  /* 外壳 */
  --neta-inverse-key-face: var(--neta-gray-90);  /* 按键面 */
  --neta-inverse-key-face-hover: var(--neta-dark-1);  /* 悬浮 */
  --neta-inverse-key-highlight: var(--neta-dark-1);  /* 顶部高光 */
  --neta-inverse-key-depth: var(--neta-gray-100);  /* 底部体积：比按键面深 */
  --neta-inverse-key-content: var(--neta-text-inverse);
  --neta-inverse-key-content-disabled: var(--neta-text-inverse-secondary);  /* 禁用文字 */
  /* 金色主按键（付费墙） · Buy credits 购买积分（付费墙主操作）；文字 700。禁用同主按键 primary-key-disabled-* */
  --neta-commerce-key-shell: var(--neta-yellow-text);  /* 外壳 2px */
  --neta-commerce-key-face: var(--neta-yellow);  /* 按键面 */
  --neta-commerce-key-face-hover: #FFE27A;  /* = commerce-gold-bright · 悬浮按键面 · 付费墙局部色 */
  --neta-commerce-key-highlight: #FFF3C4;  /* = commerce-gold-tint · 顶部高光 · 付费墙局部色 */
  --neta-commerce-key-depth: #F5B936;  /* = commerce-gold · 底部体积 · 付费墙局部色 */
  --neta-commerce-key-content: #7A4A12;  /* = commerce-gold-text · 文字 · 与按键面对比 5.3:1 · 付费墙局部色 */
  /* 危险主按键 · Delete world 确认 */
  --neta-danger-key-shell: #7A0F28;  /* 外壳 · 组件专用 */
  --neta-danger-key-face: var(--neta-danger-text);  /* 按键面 */
  --neta-danger-key-face-hover: #E23C60;  /* 悬浮 · 组件专用 */
  --neta-danger-key-highlight: var(--neta-danger);  /* 顶部高光 */
  --neta-danger-key-depth: #A3173A;  /* 底部体积 · 组件专用 */
  --neta-danger-key-content: var(--neta-text-inverse);
  /* 选择项 · 导航、菜单项、文件树、弹窗左栏 */
  --neta-selection-item-frame: var(--neta-border-frame);  /* 像素框（只给 .is-pixel · 画板标签栏） */
  --neta-selection-item-bg-hover: var(--neta-bg-subtle);  /* 预选中 */
  --neta-selection-item-bg-selected: var(--neta-bg-selected);  /* 选中 */
  --neta-selection-item-content: var(--neta-text-strong);
  /* 可选卡片 / 开启状态 · 积分面额、Board 背景、分享开启 */
  --neta-option-card-border: var(--neta-border);  /* 未选中描边 */
  --neta-option-card-bg-hover: var(--neta-bg-subtle);
  --neta-option-card-selected-border: var(--neta-accent);  /* 选中 / 开启描边 */
  --neta-option-card-selected-bg: var(--neta-accent-bg);  /* 选中 / 开启底 */
  --neta-option-card-mark: var(--neta-accent);  /* 勾选块 */
  /* 内容卡片 · Explore 世界卡、精选列表（16px 圆角，2px 框） */
  --neta-card-border: var(--neta-border);  /* 描边 */
  --neta-card-border-hover: var(--neta-border-frame);  /* 悬停描边（+ shadow-hover） */
  --neta-card-bg: var(--neta-bg);  /* 卡片底 */
  /* 像素输入框 · Explore 搜索框（.neta-input.is-pixel）。其他输入框用语义描边 border → border-strong → border-focus */
  --neta-input-border: var(--neta-border-strong);  /* 默认描边 */
  --neta-input-border-hover: var(--neta-border-focus);  /* 悬停 */
  --neta-input-border-focus: var(--neta-gray-100);  /* 聚焦 / 下拉展开 */
  --neta-input-border-error: var(--neta-danger);  /* 错误 */
  --neta-input-bg: var(--neta-bg);  /* 底色 */
  --neta-input-bg-readonly: var(--neta-bg-subtle);  /* 只读 */
  --neta-input-content: var(--neta-text-strong);  /* 输入文字 */
  --neta-input-placeholder: var(--neta-text-disabled);  /* Placeholder */
  --neta-input-icon: var(--neta-text-secondary);  /* 放大镜、清空 ×、下拉箭头 */

  /* ── Alpha ── */
  --neta-gray-100-a8: rgb(22 23 24 / 8%);  /* shadow-1 贴附、shadow-hover */
  --neta-gray-100-a12: rgb(22 23 24 / 12%);  /* shadow-2 浮层、shadow-3 弹窗、套餐卡投影 */
  --neta-gray-100-a24: rgb(22 23 24 / 24%);  /* scrim 遮罩、压在图片上的文字阴影 */

  /* ── 4 · 阴影 Shadow ── 静止浮层不偏移，悬停抬起往下偏；-drop 是 filter 写法 */
  --neta-shadow-1: 0 0 16px 0 var(--neta-gray-100-a8);  /* 贴附：贴在画布或页面上的小件：画板工具条、画板卡片、文件预览图片、Tooltip */
  --neta-shadow-2: 0 0 16px 0 var(--neta-gray-100-a12);  /* 浮层：临时弹出、点外面就关：下拉菜单、头像菜单、分享面板、Toast */
  --neta-shadow-3: 0 0 40px 0 var(--neta-gray-100-a12);  /* 弹窗：带遮罩的弹窗：设置、购买、套餐、兑换、World settings */
  --neta-shadow-hover: 0 12px 24px 0 var(--neta-gray-100-a8);  /* 悬停抬起：可点卡片悬停（配合 translateY(-3px)）、Explore 精选卡 */
  --neta-shadow-1-drop: drop-shadow(0 0 16px var(--neta-gray-100-a8));
  --neta-shadow-2-drop: drop-shadow(0 0 16px var(--neta-gray-100-a12));
  --neta-shadow-3-drop: drop-shadow(0 0 40px var(--neta-gray-100-a12));
  --neta-shadow-hover-drop: drop-shadow(0 12px 24px var(--neta-gray-100-a8));
  --neta-scrim: var(--neta-gray-100-a24);  /* 弹窗遮罩 */
  --neta-scrim-blur: 6px;  /* 遮罩的背景模糊：backdrop-filter: blur(var(--neta-scrim-blur)) */
  /* 像素硬阴影尺寸（不模糊，颜色用组件 Token） */
  --neta-px-highlight: 2px;  /* inset 0 2px 0 · 按键顶部高光、开关、积分格高光 */
  --neta-px-depth: 4px;  /* inset 0 -4px 0 · 按键底部体积（默认 / 悬停） */
  --neta-px-depth-pressed: 2px;  /* inset 0 -2px 0 · 按下：底部变薄 2px，整体下移 2px；开关圆钮 */
  --neta-ring-2: 2px;  /* 0 0 0 2px · 头像外框；焦点框 = ring-2 白 + ring-2 gray-100 */
  --neta-ring-4: 4px;  /* 0 0 0 4px · 光圈：套餐卡、Best value 积分包 */
}


/* ════════════════════════════════════════════════════════════
   01 颜色与阴影 · 功能局部色：付费 / 积分购买（容器加 class="commerce" 才生效）
   ════════════════════════════════════════════════════════════ */
/* NETA · 付费 / 积分购买 · 功能局部色
 * 只在套餐页、Buy credits、设置 · Billing & Credits 使用；不属于全局 Token。
 * 依赖 colors.css。其余颜色一律引用全局 Token。 */
.commerce {
  /* Creator 套餐主题 — 同时使用全局：bg-inverse、accent-bright、accent、accent-bg、inverse-key-* */
  --commerce-creator-hover-bg: #0E2C31;  /* 悬停时的深青底 */
  --commerce-creator-stripe: #123A40;  /* 悬停时的像素斜纹 */
  --commerce-creator-accent-text: #7FE9F2;  /* 深色卡上的青色小字（billed monthly） */
  --commerce-creator-halo: #C9FBFF;  /* 悬停外圈光晕 */
  /* Legend / 金色 — 同时使用全局：warning-bg、warning-text、credit-text、commerce-key-* */
  --commerce-gold: #F5B936;  /* Legend 描边、积分格、星星 */
  --commerce-gold-soft: #FFE79A;  /* 浅金描边：权益分隔线、模型区 */
  --commerce-gold-bright: #FFE27A;  /* 高光、亮星 */
  --commerce-gold-tint: #FFF3C4;  /* 光晕外圈、空积分格 */
  --commerce-gold-text: #7A4A12;  /* 价格、Billed（与 type-amber-text 同值） */
  /* 套餐卡投影：光圈用全局 ring-4；投影颜色引用 Token 再调透明度 */
  --commerce-plan-shadow: 0 16px 32px 0 var(--neta-gray-100-a12);  /* 套餐卡默认（Creator） */
  --commerce-creator-shadow-hover: 0 22px 40px 0 color-mix(in srgb, var(--neta-cyan-text) 26%, transparent);  /* Creator 悬停 */
  --commerce-legend-shadow: 0 16px 32px 0 color-mix(in srgb, var(--commerce-gold) 24%, transparent);  /* Legend 默认 */
  --commerce-legend-shadow-hover: 0 16px 32px 0 color-mix(in srgb, var(--commerce-gold) 30%, transparent);  /* Legend 悬停 */
}


/* ════════════════════════════════════════════════════════════
   02 文字、间距与尺寸 · 全局 Token + 组件 Token + 功能局部 + 文字样式类
   ════════════════════════════════════════════════════════════ */
/* NETA Core Tokens · 02 文字、间距与尺寸 — generated by build.py
   依赖 colors.css（01 颜色与阴影）。两层：1 全局 Token · 2 功能局部。 */

/* ── 1 · 全局 Token ── */
:root {
  /* 文字 */
  --neta-font-family: Figtree, "PingFang SC", "Noto Sans CJK SC", "Microsoft YaHei", Arial, sans-serif;  /* 界面字体：英文 Figtree，中文回退系统黑体 */
  --neta-font-family-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;  /* 代码、链接、UUID */
  --neta-font-size-caption: 12px;  /* 说明、时间、标签、表单标签、文件树、角标（界面最小字号） */
  --neta-font-size-body: 14px;  /* 正文、导航、按键、输入框、卡片标题 */
  --neta-font-size-subtitle: 16px;  /* 区块标题、资料卡名字 */
  --neta-font-size-heading: 18px;  /* 品牌名、弹窗左栏标题 */
  --neta-font-size-title: 20px;  /* 弹窗标题、内容区标题、套餐名 */
  --neta-font-size-display: 32px;  /* 页面大标题、世界名 */
  --neta-font-size-numeral: 44px;  /* 大数字：积分余额、价格 */
  --neta-font-weight-regular: 400;  /* 正文、说明、导航 */
  --neta-font-weight-medium: 500;  /* 选中项、强调短句、表单键名 */
  --neta-font-weight-bold: 700;  /* 标题、数字、角标、正文加粗 */
  --neta-line-height-single: 1;  /* 单行：按键、标签、导航、数字 */
  --neta-line-height-heading: 1.2;  /* 标题；可能被省略的单行文字 */
  --neta-line-height-multiline: 1.5;  /* 多行：正文、说明、列表 */
  --neta-line-height-agent: 1.8;  /* Agent 长回复 */
  --neta-letter-spacing-caps: 0.06em;  /* 大写小标题 */
  /* 间距 */
  --neta-space-2: 2px;  /* 像素微调、按键体积让位 */
  --neta-space-4: 4px;  /* 标签上下、标签之间、导航项之间 */
  --neta-space-6: 6px;  /* 小标签左右、筛选标签之间 */
  --neta-space-8: 8px;  /* 图标和文字、卡片封面四周、按键之间 */
  --neta-space-10: 10px;  /* 选择项左右、芯片左右 */
  --neta-space-12: 12px;  /* 小控件左右、卡片之间、列表行上下 */
  --neta-space-16: 16px;  /* 按键左右、卡片内容、网格间隔 */
  --neta-space-20: 20px;  /* 大卡片内容、小区块之间 */
  --neta-space-24: 24px;  /* 列表左右、区块之间、弹窗离屏幕边 */
  --neta-space-32: 32px;  /* 弹窗内边距 */
  --neta-space-40: 40px;  /* 设置内容区左右、页面顶部 */
  --neta-space-48: 48px;  /* 大区块之间 */
  /* 控件高度 */
  --neta-control-h-20: 20px;  /* 角标、文件标签关闭键 */
  --neta-control-h-24: 24px;  /* 标签 */
  --neta-control-h-28: 28px;  /* 小开关、小分段、小按键 */
  --neta-control-h-32: 32px;  /* 图标键、关闭键、积分标签、聊天记录行、文件树行、筛选项 */
  --neta-control-h-36: 36px;  /* 小像素按键、下拉、文件标签、菜单项 */
  --neta-control-h-40: 40px;  /* 标准按键、搜索框、设置左栏导航 */
  --neta-control-h-44: 44px;  /* 大按键、侧栏主导航、表单输入框 */
  /* 圆角 */
  --neta-radius-2: 2px;  /* Board 便签 / 卡片 */
  --neta-radius-4: 4px;  /* ≤ 20px 的小元素、小缩略图、编号块 */
  --neta-radius-8: 8px;  /* 标签、积分标签、Toast、聊天记录行 */
  --neta-radius-12: 12px;  /* 输入框、搜索框、下拉、卡片封面 */
  --neta-radius-16: 16px;  /* 选项卡片、选择项、画板视图 */
  --neta-radius-20: 20px;  /* 卡片、信息表、Composer */
  --neta-radius-24: 24px;  /* 弹窗、大面板 */
  --neta-radius-full: 9999px;  /* 头像 */
  /* 描边与像素 */
  --neta-border-width: 2px;  /* 所有描边 */
  --neta-pixel-cell: 2px;  /* 1 个逻辑像素 = 2px */
  --neta-pixel-step-inner: 2px;  /* 一级切角：按钮面、标签、勾选框 */
  --neta-pixel-step-outer: 4px;  /* 两级切角：立体按键、选择项、菜单 */
}

/* 文字样式（可选）：class="neta-text-body" 等 */
.neta-text-display { font-family: var(--neta-font-family); font-size: var(--neta-font-size-display); line-height: var(--neta-line-height-heading); font-weight: var(--neta-font-weight-bold); }  /* 页面大标题 · Explore、Choose your plan、世界名 */
.neta-text-title { font-family: var(--neta-font-family); font-size: var(--neta-font-size-title); line-height: var(--neta-line-height-heading); font-weight: var(--neta-font-weight-bold); }  /* 标题 · 弹窗标题、内容区标题、套餐名 */
.neta-text-heading { font-family: var(--neta-font-family); font-size: var(--neta-font-size-heading); line-height: var(--neta-line-height-heading); font-weight: var(--neta-font-weight-bold); }  /* 中标题 · 弹窗左栏标题、品牌名 */
.neta-text-subtitle { font-family: var(--neta-font-family); font-size: var(--neta-font-size-subtitle); line-height: var(--neta-line-height-heading); font-weight: var(--neta-font-weight-bold); }  /* 小标题 · 区块标题、资料卡名字 */
.neta-text-body { font-family: var(--neta-font-family); font-size: var(--neta-font-size-body); line-height: var(--neta-line-height-multiline); font-weight: var(--neta-font-weight-regular); }  /* 正文 · 正文、导航、按键、输入框、列表 */
.neta-text-body-medium { font-family: var(--neta-font-family); font-size: var(--neta-font-size-body); line-height: var(--neta-line-height-multiline); font-weight: var(--neta-font-weight-medium); }  /* 正文强调 · 选中项、成员名、信息表键名 */
.neta-text-body-bold { font-family: var(--neta-font-family); font-size: var(--neta-font-size-body); line-height: var(--neta-line-height-multiline); font-weight: var(--neta-font-weight-bold); }  /* 正文加粗 · 作品卡标题、列表数字 */
.neta-text-caption { font-family: var(--neta-font-family); font-size: var(--neta-font-size-caption); line-height: var(--neta-line-height-multiline); font-weight: var(--neta-font-weight-regular); }  /* 说明 · 说明、时间、聊天记录、文件树 */
.neta-text-badge { font-family: var(--neta-font-family); font-size: var(--neta-font-size-caption); line-height: var(--neta-line-height-single); font-weight: var(--neta-font-weight-bold); }  /* 角标 · NEW、17% off、Recommended */
.neta-text-overline { font-family: var(--neta-font-family); font-size: var(--neta-font-size-caption); line-height: var(--neta-line-height-single); font-weight: var(--neta-font-weight-bold); text-transform: uppercase; letter-spacing: var(--neta-letter-spacing-caps); }  /* 大写小标题 · BENEFITS、LATEST MODELS */
.neta-text-numeral { font-family: var(--neta-font-family); font-size: var(--neta-font-size-numeral); line-height: var(--neta-line-height-single); font-weight: var(--neta-font-weight-bold); font-variant-numeric: tabular-nums; }  /* 大数字 · 积分余额、价格 */
.neta-text-agent { font-family: var(--neta-font-family); font-size: var(--neta-font-size-body); line-height: var(--neta-line-height-agent); font-weight: var(--neta-font-weight-regular); }  /* Agent 正文 · 对话区 Agent 回复 */
.neta-text-code { font-family: var(--neta-font-family-mono); font-size: var(--neta-font-size-caption); line-height: var(--neta-line-height-multiline); font-weight: var(--neta-font-weight-regular); }  /* 代码 · 代码预览、链接、UUID */
.neta-num { font-variant-numeric: tabular-nums; }
.neta-truncate { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; line-height: var(--neta-line-height-heading); }  /* 单行省略 */

/* ── 2 · 功能局部：只在一个功能里用，不进全局档位。组件自己的尺寸在 03 图标与组件 components.css ── */
:root {
  /* 侧栏 */
  --neta-sidebar-width: 216px;  /* 侧栏宽度（视口 ≥ 1700 时 232） */
  /* 工作区 */
  --neta-tree-width: 188px;  /* 文件树宽度 */
  /* 分享弹层 */
  --neta-share-panel-w: 360px;  /* 面板宽度 */
  /* 让位 */
  --neta-local-dialog-close-reserve: 72px;  /* 标题右侧给关闭键、角标让位 */
  --neta-local-pack-tag-reserve: 96px;  /* 积分档位左侧给角标让位 */
}
@media (min-width: 1700px) { :root { --neta-sidebar-width: 232px; } }


/* ════════════════════════════════════════════════════════════
   03 图标与组件 · 组件基础 + 组件
   ════════════════════════════════════════════════════════════ */
/* NETA Core Tokens · 03 图标与组件 — generated by build.py，不手改。
   依赖：colors.css（01 颜色与阴影）→ type-space-size.css（02 文字、间距与尺寸）→ 本文件。本文件不写色值、字号、间距。 */
:root {
  /* ── 组件基础 · pixel ── */
  --neta-pixel-shape-outer: polygon(0 4px, 2px 4px, 2px 2px, 4px 2px, 4px 0, calc(100% - 4px) 0, calc(100% - 4px) 2px, calc(100% - 2px) 2px, calc(100% - 2px) 4px, 100% 4px, 100% calc(100% - 4px), calc(100% - 2px) calc(100% - 4px), calc(100% - 2px) calc(100% - 2px), calc(100% - 4px) calc(100% - 2px), calc(100% - 4px) 100%, 4px 100%, 4px calc(100% - 2px), 2px calc(100% - 2px), 2px calc(100% - 4px), 0 calc(100% - 4px));  /* 两级阶梯角：按键外壳、选择项框、菜单框、切换轨道。不随尺寸加级 */
  --neta-pixel-shape-inner: polygon(0 2px, 2px 2px, 2px 0, calc(100% - 2px) 0, calc(100% - 2px) 2px, 100% 2px, 100% calc(100% - 2px), calc(100% - 2px) calc(100% - 2px), calc(100% - 2px) 100%, 2px 100%, 2px calc(100% - 2px), 0 calc(100% - 2px));  /* 一级阶梯角：按键面、选择项底色、勾选框；平面像素标识（角标、世界头像、重点标题）也用它 */
  --neta-pixel-pressed-offset: 2px;  /* 按下整体下移 2px，不缩放 */
  --neta-pixel-motion: 80ms steps(1);  /* 像素按键状态切换：一步到位，不做缓动 */
  /* ── 组件基础 · icon ── */
  --neta-icon-line-sm: 14px;  /* 线性图标 · 12px 文字旁、紧凑控件里 */
  --neta-icon-line-md: 16px;  /* 线性图标 · 默认 */
  --neta-icon-line-lg: 18px;  /* 线性图标 · 弹窗左栏导航、面板式菜单、大按键 */
  --neta-icon-slot-sm: 16px;  /* 彩色像素图标 · 筛选标签、封面标签；勾选框、可选卡片的勾选块 */
  --neta-icon-slot-md: 20px;  /* 彩色像素图标 · 文件树、标签栏、面包屑、内容标签（图标按光学大小 18 / 19 / 20px 放进 20px 槽位） */
  --neta-icon-slot-lg: 24px;  /* 彩色像素图标 · 侧栏主导航、积分闪电 */
  --neta-icon-logo: 32px;  /* NETA 品牌 logo 在品牌行：按 32 × 24 显示，不用 pixelated */
  /* ── 组件尺寸：字号、内边距、宽度（值引用 02 的全局档位）── */
  /* 像素按键 */
  --neta-pixel-key-font-size: var(--neta-font-size-body);  /* 字号 */
  --neta-pixel-key-font-size-small: var(--neta-font-size-caption);  /* ≤ 28px 高的小按键 */
  --neta-pixel-key-padding-x: var(--neta-space-16);  /* 左右内边距 */
  --neta-pixel-key-padding-x-small: var(--neta-space-12);  /* ≤ 36px 高 */
  --neta-pixel-key-depth-reserve: var(--neta-space-2);  /* 底部给体积让位 */
  /* 选择项 */
  --neta-selection-font-size: var(--neta-font-size-body);  /* 导航、分段 */
  --neta-selection-font-size-compact: var(--neta-font-size-caption);  /* ≤ 36px：筛选标签、紧凑分段、聊天记录 */
  --neta-selection-padding-x: var(--neta-space-12);  /* 40 / 44px 高 */
  --neta-selection-padding-x-compact: var(--neta-space-10);  /* ≤ 36px 高 */
  /* 切换组件 */
  --neta-segmented-track-padding: var(--neta-space-4);  /* 轨道内边距 */
  --neta-segmented-item-padding-x: var(--neta-space-12);  /* 选项左右 */
  /* 菜单 */
  --neta-menu-padding: var(--neta-space-6);  /* 菜单内边距（下拉、紧凑菜单） */
  --neta-menu-gap: var(--neta-space-2);  /* 选项之间 */
  --neta-menu-offset: var(--neta-space-6);  /* 离触发器 */
  --neta-account-menu-w: 256px;  /* 头像菜单宽度 */
  /* 平面像素标识 */
  --neta-pixel-title-font-size: var(--neta-font-size-subtitle);  /* 重点标题字号 */
  --neta-pixel-title-font-weight: var(--neta-font-weight-bold);  /* 重点标题字重 */
  --neta-world-avatar-font-size: var(--neta-font-size-body);  /* 世界首字头像 */
  --neta-world-avatar-font-weight: var(--neta-font-weight-bold);
  /* 输入框 */
  --neta-input-padding-x: var(--neta-space-12);  /* 左右内边距 */
  /* 弹窗 */
  --neta-dialog-w-sm: 400px;  /* 小弹窗：兑换码 */
  --neta-dialog-w-md: 560px;  /* 中弹窗：积分记录、订阅管理 */
  --neta-dialog-w-lg: 760px;  /* 大弹窗：Buy credits */
  --neta-dialog-w-xl: 880px;  /* 设置弹窗：账户设置、世界设置 */
  --neta-dialog-w-page: 1264px;  /* 整页弹层：套餐页 */
  --neta-dialog-settings-h: 672px;  /* 设置弹窗高度 */
  --neta-dialog-side-width: 248px;  /* 设置弹窗左栏 */
  /* 卡片 */
  --neta-card-padding: var(--neta-space-8);  /* 封面四周 */
  --neta-list-padding-x: var(--neta-space-24);  /* 列表卡行左右 */
  /* 悬停提示 */
  --neta-tooltip-padding-x: var(--neta-space-10);  /* 左右内边距 */
  --neta-tooltip-offset: var(--neta-space-6);  /* 离触发器 */
  --neta-tooltip-font-size: var(--neta-font-size-caption);  /* 字号 */
  --neta-tooltip-font-weight: var(--neta-font-weight-medium);  /* 字重 */
  --neta-tooltip-max-width: 320px;  /* 最宽，超出省略 */
  /* ── 组件自己的其他变量 ── */
  /* ── 切换组件 · Segmented Control ── */
  --neta-segmented-thumb-body: 2px;  /* 选中块底部多出的体积 */
  --neta-segmented-motion: 340ms cubic-bezier(.22,1,.36,1);
  /* ── 下拉菜单 · Dropdown ── */
  --neta-dropdown-min-width: 104px;
  --neta-dropdown-motion-open: 180ms;
  --neta-dropdown-motion-close: 140ms;
  /* ── 平面像素标识 · Flat Pixel ── */
  --neta-flat-pixel-badge-sm: 16px;  /* 小角标；20 / 24 用 control-h-20 / 24 */
  /* ── 卡片 · Card ── */
  --neta-card-list-row-height: 56px;  /* 列表卡的行高 */
  /* ── 悬停提示 · Tooltip ── */
  --neta-tooltip-delay: 300ms;  /* 首次出现的停留时间 */
  --neta-tooltip-motion: 120ms ease-out;  /* 淡入 + 上移 */
  --neta-tooltip-rise: 2px;  /* 出现时上移距离 */
  /* ── 对话气泡 · Chat Bubble ── */
  --neta-bubble-max-width: 80%;  /* 最宽占对话区 */
}

/* ═══════════════════════════════════════════════════════════════════════════
   参考实现 · 只用 colors.css / type-space.css / size.css / 上面的组件变量，不写色值、字号、间距。
   类名：.neta-key / .neta-selection-item / .neta-chip / .neta-segmented / .neta-dropdown /
         .neta-menu / .neta-check / .neta-option-card / .neta-badge / .neta-world-avatar /
         .neta-pixel-title / .neta-input / .neta-composer / .neta-dialog / .neta-card /
         .neta-list / .neta-tag / .neta-credit-pill / .neta-toast / .neta-tooltip / .neta-chat-row / .neta-icon-button
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── 主按键 · 次要 · 深色面 · 危险 ─────────────────────────────────────────
   结构：外壳（两级阶梯角）→ ::before 按键面（一级阶梯角）+ 顶部高光 + 底部体积。 */
.neta-key {
  --k-shell: var(--neta-primary-key-shell); --k-face: var(--neta-primary-key-face); --k-face-hover: var(--neta-primary-key-face-hover);
  --k-highlight: var(--neta-primary-key-highlight); --k-depth: var(--neta-primary-key-depth); --k-content: var(--neta-primary-key-content);
  --k-hl: var(--neta-px-highlight); --k-height: var(--neta-control-h-40);
  position: relative; isolation: isolate; display: inline-flex; align-items: center; justify-content: center;
  gap: var(--neta-space-8); height: var(--k-height); margin: 0; border: 0;
  padding: 0 var(--neta-pixel-key-padding-x) var(--neta-pixel-key-depth-reserve);
  background: var(--k-shell); color: var(--k-content); clip-path: var(--neta-pixel-shape-outer);
  font-family: var(--neta-font-family); font-size: var(--neta-pixel-key-font-size); font-weight: var(--neta-font-weight-regular);
  line-height: var(--neta-line-height-single); white-space: nowrap; cursor: pointer; text-decoration: none;
  transition: transform var(--neta-pixel-motion); -webkit-tap-highlight-color: transparent;
}
.neta-key::before {
  content: ""; position: absolute; z-index: -1; inset: var(--neta-border-width);
  background: var(--k-face); clip-path: var(--neta-pixel-shape-inner);
  box-shadow: inset 0 var(--k-hl) 0 var(--k-highlight), inset 0 calc(var(--neta-px-depth) * -1) 0 var(--k-depth);
}
.neta-key:focus-visible { outline: none; }
.neta-key:hover::before, .neta-key.is-hover::before { background: var(--k-face-hover); }
.neta-key:active, .neta-key.is-pressed { transform: translateY(var(--neta-pixel-pressed-offset)); }
.neta-key:active::before, .neta-key.is-pressed::before {
  box-shadow: inset 0 var(--k-hl) 0 var(--k-highlight), inset 0 calc(var(--neta-px-depth-pressed) * -1) 0 var(--k-depth);
}
.neta-key.is-xl { --k-height: var(--neta-control-h-44); }
.neta-key.is-md { --k-height: var(--neta-control-h-36); padding-left: var(--neta-pixel-key-padding-x-small); padding-right: var(--neta-pixel-key-padding-x-small); font-size: var(--neta-pixel-key-font-size-small); }
.neta-key.is-sm { --k-height: var(--neta-control-h-32); padding-left: var(--neta-pixel-key-padding-x-small); padding-right: var(--neta-pixel-key-padding-x-small); font-size: var(--neta-pixel-key-font-size-small); }
.neta-key.is-square { padding-left: 0; padding-right: 0; aspect-ratio: 1; }

.neta-key.is-secondary {
  --k-shell: var(--neta-secondary-key-shell); --k-face: var(--neta-secondary-key-face); --k-face-hover: var(--neta-secondary-key-face-hover);
  --k-depth: var(--neta-secondary-key-depth); --k-content: var(--neta-secondary-key-content); --k-hl: 0px; --k-highlight: transparent;
}
.neta-key.is-inverse {
  --k-shell: var(--neta-inverse-key-shell); --k-face: var(--neta-inverse-key-face); --k-face-hover: var(--neta-inverse-key-face-hover);
  --k-highlight: var(--neta-inverse-key-highlight); --k-depth: var(--neta-inverse-key-depth); --k-content: var(--neta-inverse-key-content);
}
.neta-key.is-commerce {
  --k-shell: var(--neta-commerce-key-shell); --k-face: var(--neta-commerce-key-face); --k-face-hover: var(--neta-commerce-key-face-hover);
  --k-highlight: var(--neta-commerce-key-highlight); --k-depth: var(--neta-commerce-key-depth); --k-content: var(--neta-commerce-key-content);
  font-weight: var(--neta-font-weight-bold);
}
.neta-key.is-danger {
  --k-shell: var(--neta-danger-key-shell); --k-face: var(--neta-danger-key-face); --k-face-hover: var(--neta-danger-key-face-hover);
  --k-highlight: var(--neta-danger-key-highlight); --k-depth: var(--neta-danger-key-depth); --k-content: var(--neta-danger-key-content);
}
/* 禁用：保留结构，不响应悬停 / 按下 */
.neta-key:disabled, .neta-key[aria-disabled="true"] {
  --k-shell: var(--neta-primary-key-disabled-shell); --k-face: var(--neta-primary-key-disabled-face); --k-face-hover: var(--neta-primary-key-disabled-face);
  --k-highlight: var(--neta-primary-key-disabled-highlight); --k-depth: var(--neta-primary-key-disabled-depth); --k-content: var(--neta-primary-key-disabled-content);
  cursor: not-allowed; transform: none;
}
.neta-key.is-secondary:disabled, .neta-key.is-secondary[aria-disabled="true"] {
  --k-shell: var(--neta-secondary-key-disabled-shell); --k-face: var(--neta-secondary-key-disabled-face); --k-face-hover: var(--neta-secondary-key-disabled-face);
  --k-depth: var(--neta-secondary-key-disabled-depth); --k-content: var(--neta-secondary-key-disabled-content);
}
.neta-key.is-inverse:disabled, .neta-key.is-inverse[aria-disabled="true"] {
  --k-shell: var(--neta-inverse-key-shell); --k-face: var(--neta-inverse-key-face); --k-face-hover: var(--neta-inverse-key-face);
  --k-highlight: var(--neta-inverse-key-highlight); --k-depth: var(--neta-inverse-key-depth); --k-content: var(--neta-inverse-key-content-disabled);
}
.neta-key:disabled::before, .neta-key[aria-disabled="true"]::before {
  box-shadow: inset 0 var(--k-hl) 0 var(--k-highlight), inset 0 calc(var(--neta-px-depth) * -1) 0 var(--k-depth);
}
.neta-key .neta-line-icon, .neta-key img { flex: none; }

/* ── 危险确认区 ── */
.neta-danger-confirm { padding: var(--neta-space-16); border: var(--neta-border-width) solid var(--neta-danger-border); border-radius: var(--neta-radius-16); background: var(--neta-danger-bg); }

/* ── 图标按键 ── */
.neta-icon-button {
  display: inline-grid; place-items: center; flex: none; width: var(--neta-control-h-32); height: var(--neta-control-h-32);
  margin: 0; padding: 0; border: 0; border-radius: var(--neta-radius-8); background: none; color: var(--neta-text-secondary); cursor: pointer;
}
.neta-icon-button:hover { background: var(--neta-bg-subtle); color: var(--neta-text-strong); }
.neta-icon-button:disabled { color: var(--neta-text-disabled); background: none; cursor: not-allowed; }
.neta-icon-button:focus-visible { outline: none; }

/* ── 选择项 ── */
.neta-selection-item {
  --s-fill: transparent; position: relative; isolation: isolate; display: inline-flex; align-items: center; gap: var(--neta-space-8);
  height: var(--neta-control-h-40); margin: 0; padding: 0 var(--neta-selection-padding-x); border: 0; background: none;
  color: var(--neta-selection-item-content); font-family: var(--neta-font-family); font-size: var(--neta-selection-font-size);
  font-weight: var(--neta-font-weight-regular); line-height: var(--neta-line-height-single); text-decoration: none; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.neta-selection-item::before, .neta-selection-item::after { content: ""; position: absolute; z-index: -1; display: none; }
.neta-selection-item::after { inset: 0; background: var(--s-fill); border-radius: var(--neta-radius-8); }
/* 像素版：只用在画板标签栏 */
.neta-selection-item.is-pixel::before { inset: 0; background: var(--neta-selection-item-frame); clip-path: var(--neta-pixel-shape-outer); }
.neta-selection-item.is-pixel::after { inset: var(--neta-border-width); border-radius: 0; clip-path: var(--neta-pixel-shape-inner); }
.neta-selection-item:hover, .neta-selection-item.is-hover { --s-fill: var(--neta-selection-item-bg-hover); }
.neta-selection-item.is-selected, .neta-selection-item[aria-current="page"], .neta-selection-item[aria-selected="true"] { --s-fill: var(--neta-selection-item-bg-selected); }
.neta-selection-item.is-pixel:is(:hover, .is-hover, .is-selected, [aria-current="page"], [aria-selected="true"])::before,
.neta-selection-item:is(:hover, .is-hover, .is-selected, [aria-current="page"], [aria-selected="true"])::after { display: block; }
.neta-selection-item:is(.is-selected, [aria-current="page"], [aria-selected="true"]) { font-weight: var(--neta-font-weight-medium); }
.neta-selection-item:focus-visible { outline: none; }
.neta-selection-item.is-xl { height: var(--neta-control-h-44); }
.neta-selection-item.is-md { height: var(--neta-control-h-36); padding: 0 var(--neta-selection-padding-x-compact); font-size: var(--neta-selection-font-size-compact); }
.neta-selection-item.is-sm { height: var(--neta-control-h-32); padding: 0 var(--neta-selection-padding-x-compact); font-size: var(--neta-selection-font-size-compact); }
.neta-selection-item.is-square { width: var(--neta-control-h-32); padding: 0; justify-content: center; }
.neta-selection-item.is-danger { color: var(--neta-danger-text); }

/* ── 筛选标签 ── */
.neta-chip-row { display: flex; flex-wrap: wrap; gap: var(--neta-space-6); }
.neta-chip {
  --c-frame: var(--neta-border-frame); --c-fill: var(--neta-bg); --c-content: var(--neta-text-strong);
  position: relative; isolation: isolate; display: inline-flex; align-items: center; gap: var(--neta-space-6);
  height: var(--neta-control-h-32); margin: 0; padding: 0 var(--neta-space-12); border: 0;
  background: var(--c-frame); clip-path: var(--neta-pixel-shape-outer); color: var(--c-content);
  font-family: var(--neta-font-family); font-size: var(--neta-font-size-caption); font-weight: var(--neta-font-weight-regular);
  line-height: var(--neta-line-height-single); cursor: pointer;
}
.neta-chip::before { content: ""; position: absolute; z-index: -1; inset: var(--neta-border-width); background: var(--c-fill); clip-path: var(--neta-pixel-shape-inner); }
.neta-chip:hover { --c-frame: var(--neta-border-strong); --c-fill: var(--neta-bg-subtle); }
.neta-chip.is-selected, .neta-chip[aria-pressed="true"] { --c-frame: var(--neta-bg-inverse); --c-fill: var(--neta-bg-inverse); --c-content: var(--neta-text-inverse); font-weight: var(--neta-font-weight-medium); }
.neta-chip:focus-visible { outline: none; }
.neta-chip.is-selected[data-type="all"] { --c-fill: var(--neta-bg-selected); --c-frame: var(--neta-text-secondary); --c-content: var(--neta-text-strong); }
.neta-chip.is-selected[data-type="video"] { --c-fill: var(--neta-type-blue-tint); --c-frame: var(--neta-type-blue); --c-content: var(--neta-type-blue-text); }
.neta-chip.is-selected[data-type="game"] { --c-fill: var(--neta-type-red-tint); --c-frame: var(--neta-type-red); --c-content: var(--neta-type-red-text); }
.neta-chip.is-selected[data-type="character"] { --c-fill: var(--neta-type-violet-tint); --c-frame: var(--neta-type-violet); --c-content: var(--neta-type-violet-text); }
.neta-chip.is-selected[data-type="story"] { --c-fill: var(--neta-type-amber-tint); --c-frame: var(--neta-type-amber); --c-content: var(--neta-type-amber-text); }
.neta-chip.is-selected[data-type="web"] { --c-fill: var(--neta-type-green-tint); --c-frame: var(--neta-type-green); --c-content: var(--neta-type-green-text); }

/* ── 切换组件 ── 轨道高 = 选项高 + 2 × 4px */
.neta-segmented {
  --seg-item: var(--neta-control-h-32); position: relative; isolation: isolate; display: inline-flex; align-items: center;
  padding: var(--neta-segmented-track-padding); background: var(--neta-bg-selected); clip-path: var(--neta-pixel-shape-outer);
}
.neta-segmented.is-large { --seg-item: var(--neta-control-h-36); }
.neta-segmented.is-compact { --seg-item: calc(var(--neta-control-h-36) - 2 * var(--neta-segmented-track-padding)); }
.neta-segmented-thumb {
  position: absolute; z-index: 0; left: 0; top: var(--neta-segmented-track-padding); height: var(--seg-item); pointer-events: none;
  background: var(--neta-border-frame); clip-path: var(--neta-pixel-shape-outer); transition: transform var(--neta-segmented-motion), width var(--neta-segmented-motion);
}
.neta-segmented-thumb::after {
  content: ""; position: absolute; inset: var(--neta-border-width) var(--neta-border-width) calc(var(--neta-border-width) + var(--neta-segmented-thumb-body));
  background: var(--neta-bg); clip-path: var(--neta-pixel-shape-inner);
}
.neta-segmented-item {
  position: relative; z-index: 1; display: inline-flex; align-items: center; gap: var(--neta-space-8); height: var(--seg-item);
  margin: 0; padding: 0 var(--neta-segmented-item-padding-x); border: 0; background: none; color: var(--neta-text-secondary);
  font-family: var(--neta-font-family); font-size: var(--neta-font-size-body); line-height: var(--neta-line-height-single); cursor: pointer;
  transition: color .22s cubic-bezier(.4, 0, .2, 1);
}
.neta-segmented.is-compact .neta-segmented-item { font-size: var(--neta-font-size-caption); }
.neta-segmented-item:hover { color: var(--neta-text-strong); }
.neta-segmented-item[aria-selected="true"], .neta-segmented-item.is-selected { color: var(--neta-text-strong); font-weight: var(--neta-font-weight-medium); }
.neta-segmented-item:focus-visible { outline: none; }
@media (prefers-reduced-motion: reduce) { .neta-segmented-thumb, .neta-segmented-item { transition: none; } }

/* ── 菜单 ── */
.neta-menu {
  position: relative; isolation: isolate; display: flex; flex-direction: column; gap: var(--neta-menu-gap);
  min-width: 160px; padding: var(--neta-menu-padding); border: var(--neta-border-width) solid var(--neta-border-frame);
  border-radius: var(--neta-radius-12); background: var(--neta-bg); box-shadow: var(--neta-shadow-2);
}
/* 面板式浮层：头像菜单、分享面板 */
.neta-menu.is-panel { padding: var(--neta-space-16); border-radius: var(--neta-radius-16); }
.neta-menu > .neta-selection-item { width: 100%; height: var(--neta-control-h-32); font-size: var(--neta-font-size-body); }
.neta-menu > .neta-selection-item.is-md { height: var(--neta-control-h-36); }

/* ── 下拉菜单 ── */
.neta-dropdown { position: relative; display: inline-block; }
.neta-dropdown-trigger {
  display: inline-flex; align-items: center; justify-content: space-between; gap: var(--neta-space-8); min-width: var(--neta-dropdown-min-width);
  height: var(--neta-control-h-36); padding: 0 var(--neta-input-padding-x);
  font-family: var(--neta-font-family); font-size: var(--neta-font-size-body);
  line-height: var(--neta-line-height-single); cursor: pointer;
}
.neta-dropdown-trigger .neta-line-icon { color: var(--neta-text-secondary); transition: transform var(--neta-dropdown-motion-open); }
.neta-dropdown.is-open .neta-dropdown-trigger .neta-line-icon { transform: rotate(180deg); }
.neta-dropdown.is-compact .neta-dropdown-trigger { height: var(--neta-control-h-32); font-size: var(--neta-font-size-caption); }
.neta-dropdown-trigger:focus-visible { outline: none; }
.neta-dropdown .neta-menu { position: absolute; z-index: 10; left: 0; top: calc(100% + var(--neta-menu-offset)); }
.neta-dropdown .neta-menu[hidden] { display: none; }
.neta-dropdown-check { margin-left: auto; visibility: hidden; }
.neta-selection-item.is-selected .neta-dropdown-check { visibility: visible; }
.neta-menu .neta-selection-item.is-selected { font-weight: var(--neta-font-weight-medium); }

select.neta-dropdown-native { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.neta-menu.is-float { position: fixed; z-index: 1000; animation: neta-dd-in var(--neta-dropdown-motion-open) cubic-bezier(.22, 1, .36, 1) both; }
.neta-menu.is-float.is-up { animation-name: neta-dd-in-up; }
.neta-menu.is-float.is-closing { animation: neta-dd-out var(--neta-dropdown-motion-close) ease-in both; }
@keyframes neta-dd-in { from { opacity: 0; transform: translateY(-4px); } }
@keyframes neta-dd-in-up { from { opacity: 0; transform: translateY(4px); } }
@keyframes neta-dd-out { to { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .neta-menu.is-float, .neta-menu.is-float.is-closing { animation: none; } }

/* ── 勾选 / 单选 ── */
.neta-check {
  position: relative; display: inline-block; flex: none; width: var(--neta-icon-slot-sm); height: var(--neta-icon-slot-sm);
  border-radius: var(--neta-radius-4); background: var(--neta-text-strong);
}
.neta-check::before { content: ""; position: absolute; inset: var(--neta-border-width); border-radius: calc(var(--neta-radius-4) - var(--neta-border-width)); background: var(--neta-bg); }
.neta-check.is-checked::before { background: var(--neta-accent); }
.neta-check.is-checked::after {
  content: ""; position: absolute; left: 4px; top: 4px; width: 8px; height: 6px; background: var(--neta-text-strong);
  clip-path: polygon(0 2px, 2px 2px, 2px 4px, 4px 4px, 4px 2px, 6px 2px, 6px 0, 8px 0, 8px 2px, 6px 2px, 6px 4px, 4px 4px, 4px 6px, 2px 6px, 2px 4px, 0 4px);
}

/* ── 可选卡片 ── */
.neta-option-card {
  position: relative; display: block; padding: var(--neta-space-16); border: var(--neta-border-width) solid var(--neta-option-card-border);
  border-radius: var(--neta-radius-16); background: var(--neta-bg); color: var(--neta-text); text-align: left; font: inherit; cursor: pointer;
}
.neta-option-card:hover { background: var(--neta-option-card-bg-hover); }
.neta-option-card[aria-checked="true"], .neta-option-card.is-selected { border-color: var(--neta-option-card-selected-border); background: var(--neta-option-card-selected-bg); color: var(--neta-text-strong); }
.neta-option-card-mark { display: none; position: absolute; right: var(--neta-space-12); bottom: var(--neta-space-12); width: var(--neta-icon-slot-sm); height: var(--neta-icon-slot-sm); background: var(--neta-option-card-mark); clip-path: var(--neta-pixel-shape-inner); }
.neta-option-card-mark::after { content: ""; position: absolute; left: 4px; top: 5px; width: 8px; height: 6px; background: var(--neta-text-strong);
  clip-path: polygon(0 2px, 2px 2px, 2px 4px, 4px 4px, 4px 2px, 6px 2px, 6px 0, 8px 0, 8px 2px, 6px 2px, 6px 4px, 4px 4px, 4px 6px, 2px 6px, 2px 4px, 0 4px); }
.neta-option-card:is([aria-checked="true"], .is-selected) .neta-option-card-mark { display: block; }
.neta-option-card:focus-visible { outline: none; }
/* 中性选中：问卷选项 */
.neta-option-card.is-neutral:hover { border-color: var(--neta-border-strong); background: var(--neta-bg); }
.neta-option-card.is-neutral:is([aria-checked="true"], .is-selected) { border-color: var(--neta-text-secondary); background: var(--neta-bg-selected); font-weight: var(--neta-font-weight-medium); }
.neta-option-card.is-neutral .neta-option-card-mark { display: none; }

/* ── 平面像素标识：角标 · 世界头像 · 重点标题 ── */
.neta-badge {
  display: inline-flex; align-items: center; gap: var(--neta-space-4); height: var(--neta-control-h-20); padding: 0 var(--neta-space-8);
  background: var(--neta-bg-inverse); color: var(--neta-text-inverse); clip-path: var(--neta-pixel-shape-inner);
  font-size: var(--neta-font-size-caption); font-weight: var(--neta-font-weight-bold); line-height: var(--neta-line-height-single); white-space: nowrap;
}
.neta-badge.is-sm { height: var(--neta-flat-pixel-badge-sm); padding: 0 var(--neta-space-6); }
.neta-badge.is-lg { height: var(--neta-control-h-24); padding: 0 var(--neta-space-10); }
.neta-badge.is-promo { background: var(--neta-warning); color: var(--neta-text-strong); }
.neta-badge.is-caps { text-transform: uppercase; letter-spacing: var(--neta-letter-spacing-caps); }
.neta-world-avatar {
  display: inline-grid; place-items: center; flex: none; width: var(--neta-control-h-32); height: var(--neta-control-h-32); overflow: hidden;
  background: var(--neta-bg-inverse); color: var(--neta-text-inverse); clip-path: var(--neta-pixel-shape-inner);
  font-size: var(--neta-world-avatar-font-size); font-weight: var(--neta-world-avatar-font-weight); line-height: var(--neta-line-height-single);
}
.neta-world-avatar.is-image { background: var(--neta-bg-selected); }
.neta-world-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.neta-world-avatar.is-md { width: var(--neta-control-h-36); height: var(--neta-control-h-36); }
.neta-world-avatar.is-lg { width: var(--neta-control-h-40); height: var(--neta-control-h-40); }
.neta-pixel-title {
  display: inline-flex; align-items: center; max-width: 100%; margin: 0; padding: var(--neta-space-8) var(--neta-space-12); background: var(--neta-bg-inverse); color: var(--neta-text-inverse);
  clip-path: var(--neta-pixel-shape-inner); font-size: var(--neta-pixel-title-font-size); font-weight: var(--neta-pixel-title-font-weight);
  line-height: var(--neta-line-height-single); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* ── 输入框 · 下拉触发器：现代圆角（默认）──
   2px border gray-8 → 悬停 border-strong → 聚焦 border-focus；12px 圆角；错误红框；只读 / 禁用 bg-subtle。 */
:is(.neta-input, .neta-dropdown-trigger) {
  border: var(--neta-border-width) solid var(--neta-border); border-radius: var(--neta-radius-12); outline: 0; box-shadow: none;
  background: var(--neta-bg); color: var(--neta-text-strong);
}
:is(.neta-input, .neta-dropdown-trigger):hover { border-color: var(--neta-border-strong); }
.neta-input:focus, .neta-dropdown.is-open .neta-dropdown-trigger, .neta-dropdown-trigger:focus-visible { border-color: var(--neta-border-focus); }
.neta-input:is(.is-error, [aria-invalid="true"]), .neta-input:is(.is-error, [aria-invalid="true"]):is(:hover, :focus) { border-color: var(--neta-danger); }
.neta-input:is([readonly], :disabled) { background: var(--neta-bg-subtle); }
.neta-input:disabled { color: var(--neta-text-disabled); }

/* ── 像素输入框 .neta-input.is-pixel：目前只用在 Explore 工具条的搜索框（颜色 input-*）──
   原生 input 不能用伪元素：border 画 2px 框 + 背景层 4 个 2×2 角块 + pixel-shape-outer 裁切 = 外 2 级、内 1 级台阶。
   其他地方要用，先确认再加进「用在哪」。 */
.neta-input.is-pixel {
  --in-f: var(--neta-input-border); --in-bg: var(--neta-input-bg);
  border-color: var(--in-f); border-radius: 0;
  background:
    linear-gradient(var(--in-f), var(--in-f)) left top / var(--neta-pixel-cell) var(--neta-pixel-cell) no-repeat padding-box,
    linear-gradient(var(--in-f), var(--in-f)) right top / var(--neta-pixel-cell) var(--neta-pixel-cell) no-repeat padding-box,
    linear-gradient(var(--in-f), var(--in-f)) left bottom / var(--neta-pixel-cell) var(--neta-pixel-cell) no-repeat padding-box,
    linear-gradient(var(--in-f), var(--in-f)) right bottom / var(--neta-pixel-cell) var(--neta-pixel-cell) no-repeat padding-box,
    var(--in-bg);
  clip-path: var(--neta-pixel-shape-outer); color: var(--neta-input-content);
}
.neta-input.is-pixel:hover { --in-f: var(--neta-input-border-hover); border-color: var(--in-f); }
.neta-input.is-pixel:focus { --in-f: var(--neta-input-border-focus); border-color: var(--in-f); }
.neta-input.is-pixel::placeholder { color: var(--neta-input-placeholder); }
.neta-input {
  box-sizing: border-box; height: var(--neta-control-h-40); padding: 0 var(--neta-input-padding-x);
  font-family: var(--neta-font-family); font-size: var(--neta-font-size-body); line-height: var(--neta-line-height-single);
}
.neta-input::placeholder, .neta-composer textarea::placeholder { color: var(--neta-text-disabled); }
textarea.neta-input { height: auto; padding: var(--neta-space-12) var(--neta-input-padding-x) var(--neta-space-16); line-height: var(--neta-line-height-multiline); resize: vertical; }
.neta-input.is-md { height: var(--neta-control-h-36); font-size: var(--neta-font-size-caption); }
.neta-input.is-xl { height: var(--neta-control-h-44); }
.neta-field { display: flex; flex-direction: column; gap: var(--neta-space-8); }
.neta-field-label { color: var(--neta-text-secondary); font-size: var(--neta-font-size-caption); }
.neta-field-error { color: var(--neta-danger-text); font-size: var(--neta-font-size-caption); }
/* Composer：圆角容器，不用像素外框 */
.neta-composer { padding: var(--neta-space-16); border: var(--neta-border-width) solid var(--neta-border); border-radius: var(--neta-radius-20); background: var(--neta-bg); }
.neta-composer textarea { width: 100%; border: 0; outline: 0; background: none; resize: none; font: inherit; color: var(--neta-input-content); }

/* ── 弹窗 · 卡片 · 信息表 ── */
.neta-scrim { position: fixed; inset: 0; background: var(--neta-scrim); backdrop-filter: blur(var(--neta-scrim-blur)); }
.neta-dialog { position: relative; border-radius: var(--neta-radius-24); background: var(--neta-bg); box-shadow: var(--neta-shadow-3); overflow: hidden; }
.neta-dialog-close { position: absolute; top: 16px; right: 16px; }
.neta-card { border: var(--neta-border-width) solid var(--neta-border); border-radius: var(--neta-radius-20); background: var(--neta-bg); padding: var(--neta-card-padding); }
.neta-card.is-interactive:hover { border-color: var(--neta-border-frame); box-shadow: var(--neta-shadow-hover); }
.neta-card.is-group { border-radius: var(--neta-radius-16); }
.neta-card.is-content { border-color: var(--neta-card-border); border-radius: var(--neta-radius-16); background: var(--neta-card-bg); transition: border-color .2s, box-shadow .2s; }
.neta-card.is-content:hover { border-color: var(--neta-card-border-hover); box-shadow: var(--neta-shadow-hover); }
.neta-card.is-content.is-current { border-color: var(--neta-border-focus); }
.neta-card.is-emphasis { border-color: var(--neta-warning); background: var(--neta-warning-bg); }
.neta-card-cover { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--neta-radius-12); background: var(--neta-bg-selected); }
.neta-list { border: var(--neta-border-width) solid var(--neta-border); border-radius: var(--neta-radius-20); }
.neta-list-row { display: flex; align-items: center; justify-content: space-between; min-height: var(--neta-card-list-row-height); padding: 0 var(--neta-list-padding-x); }
.neta-list-row + .neta-list-row { border-top: var(--neta-border-width) solid var(--neta-border); }
.neta-list-row .k { color: var(--neta-text); font-weight: var(--neta-font-weight-medium); }
.neta-list-row .v { color: var(--neta-text-secondary); }

/* ── 标签 · 积分标签 · Toast · 聊天记录行 ── */
.neta-tag {
  display: inline-flex; align-items: center; gap: var(--neta-space-4); height: var(--neta-control-h-24); padding: 0 var(--neta-space-8); border-radius: var(--neta-radius-8);
  background: var(--neta-bg-selected); color: var(--neta-text); font-size: var(--neta-font-size-caption); font-weight: var(--neta-font-weight-medium);
  line-height: var(--neta-line-height-single); white-space: nowrap;
}
.neta-tag.is-sm { height: var(--neta-control-h-20); padding: 0 var(--neta-space-6); }
.neta-tag.is-on-cover { background: var(--neta-bg); color: var(--neta-text-strong); }
.neta-tag.is-info { background: var(--neta-accent-bg); color: var(--neta-text-accent); }
.neta-tag.is-success { background: var(--neta-success-bg); color: var(--neta-success-text); }
.neta-tag.is-warning { background: var(--neta-warning-bg); color: var(--neta-warning-text); }
.neta-tag.is-danger { background: var(--neta-danger-bg); color: var(--neta-danger-text); }
.neta-credit-pill {
  display: inline-flex; align-items: center; gap: var(--neta-space-4); height: var(--neta-control-h-32); padding: 0 var(--neta-space-8) 0 var(--neta-space-4); border-radius: var(--neta-radius-8);
  background: var(--neta-bg-subtle); color: var(--neta-credit-text); font-size: var(--neta-font-size-caption); font-weight: var(--neta-font-weight-bold);
  line-height: var(--neta-line-height-single); text-decoration: none;
}
.neta-credit-pill:hover { background: var(--neta-bg-selected); }
.neta-toast {
  display: inline-flex; align-items: center; gap: var(--neta-space-8); padding: var(--neta-space-12) var(--neta-space-16); border-radius: var(--neta-radius-8); background: var(--neta-bg-inverse);
  color: var(--neta-text-inverse); box-shadow: var(--neta-shadow-2); font-size: var(--neta-font-size-caption); line-height: var(--neta-line-height-single);
}
.neta-tooltip {
  position: relative; display: inline-flex; align-items: center; gap: var(--neta-space-8); height: var(--neta-control-h-28); max-width: var(--neta-tooltip-max-width);
  padding: 0 var(--neta-tooltip-padding-x); border: var(--neta-border-width) solid var(--neta-border); border-radius: var(--neta-radius-8);
  background: var(--neta-bg); color: var(--neta-text); box-shadow: var(--neta-shadow-1);
  font-family: var(--neta-font-family); font-size: var(--neta-tooltip-font-size); font-weight: var(--neta-tooltip-font-weight); line-height: var(--neta-line-height-single);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; pointer-events: none;
}
.neta-tooltip kbd {
  flex: none; padding: var(--neta-space-2) var(--neta-space-6); border-radius: var(--neta-radius-4); background: var(--neta-bg-subtle);
  color: var(--neta-text-secondary); font: inherit;
}
/* 参考实现：.neta-tooltip-anchor 包住触发器，.neta-tooltip 作为它的子元素；产品里用 Radix Tooltip 时只取上面的外观 + 下面的动效。 */
.neta-tooltip-anchor { position: relative; display: inline-flex; }
.neta-tooltip-anchor > .neta-tooltip {
  position: absolute; z-index: 10; bottom: calc(100% + var(--neta-tooltip-offset)); left: 50%;
  opacity: 0; translate: -50% var(--neta-tooltip-rise); transition: opacity var(--neta-tooltip-motion), translate var(--neta-tooltip-motion);
}
.neta-tooltip-anchor:is(:hover, :focus-within) > .neta-tooltip { opacity: 1; translate: -50% 0; transition-delay: var(--neta-tooltip-delay); }
.neta-tooltip-anchor > .neta-tooltip.is-bottom { bottom: auto; top: calc(100% + var(--neta-tooltip-offset)); translate: -50% calc(var(--neta-tooltip-rise) * -1); }
.neta-tooltip-anchor:is(:hover, :focus-within) > .neta-tooltip.is-bottom { translate: -50% 0; }
.neta-tooltip-anchor > .neta-tooltip.is-start { left: 0; translate: 0 var(--neta-tooltip-rise); }
.neta-tooltip-anchor:is(:hover, :focus-within) > .neta-tooltip.is-start { translate: 0 0; }
.neta-tooltip-anchor > .neta-tooltip.is-open { opacity: 1; translate: -50% 0; }
/* 一组按键（.neta-tooltip-group）同时只显示一个提示 */
.neta-tooltip-group:has(.neta-tooltip-anchor:hover) .neta-tooltip-anchor:not(:hover) > .neta-tooltip { opacity: 0; }
@media (hover: none) { .neta-tooltip-anchor > .neta-tooltip:not(.is-open) { display: none; } }
@media (prefers-reduced-motion: reduce) { .neta-tooltip-anchor > .neta-tooltip { translate: -50% 0; transition-property: opacity; } }
.neta-chat-row {
  display: flex; align-items: center; gap: var(--neta-space-8); width: 100%; min-height: var(--neta-control-h-32); padding: 0 var(--neta-space-12); border: 0; border-radius: var(--neta-radius-8);
  background: none; color: var(--neta-text-secondary); font-family: var(--neta-font-family); font-size: var(--neta-font-size-caption);
  line-height: var(--neta-line-height-heading); text-align: left; cursor: pointer;
}
.neta-chat-row > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.neta-chat-row:hover { background: var(--neta-bg-subtle); color: var(--neta-text-strong); }
.neta-chat-row.is-selected { background: var(--neta-bg-selected); color: var(--neta-text-strong); }

/* ── 对话气泡（你的消息）：灰底灰描边，靠右，最宽 80% ── */
.neta-bubble-row { display: flex; justify-content: flex-end; }
.neta-bubble {
  box-sizing: border-box; max-width: var(--neta-bubble-max-width); margin: 0; padding: var(--neta-space-10) var(--neta-space-16);
  border: var(--neta-border-width) solid var(--neta-border-frame); border-radius: var(--neta-radius-12); background: var(--neta-bg-subtle);
  color: var(--neta-text); font-size: var(--neta-font-size-body); line-height: var(--neta-line-height-multiline); white-space: pre-wrap; overflow-wrap: anywhere;
}

/* 像素资产保持硬边 */
.neta-pixel-asset { image-rendering: pixelated; }


/* ════════════════════════════════════════════════════════════
   03 图标与组件 · 图标
   ════════════════════════════════════════════════════════════ */
/* NETA Core Tokens · 03 图标与组件 · 图标样式（generated by build.py） */
.neta-icon{display:inline-grid;place-items:center;flex:none;width:var(--slot,var(--neta-icon-slot-md));height:var(--slot,var(--neta-icon-slot-md))}
.neta-icon img{display:block;width:var(--glyph,18px);height:var(--glyph,18px);image-rendering:pixelated}
.neta-line-icon{display:block;flex:none}
.neta-tree-arrow{display:inline-grid;place-items:center;width:var(--neta-icon-line-md);height:var(--neta-icon-line-md);color:var(--neta-text-secondary);transition:transform .16s}
details[open]>summary>.neta-tree-arrow,.neta-tree-arrow.is-expanded{transform:rotate(90deg)}
@media(prefers-reduced-motion:reduce){.neta-tree-arrow{transition:none}}


/* ════════════════════════════════════════════════════════════
   03 图标与组件 · 开关（团子）
   ════════════════════════════════════════════════════════════ */
/* NETA Core Tokens · 03 图标与组件 · 开关（团子）.px-switch.px-switch--dango
   48 × 28；关 = 闭眼，开 = 滑过去、睁眼、跳一下，每 4 秒眨一次；减少动态时不眨眼不跳。
   位移用 steps()：一步 = 2 个像素格，保持像素对齐。开启态的轨道沿用主按键颜色（primary-key-*）。 */
.px-switch {
  /* 轨道 · 关 */
  --sw-shell: var(--neta-selection-item-frame);
  --sw-face: var(--neta-gray-8);
  --sw-face-fx: inset 0 var(--neta-px-highlight) 0 var(--neta-selection-item-frame); /* 凹槽：顶部 2px 暗边 */
  /* 滑块 */
  --sw-knob-frame: var(--neta-gray-18);
  --sw-knob-face: var(--neta-white);
  --sw-knob-depth: var(--neta-selection-item-frame);
  --sw-w: 48px;
  --sw-h: 28px;
  --sw-knob: 20px;
  --sw-travel: 20px;
  --sw-steps: 5;

  position: relative;
  flex: none;
  width: var(--sw-w);
  height: var(--sw-h);
  margin: 0;
  padding: 0;
  border: 0;
  background: var(--sw-shell);
  clip-path: var(--neta-pixel-shape-outer);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.px-switch:focus-visible { outline: none; }

/* 轨道面 */
.px-switch::before {
  content: "";
  position: absolute;
  inset: 2px;
  background: var(--sw-face);
  box-shadow: var(--sw-face-fx);
  clip-path: var(--neta-pixel-shape-inner);
}

/* 轨道 · 开：沿用深色像素按键的层次 */
.px-switch[aria-checked="true"] {
  --sw-shell: var(--neta-primary-key-shell);
  --sw-face: var(--neta-primary-key-face);
  --sw-face-fx: inset 0 var(--neta-px-highlight) 0 var(--neta-primary-key-highlight), inset 0 calc(var(--neta-px-depth-pressed) * -1) 0 var(--neta-primary-key-depth);
  --sw-knob-frame: var(--neta-primary-key-shell);
}
.px-switch:hover, .px-switch.is-hover { --sw-face: var(--neta-gray-4); }
.px-switch[aria-checked="true"]:hover,
.px-switch[aria-checked="true"].is-hover { --sw-face: var(--neta-primary-key-face-hover); }

/* 滑块：2px 框 + 白色面 + 底部 2px 体积 */
.px-switch .knob {
  position: absolute;
  z-index: 1;
  left: 4px;
  top: 4px;
  width: var(--sw-knob);
  height: var(--sw-knob);
  background: var(--sw-knob-frame);
  clip-path: var(--neta-pixel-shape-outer);
  transform: translateX(0);
  transition: transform 120ms steps(var(--sw-steps)), width 80ms steps(1);
}
.px-switch .knob::before {
  content: "";
  position: absolute;
  inset: 2px;
  background: var(--sw-knob-face);
  box-shadow: inset 0 calc(var(--neta-px-depth-pressed) * -1) 0 var(--sw-knob-depth);
  clip-path: var(--neta-pixel-shape-inner);
}
.px-switch[aria-checked="true"] .knob { transform: translateX(var(--sw-travel)); }

/* 按下：滑块朝目标方向拉长 4px（不缩放） */
.px-switch:active .knob, .px-switch.is-pressed .knob { width: calc(var(--sw-knob) + 4px); }
.px-switch[aria-checked="true"]:active .knob,
.px-switch[aria-checked="true"].is-pressed .knob { transform: translateX(calc(var(--sw-travel) - 4px)); }

/* 禁用：保留轮廓和体积，整体浅灰 */
.px-switch:disabled { cursor: not-allowed; --sw-shell: var(--neta-gray-8); --sw-face: var(--neta-gray-4); --sw-face-fx: none; --sw-knob-frame: var(--neta-gray-8); --sw-knob-depth: var(--neta-gray-8); }
.px-switch:disabled .knob { width: var(--sw-knob); }
.px-switch[aria-checked="true"]:disabled { --sw-shell: var(--neta-gray-30); --sw-face: var(--neta-gray-30); --sw-knob-frame: var(--neta-gray-30); }

/* 团子：滑块是 NETA 标里那张白脸。关 = 闭眼（灰色横线），开 = 滑到位后睁眼（1 × 2 格），每 4 秒眨一次；悬停：关 → 偷偷睁一只眼，开 → 眼睛往右看。 */
.px-switch--dango .eye {
  position: absolute;
  z-index: 1;
  top: 10px;
  width: 4px;
  height: 2px;
  background: var(--neta-gray-30);
  transition: all 0s steps(1) 0s;
}
.px-switch--dango .eye-l { left: 4px; }
.px-switch--dango .eye-r { left: 12px; }

.px-switch--dango[aria-checked="true"] .eye {
  top: 8px;
  width: 2px;
  height: 4px;
  background: var(--neta-bg-inverse);
  transition-delay: 120ms;          /* 到位后再睁眼 */
  animation: px-dango-blink 4s steps(1) 600ms infinite;
}
.px-switch--dango[aria-checked="true"] .eye-l { left: 6px; }
.px-switch--dango[aria-checked="true"] .eye-r { left: 12px; }

.px-switch--dango:not([aria-checked="true"]):not(:disabled):hover .eye-r,
.px-switch--dango:not([aria-checked="true"]).is-hover .eye-r {
  top: 8px; left: 12px; width: 2px; height: 4px; background: var(--neta-bg-inverse);
}
.px-switch--dango[aria-checked="true"]:not(:disabled):hover .eye,
.px-switch--dango[aria-checked="true"].is-hover .eye { transform: translateX(2px); }

@keyframes px-dango-blink {
  0%, 94% { height: 4px; top: 8px; }
  95%, 98% { height: 2px; top: 10px; }
  99%, 100% { height: 4px; top: 8px; }
}

.px-switch--dango:disabled .eye { background: var(--neta-gray-30); animation: none; }

/* 团子：开 / 关动画
   开：滑到位 → 睁眼 → 原地跳一下（上 2px、落回，各 80ms）。
   关：立刻闭眼 → 滑回去。
   减少动态（系统设置或 .reduce-motion）：不眨眼、不跳，状态照常切换。 */
.px-switch--dango[aria-checked="true"] .knob {
  animation: px-dango-hop 160ms steps(1) 120ms;
}
@keyframes px-dango-hop {
  0%, 49%  { transform: translate(var(--sw-travel), -2px); }
  50%, 100% { transform: translate(var(--sw-travel), 0); }
}
.reduce-motion .px-switch--dango .knob,
.reduce-motion .px-switch--dango .eye { animation: none !important; }
@media (prefers-reduced-motion: reduce) {
  .px-switch--dango .knob, .px-switch--dango .eye { animation: none !important; }
}
