/* ============================================
   iOS 26 设置页 · 规范
   整体背景 #F2F2F7 · 分组卡片 #FFFFFF · 分割线 #C6C6C8
   标题 #000 · 副标题 #8E8E93 · 方形圆角图标（色底+白标）
   保留：毛玻璃、阴影、透明等特效
   ============================================ */

#page-settings,
#page-settings-api,
#page-settings-image-gen {
  background: #F2F2F7;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Helvetica Neue", sans-serif;
  accent-color: #007AFF;
}

/* ---------- 导航栏（与整体背景统一：同色底 + 毛玻璃） ---------- */
.yd-settings-nav {
  min-height: calc(56px + env(safe-area-inset-top));
  padding-left: 16px;
  padding-right: 16px;
  padding-top: env(safe-area-inset-top);
  /* padding-bottom: 10px; */
  position: relative;
  z-index: 1;
  background: rgba(242, 242, 247, 0.85);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: none;
}

.yd-settings-nav .yd-page-header__center,
.yd-settings-nav__title {
  font-size: 17px;
  font-weight: 600;
  color: #000000;
  letter-spacing: -0.41px;
}

.yd-header-btn--circle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgb(244 244 244 / 83%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid rgb(255 255 255 / 92%);
  box-shadow: 0 0 12px rgb(213 213 213 / 87%);
  color: #000;
}

.yd-header-btn--circle:active {
  background: rgb(230 230 230 / 85%);
}

/* 与 --circle 同材质（浅灰底 + 白描边 + 轻阴影），用于顶栏短文案，如「记录」 */
.yd-header-btn--circle.yd-header-btn--circle-pill {
  width: auto;
  min-width: 40px;
  height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.31px;
}

.yd-header-btn--text {
  width: auto;
  min-width: auto;
  background: transparent;
  border: none;
  padding: 8px 12px;
  font-size: 17px;
  font-weight: 400;
  color: #007AFF;
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
}

.yd-header-btn--text:active {
  opacity: 0.6;
}

.yd-settings-back-arrow {
  display: block;
  width: 28px;
  height: 28px;
  margin-left: -2px;
}

/* ---------- 内容区（与整体背景一致） ---------- */
.yd-settings-content,
.yd-settings-detail-content {
  padding: 16px 20px 34px;
  padding-bottom: 16px;
  background: #F2F2F7;
  -webkit-overflow-scrolling: touch;
}

.yd-settings-large-title {
  margin: 0 0 20px 0;
  font-size: 34px;
  font-weight: 700;
  color: #000000;
  letter-spacing: 0.4px;
  line-height: 1.15;
}

/* ---------- 分组卡片：纯白底 + 保留阴影/边框 ---------- */
.yd-settings-group {
  margin: 0 0 24px 0;
  background: #FFFFFF;
  backdrop-filter: saturate(180%) blur(24px);
  -webkit-backdrop-filter: saturate(180%) blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 32px;
  overflow: hidden;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.yd-settings-content > .yd-settings-group:first-of-type {
  margin-top: 0;
}

/* API / 生图设置：独立卡片行（左侧图标 + 标签，右侧开关右对齐） */
#page-settings-api .yd-api-auto-vision-row,
#page-settings-image-gen .yd-api-auto-vision-row {
  justify-content: flex-start;
  cursor: default;
}
#page-settings-api .yd-api-auto-vision-row .yd-settings-row__label,
#page-settings-image-gen .yd-api-auto-vision-row .yd-settings-row__label {
  flex: 1;
  min-width: 0;
  margin-right: 0;
}
#page-settings-api .yd-api-auto-vision-row::before,
#page-settings-image-gen .yd-api-auto-vision-row::before {
  display: none;
}
#page-settings-api .yd-api-auto-vision-toggle,
#page-settings-image-gen .yd-api-auto-vision-toggle {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  margin-left: auto;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

/* ---------- 列表行 ---------- */
.yd-settings-row {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 11px 16px;
  background: transparent;
  border: none;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  font-family: inherit;
  font-size: 17px;
  font-weight: 400;
  letter-spacing: -0.41px;
  box-sizing: border-box;
  position: relative;
}

/* 分割线：#C6C6C8，右侧延伸到箭头终止位置（箭头尖处结束） */
.yd-settings-row::before {
  content: "";
  position: absolute;
  left: 52px;
  right: 16px;
  bottom: 0;
  height: 0.5px;
  background: #C6C6C8;
}

.yd-settings-row:last-child::before {
  display: none;
}

.yd-settings-row:active {
  background: rgba(0, 0, 0, 0.04);
}

/* 方形圆角图标：背景为系统色，图标为白色 */
.yd-settings-row__icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  flex-shrink: 0;
  margin-right: 12px;
  background-size: 18px 18px;
  background-position: center;
  background-repeat: no-repeat;
}

/* 图标：渐变底 + 白标（多重 background） */
.yd-settings-row__icon--api {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23FFFFFF' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.55a11 11 0 0 1 14.08 0M1.42 9a16 16 0 0 1 21.16 0M8.53 16.11a6 6 0 0 1 6.95 0M12 20h.01'/%3E%3C/svg%3E"), linear-gradient(135deg, #7eb8ff 0%, #007AFF 100%);
  background-size: 18px 18px, 100% 100%;
  background-position: center, 0 0;
  background-repeat: no-repeat, repeat;
}

/* 生图设置：画框图 + 三段渐变（与下方四个「美化」入口同款 135deg / 0%·55%·100% 结构） */
.yd-settings-row__icon--image-gen {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23FFFFFF' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='3' width='18' height='18' rx='2' ry='2'/%3E%3Ccircle cx='8.5' cy='8.5' r='1.5' fill='%23FFFFFF' stroke='none'/%3E%3Cpath d='M21 15l-5-5L5 21'/%3E%3C/svg%3E"), linear-gradient(135deg, #c084fc 0%, #60a5fa 40%, #f9a8d4 100%);
  background-size: 18px 18px, 100% 100%;
  background-position: center, 0 0;
  background-repeat: no-repeat, repeat;
}

/* 流式请求：波形条 */
.yd-settings-row__icon--stream {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23FFFFFF' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 6v12'/%3E%3Cpath d='M8 9v9'/%3E%3Cpath d='M12 7v10'/%3E%3Cpath d='M16 10v7'/%3E%3Cpath d='M20 5v14'/%3E%3C/svg%3E"), linear-gradient(135deg, #2dd4bf 0%, #0ea5e9 55%, #38bdf8 100%);
  background-size: 18px 18px, 100% 100%;
  background-position: center, 0 0;
  background-repeat: no-repeat, repeat;
}

.yd-settings-row__icon--trash {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23FFFFFF' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 6h18M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2M10 11v6M14 11v6'/%3E%3C/svg%3E"), linear-gradient(135deg, #ff8a80 0%, #FF3B30 100%);
  background-size: 18px 18px, 100% 100%;
  background-position: center, 0 0;
  background-repeat: no-repeat, repeat;
}

.yd-settings-row__icon--export {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23FFFFFF' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4M7 10l5 5 5-5M12 15V3'/%3E%3C/svg%3E"), linear-gradient(135deg, #8ee08e 0%, #4CD964 100%);
  background-size: 18px 18px, 100% 100%;
  background-position: center, 0 0;
  background-repeat: no-repeat, repeat;
}

.yd-settings-row__icon--import {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23FFFFFF' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4M17 8l-5-5-5 5M12 3v12'/%3E%3C/svg%3E"), linear-gradient(135deg, #7eb8ff 0%, #007AFF 100%);
  background-size: 18px 18px, 100% 100%;
  background-position: center, 0 0;
  background-repeat: no-repeat, repeat;
}

/* 壁纸图标 */
.yd-settings-row__icon--wallpaper {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23FFFFFF' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='16' rx='3' ry='3'/%3E%3Ccircle cx='9' cy='9' r='2'/%3E%3Cpath d='M21 15l-4.5-4.5L9 18'/%3E%3C/svg%3E"), linear-gradient(135deg, #a5b4fc 0%, #5856D6 100%);
  background-size: 18px 18px, 100% 100%;
  background-position: center, 0 0;
  background-repeat: no-repeat, repeat;
}

/* 美化设置图标 */
.yd-settings-row__icon--beautify {
  /* 图标美化：偏紫蓝 */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23FFFFFF' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 2l3 7 7 3-7 3-3 7-3-7-7-3 7-3z'/%3E%3C/svg%3E"), linear-gradient(135deg, #8b7cff 0%, #4f8cff 55%, #b9b2ff 100%);
  background-size: 18px 18px, 100% 100%;
  background-position: center, 0 0;
  background-repeat: no-repeat, repeat;
}

/* 美化图标配色方案（形状不变，仅渐变配色微调） */
.yd-settings-row__icon--beautify-bubble {
  /* 气泡美化：偏青蓝 */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23FFFFFF' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 2l3 7 7 3-7 3-3 7-3-7-7-3 7-3z'/%3E%3C/svg%3E"), linear-gradient(135deg, #5ac8fa 0%, #2dd4bf 55%, #a7f3d0 100%);
  background-size: 18px 18px, 100% 100%;
  background-position: center, 0 0;
  background-repeat: no-repeat, repeat;
}

.yd-settings-row__icon--beautify-session {
  /* 会话美化：偏绿 */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23FFFFFF' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 2l3 7 7 3-7 3-3 7-3-7-7-3 7-3z'/%3E%3C/svg%3E"), linear-gradient(135deg, #34C759 0%, #7dd3fc 55%, #bbf7d0 100%);
  background-size: 18px 18px, 100% 100%;
  background-position: center, 0 0;
  background-repeat: no-repeat, repeat;
}

.yd-settings-row__icon--beautify-widgets {
  /* 小组件美化：偏橙粉 */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23FFFFFF' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 2l3 7 7 3-7 3-3 7-3-7-7-3 7-3z'/%3E%3C/svg%3E"), linear-gradient(135deg, #ff8a80 0%, #ffb86b 55%, #ffd1dc 100%);
  background-size: 18px 18px, 100% 100%;
  background-position: center, 0 0;
  background-repeat: no-repeat, repeat;
}

/* 语音设置图标 */
.yd-settings-row__icon--voice {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23FFFFFF' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 14a3 3 0 0 0 3-3V5a3 3 0 0 0-6 0v6a3 3 0 0 0 3 3z'/%3E%3Cpath d='M19 11a7 7 0 0 1-14 0'/%3E%3Cpath d='M12 19v3'/%3E%3Cpath d='M8 22h8'/%3E%3C/svg%3E"), linear-gradient(135deg, #ff9a9e 0%, #f56c6c 100%);
  background-size: 18px 18px, 100% 100%;
  background-position: center, 0 0;
  background-repeat: no-repeat, repeat;
}

.yd-settings-row__icon--bell {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23FFFFFF' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18 8a6 6 0 1 0-12 0c0 7-3 7-3 9h18c0-2-3-2-3-9'/%3E%3Cpath d='M13.73 21a2 2 0 0 1-3.46 0'/%3E%3C/svg%3E"), linear-gradient(135deg, #ffd76a 0%, #f4b400 100%);
  background-size: 18px 18px, 100% 100%;
  background-position: center center, 0 0;
  background-repeat: no-repeat, repeat;
}

.yd-settings-row__icon--time {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23FFFFFF' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='8'/%3E%3Cpath d='M12 8v4l2.5 1.5'/%3E%3C/svg%3E"), linear-gradient(135deg, #94d2b7 0%, #34C759 100%);
  background-size: 18px 18px, 100% 100%;
  background-position: center, 0 0;
  background-repeat: no-repeat, repeat;
}

.yd-settings-row__icon--dock {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23FFFFFF' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='14' rx='4'/%3E%3Cpath d='M3 15h18'/%3E%3C/svg%3E"), linear-gradient(135deg, #7eb8ff 0%, #5a7bff 100%);
  background-size: 18px 18px, 100% 100%;
  background-position: center, 0 0;
  background-repeat: no-repeat, repeat;
}

.yd-settings-row__icon--key {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23FFFFFF' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 2l-2 2m-7.61 7.61a5.5 5.5 0 1 1-7.778 7.778 5.5 5.5 0 0 1 7.777-7.777zm0 0L15.5 7.5'/%3E%3C/svg%3E"), linear-gradient(135deg, #a8a4f0 0%, #5856D6 100%);
  background-size: 18px 18px, 100% 100%;
  background-position: center, 0 0;
  background-repeat: no-repeat, repeat;
}

.yd-settings-row__icon--link {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23FFFFFF' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71'/%3E%3C/svg%3E"), linear-gradient(135deg, #7eb8ff 0%, #007AFF 100%);
  background-size: 18px 18px, 100% 100%;
  background-position: center, 0 0;
  background-repeat: no-repeat, repeat;
}

.yd-settings-row__icon--refresh {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23FFFFFF' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 12a9 9 0 1 1-2.64-6.36'/%3E%3Cpath d='M21 3v7h-7'/%3E%3C/svg%3E"), linear-gradient(135deg, #7eb8ff 0%, #5ac8fa 100%);
  background-size: 18px 18px, 100% 100%;
  background-position: center, 0 0;
  background-repeat: no-repeat, repeat;
}

.yd-settings-row__icon--wrench {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23FFFFFF' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 7.5a5.5 5.5 0 0 1-7.47 5.16L7.2 19 4 20l1-3.2 6.34-6.33A5.5 5.5 0 0 1 16.5 3l-2.2 2.2.5 2.1 2.1.5L19 5.5A5.48 5.48 0 0 1 21 7.5z'/%3E%3C/svg%3E"), linear-gradient(135deg, #9b8cff 0%, #5856D6 100%);
  background-size: 18px 18px, 100% 100%;
  background-position: center, 0 0;
  background-repeat: no-repeat, repeat;
}

.yd-settings-row__icon--manual {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23FFFFFF' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 19.5A2.5 2.5 0 0 1 6.5 17H20'/%3E%3Cpath d='M6.5 2H20v20H6.5A2.5 2.5 0 0 1 4 19.5V4.5A2.5 2.5 0 0 1 6.5 2z'/%3E%3Cpath d='M8 6h8M8 10h8'/%3E%3C/svg%3E"), linear-gradient(135deg, #a8a4f0 0%, #007AFF 100%);
  background-size: 18px 18px, 100% 100%;
  background-position: center, 0 0;
  background-repeat: no-repeat, repeat;
}

.yd-settings-row__label {
  flex: 1;
  text-align: left;
  color: #000000;
  font-size: 17px;
  font-weight: 400;
}

.yd-settings-row__main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 2px;
}

.yd-settings-row__title {
  text-align: left;
  color: #000000;
  font-size: 17px;
  font-weight: 400;
  line-height: 1.2;
}

.yd-settings-row__subtitle {
  text-align: left;
  color: #8E8E93;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.25;
}

.yd-settings-row__chevron {
  width: 8px;
  height: 13px;
  margin-left: 6px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 13' fill='none'%3E%3Cpath d='M1.5 1.5l5 5-5 5' stroke='%23C7C7CC' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/contain no-repeat;
  flex-shrink: 0;
}

/* ---------- 个人信息行 ---------- */
.yd-settings-row--profile {
  min-height: 76px;
  padding: 14px 16px;
}

.yd-settings-row--profile::before {
  left: 90px;
}

.yd-settings-row__avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  overflow: hidden;
  background: linear-gradient(135deg, #a8c5e6 0%, #b8d4f1 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 600;
  color: #fff;
  letter-spacing: -0.5px;
  flex-shrink: 0;
  margin-right: 14px;
}

.yd-settings-row__avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

.yd-settings-row--profile .yd-settings-row__main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 2px;
}

.yd-settings-row--profile .yd-settings-row__title {
  font-size: 20px;
  font-weight: 600;
  color: #000000;
  letter-spacing: -0.5px;
  line-height: 1.2;
}

.yd-settings-row--profile .yd-settings-row__subtitle {
  font-size: 14px;
  font-weight: 400;
  color: #8E8E93;
  letter-spacing: -0.15px;
  line-height: 1.25;
}

/* ---------- API 子页：左图标+标签，右灰色回显+> ---------- */
.yd-settings-row--api-detail {
  cursor: default;
  padding: 10px 16px 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  text-align: left;
  border: none;
  font: inherit;
  color: inherit;
  background: transparent;
}

/* 分割线：与主设置列表一致，左侧从 52px 起，最后一行不显示 */
.yd-settings-row--api-detail:not(:last-child)::before {
  content: "";
  position: absolute;
  left: 52px;
  right: 16px;
  bottom: 0;
  height: 0.5px;
  background: #C6C6C8;
}

.yd-settings-row--api-detail:active {
  background: rgba(0, 0, 0, 0.04);
}


.yd-settings-row--api-detail .yd-settings-row__icon {
  margin-right: 0;
  flex-shrink: 0;
}

/* 标题与值之间留出间距 */
.yd-settings-row--api-detail .yd-settings-row__label {
  flex: 0 0 auto;
  min-width: 0;
  margin-right: 16px;
}

/* 右侧灰色回显：小号灰色字 */
.yd-settings-row__value-wrap {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.yd-settings-row__value {
  font-size: 13px;
  font-weight: 400;
  color: #8E8E93;
  letter-spacing: -0.08px;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 4px 0;
}

.yd-settings-select {
  max-width: 100%;
  min-width: 0;
  padding: 6px 12px;
  border: none;
  border-radius: 8px;
  background: #E5E5EA;
  font-size: 13px;
  font-weight: 400;
  color: #8E8E93;
  letter-spacing: -0.08px;
  font-family: inherit;
  outline: none;
  text-align: right;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 13' fill='none'%3E%3Cpath d='M1.5 1.5l5 5-5 5' stroke='%238E8E93' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 8px 13px;
  padding-right: 26px;
  cursor: pointer;
}

.yd-settings-row--api-detail .yd-settings-row__chevron {
  margin-left: 0;
  flex-shrink: 0;
}

/* 弹窗编辑 */
.yd-api-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  box-sizing: border-box;
}

.yd-api-modal[hidden] {
  display: none;
}

.yd-api-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
}

.yd-api-modal__box {
  position: relative;
  width: 100%;
  max-width: 320px;
  background: #FFFFFF;
  border-radius: 20px;
  padding: 24px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

.yd-api-modal__title {
  margin: 0 0 16px 0;
  font-size: 17px;
  font-weight: 600;
  color: #000000;
  letter-spacing: -0.41px;
}

.yd-api-modal__input {
  width: 100%;
  box-sizing: border-box;
  padding: 12px 16px;
  margin-bottom: 20px;
  border: 1px solid #C6C6C8;
  border-radius: 12px;
  font-size: 16px;
  color: #000000;
  font-family: inherit;
  outline: none;
  background: #F2F2F7;
}

.yd-api-modal__input:focus {
  border-color: #007AFF;
  background: #FFFFFF;
}

.yd-api-modal__input::placeholder {
  color: #8E8E93;
}

.yd-api-modal__hint {
  margin: 6px 0 0 0;
  font-size: 12px;
  color: #8E8E93;
  line-height: 1.4;
}

#api-edit-single-wrap .yd-api-modal__input {
  margin-bottom: 20px;
}

.yd-api-modal__max-tokens-panel {
  margin-bottom: 4px;
}

.yd-api-modal__hint--max-tokens {
  margin: 0 0 14px 0;
}

.yd-api-modal__switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.yd-api-modal__switch-label {
  flex: 1;
  font-size: 15px;
  color: #000000;
  line-height: 1.25;
}

.yd-api-modal__toggle .yd-toggle__control {
  flex-shrink: 0;
}

.yd-api-modal__field-label {
  display: block;
  margin: 0 0 8px 0;
  font-size: 13px;
  font-weight: 500;
  color: #3a3a3c;
}

.yd-api-modal__max-tokens-number-row .yd-api-modal__input {
  margin-bottom: 16px;
}

.yd-api-modal__input--tight-margin {
  margin-bottom: 16px;
}

.yd-api-modal__actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}

.yd-api-modal__btn {
  padding: 10px 20px;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  border: none;
}

.yd-api-modal__btn--cancel {
  background: #E5E5EA;
  color: #000000;
}

.yd-api-modal__btn--confirm {
  background: #007AFF;
  color: #ffffff;
}

/* 模型图标 */
.yd-settings-row__icon--model {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23FFFFFF' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 2L2 7l10 5 10-5-10-5zM2 17l10 5 10-5M2 12l10 5 10-5'/%3E%3C/svg%3E"), linear-gradient(135deg, #7ed0a0 0%, #34C759 100%);
  background-size: 18px 18px, 100% 100%;
  background-position: center, 0 0;
  background-repeat: no-repeat, repeat;
}

/* 记忆轮数：气泡+点（偏蓝紫） */
.yd-settings-row__icon--rounds {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23FFFFFF' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 14a4 4 0 0 1-4 4H9l-4 3v-3H7a4 4 0 0 1-4-4V7a4 4 0 0 1 4-4h10a4 4 0 0 1 4 4v7z'/%3E%3Cpath d='M8 9h.01M12 9h.01M16 9h.01'/%3E%3C/svg%3E"), linear-gradient(135deg, #7c7cff 0%, #5ac8fa 100%);
  background-size: 18px 18px, 100% 100%;
  background-position: center, 0 0;
  background-repeat: no-repeat, repeat;
}

/* 最大 token：票据/标签（偏橙） */
.yd-settings-row__icon--tokens {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23FFFFFF' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 12v6a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2v-6'/%3E%3Cpath d='M4 8V6a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2v2'/%3E%3Cpath d='M8 12h8'/%3E%3Cpath d='M10 15h4'/%3E%3C/svg%3E"), linear-gradient(135deg, #ffb86b 0%, #ff6b6b 100%);
  background-size: 18px 18px, 100% 100%;
  background-position: center, 0 0;
  background-repeat: no-repeat, repeat;
}

/* ---------- 兼容旧类名（若有其他地方用到） ---------- */
.yd-settings-row--input {
  cursor: default;
  padding: 10px 16px 12px;
  display: flex;
  align-items: center;
}

.yd-settings-row--input::before {
  display: none;
}

.yd-settings-row--input .yd-settings-row__icon {
  margin-right: 12px;
}

.yd-settings-input {
  flex: 1;
  min-width: 0;
  min-height: 22px;
  padding: 0;
  border: none;
  background: transparent;
  font-size: 17px;
  font-weight: 400;
  color: #000000;
  letter-spacing: -0.41px;
  font-family: inherit;
  outline: none;
}

.yd-settings-input::placeholder {
  color: #c7c7cc;
}

/* ---------- 存储按钮 ---------- */
.yd-settings-detail-actions {
  margin-top: 32px;
}

/* ==============================
   气泡设置页：底部固定操作栏
   ============================== */
#page-bubble-settings .yd-settings-detail-content {
  /* 与会话美化页对齐：使用详情页标准左右安全边距 */
  padding: 16px 20px calc(120px + env(safe-area-inset-bottom));
}

#page-session-beautify .yd-settings-detail-content {
  padding-bottom: calc(120px + env(safe-area-inset-bottom));
}

#page-session-beautify .yd-session-beautify-bottom-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 50;
  display: flex;
  gap: 10px;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  border-radius: 0;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.10);
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}

#page-session-beautify .yd-session-beautify-bottom-bar .yd-btn {
  flex: 1;
  height: 44px;
  border-radius: 12px;
}

/* 聊天气泡页：统一分组左右边距与节奏 */
#page-bubble-settings .yd-settings-group {
  margin: 0 0 14px;
  background: transparent;
  border: none;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border-radius: 0;
  overflow: visible;
}

#page-bubble-settings .yd-bubble-layout-section {
  margin: 0 0 14px;
}

#page-bubble-settings .yd-bubble-layout-title {
  margin: 0 0 8px;
  font-weight: 900;
  font-size: 14px;
  color: #111;
}

#page-bubble-settings .yd-bubble-layout-card {
  background: #fff;
  border-radius: 16px;
  padding: 14px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.06);
}

#page-bubble-settings .yd-bubble-layout-subtitle {
  font-size: 13px;
  color: #8E8E93;
  margin-bottom: 10px;
}

#page-bubble-settings .yd-bubble-color-card {
  margin: 0;
}

#page-bubble-settings .yd-bubble-customcss-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

#page-bubble-settings .yd-bubble-customcss-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 10px;
}

/* 小按钮：用于“预览” */
#page-bubble-settings .yd-btn--mini {
  height: auto;
  padding: 0;
  font-size: 13px;
  line-height: 1;
  border-radius: 8px;
}

#bubble-custom-preview {
  border: none;
  background: transparent;
  color: #007AFF;
}

#bubble-custom-preview .yd-bubble-preview-pill {
  display: inline-block;
  padding: 5px 10px;
  border: 1px solid #D1D1D6;
  border-radius: 8px;
  background: #FFFFFF;
  line-height: 1.2;
}

#page-bubble-settings .yd-bubble-settings-bottom-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 50;
  display: flex;
  gap: 10px;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  border-radius: 0;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.10);
  border: 1px solid rgba(255, 255, 255, 0.65);
}

#page-bubble-settings .yd-bubble-settings-bottom-bar .yd-btn {
  flex: 1;
  height: 44px;
  border-radius: 12px;
}

/* 气泡设置页：开关样式（与背景色/字体色同行，使用绿色滑动开关） */
#page-bubble-settings .yd-global-regex-modal-toggle__switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  cursor: pointer;
}
#page-bubble-settings .yd-global-regex-modal-toggle__input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  margin: 0;
  pointer-events: none;
}
#page-bubble-settings .yd-global-regex-modal-toggle__slider {
  display: block;
  width: 44px;
  height: 26px;
  border-radius: 999px;
  background: #e5e5ea;
  transition: background 0.2s;
  position: relative;
}
#page-bubble-settings .yd-global-regex-modal-toggle__slider::before {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.22);
  transition: transform 0.2s;
}
#page-bubble-settings .yd-global-regex-modal-toggle__input:checked + .yd-global-regex-modal-toggle__slider {
  background: #34c759;
}
#page-bubble-settings .yd-global-regex-modal-toggle__input:checked + .yd-global-regex-modal-toggle__slider::before {
  transform: translateX(18px);
}
#page-bubble-settings .yd-global-regex-modal-toggle__input:focus-visible + .yd-global-regex-modal-toggle__slider {
  outline: 2px solid rgba(52, 199, 89, 0.45);
  outline-offset: 2px;
}

.yd-btn--secondary-full {
  width: 100%;
  background: #F5F5F7;
  color: #007AFF;
  border: 1px solid #E5E5EA;
  padding: 12px 16px;
  font-size: 15px;
  font-weight: 600;
  border-radius: 12px;
  cursor: pointer;
}

.yd-btn--secondary-full:active {
  background: #E5E5EA;
  opacity: 0.8;
}

.yd-btn--small-round {
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 500;
  background: #F5F5F7;
  color: #007AFF;
  border: 1px solid #E5E5EA;
  border-radius: 20px;
  cursor: pointer;
}

.yd-btn--small-round:active {
  background: #E5E5EA;
  opacity: 0.8;
}

.yd-btn--primary-full {
  width: 100%;
  height: 50px;
  border-radius: 20px;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.41px;
  background: #007AFF;
  color: #ffffff;
  border: none;
  cursor: pointer;
  font-family: inherit;
}

.yd-btn--primary-full:active {
  opacity: 0.8;
}

/* ---------- 美化设置预设主题 ---------- */
.yd-beautify-preset-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 32px;
  padding: 0;
}

/* 图标美化：预设行需要左侧留白 */
#page-settings-beautify .yd-beautify-preset-row {
  padding: 14px 16px;
}

/* API / 生图设置：当前配置行需要左侧留白 */
#page-settings-api .yd-beautify-preset-row,
#page-settings-image-gen .yd-beautify-preset-row {
  padding: 14px 16px;
}

/* 生图设置页内：测试生成区块 */
.yd-gen-test-section-head {
  padding: 14px 16px 6px;
  font-size: 15px;
  font-weight: 600;
  color: rgba(0, 0, 0, 0.88);
  letter-spacing: -0.24px;
}
.yd-gen-test-card {
  padding: 14px 16px 16px;
}
.yd-gen-test-card--preview {
  padding-top: 12px;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}
.yd-gen-test-result-block {
  padding: 0 0 4px;
}
.yd-gen-test-textarea.yd-settings-input {
  flex: none;
  display: block;
  width: 100%;
  box-sizing: border-box;
  margin-top: 0;
  min-height: 100px;
  resize: vertical;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 15px;
  line-height: 1.45;
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.35);
}
.yd-gen-test-card .yd-btn--primary-full {
  margin-top: 14px;
}
.yd-gen-test-card .yd-btn--primary-full:disabled {
  background: #c7c7cc;
  color: rgba(255, 255, 255, 0.92);
  cursor: not-allowed;
  opacity: 1;
}
.yd-gen-test-card .yd-btn--primary-full:disabled:active {
  opacity: 1;
}
.yd-gen-test-error {
  margin: 0 0 12px;
  padding: 0 20px;
  font-size: 14px;
  color: #ff3b30;
  line-height: 1.4;
}
.yd-gen-test-error--inset {
  padding-left: 16px;
  padding-right: 16px;
}
.yd-gen-test-preview {
  display: block;
  width: 100%;
  max-width: 100%;
  margin-top: 8px;
  border-radius: 12px;
  background: #f2f2f7;
}

#page-bubble-settings .yd-bubble-layout-card.yd-bubble-preset-card {
  position: relative;
  padding: 14px 12px;
  border-radius: 26px;
}

.yd-bubble-preset-row {
  position: relative;
}

.yd-bubble-preset-label {
  margin: 0;
  display: inline-flex;
  align-items: center;
  line-height: 1;
  white-space: nowrap;
  flex-shrink: 0;
}

.yd-bubble-preset-action-trigger {
  width: 30px;
  height: 30px;
  border: 1px solid #D1D1D6;
  background: #FFFFFF;
  color: #3A3A3C;
}

.yd-bubble-preset-add-actions {
  position: absolute;
  right: 0;
  top: 0;
  height: 0;
  width: 0;
  margin: 0;
  padding: 0 !important;
  overflow: visible;
  pointer-events: none;
}

.yd-bubble-preset-menu {
  position: fixed;
  right: auto;
  top: auto;
  width: max-content;
  min-width: 0;
  max-width: 72vw;
  border-radius: 12px;
  border: 1px solid #E5E5EA;
  background: #FFFFFF;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  overflow: hidden;
  z-index: 1200;
}

#bubble-preset-add-menu {
  max-width: 76vw;
  pointer-events: auto;
}

.yd-bubble-preset-menu__item {
  width: auto;
  min-width: 100%;
  border: none;
  border-bottom: 1px solid #F2F2F7;
  background: #FFFFFF;
  padding: 10px 14px;
  text-align: left;
  font-size: 14px;
  color: #1C1C1E;
  cursor: pointer;
  white-space: nowrap;
}

.yd-bubble-preset-menu__item:last-child {
  border-bottom: none;
}

.yd-bubble-preset-menu__item:active {
  background: #F2F2F7;
}

.yd-bubble-preset-menu__item--danger {
  color: #FF3B30;
}

.yd-beautify-preset-select {
  flex: 1;
  height: 32px;
  border-radius: 8px;
  border: 1px solid #C6C6C8;
  font-size: 15px;
  padding: 0 28px 0 10px;
  background: #FFFFFF;
  color: #000;
  font-family: inherit;
  min-width: 120px;
}

.yd-beautify-item-select {
  width: 100%;
  height: 40px;
  border-radius: 10px;
  border: 1px solid #C6C6C8;
  font-size: 15px;
  padding: 0 12px;
  background: #FFFFFF;
  color: #000;
  font-family: inherit;
  margin-top: 8px;
  margin-bottom: 8px;
}

.yd-beautify-item-select:focus {
  outline: none;
  border-color: #007AFF;
}

.yd-btn--small {
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 500;
  border-radius: 8px;
  border: 1px solid #C6C6C8;
  background: #FFFFFF;
  color: #007AFF;
  cursor: pointer;
  font-family: inherit;
}

.yd-btn--small:active {
  opacity: 0.7;
}

.yd-btn--danger {
  color: #FF3B30;
  border-color: #FF3B30;
}

.yd-btn--danger:active {
  background: rgba(255, 59, 48, 0.1);
}

#page-settings-api .yd-settings-nav,
#page-settings-image-gen .yd-settings-nav {
  background: rgba(242, 242, 247, 0.85);
  backdrop-filter: saturate(180%) blur(24px);
  -webkit-backdrop-filter: saturate(180%) blur(24px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
}

/* ---------- 美化设置子页 ---------- */
.yd-beautify-settings-group {
  margin-bottom: 24px;
}

.yd-beautify-settings-header {
  padding: 14px 16px 8px;
  position: relative;
}

.yd-beautify-settings-header::after {
  content: "";
  display: block;
  margin-top: 8px;
  margin-left: 12px;
  margin-right: 12px;
  background: rgba(198, 198, 200, 0.5);
}

.yd-beautify-settings-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.yd-beautify-settings-title {
  font-size: 17px;
  font-weight: 600;
  color: #000;
  margin-bottom: 4px;
}

.yd-beautify-settings-subtitle {
  font-size: 12px;
  color: #8E8E93;
}

.yd-beautify-page-tabs {
  display: inline-flex;
  margin: 10px 16px 8px;
  padding: 2px;
  border-radius: 999px;
  background: #E5E5EA;
}

.yd-beautify-tab {
  border: none;
  background: transparent;
  font-size: 12px;
  padding: 6px 12px;
  border-radius: 999px;
  cursor: pointer;
  color: #555;
}

.yd-beautify-tab--active {
  background: #FFFFFF;
  box-shadow: 0 1px 3px rgba(0,0,0,0.15);
  color: #000;
}

.yd-beautify-grid-wrap {
  padding: 12px 16px 16px;
}

.yd-beautify-grid {
  --cols: 4;
  --rows: 6;
  display: grid;
  grid-template-columns: repeat(var(--cols), 1fr);
  /* 按 4×6 的比例固定整个预览区域高度，让单元格接近正方形 */
  grid-template-rows: repeat(var(--rows), 1fr);
  aspect-ratio: 4 / 6;
  gap: 4px;
  padding: 8px;
  border-radius: 18px;
  background: #F2F2F7;
  border: 1px dashed #D1D1D6;
  max-width: 340px;
  margin: 0 auto;
}

.yd-beautify-grid-cell {
  border-radius: 8px;
  border: 1px dashed rgba(0,0,0,0.04);
  background: rgba(255,255,255,0.6);
}

.yd-beautify-grid-cell--selected {
  outline: 2px solid #007AFF;
  outline-offset: -1px;
}

.yd-beautify-grid-placeholder {
  position: relative;
  border-radius: 10px;
  background: rgba(0, 122, 255, 0.15);
  border: 2px dashed #007AFF;
  box-sizing: border-box;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 10;
}

.yd-beautify-grid-tile {
  position: relative;
  border-radius: 10px;
  background: linear-gradient(135deg, #a8c5e6 0%, #b8d4f1 100%);
  color: #000;
  font-size: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2px 4px;
  box-sizing: border-box;
  /* 填满整个网格单元：1×1 就是正方形，2×2 / 2×3 也按比例放大 */
  width: 100%;
  height: 100%;
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
  cursor: pointer;
}

.yd-beautify-grid-tile--widget {
  background: linear-gradient(135deg, #f0d4e6 0%, #e6c5d4 100%);
}

.yd-beautify-grid-tile--selected {
  outline: 2px solid #007AFF;
  outline-offset: 1px;
}

.yd-beautify-widget-panel {
  padding: 12px 16px 16px;
}

.yd-beautify-widget-empty {
  font-size: 13px;
  color: #8E8E93;
}

.yd-beautify-widget-title {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 4px;
}

.yd-beautify-widget-meta {
  font-size: 12px;
  color: #8E8E93;
  margin-bottom: 10px;
}

.yd-beautify-widget-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.yd-beautify-icon-toolbar {
  display: inline-flex;
  gap: 4px;
}

.yd-btn--text {
  background: transparent;
  border: none;
  padding: 4px 6px;
  font-size: 12px;
  color: #007AFF;
  cursor: pointer;
}

.yd-btn--text:active {
  opacity: 0.7;
}

.yd-beautify-icon-preview {
  margin: 0;
}

.yd-beautify-icon-preview-inner {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: linear-gradient(135deg, #a8c5e6 0%, #b8d4f1 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0,0,0,0.12);
  color: #fff; /* 预览中 SVG 采用 currentColor 填充 */
}

.yd-beautify-icon-preview-inner img {
  width: 100%;
  height: 100%;
  border-radius: 16px;
  object-fit: cover;
}

.yd-beautify-icon-emoji {
  font-size: 28px;
}

.yd-beautify-icon-placeholder {
  font-size: 20px;
  color: #666;
}

.yd-beautify-icon-preview-inner svg {
  width: 28px;
  height: 28px;
  fill: currentColor;
}

.yd-beautify-icon-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 4px 0 10px;
}

.yd-beautify-icon-main {
  flex: 1;
  min-width: 0;
}

.yd-beautify-field-label {
  font-size: 13px;
  font-weight: 500;
  margin: 8px 0 4px;
}

.yd-beautify-textarea {
  width: 100%;
  min-height: 80px;
  box-sizing: border-box;
  border-radius: 10px;
  border: 1px solid #C6C6C8;
  padding: 8px 10px;
  font-size: 13px;
  font-family: inherit;
  resize: vertical;
}

.yd-beautify-textarea::placeholder {
  color: #c7c7cc;
}

/* ---------- 语音设置子页：表单输入框（局部覆盖 yd-settings-input 的“无边框”风格） ---------- */
#page-settings-voice .yd-settings-input {
  width: 100%;
  max-width: 100%;
  display: block;
  min-width: 0;
  min-height: 38px;
  box-sizing: border-box;
  border-radius: 10px;
  border: 1px solid #C6C6C8;
  padding: 8px 10px;
  background-color: rgba(255, 255, 255, 0.92);
}

#page-settings-voice .yd-settings-detail-content,
#page-settings-voice .yd-voice-settings-card,
#page-settings-voice .yd-voice-settings-grid,
#page-settings-voice .yd-voice-settings-field {
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

/* ---------- 语音设置子页：简洁卡片布局 ---------- */
#page-settings-voice .yd-settings-detail-content {
  padding-top: 14px;
}

.yd-voice-settings-card {
  margin: 0 14px;
  padding: 14px 14px 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 10px 26px rgba(0,0,0,0.08);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  overflow-x: hidden;
}

.yd-voice-settings-title {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.2px;
  color: #111;
}

.yd-voice-settings-subtitle {
  margin-top: 4px;
  font-size: 12px;
  color: rgba(60, 60, 67, 0.72);
}

.yd-voice-settings-field {
  margin-top: 12px;
}

.yd-voice-settings-label {
  font-size: 12px;
  font-weight: 700;
  color: rgba(60, 60, 67, 0.82);
  margin: 0 0 6px;
}

.yd-voice-settings-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-top: 2px;
}

.yd-voice-settings-voice-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  width: 100%;
  min-width: 0;
}

.yd-voice-settings-voice-row .yd-settings-input {
  flex: 1 1 0;
  min-width: 0;
}

.yd-voice-settings-pick {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  text-align: left;
  cursor: pointer;
  width: auto;
  max-width: 100%;
  min-width: 0;
  position: relative;
  padding-right: 32px; /* 给箭头留空间 */
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='M4 6l4 4 4-4' stroke='%238E8E93' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 16px 16px;
}

.yd-voice-settings-pick span {
  width: 100%;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.yd-voice-settings-hint {
  margin-top: 6px;
  font-size: 12px;
  color: rgba(60, 60, 67, 0.6);
  line-height: 1.4;
}

.yd-voice-settings-actions {
  display: flex;
  gap: 10px;
  margin-top: 12px;
}

.yd-voice-settings-actions .yd-btn {
  flex: 1;
}

.yd-voice-settings-picker {
  width: min(92vw, 680px);
  max-height: 86vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.yd-voice-settings-picker__title {
  font-weight: 900;
}

.yd-voice-settings-picker__toolbar {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: stretch;
  padding: 8px 12px 12px;
}

.yd-voice-settings-picker__type {
  width: 100%;
}

.yd-voice-settings-picker__search {
  width: 100%;
  min-width: 0;
}

.yd-voice-settings-picker__list {
  overflow: auto;
  padding: 0 12px 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.yd-voice-settings-voice-card {
  appearance: none;
  border: 1px solid #e7e7e7;
  background: #fff;
  border-radius: 12px;
  padding: 12px;
  text-align: left;
  cursor: pointer;
}

.yd-voice-settings-voice-card.is-active {
  border-color: #111;
  box-shadow: 0 0 0 1px rgba(17,17,17,0.1) inset;
}

.yd-voice-settings-voice-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.yd-voice-settings-voice-card__name {
  font-size: 14px;
  font-weight: 700;
  color: #111;
}

.yd-voice-settings-voice-card__group {
  font-size: 11px;
  color: #4b5563;
  background: #f3f4f6;
  border-radius: 999px;
  padding: 2px 8px;
  white-space: nowrap;
}

.yd-voice-settings-voice-card__id {
  margin-top: 6px;
  font-size: 12px;
  color: #555;
  word-break: break-all;
}

.yd-beautify-hint {
  font-size: 11px;
  color: #8E8E93;
  margin-top: 4px;
}

.yd-beautify-icon-style-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 4px 0 6px;
}

.yd-beautify-icon-style-row input[type="color"] {
  width: 32px;
  height: 24px;
  padding: 0;
  border-radius: 6px;
  border: 1px solid #C6C6C8;
}

.yd-beautify-icon-style-row input[type="range"] {
  flex: 1;
}

.yd-beautify-icon-style-row select {
  height: 28px;
  border-radius: 6px;
  border: 1px solid #C6C6C8;
  font-size: 12px;
  padding: 2px 6px;
}

.yd-beautify-global-icon-body{
  padding: 0 16px 16px;
}

.yd-beautify-icon-upload-row {
  margin-top: 8px;
  margin-bottom: 16px;
}

.yd-beautify-upload-icon {
  width: 18px;
  height: 18px;
  display: inline-block;
  margin-right: 4px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-2'/%3E%3Cpolyline points='7 9 12 4 17 9'/%3E%3Cline x1='12' y1='4' x2='12' y2='16'/%3E%3C/svg%3E") center/contain no-repeat;
}

.yd-beautify-actions {
  margin-top: 10px;
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.yd-beautify-upload-list {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.yd-beautify-upload-thumb {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background-size: cover;
  background-position: center;
  border: 1px solid rgba(0,0,0,0.08);
}

.yd-beautify-widget-carousel {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 6px 0 4px;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE and Edge */
}

.yd-beautify-widget-carousel::-webkit-scrollbar {
  display: none; /* Chrome, Safari, Opera */
}

.yd-beautify-widget-card {
  min-width: 140px;
  max-width: 180px;
  padding: 0;
  border-radius: 0;
  background: transparent;
  border: none;
  font-size: 12px;
  text-align: center;
  cursor: pointer;
  flex-shrink: 0;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.yd-beautify-widget-card__preview {
  width: 100%;
  border-radius: 0;
  overflow: hidden;
  background: transparent;
  position: relative;
  box-shadow: none;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  /* 根据组件尺寸动态设置高度 */
}

.yd-beautify-widget-preview-iframe {
  border: none;
  pointer-events: none;
  transform: scale(0.5);
  transform-origin: center center;
  width: 200%;
  height: 200%;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  margin: auto;
}

.yd-beautify-widget-card__info {
  padding: 4px 0 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
}

.yd-beautify-widget-card__title {
  font-weight: 600;
  margin: 0;
  font-size: 13px;
  color: #000;
}

.yd-beautify-widget-card__size {
  font-size: 11px;
  color: #8E8E93;
  margin: 0;
}

.yd-beautify-widget-card--selected .yd-beautify-widget-card__info {
  outline: 2px solid #007AFF;
  outline-offset: 2px;
  border-radius: 4px;
  padding: 4px 8px;
}

.yd-beautify-divider {
  height: 1px;
  background: rgba(198, 198, 200, 0.5);
  margin: 10px 0;
}

.yd-new-widget-preview {
  width: 100%;
  height: 200px;
  border-radius: 12px;
  overflow: hidden;
  background: #F5F5F7;
  border: 1px solid #E5E5EA;
  margin-bottom: 16px;
  position: relative;
}

.yd-new-widget-preview-iframe {
  width: 100%;
  height: 100%;
  border: none;
  pointer-events: none;
  transform: scale(0.5);
  transform-origin: top left;
  width: 200%;
  height: 200%;
}

/* ---------- 预设管理底部卡片 ---------- */
.yd-beautify-preset-actions-card {
  display: flex;
  gap: 12px;
  padding: 16px;
  justify-content: center;
  align-items: center;
}

.yd-beautify-preset-actions-card .yd-btn {
  flex: 1;
  height: 44px;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s ease;
}

.yd-beautify-preset-actions-card .yd-btn--primary {
  background: linear-gradient(135deg, #007AFF 0%, #0051D5 100%);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(0, 122, 255, 0.3);
}

.yd-beautify-preset-actions-card .yd-btn--primary:active {
  transform: scale(0.98);
  box-shadow: 0 2px 8px rgba(0, 122, 255, 0.2);
}

.yd-beautify-preset-actions-card .yd-btn--danger {
  background: linear-gradient(135deg, #FF3B30 0%, #D32F2F 100%);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(255, 59, 48, 0.3);
  border: none;
}

.yd-beautify-preset-actions-card .yd-btn--danger:active {
  transform: scale(0.98);
  box-shadow: 0 2px 8px rgba(255, 59, 48, 0.2);
}

/* ---------- 回收站（七天冷静期备份） ---------- */
#yd-recycle-bin-list .yd-recycle-bin-item {
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 11px 16px;
  border-top: 0.5px solid #C6C6C8;
}

#yd-recycle-bin-list .yd-recycle-bin-item:first-child {
  border-top: none;
}

#yd-recycle-bin-list .yd-recycle-bin-item__title {
  font-size: 17px;
  font-weight: 400;
  color: #000000;
  letter-spacing: -0.41px;
}

#yd-recycle-bin-list .yd-recycle-bin-item__meta {
  margin-top: 2px;
  font-size: 13px;
  color: #8E8E93;
  line-height: 1.45;
}

/* 回收站：不展示“暂无备份/共有x条”副标题 */
#yd-recycle-bin-meta {
  display: none;
}

/* 回收站：不显示标题行下方那条分割线（避免你说的“下面还有一条横线”） */
#yd-recycle-bin-header::before {
  display: none;
}

/* 回收站弹窗列表：避免按钮 100% 宽度导致正文被挤成竖排 */
#yd-recycle-bin-restore-list .yd-recycle-bin-restore-entry {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid #E5E5EA;
  border-radius: 12px;
  background: #ffffff;
}

#yd-recycle-bin-restore-list .yd-recycle-bin-restore-entry__main {
  min-width: 0;
  flex: 1 1 auto;
}

#yd-recycle-bin-restore-list .yd-recycle-bin-restore-entry__title {
  font-weight: 700;
  color: #000000;
  font-size: 14px;
  letter-spacing: -0.2px;
  line-height: 1.35;
  word-break: keep-all;
}

#yd-recycle-bin-restore-list .yd-recycle-bin-restore-entry__sid {
  margin-left: 4px;
  color: #3C3C43;
  font-size: 13px;
  font-weight: 600;
  word-break: break-all;
}

#yd-recycle-bin-restore-list .yd-recycle-bin-restore-entry__meta {
  margin-top: 6px;
  color: #8E8E93;
  font-size: 12px;
  line-height: 1.45;
}

#yd-recycle-bin-restore-list .yd-recycle-bin-restore-action {
  width: auto;
  min-width: 84px;
  height: 36px;
  padding: 0 14px;
  border-radius: 10px;
  border: none;
  background: #007AFF;
  color: #ffffff;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.2px;
  flex: 0 0 auto;
}

#yd-recycle-bin-restore-list .yd-recycle-bin-restore-action:disabled {
  opacity: 0.7;
}
