/* ============================================================================
   Youther 视觉系统 v3（2026-10-04）· 清爽整洁版
   ---------------------------------------------------------------------------
   这一层在 base / themes / views / features 之后加载，把前两轮"叠色斑"留下的
   花、脏、看不清统一收干净。原则：
     1. 只改外观：不动任何结构、类名、文案与交互；
     2. 一个主题只保留「主题色 + 中性灰」两条色彩线，别的颜色一律回到 CSS 变量；
     3. 浅底深字 / 深底浅字，任何主题下都要看得清；
     4. 圆角、阴影、间距三件事统一，页面才有"整"的感觉。
   ========================================================================== */

/* ---------------------------------------------------------------------------
   一、设计变量：圆角 / 阴影 / 线条
   ------------------------------------------------------------------------ */
:root {
  --radius-lg: 20px;
  --radius: 16px;
  --radius-sm: 11px;
  --line: rgba(20, 40, 34, .07);
  --line-strong: rgba(20, 40, 34, .12);
  --shadow-sm: 0 1px 2px rgba(16, 38, 32, .06);
  --shadow: 0 1px 2px rgba(16, 38, 32, .05), 0 16px 38px -26px rgba(16, 38, 32, .40);
  --shadow-lg: 0 2px 6px rgba(16, 38, 32, .06), 0 34px 68px -34px rgba(16, 38, 32, .46);
  --glow-ring: 0 0 0 4px var(--primary-soft);
  --dot-field: rgba(20, 40, 34, .05);
}

/* 主题的圆角口径统一；夏日 / 梧桐保留各自的字体与背景个性 */
html[data-theme="summer"] {
  --radius-lg: 20px;
  --radius: 16px;
  --radius-sm: 11px;
}
html[data-theme="wutong"] {
  --radius-lg: 18px;
  --radius: 14px;
  --radius-sm: 10px;
}


/* 梦幻：云朵白 + 粉紫光晕，线条与阴影跟着偏紫一点，圆角比默认再柔一档 */
html[data-theme="dreamy"] {
  --radius-lg: 20px;
  --radius: 15px;
  --radius-sm: 11px;
  --line: rgba(120, 62, 110, .10);
  --line-strong: rgba(120, 62, 110, .18);
  --dot-field: rgba(120, 62, 110, .05);
  --shadow-sm: 0 1px 2px rgba(94, 62, 122, .05);
  --shadow: 0 1px 2px rgba(94, 62, 122, .04), 0 16px 38px -26px rgba(94, 62, 122, .32);
  --shadow-lg: 0 2px 6px rgba(94, 62, 122, .05), 0 34px 68px -34px rgba(94, 62, 122, .40);
}
/* ---------------------------------------------------------------------------
   二、页面背景：一层主题色柔光 + 极淡点阵，干净、不脏
   （用户自选个人背景时不参与）
   ------------------------------------------------------------------------ */
body[data-bg=""] {
  background-color: #f5f8f7;
  background-image:
    radial-gradient(1100px 500px at 50% -170px, var(--primary-soft) 0%, rgba(255, 255, 255, 0) 66%),
    radial-gradient(var(--dot-field) 1px, rgba(0, 0, 0, 0) 1.4px),
    var(--body-pattern);
  background-size: auto, 24px 24px, auto;
  background-attachment: fixed;
}

/* 文章正文里的 **加粗** */
.article-body .md-strong, .article-body b { font-weight: 700; }
/* ---------------------------------------------------------------------------
   二十三、图案减淡（v3.3）
   夏日水波、梧桐落叶、校园光斑这类"主题图案"本身很有味道，但铺满全屏会抢内容。
   在图案上盖一层 52% 的白色轻纱，只减淡、不取消，保证一眼看到的是字和卡片。
   ------------------------------------------------------------------------ */
body[data-bg=""] {
  background-image:
    radial-gradient(1100px 500px at 50% -170px, var(--primary-soft) 0%, rgba(255, 255, 255, 0) 66%),
    linear-gradient(rgba(255, 255, 255, .52), rgba(255, 255, 255, .52)),
    var(--body-pattern);
  background-size: auto, auto, auto;
}
html[data-theme="simple"] body[data-bg=""] {
  background-image:
    radial-gradient(1100px 500px at 50% -170px, var(--primary-soft) 0%, rgba(255, 255, 255, 0) 66%),
    radial-gradient(var(--dot-field) 1px, rgba(0, 0, 0, 0) 1.4px);
  background-size: auto, 24px 24px;
}

/* 深色主题：深底 + 主题色夜光，点阵换成极淡白点 */
body[data-theme="hongkong"][data-bg=""],
body[data-theme="basketball"][data-bg=""],
body[data-theme="blackgold"][data-bg=""],
body[data-theme="aurora"][data-bg=""],
body[data-theme="racing"][data-bg=""] {
  background-color: var(--bg);
  background-image:
    radial-gradient(1000px 460px at 50% -160px, var(--primary-soft) 0%, rgba(0, 0, 0, 0) 62%),
    radial-gradient(rgba(255, 255, 255, .045) 1px, rgba(0, 0, 0, 0) 1.4px),
    var(--body-pattern);
  background-size: auto, 24px 24px, auto;
  background-attachment: fixed;
}

/* ---------------------------------------------------------------------------
   三、顶部导航
   ------------------------------------------------------------------------ */
.site-header {
  background: var(--header-bg);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 1px 0 rgba(16, 38, 32, .03), 0 12px 30px -26px rgba(16, 38, 32, .40);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
}
.header-inner { padding: 9px 20px; gap: 14px; }
.brand-mark {
  width: 36px; height: 36px; border-radius: 12px;
  background: linear-gradient(140deg, var(--primary) 0%, var(--primary-mid, var(--primary)) 100%);
  color: var(--primary-ink);
  box-shadow: 0 6px 16px -8px var(--primary);
  overflow: hidden;
}
.brand-mark img { width: 100%; height: 100%; object-fit: cover; }
.brand-name { font-size: 16.5px; letter-spacing: .3px; }
.brand-sub { font-size: 10.5px; }
.main-nav { gap: 3px; }
.nav-item {
  padding: 7px 13px; border-radius: 999px;
  font-weight: 600; font-size: 13.5px; color: var(--text-dim);
  transition: background .18s ease, color .18s ease, box-shadow .18s ease;
}
.nav-item:hover { background: var(--surface-2); color: var(--text); transform: none; }
.nav-item.active {
  background: linear-gradient(140deg, var(--primary) 0%, var(--primary-mid, var(--primary)) 100%);
  color: var(--primary-ink);
  box-shadow: 0 6px 16px -8px var(--primary);
}
.icon-btn {
  width: 36px; height: 36px; border-radius: 12px;
  border-color: var(--line-strong);
  background: var(--surface);
  transition: color .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.icon-btn:hover { border-color: var(--primary); box-shadow: var(--glow-ring); }
.user-chip { border-color: var(--line-strong); padding: 3px 11px 3px 3px; }
.user-chip:hover { border-color: var(--primary); box-shadow: var(--glow-ring); }

/* ---------------------------------------------------------------------------
   四、卡片与页头
   ------------------------------------------------------------------------ */
.card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  background: var(--surface);
  transition: box-shadow .2s ease, border-color .2s ease, transform .2s ease;
}
.card:hover {
  border-color: var(--line-strong);
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}
.card.pad-lg { border-radius: var(--radius-lg); padding: 24px 26px; }

/* 页面开头的说明卡（学习 / 社区 / 排行榜 / 文章 / 笔记本…）：
   标题更实，正文更紧凑，不再占掉半屏 */
#view > .card.pad-lg > h2:first-child,
#view > .card.pad-lg > .row > div > h2:first-child { font-size: 23px; font-weight: 800; letter-spacing: .4px; }
#view > .card.pad-lg > h2:first-child + .muted,
#view > .card.pad-lg > .row > div > h2:first-child + .muted { margin-bottom: 2px; }

.card-title { font-size: 15.5px; font-weight: 700; letter-spacing: .2px; }
.card-title .dot {
  width: 8px; height: 8px; border-radius: 3px;
  background: linear-gradient(140deg, var(--primary), var(--primary-mid, var(--primary)));
  box-shadow: 0 0 0 4px var(--primary-soft);
}
.card-head { padding: 14px 18px; border-bottom: 1px solid var(--line); }

/* ---------------------------------------------------------------------------
   五、文字层级：辅助文字加深
   ------------------------------------------------------------------------ */
.muted { color: var(--text-dim); }
.faint { color: var(--text-faint); }
.tiny { font-size: 11.5px; }
.small { font-size: 12.5px; }
.sec-note, .page-desc { color: var(--text-dim); }

/* ---------------------------------------------------------------------------
   六、按钮 / 标签 / 输入 / 表格 / 弹窗
   ------------------------------------------------------------------------ */
.btn {
  border-radius: var(--radius-sm);
  background-image: linear-gradient(140deg, var(--primary) 0%, var(--primary-mid, var(--primary)) 100%);
  color: var(--primary-ink);
  font-weight: 600; letter-spacing: .2px;
  box-shadow: 0 6px 16px -8px var(--primary);
  transition: transform .16s ease, box-shadow .16s ease, background .16s ease, border-color .16s ease;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 10px 22px -10px var(--primary); }
.btn:active { transform: translateY(0); }
.btn.ghost, .btn.soft, .btn.danger { box-shadow: none; }
.btn.ghost {
  background: var(--surface);
  border: 1px solid var(--line-strong);
  color: var(--text);
}
.btn.ghost:hover { border-color: var(--primary); color: var(--primary-strong); background: var(--surface); }
.btn.soft { background: var(--primary-soft); color: var(--primary-strong); border: 1px solid transparent; }
.btn.soft:hover { border-color: var(--primary); }
.btn.tiny { border-radius: 9px; }
.btn.small { border-radius: 10px; }

.chip {
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--text-dim);
  border-radius: 999px;
  font-weight: 600;
  transition: background .16s ease, color .16s ease, border-color .16s ease;
}
.chip:hover { border-color: var(--primary); color: var(--primary-strong); background: var(--surface); transform: none; }
.chip.active {
  background: linear-gradient(140deg, var(--primary) 0%, var(--primary-mid, var(--primary)) 100%);
  border-color: transparent; color: var(--primary-ink);
}

.tag {
  border: 1px solid var(--line-strong);
  background: var(--surface-2);
  color: var(--text-dim);
  border-radius: 9px; font-weight: 600;
}
.tag.accent { background: var(--accent-soft); border-color: transparent; }
.tag.ok { background: var(--success-soft); border-color: transparent; color: var(--success); }

.input, .textarea, .select {
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  box-shadow: inset 0 1px 2px rgba(16, 38, 32, .03);
  transition: border-color .16s ease, box-shadow .16s ease;
}
.input:hover, .textarea:hover, .select:hover { border-color: var(--primary); }
.input:focus, .textarea:focus, .select:focus {
  border-color: var(--primary);
  box-shadow: var(--glow-ring);
  outline: none;
}
.input::placeholder, .textarea::placeholder { color: var(--text-faint); }

.table th, table th {
  background: var(--surface-2);
  color: var(--text-dim);
  font-weight: 700;
  font-size: 12.5px;
  letter-spacing: .2px;
}
.table td, table td { border-top: 1px solid var(--line); }

.modal { border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); border: 1px solid var(--line); }
.modal-mask, .overlay { background: rgba(12, 24, 20, .42); }
.toast {
  background: var(--surface); color: var(--text);
  border: 1px solid var(--line); border-radius: 14px;
  box-shadow: var(--shadow-lg);
}

* { scrollbar-width: thin; scrollbar-color: var(--border-strong) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 999px; border: 3px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-track { background: transparent; }

.site-footer {
  color: var(--text-faint);
  border-top: 1px solid var(--line);
  background: transparent;
}
/* ---------------------------------------------------------------------------
   七、首页 · 板块标题
   ------------------------------------------------------------------------ */
.home-page .home-sec { margin: 26px 0 12px; align-items: center; }
.home-page .home-sec h2 { font-size: 19px; font-weight: 800; letter-spacing: .4px; }
.home-page .home-sec h2::before {
  content: "";
  width: 9px; height: 9px; border-radius: 4px;
  background: linear-gradient(140deg, var(--primary), var(--primary-mid, var(--primary)));
  box-shadow: 0 0 0 5px var(--primary-soft);
}
.home-page .home-sec .sec-note { font-size: 12.5px; color: var(--text-faint); }
.home-page .home-sec .sec-more {
  font-size: 12.5px; font-weight: 600; color: var(--primary-strong);
  padding: 4px 10px; border-radius: 999px;
  transition: background .16s ease;
}
.home-page .home-sec .sec-more:hover { background: var(--primary-soft); text-decoration: none; }

/* ---------------------------------------------------------------------------
   八、首页 · 智能查词（去掉花哨色块，改成干净的"输入台"）
   ------------------------------------------------------------------------ */
.home-page .search-hero {
  position: relative; overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 24px;
  background:
    radial-gradient(560px 260px at 100% 0%, var(--primary-soft) 0%, rgba(255, 255, 255, 0) 72%),
    linear-gradient(180deg, var(--surface) 0%, var(--surface) 100%);
  box-shadow: var(--shadow-lg);
  padding: 26px 26px 22px;
}
/* 旧版那两个装饰色块（彩色圆点方块 / Aa 水印）直接撤掉 */
.home-page .search-hero::before { content: none; display: none; }
.home-page .search-hero::after {
  content: ""; position: absolute; right: -70px; top: -90px;
  width: 300px; height: 300px; border-radius: 50%;
  background-image: radial-gradient(var(--primary) 1.2px, rgba(0, 0, 0, 0) 1.6px);
  background-size: 15px 15px;
  opacity: .16; pointer-events: none;
  -webkit-mask-image: radial-gradient(circle at 50% 50%, #000 26%, rgba(0, 0, 0, 0) 70%);
  mask-image: radial-gradient(circle at 50% 50%, #000 26%, rgba(0, 0, 0, 0) 70%);
}
.home-page .search-hero .search-box { position: relative; z-index: 1; gap: 10px; }
.home-page .search-hero .suggest-list { top: calc(100% + 6px); border-radius: 14px; box-shadow: var(--shadow-lg); }
.home-page .search-hero .search-input-wrap { box-shadow: var(--shadow); border-radius: 16px; }
.home-page .search-hero .search-box .input {
  font-size: 16.5px; font-weight: 500;
  padding: 15px 16px 15px 44px; height: auto; min-height: 56px;
  border-radius: 16px; border-color: var(--line-strong);
  background: var(--surface);
  box-shadow: none;
}
.home-page .search-hero .search-box .input:focus { box-shadow: var(--glow-ring); border-color: var(--primary); }
.home-page .search-hero .search-box .btn { border-radius: 16px; padding: 13px 26px; font-size: 15px; }
.home-page .search-hero .lead-icon { left: 16px; font-size: 16px; opacity: .7; }
.home-page .search-hero .search-actions { gap: 9px; margin-top: 14px; }
.home-page .search-hero .search-actions .btn.ghost {
  background: var(--surface); border: 1px solid var(--line-strong);
  box-shadow: none; font-weight: 600; color: var(--text);
  border-radius: 999px; padding: 7px 14px;
}
.home-page .search-hero .search-actions .btn.ghost:hover { border-color: var(--primary); color: var(--primary-strong); }
.home-page .search-hero .search-actions .faint { color: var(--text-faint); }

/* 「试试这几个词」：一条轻量的快捷条 */
.home-page .home-search > .stack > .card {
  background: var(--surface);
  border: 1px dashed var(--line-strong);
  box-shadow: none;
  padding: 13px 16px;
  border-radius: var(--radius);
}
.home-page .home-search > .stack > .card:hover { transform: none; box-shadow: none; border-color: var(--primary); }
.home-page .home-search > .stack > .card b { font-size: 13.5px; }
.home-page .home-search .chip { padding: 3px 11px; font-size: 12.5px; }

/* ---------------------------------------------------------------------------
   十、首页 · 今日单词 / 黑胶播放器 / 三栏焦点
   ------------------------------------------------------------------------ */
.home-page .today-word {
  position: relative; overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: linear-gradient(100deg, var(--primary-soft) 0%, var(--surface) 46%);
  box-shadow: var(--shadow);
  padding: 22px 24px;
}
.home-page .today-word::before {
  width: 6px; border-radius: 999px;
  background: linear-gradient(180deg, var(--primary), var(--primary-mid, var(--primary)));
}
.home-page .word-en { font-size: 34px; font-weight: 800; letter-spacing: -.6px; }

.home-page .music-card { border-radius: 20px; padding: 24px 26px; box-shadow: var(--shadow); }
.home-page .music-card .vinyl { width: 136px; height: 136px; }
.home-page .music-card .vinyl-label {
  background: linear-gradient(140deg, var(--primary) 0%, var(--primary-strong) 100%);
}
.home-page .music-card .play-btn {
  width: 56px; height: 56px; border-radius: 50%;
  background-image: linear-gradient(140deg, var(--primary) 0%, var(--primary-mid, var(--primary)) 100%);
  box-shadow: 0 0 0 7px var(--primary-soft), 0 12px 24px -10px var(--primary);
}
.home-page .music-card .music-progress .bar { height: 6px; border-radius: 999px; background: var(--surface-3); }
.home-page .music-card .music-progress .bar i { border-radius: 999px; background: linear-gradient(90deg, var(--primary), var(--primary-mid, var(--primary))); }
.home-page .music-card .music-title b { font-size: 17px; }

.home-page .panel { border-radius: 18px; box-shadow: var(--shadow); border: 1px solid var(--line); }
.home-page .panel-head {
  background: linear-gradient(96deg, var(--primary-soft) 0%, rgba(255, 255, 255, 0) 82%);
  padding: 13px 16px;
  border-bottom: 1px solid var(--line);
}
.home-page .panel-head::before {
  width: 4px; border-radius: 999px; top: 15px; bottom: 15px;
  background: linear-gradient(180deg, var(--primary), var(--primary-mid, var(--primary)));
}
.home-page .panel-head > span { padding-left: 11px; font-size: 14.5px; font-weight: 700; }
.home-page .panel-head .more { font-size: 12.5px; font-weight: 600; color: var(--primary-strong); }
.home-page .panel .quote-art.small {
  display: block; width: 100%; height: 92px; object-fit: cover;
  border-radius: 14px; border: 1px solid var(--line);
}
.home-page .panel .quote-en { font-size: 16.5px; line-height: 1.5; letter-spacing: .1px; }
.home-page .panel .quote-zh { color: var(--text-dim); font-size: 13px; }
.home-page .panel .quote-author { color: var(--text-faint); font-size: 11.5px; }
.home-page .panel .rank-row { border-radius: 10px; padding: 6px 8px; }
.home-page .panel .rank-row:hover { background: var(--surface-2); }
.home-page .panel .festival-row { border-radius: 10px; padding: 7px 8px; }
.home-page .panel .festival-row:hover { background: var(--surface-2); }

/* ---------------------------------------------------------------------------
   十一、查词卡片（九要素）：从"灰色表格"变成"规格说明"的清爽排布
   ------------------------------------------------------------------------ */
.word-card { gap: 16px; }
.word-card .word-title { font-size: 38px; font-weight: 800; letter-spacing: -.6px; }
.word-card .word-flags { gap: 7px; }
.word-card .phonetic-row { font-size: 14.5px; color: var(--text-dim); }
.word-card .speak-btn {
  border: 1px solid var(--line-strong); background: var(--surface);
  border-radius: 999px; padding: 2px 10px; font-size: 12px; color: var(--text-dim);
  transition: border-color .16s ease, color .16s ease, background .16s ease;
}
.word-card .speak-btn:hover { border-color: var(--primary); color: var(--primary-strong); background: var(--primary-soft); }
.word-card .word-head .row { gap: 7px; }

.word-card .element { border-top: 1px solid var(--line); padding-top: 13px; }
.word-card .element-head {
  gap: 9px; margin-bottom: 8px;
  font-size: 13.5px; font-weight: 700; color: var(--text);
}
.word-card .element-head .idx {
  width: 22px; height: 22px; border-radius: 8px;
  background: var(--primary-soft); color: var(--primary-strong);
  font-size: 11.5px; font-weight: 800;
}
.word-card .meaning-list { gap: 6px; font-size: 15px; line-height: 1.6; }
.word-card .meaning-group { margin-bottom: 0; }
.word-card .pos-badge {
  min-width: 42px; border-radius: 8px; padding: 2px 8px;
  background: var(--primary-soft); color: var(--primary-strong);
  font-size: 12.5px; font-weight: 700;
}
.word-card .pill-list { gap: 8px; }
.word-card .pill {
  background: var(--surface); border: 1px solid var(--line-strong);
  border-radius: 11px; padding: 6px 11px; font-size: 13.5px;
  transition: border-color .16s ease, background .16s ease, color .16s ease;
}
.word-card .pill.click:hover { border-color: var(--primary); background: var(--primary-soft); color: var(--primary-strong); }
.word-card .pill .note { color: var(--text-faint); font-size: 11.5px; margin-left: 6px; }
.word-card .mini-add {
  border: 1px solid transparent; background: transparent;
  border-radius: 8px; padding: 1px 5px; font-size: 11.5px;
  color: var(--text-faint); opacity: .75;
  transition: opacity .16s ease, background .16s ease, border-color .16s ease;
}
.word-card .mini-add:hover { opacity: 1; background: var(--primary-soft); border-color: var(--primary); color: var(--primary-strong); }
.word-card .example {
  background: var(--surface-2); border-radius: 12px;
  border-left: 3px solid var(--primary);
  padding: 11px 14px; margin-bottom: 9px;
}
.word-card .example .en-line { font-size: 15px; line-height: 1.6; }
.word-card .example .zh-line { font-size: 13px; margin-top: 4px; }
.word-card .example .src { font-size: 11px; }
.word-card .correction-banner {
  background: var(--warn-soft); border: 1px solid var(--warn);
  border-radius: 12px; padding: 10px 13px; font-size: 13px;
}
.word-card .correction-banner b { color: var(--warn); }
.word-card .forms-row .chip, .word-card .chip { border-radius: 9px; }
/* ---------------------------------------------------------------------------
   十二、学习 · 批改 · 翻译
   ------------------------------------------------------------------------ */
.chips.mode-tabs { gap: 8px; margin: 14px 0; }
.chips.mode-tabs .chip { padding: 7px 16px; font-size: 13.5px; }
.learn-input .textarea {
  border-radius: var(--radius);
  min-height: 190px;
  padding: 16px 18px;
  font-size: 15px;
  line-height: 1.8;
  background: var(--surface);
}
.learn-actions { gap: 9px; }
.learn-actions .btn.ghost { border-radius: 999px; }

/* ---------------------------------------------------------------------------
   十三、时光日历
   ------------------------------------------------------------------------ */
.calendar-grid .cal-head { color: var(--text-faint); font-weight: 700; font-size: 12px; }
.calendar-grid .cal-cell {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  transition: border-color .16s ease, background .16s ease, box-shadow .16s ease;
}
.calendar-grid .cal-cell:hover { border-color: var(--primary); box-shadow: 0 6px 16px -12px var(--primary); }
.calendar-grid .cal-cell.empty { border-style: dashed; background: transparent; }
.calendar-grid .cal-cell.today {
  border-color: var(--primary); border-width: 2px;
  background: linear-gradient(160deg, var(--primary-soft), var(--surface) 70%);
  box-shadow: 0 8px 20px -14px var(--primary);
}
.calendar-grid .cal-cell.selected { border-color: var(--primary); box-shadow: var(--glow-ring); }
.calendar-grid .cal-cell.day-holiday { background: var(--danger-soft); }
.calendar-grid .cal-cell.day-rest { background: var(--surface-2); }
.calendar-grid .cal-cell.day-work { background: var(--warn-soft); }
.calendar-grid .cal-day { font-size: 17px; font-weight: 700; }
.calendar-grid .cal-lunar { color: var(--text-faint); font-size: 11px; }
.calendar-grid .cal-kind { border-radius: 6px; font-weight: 600; padding: 0 5px; }
.calendar-grid .cal-kind.kind-holiday { background: var(--danger); color: #fff; }
.calendar-grid .cal-kind.kind-rest { background: var(--surface-3); color: var(--text-dim); }
.calendar-grid .cal-kind.kind-work { background: var(--warn); color: #fff; }
.calendar-grid .cal-kind.kind-school { background: var(--info); color: #fff; }
.calendar-grid .cal-fest { color: var(--text-dim); font-size: 11px; }

/* ---------------------------------------------------------------------------
   十四、探讨社区（群聊）
   ------------------------------------------------------------------------ */
.chat-box { padding: 6px 4px 0; }
.chat-list { gap: 14px; padding: 12px 6px; }
.chat-avatar { width: 34px; height: 34px; border-radius: 12px; }
.chat-name { font-size: 13.5px; font-weight: 600; }
.bubble {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 14px 14px 14px 4px;
  padding: 9px 13px;
  font-size: 14.5px;
  max-width: 62ch;
}
.bubble.me {
  background: linear-gradient(140deg, var(--primary) 0%, var(--primary-mid, var(--primary)) 100%);
  border-color: transparent;
  color: var(--primary-ink);
  border-radius: 14px 14px 4px 14px;
}
.bubble.me a, .bubble.me .en { color: inherit; }
.chat-meta { color: var(--text-faint); font-size: 11.5px; margin-top: 3px; }
.chat-tools .btn { border-radius: 8px; }
.chat-input-row { border-top: 1px solid var(--line); padding: 10px 4px 4px; gap: 10px; }
.chat-input { border-radius: var(--radius-sm); }

/* ---------------------------------------------------------------------------
   十五、笔记本：纸张质感保留，边角收干净
   ------------------------------------------------------------------------ */
.nb-paper {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: repeating-linear-gradient(var(--surface), var(--surface) 27px, var(--line) 27px, var(--line) 28px);
  box-shadow: var(--shadow-sm);
}
.nb-tools .btn { border-radius: 999px; }
.nb-kind { border-radius: 999px; }
.nb-time { color: var(--text-faint); }

/* ---------------------------------------------------------------------------
   十六、排行榜
   ------------------------------------------------------------------------ */
.rank-list { gap: 8px; }
.rank-row { border: 1px solid var(--line); background: var(--surface); border-radius: 12px; }
.rank-row:hover { border-color: var(--primary); box-shadow: 0 8px 20px -16px var(--primary); }
.rank-row.me { border-color: var(--primary); background: var(--primary-soft); }
.rank-row.rank-1 { background: linear-gradient(96deg, var(--star-soft), var(--surface) 62%); border-color: transparent; }
.rank-row.rank-2 { background: linear-gradient(96deg, var(--surface-3), var(--surface) 62%); border-color: transparent; }
.rank-row.rank-3 { background: linear-gradient(96deg, var(--hot-soft), var(--surface) 62%); border-color: transparent; }
.rank-medal { font-size: 15px; font-weight: 800; }
.rank-name { font-weight: 600; }
.rank-val { color: var(--primary-strong); font-weight: 700; }

/* ---------------------------------------------------------------------------
   十七、文章
   ------------------------------------------------------------------------ */
.article-card { gap: 10px; border-radius: var(--radius-lg); }
.article-title { font-size: 18px; font-weight: 700; line-height: 1.5; }
.article-title:hover { color: var(--primary-strong); }
.article-intro { font-size: 14px; color: var(--text-dim); line-height: 1.75; }
.article-body { font-size: 15px; line-height: 1.85; }
.article-image, .article-thumb { border-radius: var(--radius); border: 1px solid var(--line); }
.article-line { padding: 2px 0; }
.post-head { padding-bottom: 2px; }

/* ---------------------------------------------------------------------------
   十八、个人中心 / 后台
   ------------------------------------------------------------------------ */
.avatar-big { border-radius: 22px; border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.avatar-grid { gap: 10px; }
.avatar-pick {
  border-radius: 16px; border: 2px solid transparent;
  transition: border-color .16s ease, transform .16s ease, box-shadow .16s ease;
}
.avatar-pick:hover { transform: translateY(-2px); border-color: var(--line-strong); }
.avatar-pick.active { border-color: var(--primary); box-shadow: var(--glow-ring); }
.stat-row { gap: 12px; }
.stat {
  padding: 12px 16px; border-radius: 14px;
  background: var(--surface-2); border: 1px solid var(--line);
  min-width: 96px;
}
.stat .num { font-size: 24px; font-weight: 800; color: var(--primary-strong); letter-spacing: -.4px; }
.stat .lab { font-size: 11.5px; color: var(--text-faint); margin-top: 2px; }
.theme-grid { gap: 12px; }
.theme-card {
  border: 1px solid var(--line); border-radius: 14px; padding: 12px; background: var(--surface);
  transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}
.theme-card:hover { border-color: var(--primary); transform: translateY(-2px); box-shadow: var(--shadow); }
.theme-card.active { border-color: var(--primary); box-shadow: var(--glow-ring); }
.theme-swatch { border-radius: 10px; overflow: hidden; }
.data-table { border-radius: 12px; overflow: hidden; }
.data-table th { background: var(--surface-2); }
.table-wrap { border: 1px solid var(--line); border-radius: 12px; }

/* 每日任务 */
.task-item { border: 1px solid var(--line); border-radius: 14px; }
.task-item .task-head { background: var(--surface-2); }
.task-item.done .task-head { background: var(--primary-soft); }
.task-body { border-top: 1px solid var(--line); }

/* ---------------------------------------------------------------------------
   十九、深色主题：把中性色换成"深底浅线"，文字保持浅色
   ------------------------------------------------------------------------ */
body[data-theme="hongkong"], body[data-theme="basketball"], body[data-theme="blackgold"],
body[data-theme="aurora"], body[data-theme="racing"] {
  --line: rgba(255, 255, 255, .09);
  --line-strong: rgba(255, 255, 255, .17);
  --dot-field: rgba(255, 255, 255, .05);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .35);
  --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 18px 40px -26px rgba(0, 0, 0, .85);
  --shadow-lg: 0 2px 6px rgba(0, 0, 0, .45), 0 36px 70px -34px rgba(0, 0, 0, .9);
}
body[data-theme="hongkong"] .site-header, body[data-theme="basketball"] .site-header,
body[data-theme="blackgold"] .site-header, body[data-theme="aurora"] .site-header,
body[data-theme="racing"] .site-header { border-bottom-color: rgba(255, 255, 255, .08); }

/* 深色主题：输入框 / 标签的底色重新贴近深色面板 */
body[data-theme="hongkong"] .input, body[data-theme="basketball"] .input,
body[data-theme="blackgold"] .input, body[data-theme="aurora"] .input,
body[data-theme="racing"] .input,
body[data-theme="hongkong"] .textarea, body[data-theme="basketball"] .textarea,
body[data-theme="blackgold"] .textarea, body[data-theme="aurora"] .textarea,
body[data-theme="racing"] .textarea {
  background: var(--surface-2);
  color: var(--text);
}
body[data-theme="hongkong"] .chip, body[data-theme="basketball"] .chip,
body[data-theme="blackgold"] .chip, body[data-theme="aurora"] .chip,
body[data-theme="racing"] .chip { background: var(--surface-2); }
body[data-theme="hongkong"] .chip.active, body[data-theme="basketball"] .chip.active,
body[data-theme="blackgold"] .chip.active, body[data-theme="aurora"] .chip.active,
body[data-theme="racing"] .chip.active { color: var(--primary-ink); }
body[data-theme="hongkong"] .btn.ghost, body[data-theme="basketball"] .btn.ghost,
body[data-theme="blackgold"] .btn.ghost, body[data-theme="aurora"] .btn.ghost,
body[data-theme="racing"] .btn.ghost { background: var(--surface-2); color: var(--text); }
body[data-theme="hongkong"] .calendar-grid .cal-cell.day-holiday,
body[data-theme="aurora"] .calendar-grid .cal-cell.day-holiday { background: rgba(248, 113, 113, .16); }
body[data-theme="hongkong"] .calendar-grid .cal-cell.day-work,
body[data-theme="aurora"] .calendar-grid .cal-cell.day-work { background: rgba(251, 191, 36, .14); }
body[data-theme="hongkong"] .bubble.me, body[data-theme="basketball"] .bubble.me,
body[data-theme="blackgold"] .bubble.me, body[data-theme="aurora"] .bubble.me,
body[data-theme="racing"] .bubble.me { color: var(--primary-ink); }

/* ---------------------------------------------------------------------------
   二十、窄屏适配：手机上一屏能看清，不挤不叠
   ------------------------------------------------------------------------ */
@media (max-width: 720px) {
  .page { padding: 16px 13px 48px; }
  .header-inner { padding: 8px 13px; gap: 10px; }
  .nav-item { padding: 6px 10px; font-size: 13px; }
  .home-page .search-hero { padding: 18px 16px 16px; border-radius: 20px; }
  .home-page .search-hero .search-actions .btn.ghost { padding: 6px 12px; }
  .home-page .search-hero .search-actions .faint { display: none; }
  .home-page .home-sec { margin: 22px 0 10px; }
  .home-page .home-sec h2 { font-size: 17.5px; }
  .home-page .today-word { padding: 18px 16px; }
  .home-page .word-en { font-size: 28px; }
  .home-page .music-card { padding: 18px 16px; }
  .home-page .music-card .vinyl { width: 104px; height: 104px; }
  .card.pad-lg { padding: 18px 16px; }
  #view > .card.pad-lg > h2:first-child,
  #view > .card.pad-lg > .row > div > h2:first-child { font-size: 20px; }
  .stat { min-width: 84px; padding: 10px 13px; }
}
/* ---------------------------------------------------------------------------
   二十一、细节修正（v3.1）
   ------------------------------------------------------------------------ */

/* 日历：日期字号收一点，"4 · 今天"不再折成两行 */
.calendar-grid .cal-day { font-size: 15.5px; line-height: 1.35; }
.calendar-grid .cal-cell.today .cal-day { font-size: 14.5px; white-space: nowrap; }

/* 个人中心「我的数据」：等宽网格，不再忽大忽小 */
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 10px; }
.stat-row .stat { min-width: 0; }

/* 排行榜前三名：金 / 银 / 铜（原来第三名是粉的，太跳） */
.rank-row.rank-3 { background: linear-gradient(96deg, var(--warn-soft), var(--surface) 62%); }

/* ---------------------------------------------------------------------------
   二十二、背景微调（v3.2）
   底色改用主题自己的 --bg-soft：梧桐是暖纸、校园是浅蓝、春是樱花白……
   这样换主题才像"换了整体风格"，而不是都压成同一种灰绿。
   点阵装饰只留给没有自带图案的"简约风"，避免两层图案打架。
   ------------------------------------------------------------------------ */
body[data-bg=""] {
  background-color: var(--bg-soft);
  background-image:
    radial-gradient(1100px 500px at 50% -170px, var(--primary-soft) 0%, rgba(255, 255, 255, 0) 66%),
    var(--body-pattern);
  background-size: auto, auto;
  background-attachment: fixed;
}
html[data-theme="simple"] body[data-bg=""] {
  background-image:
    radial-gradient(1100px 500px at 50% -170px, var(--primary-soft) 0%, rgba(255, 255, 255, 0) 66%),
    radial-gradient(var(--dot-field) 1px, rgba(0, 0, 0, 0) 1.4px);
  background-size: auto, 24px 24px;
}
body[data-theme="hongkong"][data-bg=""],
body[data-theme="basketball"][data-bg=""],
body[data-theme="blackgold"][data-bg=""],
body[data-theme="aurora"][data-bg=""],
body[data-theme="racing"][data-bg=""] {
  background-color: var(--bg);
  background-image:
    radial-gradient(1000px 460px at 50% -160px, var(--primary-soft) 0%, rgba(0, 0, 0, 0) 62%),
    var(--body-pattern);
  background-size: auto, auto;
  background-attachment: fixed;
}

/* ---------- 按住说话（语音输入）与短语中英对照 ---------- */
.hold-btn { touch-action: none; user-select: none; -webkit-user-select: none; }
.hold-btn.recording {
  background: var(--danger-soft, #fdecea) !important;
  border-color: var(--danger, #c0392b) !important;
  color: var(--danger, #c0392b) !important;
  animation: wg-hold-pulse 1.1s ease-in-out infinite;
}
@keyframes wg-hold-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(192, 57, 43, .35); }
  50% { box-shadow: 0 0 0 7px rgba(192, 57, 43, 0); }
}
.mini-tag {
  margin-left: 6px; font-size: 10.5px; padding: 1px 5px; border-radius: 6px;
  background: var(--surface-2, #f1f3f5); color: var(--text-faint, #868e96);
}
.sentence-keywords .kw {
  display: inline-flex; flex-direction: column; align-items: flex-start;
  line-height: 1.3; padding: 2px 6px;
}
.sentence-keywords .kw .kw-zh { font-size: 11px; color: var(--text-faint, #868e96); }

/* 播放器的 <audio> 藏在这里：放进文档里，移动端切后台 / 锁屏更稳（不要用 display:none） */
.music-audio-holder {
  position: fixed; top: 0; left: -9999px; width: 1px; height: 1px;
  overflow: hidden; opacity: 0; pointer-events: none;
}
/* 「继续播放」：整页刷新后浏览器拦了自动播放时露出来 */
.music-resume-row {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin: 4px 0 8px;
}

/* ---------- 群公告：首页那条细长公告 + 公告页（历史记录 / 全文） ---------- */
.notice-bar {
  display: flex; align-items: flex-start; gap: 14px;
  padding: 14px 18px; border-radius: 16px;
}
.notice-bar .notice-badge {
  flex: none; width: 34px; height: 34px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  background: var(--primary-soft); font-size: 17px;
}
.notice-bar .notice-main { flex: 1 1 auto; min-width: 0; }
.notice-bar .notice-line { font-size: 15px; line-height: 1.5; }
.notice-bar .notice-text {
  margin-top: 4px; color: var(--text-dim); font-size: 13.5px; line-height: 1.6;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.notice-bar .notice-side {
  flex: none; display: flex; flex-direction: column; gap: 6px;
  align-items: flex-end; text-align: right;
}

.notice-page-title { margin: 0; font-size: 22px; font-weight: 800; letter-spacing: .3px; }
.notice-head-row { gap: 12px; flex-wrap: wrap; margin-bottom: 14px; align-items: flex-start; }
.notice-list { gap: 14px; }
.notice-card { display: flex; flex-direction: column; gap: 8px; }
.notice-title { margin: 0; font-size: 17px; font-weight: 700; line-height: 1.5; }
.notice-title a { color: inherit; text-decoration: none; }
.notice-title a:hover { color: var(--primary); text-decoration: underline; }
.notice-title-lg { margin: 0; font-size: 22px; font-weight: 800; line-height: 1.4; }
.notice-meta {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  color: var(--text-faint); font-size: 12.5px;
}
.notice-author { display: inline-flex; align-items: center; gap: 6px; color: var(--text-dim); }
.notice-body {
  white-space: pre-wrap; word-break: break-word;
  line-height: 1.8; font-size: 15px; color: var(--text);
}
.notice-body.clamp {
  display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical;
  overflow: hidden; color: var(--text-dim);
}
.notice-foot { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 2px; }
.notice-tools { display: inline-flex; gap: 6px; }
.notice-more { margin-top: 14px; }
.notice-empty { text-align: center; padding: 26px 18px; }
.notice-empty-title { font-size: 16px; font-weight: 700; margin-bottom: 6px; }
.notice-back { margin-bottom: 10px; }
.notice-others { margin-top: 14px; display: flex; flex-direction: column; }
.notice-other-row {
  display: flex; justify-content: space-between; gap: 10px; align-items: baseline;
  padding: 9px 4px; border-bottom: 1px dashed var(--border);
  text-decoration: none; color: inherit;
}
.notice-other-row:last-child { border-bottom: none; }
.notice-other-row:hover { color: var(--primary); }
.notice-other-title { font-size: 14px; }

@media (max-width: 720px) {
  .notice-bar { flex-wrap: wrap; }
  .notice-bar .notice-side {
    width: 100%; flex-direction: row; flex-wrap: wrap; justify-content: flex-start; text-align: left;
  }
  .notice-page-title { font-size: 19px; }
  .notice-title-lg { font-size: 19px; }
  .notice-title { font-size: 16px; }
}
