/* 主题分析 — 每页独立版式（仅 body.app-v2） */

body.app-v2 #screen-themes .theme-tab__icon {
  color: var(--v2-gold) !important;
  opacity: 0.52;
  transition: color 0.22s ease, opacity 0.22s ease, transform 0.22s ease;
}

body.app-v2 #screen-themes .theme-tab.active .theme-tab__icon {
  color: var(--v2-wine) !important;
  opacity: 1;
  transform: scale(1.06);
}

body.app-v2 #screen-themes .theme-tab__icon svg {
  width: 20px;
  height: 20px;
}

body.app-v2 #screen-themes .theme-panel__icon svg {
  width: 22px;
  height: 22px;
}

body.app-v2 #screen-themes .theme-tab__text,
body.app-v2 #screen-themes .theme-panel__title,
body.app-v2 #screen-themes .theme-char-name {
  font-family: 'Noto Serif SC', var(--v2-font-body-cn) !important;
}

body.app-v2 #screen-themes .theme-panel__intro,
body.app-v2 #screen-themes .theme-char-text {
  font-family: 'Noto Serif SC', var(--v2-font-body-cn);
}

/* ── 页面级 tint ── */
body.app-v2 #screen-themes[data-theme="love"] .theme-page-body {
  --theme-primary: var(--v2-wine);
}

body.app-v2 #screen-themes[data-theme="land"] .theme-page-body {
  --theme-primary: var(--v2-forest);
}

body.app-v2 #screen-themes[data-theme="class"] .theme-page-body {
  --theme-primary: #7a6f68;
}

body.app-v2 #screen-themes[data-theme="death"] .theme-page-body {
  --theme-primary: #5c4a72;
}

body.app-v2 #screen-themes[data-theme="freedom"] .theme-page-body {
  --theme-primary: var(--v2-gold);
}

body.app-v2 #screen-themes[data-theme="motherhood"] .theme-page-body {
  --theme-primary: #5a6b42;
}

body.app-v2 #screen-themes[data-theme="marriage"] .theme-page-body {
  --theme-primary: #9a6840;
}

body.app-v2 #screen-themes[data-theme="modernity"] .theme-page-body {
  --theme-primary: #3d5a7a;
}

/* ── 共用：重置 v2-design 统一顶栏，交给各主题 ── */
body.app-v2 #screen-themes .theme-panel {
  border-top: none !important;
}

body.app-v2 #screen-themes .theme-panel::before {
  display: none;
}

body.app-v2 #screen-themes .theme-char-card::before {
  display: none;
}

/* ═══ love — 左缘酒红竖条 + 圆形头像 ═══ */
body.app-v2 #screen-themes .theme-panel--love {
  border-left: 4px solid var(--v2-wine) !important;
  border-radius: 0 var(--v2-radius) var(--v2-radius) var(--v2-radius) !important;
  background:
    radial-gradient(ellipse 120% 80% at 100% 0%, rgba(158, 58, 74, 0.07), transparent 55%),
    rgba(255, 252, 248, 0.92) !important;
}

body.app-v2 #screen-themes .theme-panel--love .theme-panel__head {
  border-bottom-color: rgba(158, 58, 74, 0.16);
}

body.app-v2 #screen-themes .theme-panel--love .theme-panel__icon {
  border-radius: 50%;
  background: rgba(158, 58, 74, 0.1);
  border-color: rgba(158, 58, 74, 0.28);
  color: var(--v2-wine);
}

body.app-v2 #screen-themes .theme-panel--love .theme-quote__bar {
  background: linear-gradient(180deg, var(--v2-wine) 0%, rgba(158, 58, 74, 0.45) 100%);
}

body.app-v2 #screen-themes .theme-panel--love .theme-char-avatar {
  border-radius: 50% !important;
  box-shadow: 0 0 0 2px rgba(158, 58, 74, 0.18), var(--v2-shadow-soft) !important;
}

body.app-v2 #screen-themes .theme-panel--love .theme-char-card {
  border-left: 3px solid rgba(158, 58, 74, 0.22);
}

/* ═══ land — 顶饰麦穗带 + 圆角方头像 ═══ */
body.app-v2 #screen-themes .theme-panel--land {
  border-top: 3px solid var(--v2-forest) !important;
  border-radius: 0 0 var(--v2-radius) var(--v2-radius) !important;
  background:
    linear-gradient(180deg, rgba(61, 92, 72, 0.08) 0%, transparent 42%),
    rgba(255, 252, 248, 0.93) !important;
}

body.app-v2 #screen-themes .theme-panel--land .theme-panel__head::after {
  content: '';
  position: absolute;
  left: 16px;
  right: 16px;
  top: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--v2-gold-light), transparent);
}

body.app-v2 #screen-themes .theme-panel--land .theme-panel__head {
  position: relative;
  padding-top: 6px;
  border-bottom-color: rgba(61, 92, 72, 0.14);
}

body.app-v2 #screen-themes .theme-panel--land .theme-panel__icon {
  border-radius: 10px;
  background: rgba(61, 92, 72, 0.1);
  border-color: rgba(61, 92, 72, 0.25);
  color: var(--v2-forest);
}

body.app-v2 #screen-themes .theme-panel--land .theme-quote__pull {
  border-top: 2px solid var(--v2-forest);
  border-left: none;
}

body.app-v2 #screen-themes .theme-panel--land .theme-quote__bar {
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--v2-forest), var(--v2-gold-light));
}

body.app-v2 #screen-themes .theme-panel--land .theme-quote__pull {
  flex-direction: column;
}

body.app-v2 #screen-themes .theme-panel--land .theme-char-avatar {
  border-radius: 12px !important;
  box-shadow: 0 0 0 2px rgba(61, 92, 72, 0.16), var(--v2-shadow-soft) !important;
}

body.app-v2 #screen-themes .theme-panel--land .theme-char-card {
  background: linear-gradient(135deg, rgba(255, 252, 248, 0.96) 0%, rgba(61, 92, 72, 0.06) 100%) !important;
}

/* ═══ class — 正式双框 + 方角头像 ═══ */
body.app-v2 #screen-themes .theme-panel--class {
  border: 1px solid rgba(122, 111, 104, 0.28) !important;
  outline: 1px solid rgba(184, 146, 46, 0.18);
  outline-offset: 4px;
  border-radius: 2px !important;
  background: rgba(255, 252, 248, 0.94) !important;
}

body.app-v2 #screen-themes .theme-panel--class .theme-panel__head {
  border-bottom: 1px double rgba(122, 111, 104, 0.22);
}

body.app-v2 #screen-themes .theme-panel--class .theme-panel__icon {
  border-radius: 4px;
  background: rgba(122, 111, 104, 0.08);
  color: #6b635c;
}

body.app-v2 #screen-themes .theme-panel--class .theme-quote__pull {
  border: 1px solid rgba(122, 111, 104, 0.2);
  border-radius: 2px;
  background: rgba(250, 246, 240, 0.85);
}

body.app-v2 #screen-themes .theme-panel--class .theme-quote__bar {
  background: repeating-linear-gradient(
    180deg,
    #7a6f68 0,
    #7a6f68 4px,
    transparent 4px,
    transparent 8px
  );
}

body.app-v2 #screen-themes .theme-panel--class .theme-char-avatar {
  border-radius: 6px !important;
}

body.app-v2 #screen-themes .theme-panel--class .theme-char-card {
  border-radius: 2px !important;
  border-top: 1px solid rgba(184, 146, 46, 0.22);
}

body.app-v2 #screen-themes .theme-panel--class .theme-char-card + .theme-char-card {
  margin-top: 2px;
}

/* ═══ death — 紫灰洗 + 极简引文 ═══ */
body.app-v2 #screen-themes .theme-panel--death {
  background:
    url("data:image/svg+xml,%3Csvg width='48' height='48' viewBox='0 0 48 48' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M24 8v32M16 16h16' stroke='%235c4a72' stroke-width='0.4' fill='none' opacity='0.35'/%3E%3C/svg%3E"),
    linear-gradient(165deg, rgba(92, 74, 114, 0.06) 0%, rgba(255, 252, 248, 0.94) 48%) !important;
  border: 1px solid rgba(92, 74, 114, 0.18) !important;
  border-radius: var(--v2-radius) !important;
}

body.app-v2 #screen-themes .theme-panel--death .theme-panel__icon {
  border-radius: 50%;
  background: rgba(92, 74, 114, 0.1);
  border-color: rgba(92, 74, 114, 0.22);
  color: #5c4a72;
}

body.app-v2 #screen-themes .theme-panel--death .theme-quote.theme-quote--v2 {
  margin-bottom: 18px;
}

body.app-v2 #screen-themes .theme-panel--death .theme-quote__pull {
  border: none;
  border-top: 1px solid rgba(92, 74, 114, 0.22);
  border-bottom: 1px solid rgba(92, 74, 114, 0.22);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

body.app-v2 #screen-themes .theme-panel--death .theme-quote__bar {
  display: none;
}

body.app-v2 #screen-themes .theme-panel--death .theme-quote__content {
  padding: 14px 8px;
  text-align: center;
}

body.app-v2 #screen-themes .theme-panel--death .theme-quote__text {
  color: #4a3d58 !important;
}

body.app-v2 #screen-themes .theme-panel--death .theme-char-avatar {
  border-radius: 50% !important;
  filter: grayscale(0.15);
  box-shadow: 0 0 0 2px rgba(92, 74, 114, 0.2), var(--v2-shadow-soft) !important;
}

body.app-v2 #screen-themes .theme-panel--death .theme-char-card {
  background: rgba(255, 252, 248, 0.72) !important;
  border-style: dashed;
  border-color: rgba(92, 74, 114, 0.16);
}

/* ═══ freedom — 金芒渐变 + 交错卡片 ═══ */
body.app-v2 #screen-themes .theme-panel--freedom {
  background:
    conic-gradient(from 210deg at 90% 8%, rgba(212, 184, 106, 0.14), transparent 38%),
    rgba(255, 252, 248, 0.93) !important;
  border: 1px solid rgba(184, 146, 46, 0.28) !important;
  border-radius: var(--v2-radius) !important;
}

body.app-v2 #screen-themes .theme-panel--freedom .theme-panel__head {
  border-bottom: none;
  padding-bottom: 4px;
}

body.app-v2 #screen-themes .theme-panel--freedom .theme-panel__intro {
  padding: 0 4px 14px;
  border-bottom: 1px solid rgba(184, 146, 46, 0.2);
  margin-bottom: 16px;
}

body.app-v2 #screen-themes .theme-panel--freedom .theme-panel__icon {
  border-radius: 50%;
  background: radial-gradient(circle, rgba(212, 184, 106, 0.28), rgba(212, 184, 106, 0.08));
  border-color: rgba(184, 146, 46, 0.35);
  color: var(--v2-gold);
}

body.app-v2 #screen-themes .theme-panel--freedom .theme-quote__mark {
  opacity: 0.32;
  color: var(--v2-gold);
}

body.app-v2 #screen-themes .theme-panel--freedom .theme-quote__bar {
  background: linear-gradient(180deg, var(--v2-gold-light), var(--v2-gold));
}

body.app-v2 #screen-themes .theme-panel--freedom .theme-char-avatar {
  border-radius: 50% !important;
  box-shadow:
    0 0 0 2px rgba(255, 252, 248, 0.95),
    0 0 0 4px rgba(184, 146, 46, 0.28),
    var(--v2-shadow-soft) !important;
}

body.app-v2 #screen-themes .theme-panel--freedom .theme-char-card:nth-of-type(2n) {
  margin-left: 10px;
}

body.app-v2 #screen-themes .theme-panel--freedom .theme-char-card:nth-of-type(2n + 1) {
  margin-right: 10px;
}

/* ═══ motherhood — 暖橄榄 + 全圆头像 ═══ */
body.app-v2 #screen-themes .theme-panel--motherhood {
  background:
    radial-gradient(circle at 12% 88%, rgba(90, 107, 66, 0.1), transparent 45%),
    rgba(255, 252, 248, 0.94) !important;
  border: 1px solid rgba(90, 107, 66, 0.2) !important;
  border-radius: 18px !important;
}

body.app-v2 #screen-themes .theme-panel--motherhood .theme-panel__icon {
  border-radius: 14px;
  background: rgba(90, 107, 66, 0.1);
  border-color: rgba(90, 107, 66, 0.24);
  color: #5a6b42;
}

body.app-v2 #screen-themes .theme-panel--motherhood .theme-quote__pull {
  border-radius: 999px;
  padding: 2px;
  background: linear-gradient(135deg, rgba(90, 107, 66, 0.12), rgba(243, 230, 200, 0.5));
}

body.app-v2 #screen-themes .theme-panel--motherhood .theme-quote__content {
  border-radius: 999px;
  background: rgba(255, 252, 248, 0.92);
}

body.app-v2 #screen-themes .theme-panel--motherhood .theme-quote__bar {
  border-radius: 999px 0 0 999px;
  background: #5a6b42;
}

body.app-v2 #screen-themes .theme-panel--motherhood .theme-char-avatar {
  border-radius: 50% !important;
  width: 54px !important;
  height: 54px !important;
}

body.app-v2 #screen-themes .theme-panel--motherhood .theme-char-card {
  border-radius: 16px !important;
  background: linear-gradient(180deg, rgba(255, 252, 248, 0.98), rgba(90, 107, 66, 0.05)) !important;
}

/* ═══ marriage — 铜金双饰 + 竖双条引文 ═══ */
body.app-v2 #screen-themes .theme-panel--marriage {
  border-top: 3px double #9a6840 !important;
  border-radius: 0 0 var(--v2-radius) var(--v2-radius) !important;
  background:
    linear-gradient(180deg, rgba(154, 104, 64, 0.07) 0%, transparent 36%),
    rgba(255, 252, 248, 0.93) !important;
}

body.app-v2 #screen-themes .theme-panel--marriage .theme-panel__icon {
  border-radius: 8px;
  background: rgba(154, 104, 64, 0.1);
  border-color: rgba(154, 104, 64, 0.28);
  color: #9a6840;
}

body.app-v2 #screen-themes .theme-panel--marriage .theme-quote__pull {
  position: relative;
  padding-left: 10px;
}

body.app-v2 #screen-themes .theme-panel--marriage .theme-quote__pull::before {
  content: '';
  position: absolute;
  left: 3px;
  top: 10px;
  bottom: 10px;
  width: 3px;
  border-radius: 1px;
  background: #9a6840;
  box-shadow: 6px 0 0 rgba(184, 146, 46, 0.55);
}

body.app-v2 #screen-themes .theme-panel--marriage .theme-quote__bar {
  display: none;
}

body.app-v2 #screen-themes .theme-panel--marriage .theme-char-avatar {
  border-radius: 10px 10px 10px 2px !important;
}

body.app-v2 #screen-themes .theme-panel--marriage .theme-char-card {
  border-left: 2px solid rgba(154, 104, 64, 0.2);
  border-right: 2px solid rgba(184, 146, 46, 0.14);
}

/* ═══ modernity — 钢蓝几何 + 顶横条卡片 ═══ */
body.app-v2 #screen-themes .theme-panel--modernity {
  background:
    url("data:image/svg+xml,%3Csvg width='32' height='32' viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 16h32M16 0v32' stroke='%233d5a7a' stroke-width='0.35' opacity='0.25'/%3E%3C/svg%3E"),
    linear-gradient(135deg, rgba(61, 90, 122, 0.05) 0%, rgba(255, 252, 248, 0.95) 55%) !important;
  border: 1px solid rgba(61, 90, 122, 0.2) !important;
  border-radius: 4px !important;
}

body.app-v2 #screen-themes .theme-panel--modernity .theme-panel__head {
  border-bottom: 2px solid rgba(61, 90, 122, 0.12);
}

body.app-v2 #screen-themes .theme-panel--modernity .theme-panel__icon {
  border-radius: 4px;
  background: rgba(61, 90, 122, 0.08);
  border-color: rgba(61, 90, 122, 0.22);
  color: #3d5a7a;
}

body.app-v2 #screen-themes .theme-panel--modernity .theme-quote__pull {
  border-left: 4px solid #3d5a7a;
  border-radius: 0 var(--v2-radius-sm) var(--v2-radius-sm) 0;
}

body.app-v2 #screen-themes .theme-panel--modernity .theme-quote__bar {
  display: none;
}

body.app-v2 #screen-themes .theme-panel--modernity .theme-char-avatar {
  border-radius: 4px !important;
}

body.app-v2 #screen-themes .theme-panel--modernity .theme-char-card {
  border-radius: 4px !important;
  border-top: 3px solid rgba(61, 90, 122, 0.28);
  background: rgba(255, 252, 248, 0.88) !important;
}

@media (prefers-reduced-motion: reduce) {
  body.app-v2 #screen-themes .theme-tab__icon {
    transition: none;
  }
}
