/* ============================================================
   休闲游戏乐园 - 全局样式
   响应式 / 移动端优先 / 玻璃拟态 + 渐变光晕
   ============================================================ */

:root {
  --bg: #0b1020;
  --bg-2: #11162b;
  --card: rgba(255, 255, 255, 0.06);
  --card-border: rgba(255, 255, 255, 0.12);
  --text: #f5f7ff;
  --muted: rgba(245, 247, 255, 0.62);
  --accent: #6d8bff;
  --accent-2: #b06dff;
  --radius: 18px;
  --shadow: 0 18px 40px -18px rgba(0, 0, 0, 0.65);
  --maxw: 1200px;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

/* 滚动容器：位于顶部导航之下，滚动条不会覆盖到导航 */
.page {
  position: relative;   /* 作为子元素 offsetTop 的定位基准，供滚动条溢出判断使用 */
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  /* 弹性列布局：内容不足一屏时，页脚的 margin-top:auto 会把它压到页面底部 */
  display: flex;
  flex-direction: column;
}
/* 内部各块不参与收缩：内容超出一屏时正常滚动，而不是被压扁 */
.page > * { flex: 0 0 auto; }

/* 背景动态光晕 */
.bg-glow {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(40% 38% at 18% 12%, rgba(109, 139, 255, 0.35), transparent 60%),
    radial-gradient(38% 40% at 85% 18%, rgba(176, 109, 255, 0.30), transparent 60%),
    radial-gradient(45% 45% at 50% 100%, rgba(34, 197, 94, 0.18), transparent 60%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%);
  animation: floatGlow 14s ease-in-out infinite alternate;
}
@keyframes floatGlow {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to   { transform: translate3d(0, -20px, 0) scale(1.06); }
}

.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------------- 顶部导航 ---------------- */
.nav {
  position: sticky;
  top: 0;
  flex: none;
  z-index: 20;
  backdrop-filter: blur(14px);
  background: rgba(11, 16, 32, 0.55);
  border-bottom: 1px solid var(--card-border);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.brand {
  display: flex;
  align-items: center;
  font-weight: 800;
  font-size: 20px;
  letter-spacing: 0.5px;
  line-height: 1;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}
.brand .logo {
  /* 微信 X5 等老内核下，img 必须 display:block 才能被 align-items:center 正确居中 */
  display: block;
  flex: none;
  width: 36px; height: 36px;
  margin-right: 10px; /* 用 margin 代替 gap，兼容不支持 flex gap 的老内核 */
  border-radius: 8px;
  object-fit: contain;
  -webkit-user-drag: none;
}
.brand > span { line-height: 1; }
.visit-count { display: inline-flex; align-items: center; gap: 4px; }
.visit-icon { display: block; flex: none; width: 13px; height: 13px; }
/* 关闭访问次数时显示的「管理登录」入口：略放大，更贴近访问统计按钮的体量 */
.visit-count.login-entry { padding: 7px 15px; font-size: 13.5px; gap: 5px; }
.visit-count.login-entry .visit-icon { width: 15px; height: 15px; }
.visit-count {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--card-border);
  padding: 6px 14px;
  border-radius: 999px;
  backdrop-filter: blur(10px);
  white-space: nowrap;
  box-shadow: 0 4px 16px -10px rgba(0, 0, 0, 0.6);
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  cursor: default;
}
.visit-count b {
  font-size: 14px;
  font-weight: 800;
  color: #fff;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.3px;
}
/* 开启「点击跳转后台」后：访问次数作为链接可点击（去掉下划线，悬停反馈） */
a.visit-count { text-decoration: none; cursor: pointer; }
a.visit-count:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.22);
}

/* ---------------- Hero 区 ---------------- */
/* 用 .hero.wrap 提高优先级：避免被 .wrap 的 padding 覆盖（同优先级时后定义者胜） */
.hero.wrap {
  text-align: center;
  padding: 56px 16px 36px;
}
.hero h1 {
  margin: 0;
  font-size: clamp(34px, 7vw, 64px);
  line-height: 1.1;
  font-weight: 900;
  letter-spacing: -1px;
  background: linear-gradient(120deg, #fff 10%, var(--accent) 55%, var(--accent-2) 95%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero p {
  margin: 18px auto 0;
  max-width: 620px;
  color: var(--muted);
  font-size: clamp(15px, 3.5vw, 19px);
  line-height: 1.7;
}
/* 副标题按开关控制：电脑/手机各自显隐 */
@media (min-width: 641px) { .hero-desc.hide-desktop { display: none; } }
@media (max-width: 640px) { .hero-desc.hide-mobile { display: none; } }

/* 搜索 + 分类 */
.toolbar {
  max-width: 720px;
  margin: 30px auto 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.search {
  position: relative;
  height: 45px;
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 999px;
  transition: border-color .2s;
}
/* 输入框铺满整个搜索框：点击框内任意位置都能聚焦并定位光标 */
.search input {
  display: block;
  width: 100%;
  height: 100%;
  box-sizing: border-box;
  border: none;
  background: transparent;
  color: var(--text);
  font-size: 15px;
  line-height: 1;
  outline: none;
  padding: 0 18px 0 46px; /* 左侧留出图标位置 */
}
.search input::placeholder {
  color: rgba(245, 247, 255, 0.22);
  font-weight: 400;
  opacity: 1; /* Firefox 默认给 placeholder 加 opacity:.54，覆盖它以统一各浏览器观感 */
}
/* 图标绝对定位在左侧，可点击但不聚焦（命中 svg 时不触发输入框） */
.search svg {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  opacity: .7;
  pointer-events: auto;
}
/* 聚焦时给整个搜索框一点反馈，方便看出已激活 */
.search:focus-within { border-color: rgba(255, 255, 255, 0.28); }

.chips { display: flex; flex-wrap: wrap; gap: 18px; justify-content: center; }
.chip {
  cursor: pointer;
  position: relative;
  color: var(--muted);
  font-size: 14px;
  padding: 8px 2px;
  transition: color .2s;
  user-select: none;
}
.chip:hover { color: var(--text); }
.chip.active { color: var(--text); font-weight: 600; }
.chip.active::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, rgba(109, 139, 255, 0.5), rgba(176, 109, 255, 0.5));
}

/* 分类包裹层：分类标签居中排列 */
.chips-wrap { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 12px; }
/* 桌面端：开关关闭时整层隐藏；超过电脑上限的分类直接隐藏（不提供展开） */
@media (min-width: 641px) {
  body.hide-cats-desktop .chips-wrap { display: none; }
  .chips .chip.chip-xd { display: none; }
}

/* ---------------- 游戏网格 ---------------- */
.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 22px 0 22px;
}
.section-title h2 {
  font-size: 22px;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}
.section-title h2::before {
  content: "";
  width: 5px;
  height: 20px;
  border-radius: 3px;
  background: linear-gradient(180deg, var(--accent), var(--accent-2));
}
.section-title .count {
  color: var(--muted);
  font-size: 13px;
  background: var(--card);
  border: 1px solid var(--card-border);
  padding: 4px 12px;
  border-radius: 999px;
  white-space: nowrap;
}

.games {
  display: grid;
  /* min() 保证任何屏宽下至少能排下 2 列（50% 减去半个间距） */
  grid-template-columns: repeat(auto-fill, minmax(min(260px, calc(50% - 11px)), 1fr));
  gap: 22px;
  margin-top: 12px;
  padding-bottom: 60px;
}

.card {
  position: relative;
  border-radius: var(--card-radius, var(--radius));
  background: var(--card);
  border: 1px solid var(--card-border);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow);
  transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
  display: flex;
  flex-direction: column;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}
.card img { -webkit-user-drag: none; user-drag: none; }
.card:hover {
  border-color: rgba(255,255,255,.4);
  box-shadow: 0 18px 40px -18px rgba(0,0,0,.6),
              0 0 16px -4px var(--c);
}

.card-cover {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 8;
  /* 后台可自定义顶部区域高度（--cover-h）；未设置时沿用 16:8 比例 */
  height: var(--cover-h, auto);
  /* flex 显式居中 + width:100% 锁定宽度，避免高度变化时图标错位/溢出 */
  display: flex; align-items: center; justify-content: center;
  /* 后台可自定义图标大小（--emoji-size） */
  font-size: var(--emoji-size, 64px);
  background: linear-gradient(135deg, var(--c, #6d8bff), transparent 120%);
}
.card-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(120% 80% at 50% 0%, rgba(255,255,255,.18), transparent 60%);
}
.card-cover > .emoji { position: relative; z-index: 1; line-height: 1; filter: drop-shadow(0 6px 14px rgba(0,0,0,.35)); }
.card-cover img.emoji { width: 1em; height: 1em; vertical-align: -0.1em; }
.brand .logo img.emoji { width: 26px; height: 26px; }

/* 封面角标：左上角分类标签 / 右上角进入次数，共用一套尺寸（同为 24px 高） */
.tag,
.card-plays {
  position: absolute;
  top: 10px;
  z-index: 2;
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 12px; line-height: 1;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(0, 0, 0, .35);
  backdrop-filter: blur(6px);
  color: #fff;
}
.tag { left: 10px; }
.card-plays { right: 10px; font-weight: 600; font-variant-numeric: tabular-nums; }
.card-plays svg { width: 12px; height: 12px; flex: 0 0 12px; }
.card-plays b { font-weight: 600; }

.card-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card-title { font-size: 18px; font-weight: 700; margin: 0; }
.card-desc {
  color: var(--muted); font-size: 13.5px; line-height: 1.6; margin: 0; flex: 1;
  /* 简介单行显示，超出部分用省略号截断 */
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.play-btn {
  margin-top: 6px;
  align-self: stretch;
  justify-content: center;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  color: #dbe4ff;
  padding: 9px 16px;
  border-radius: 999px;
  /* 柔和的半透明渐变 + 同色描边，避免在卡片上过于凸出 */
  background: linear-gradient(135deg, rgba(109,139,255,.30), rgba(176,109,255,.24));
  border: 1px solid rgba(109,139,255,.40);
  transition: filter .2s, transform .15s;
}
.card:hover .play-btn { filter: brightness(1.12); }
.play-btn:active { transform: scale(.96); }
/* 开始游戏按钮按后台开关控制：电脑/手机各自显隐 */
@media (min-width: 641px) { .play-btn.hide-desktop { display: none; } }
@media (max-width: 640px) { .play-btn.hide-mobile { display: none; } }

/* 空状态 */
.empty {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--muted);
  padding: 60px 0;
  font-size: 15px;
}

/* ---------------- 页脚 ---------------- */
.footer {
  margin-top: auto;
  border-top: 1px solid var(--card-border);
  padding: 26px 0;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}
.footer a {
  color: inherit;        /* 与页脚文字同色，不改变颜色 */
  text-decoration: none; /* 去掉下划线 */
}

/* ---------------- 游戏播放页 ---------------- */
.play-shell { position: fixed; inset: 0; background: #05070f; z-index: 50; display: flex; flex-direction: column; }
.play-bar {
  height: 56px;
  flex: none;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 16px;
  background: rgba(8, 11, 22, .9);
  border-bottom: 1px solid var(--card-border);
  backdrop-filter: blur(10px);
}
.play-bar .title { font-weight: 700; font-size: 16px; }
.play-bar .spacer { flex: 1; }
.btn-back, .btn-new {
  display: inline-flex; align-items: center;
  height: 32px;
  box-sizing: border-box;
  border: 1px solid var(--card-border);
  background: var(--card);
  color: var(--text);
  padding: 0 12px;
  border-radius: 999px;
  font-size: 14px;
  text-decoration: none;
  cursor: pointer;
  transition: all .2s;
}
.btn-back:hover, .btn-new:hover { border-color: rgba(255,255,255,.35); }
.btn-new .icon-ext { margin-left: 6px; flex: none; }
.logo-mini {
  display: block;
  flex: none;
  width: 22px; height: 22px;
  margin-right: 6px;
  border-radius: 6px;
  object-fit: contain;
  -webkit-user-drag: none;
}
.frame-wrap { flex: 1; overflow: hidden; }
.game-frame { width: 100%; height: 100%; border: none; background: #05070f; }

/* ---------------- 移动端适配 ---------------- */
@media (max-width: 640px) {
  .visit-count { font-size: 12px; }
  /* 手机端：后台管理入口左右内边距收窄，避免过宽 */
  .visit-count.login-entry { padding: 6px 10px; gap: 5px; }
  .chips { display: none; }                 /* 手机端默认隐藏分类标签 */
  .chips-wrap { display: none; }            /* 未开启时整层不占位，避免多余间距 */
  /* 手机端开启后显示分类 */
  body.show-cats-mobile .chips-wrap { display: flex; }
  body.show-cats-mobile .chips { display: flex; flex-wrap: wrap; width: 100%; }
  /* 手机端：超过手机上限的分类直接隐藏（不提供展开） */
  body.show-cats-mobile .chips .chip.chip-xm { display: none; }
  .hide-mobile { display: none; }
  .hero.wrap { padding: 48px 10px 28px; }
  .search { margin: 0 36px; }
  /* 手机端：同样保证至少一排 2 个（列宽上限压缩到半宽减半个间距） */
  .games { grid-template-columns: repeat(auto-fill, minmax(min(150px, calc(50% - 7px)), 1fr)); gap: 12px; }
  .card-cover { font-size: calc(var(--emoji-size, 64px) * .75); }   /* 48px → 与原手机端一致 */
  .tag { display: none; }
  .card-plays { top: 8px; right: 8px; font-size: 11px; padding: 4px 7px; }
  .card-plays svg { width: 11px; height: 11px; flex: 0 0 11px; }
  .card-body { padding: 12px 13px 14px; }
  .card-title { font-size: 16px; }
  .play-btn { display: inline-flex; width: 100%; justify-content: center; }
  .nav-inner { height: 56px; }
  .brand { font-size: 18px; }
  .play-bar { position: relative; }
  .play-bar .spacer { display: none; }
  .play-bar .btn-new { margin-left: auto; }
  .play-bar .title {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
  }
}

/* 超窄屏（小屏手机）：两列布局下的紧凑优化 */
@media (max-width: 400px) {
  .wrap { padding: 0 12px; }
  .hero.wrap { padding: 40px 10px 24px; }
  .card-body { padding: 10px 10px 12px; gap: 6px; }
  .card-title { font-size: 14.5px; }
  .card-desc { font-size: 12px; line-height: 1.5; }
  .play-btn { font-size: 13px; padding: 8px 12px; }
  .card-cover { font-size: 40px; }
}

/* ---------------- 滚动条：隐藏原生滚动条（零占位，仅用滚轮/触控板/键盘滚动） ---------------- */
/* 页内滚动容器 .page 的 overflow 由基础样式设置；此处仅隐藏原生滚动条，使其不占布局空间 */
.page {
  scrollbar-width: none;          /* Firefox */
  -ms-overflow-style: none;       /* 旧 Edge / IE */
}
.page::-webkit-scrollbar {          /* Chrome / Safari / Edge(旧) */
  width: 0;
  height: 0;
  display: none;
}

/* ---------------- 自定义浮层滚动条（可见、不占布局空间；原生滚动条已隐藏） ---------------- */
/* 结构：上箭头 / 轨道(细滑块) / 下箭头；轨道仅作定位容器，无可见槽位 */
.vscroll {
  position: fixed;
  right: 0;                        /* 紧贴屏幕右边缘，无间距 */
  top: 0;                          /* JS 运行时设为顶部导航高度 */
  bottom: 0;
  width: 10px;
  z-index: 35;                     /* 低于浮动按钮(40)，高于普通内容 */
  display: flex;
  flex-direction: column;
  pointer-events: none;            /* 未显示时不拦截点击 */
  opacity: 0;
  transition: opacity .2s;
}
.vscroll.show { opacity: 1; }
.vscroll.show > * { pointer-events: auto; }

/* 上下箭头：纯展示，不可点击/不可交互 */
.vscroll-btn {
  flex: 0 0 auto;
  height: 10px;
  display: flex;
  align-items: center;
  justify-content: flex-end;        /* 三角形贴右边缘，水平中心与滑块对齐 */
  padding: 0;
  color: rgba(255, 255, 255, 0.25);
  cursor: default;
  pointer-events: none;            /* 不接收鼠标事件，无法点击 */
  user-select: none;
  -webkit-user-select: none;
}
.vscroll-btn svg { display: block; margin: 0; margin-left: auto; }

/* 轨道：仅定位用，无可见背景 */
.vscroll-track {
  position: relative;
  flex: 1 1 auto;
  margin: 1px 0;
}

/* 细滑块（悬浮，无凹槽） */
.vscroll-thumb {
  position: absolute;
  right: 1px;                      /* 与屏幕右边缘保留 1px 间距（该缝隙属于轨道，仍可点击滚动） */
  width: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
  cursor: pointer;
  transition: background .2s;
}
.vscroll-thumb:hover { background: rgba(255, 255, 255, 0.4); }
.vscroll-track:hover .vscroll-thumb { background: rgba(255, 255, 255, 0.4); }
.vscroll.dragging .vscroll-thumb { background: rgba(255, 255, 255, 0.5); }

/* 手机页面：隐藏自定义滚动条（移动端本就无需） */
@media (max-width: 640px) {
  .vscroll { display: none; }
}

/* ---------------- 浮动操作按钮（意见反馈 + 返回顶部） ---------------- */
.float-actions {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 40;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.float-btn,
.to-top {
  width: 46px;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid var(--card-border);
  border-radius: 50%;
  background: var(--card);
  color: #fff;
  cursor: pointer;
  box-shadow: 0 10px 28px -8px rgba(0, 0, 0, 0.55);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  transition: background .2s ease, transform .2s ease, opacity .25s ease, visibility .25s ease;
}
.float-btn:hover,
.to-top:hover { background: rgba(255, 255, 255, 0.14); }
.float-btn:active,
.to-top:active { transform: scale(.94); }
.float-actions svg { opacity: .55; transition: opacity .25s ease; }
.float-btn:hover svg,
.to-top:hover svg { opacity: 1; }
.to-top {
  opacity: 0;
  visibility: hidden;
  transform: translateY(14px);
}
.to-top.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
@media (max-width: 640px) {
  .float-actions { right: 16px; bottom: 16px; gap: 10px; }
  .float-btn, .to-top { width: 42px; height: 42px; }
}

/* ---------------- 意见反馈弹窗 ---------------- */
.modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px 20px 12vh;
}
.modal.open { display: flex; }
.modal-mask {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
}
.modal-panel {
  position: relative;
  width: 100%;
  max-width: 440px;
  background: var(--bg-2);
  border: 1px solid var(--card-border);
  border-radius: 20px;
  box-shadow: 0 24px 60px -12px rgba(0, 0, 0, .6);
  overflow: hidden;
  animation: modal-in .22s ease;
}
@keyframes modal-in {
  from { opacity: 0; transform: translateY(12px) scale(.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 20px 14px;
  border-bottom: 1px solid var(--card-border);
}
.modal-title { display: flex; align-items: center; gap: 12px; min-width: 0; }
.modal-ico {
  flex: 0 0 auto;
  width: 36px; height: 36px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(109, 139, 255, .14);
  color: var(--accent);
}
.modal-tt h3 { margin: 0; font-size: 16px; font-weight: 700; }
.modal-sub { margin: 2px 0 0; font-size: 12px; color: var(--muted); }
.modal-close {
  flex: 0 0 auto;
  align-self: flex-start;
  margin: -8px -8px 0 0;
  width: 30px; height: 30px;
  display: flex; align-items: center; justify-content: center;
  border: none; border-radius: 9px;
  background: rgba(255, 255, 255, .06);
  color: var(--muted);
  font-size: 20px; line-height: 1; cursor: pointer;
  transition: background .15s ease, color .15s ease;
}
.modal-close:hover { background: rgba(248, 113, 113, .16); color: #fca5a5; }
.modal-body { padding: 16px 20px 0; }
.modal-body textarea {
  width: 100%;
  min-height: 130px;
  resize: none;
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 14px;
  color: var(--text);
  padding: 12px 14px 28px;
  font: inherit;
  font-size: 14px;
  line-height: 1.6;
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.modal-body textarea::placeholder { color: var(--muted); }
.modal-body textarea:focus {
  border-color: var(--card-border);
  box-shadow: none;
}
/* 文本域滚动条：细窄圆角，与深色主题融合 */
.modal-body textarea {
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, .18) transparent;
}
.modal-body textarea::-webkit-scrollbar { width: 6px; }
.modal-body textarea::-webkit-scrollbar-track { background: transparent; }
.modal-body textarea::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, .18);
  border-radius: 999px;
}
.modal-body textarea::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, .3); }
.fb-field { position: relative; }
.modal-tip {
  position: absolute;
  right: 10px;
  bottom: 10px;
  font-size: 12px;
  color: var(--muted);
  pointer-events: none;
}
.modal-foot {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px 18px;
}
.modal-msg { font-size: 13px; margin-right: auto; }
.modal-msg.ok  { color: #4ade80; }
.modal-msg.err { color: #f87171; }
.btn-primary {
  border: 1px solid rgba(109, 139, 255, .3);
  border-radius: 12px;
  padding: 10px 24px;
  background: rgba(109, 139, 255, .16);
  color: var(--accent);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease;
}
.btn-primary:hover { background: rgba(109, 139, 255, .24); border-color: rgba(109, 139, 255, .45); }
.btn-primary:active { transform: scale(.97); }
