/* =========================================================
   十二神大圣堂 · 粉白婚礼风界面
   主题（data-theme）：chapel 晨光粉白 / rose 玫瑰园 / lily 百合白 / dusk 黄昏礼拜
   背景（data-bg）：halo 柔光 / petal 花瓣 / plain 素净
   ========================================================= */

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ---------- 默认主题：晨光粉白（四改：微粉白底 + 低饱和玫瑰灰主色） ---------- */
:root {
  --bg: #fdf8f9;
  --card: #ffffff;
  --card-2: #fdf7f9;
  --ink: #3a3438;
  --ink-soft: #665c63;
  --ink-faint: #756a72;
  --accent: #a35c73;
  --accent-deep: #88445a;
  --accent-ink: #7f3f57;
  --accent-soft: #f7e9ee;
  --accent-line: #e3bcc8;
  --line: #efe4e8;
  --field-line: #9f8794;   /* 表单控件描边：对填充 ≥3:1，控件边界看得清 */
  --gold: #a97f47;
  --deco-1: #ffe9ef;
  --deco-2: #fbe7f0;
  --petal: rgba(203, 154, 176, 0.26);
  --shadow: 0 8px 24px rgba(150, 110, 125, 0.08);
}

html[data-theme="rose"] {
  --bg: #fbeef2;
  --card: #fffbfc;
  --card-2: #fdf6f9;
  --ink: #3a2f35;
  --ink-soft: #685961;
  --ink-faint: #766570;
  --accent: #a4566f;
  --accent-deep: #873d57;
  --accent-ink: #7e3951;
  --accent-soft: #f6e4ea;
  --accent-line: #e1b3c2;
  --line: #f0dde4;
  --field-line: #9f8794;
  --gold: #a5763f;
  --deco-1: #ffddea;
  --deco-2: #f8d7e6;
  --petal: rgba(198, 128, 158, 0.22);
  --shadow: 0 8px 24px rgba(150, 100, 125, 0.08);
}

html[data-theme="lily"] {
  --bg: #fbfafb;
  --card: #ffffff;
  --card-2: #f9f7f9;
  --ink: #353036;
  --ink-soft: #625a64;
  --ink-faint: #6f6674;
  --accent: #96637a;
  --accent-deep: #7a4257;
  --accent-ink: #734053;
  --accent-soft: #f2e7ed;
  --accent-line: #cdb2bf;
  --line: #eae5eb;
  --field-line: #9a8791;
  --gold: #96703d;
  --deco-1: #f4eef2;
  --deco-2: #eef0f6;
  --petal: rgba(140, 124, 138, 0.16);
  --shadow: 0 8px 24px rgba(120, 108, 122, 0.07);
}

html[data-theme="dusk"] {
  --bg: #faf4ee;
  --card: #fffdfb;
  --card-2: #fdf8f3;
  --ink: #3d342e;
  --ink-soft: #6a5b53;
  --ink-faint: #786860;
  --accent: #9d6055;
  --accent-deep: #834740;
  --accent-ink: #7c4740;
  --accent-soft: #f7e8e0;
  --accent-line: #e0bfb3;
  --line: #efe3da;
  --field-line: #9d8981;
  --gold: #9c7038;
  --deco-1: #ffe9dc;
  --deco-2: #f9e6ea;
  --petal: rgba(190, 145, 125, 0.20);
  --shadow: 0 8px 24px rgba(150, 118, 100, 0.08);
}

html {
  background: var(--bg);
}

body {
  font-family: "Microsoft YaHei", "Segoe UI", system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.75;
  color: var(--ink);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ---------- 背景层（可选：柔光 / 花瓣 / 素净） ---------- */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}

html[data-bg="halo"] body::before {
  background:
    radial-gradient(1100px 640px at 50% -10%, var(--deco-1) 0%, transparent 62%),
    radial-gradient(820px 560px at 100% 108%, var(--deco-2) 0%, transparent 58%);
}

html[data-bg="petal"] body::before {
  background-image:
    radial-gradient(circle at 14px 18px, var(--petal) 0 2.5px, transparent 3px),
    radial-gradient(circle at 66px 78px, var(--petal) 0 1.8px, transparent 2.4px),
    radial-gradient(900px 520px at 50% -12%, var(--deco-1) 0%, transparent 65%);
  background-size: 104px 104px, 148px 148px, 100% 100%;
}

html[data-bg="plain"] body::before {
  background: none;
}

/* ---------- 版心 ---------- */
.app {
  max-width: 720px;
  margin: 0 auto;
  padding: 22px 16px 32px;
}

header {
  text-align: center;
  padding: 20px 0 18px;
}

h1 {
  font-family: "Noto Serif SC", "Source Han Serif SC", "Songti SC", "STSong", "SimSun", serif;
  font-size: 32px;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: 0.18em;
  text-indent: 0.18em;
  color: var(--accent-ink);
}

.ornament {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 10px 0 8px;
}

.ornament span {
  display: block;
  width: 58px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent-line));
}

.ornament span:last-child {
  background: linear-gradient(90deg, var(--accent-line), transparent);
}

.ornament i {
  display: block;
  width: 7px;
  height: 7px;
  background: var(--accent-line);
  transform: rotate(45deg);
}

.sub {
  color: var(--ink-faint);
  font-size: 13.5px;
  letter-spacing: 0.02em;
}

/* ---------- 会场风格选择条 ---------- */
.style-bar {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px; /* 与卡片圆角统一（四改：圆角/间距收敛） */
  padding: 12px 14px;
  margin-bottom: 18px;
  box-shadow: 0 6px 18px rgba(150, 110, 125, 0.07);
  display: grid;
  gap: 8px;
}

.style-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.style-label {
  min-width: 66px;
  font-size: 13px;
  color: var(--ink-soft);
  letter-spacing: 0.04em;
}

.style-opts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.style-note {
  font-size: 12px;
  color: var(--ink-faint);
  margin-left: auto;
}

/* 五改：会场主题可收纳（默认收起，折叠状态记在 localStorage） */
.style-details {
  border: 1px dashed var(--line);
  border-radius: 12px;
  padding: 4px 10px;
  background: var(--card-2);
}

.style-details > summary {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 0;
  cursor: pointer;
  list-style: none;
  text-decoration: none;
}

/* 六改：悬停时不要出现下划线（全局 details summary:hover 会加，这里压掉） */
.style-details > summary:hover,
.style-details > summary:focus {
  text-decoration: none;
}

.style-summary-hint {
  font-size: 12px;
  color: var(--ink-faint);
  letter-spacing: 0.02em;
}

.style-details > summary::-webkit-details-marker {
  display: none;
}

.style-details > summary::after {
  content: '▾';
  margin-left: 4px;
  color: var(--ink-faint);
  transition: transform 0.18s;
}

.style-details[open] > summary::after {
  transform: rotate(180deg);
}

.style-optional {
  font-size: 11.5px;
  padding: 1px 7px;
  border-radius: 999px;
  background: var(--accent-soft);
  border: 1px solid var(--accent-line);
  color: var(--accent-ink);
}

.style-details .style-opts {
  margin: 6px 0 8px;
}

.style-details .style-row {
  margin: 4px 0;
}

.style-clear {
  margin-bottom: 0;
  font-size: 12.5px;
}

.style-foot {
  display: flex;
  justify-content: flex-end;
}

.style-foot .stats-line {
  margin: 2px 0 0;
  padding: 0;
  background: none;
  border: none;
  border-radius: 0;
  font-size: 13px;
  color: var(--ink-faint);
  text-align: right;
}

button.opt {
  margin: 0;
  padding: 6px 13px;
  font-size: 13.5px;
  font-weight: 500;
  border-radius: 999px;
  background: var(--card-2);
  color: var(--ink-soft);
  border: 1px solid var(--line);
  box-shadow: none;
  transition: background 0.18s, border-color 0.18s, color 0.18s;
}

button.opt:hover {
  border-color: var(--accent-line);
  color: var(--accent-ink);
  filter: none;
}

button.opt[aria-pressed="true"] {
  background: var(--accent-soft);
  border-color: var(--accent-line);
  color: var(--accent-ink);
  font-weight: 600;
}

/* ---------- 卡片 ---------- */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 20px 18px;
  margin: 0 0 18px;
  box-shadow: var(--shadow);
}

h2 {
  position: relative;
  padding-left: 12px;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: 0.03em;
  color: var(--ink);
  margin-bottom: 12px;
}

h2::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.32em;
  width: 3px;
  height: 1.05em;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--accent-line), var(--accent-soft));
}

.tip,
.muted {
  color: var(--ink-faint);
  font-size: 13.5px;
  line-height: 1.8;
}

.tip {
  margin: 4px 0 10px;
}

.tip b {
  color: var(--ink-soft);
}

/* ---------- 表单 ---------- */
input[type=text],
input[type=password],
select,
textarea {
  width: 100%;
  padding: 12px 13px;
  border: 1px solid var(--field-line); /* 四改：表单描边提到 ≥3:1，控件边界看得清但仍细 */
  border-radius: 10px;
  background: var(--card-2);
  color: var(--ink);
  margin: 8px 0;
  font-family: inherit;
  font-size: 15px;
  line-height: 1.6;
  transition: border-color 0.18s, box-shadow 0.18s;
}

input[type=text]::placeholder,
textarea::placeholder {
  color: var(--ink-faint);
  opacity: 0.85;
}

input[type=text]:focus,
input[type=password]:focus,
select:focus,
textarea:focus {
  border-color: var(--accent-line);
  box-shadow: 0 0 0 3px var(--accent-soft);
  outline: none;
}

textarea {
  resize: vertical;
  min-height: 108px;
}

select {
  cursor: pointer;
}

select option {
  background: var(--card);
  color: var(--ink);
}

button {
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
  padding: 11px 20px;
  border: 0;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--accent), var(--accent-deep));
  color: #fff;
  cursor: pointer;
  margin: 10px 8px 0 0;
  box-shadow: 0 4px 12px rgba(136, 68, 90, 0.14); /* 四改：阴影调淡，主色降饱和 */
  transition: filter 0.18s, transform 0.12s;
}

button:hover {
  filter: brightness(1.04);
}

button:active {
  transform: translateY(1px);
}

button.danger {
  background: linear-gradient(135deg, #a8564e, #8a3f38);
  box-shadow: 0 4px 12px rgba(138, 63, 56, 0.14);
}

button:focus-visible,
.opt:focus-visible,
a:focus-visible {
  outline: 2px solid var(--accent-deep);
  outline-offset: 2px;
}

/* ---------- 标签胶囊 ---------- */
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0 2px;
}

/* 自定义标签区：展开/收起、加载更多按钮行 */
#extra-tags-more {
  justify-content: flex-start;
  flex-wrap: wrap;
  border-top: 0;
  padding: 2px 0 0;
  gap: 8px;
}

#extra-tags-more:empty {
  display: none;
}

.tag {
  display: inline-block;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--ink-soft);
  background: var(--card-2);
  cursor: pointer;
  user-select: none;
  transition: background 0.18s, border-color 0.18s, color 0.18s;
}

.tag:hover {
  border-color: var(--accent-line);
  color: var(--accent-ink);
}

/* 四改需求 3：TAG 选中态必须「看得见」——
   .tag.on 负责整颗胶囊的高亮填充；input 复选框本身从 display:none 改为可见，
   :checked 时主色填充 + 白色勾；键盘 Tab 走 :focus-visible 焦点环。 */
.tag.on {
  background: var(--accent-soft);
  border-color: var(--accent-line);
  color: var(--accent-ink);
  font-weight: 600;
  box-shadow: inset 0 0 0 1px var(--accent-line);
}

.tags .tag {
  margin-bottom: 0;   /* 抵消 .field-group label 的下边距，胶囊行距统一 */
  font-size: 13.5px;
  line-height: 1.5;
}

.tag input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  display: inline-block;
  vertical-align: -2px;
  width: 15px;
  height: 15px;
  margin: 0 6px 0 0;
  padding: 0;
  border: 1.5px solid var(--field-line); /* 未选中也要看得见（≥3:1），选中改主色填充 */
  border-radius: 4px;
  background: var(--card);
  cursor: pointer;
  transition: background-color 0.15s, border-color 0.15s;
}

.tag input[type="checkbox"]:hover {
  border-color: var(--accent);
}

.tag input[type="checkbox"]:checked {
  background-color: var(--accent-deep);
  border-color: var(--accent-deep);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.4 6.3l2.4 2.4 4.8-5.2' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-size: 12px 12px;
  background-position: center;
  background-repeat: no-repeat;
}

.tag input[type="checkbox"]:focus {
  outline: none;
}

.tag input[type="checkbox"]:focus-visible {
  outline: 2px solid var(--accent-deep);
  outline-offset: 2px;
}

/* 玩法偏好：管理员可配置的图文选项（短名 + 一句说明 + 分组） */
.tag-group {
  margin: 10px 0 0;
}

.tag-group-title {
  margin: 0 0 2px;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--accent-ink);
  opacity: 0.86;
}

.tag-rich {
  display: inline-flex;
  align-items: flex-start;
  max-width: 100%;
  border-radius: 14px;
  padding: 8px 13px;
}

.tag-rich .tag-main {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.tag-rich .tag-name {
  font-size: 13.5px;
  line-height: 1.35;
  white-space: nowrap;
}

.tag-rich .tag-desc {
  font-size: 11.5px;
  font-weight: 400;
  line-height: 1.35;
  color: var(--ink-faint);
  white-space: normal;
}

.tag-rich.on .tag-desc {
  color: var(--accent-ink);
  opacity: 0.82;
}

/* 后台：玩法偏好选项编辑区 */
.pref-set {
  margin: 18px 0 24px;
  padding-top: 14px;
  border-top: 1px dashed var(--line);
}

.pref-set h3 {
  margin-bottom: 6px;
  font-size: 16px;
}

.pref-item {
  margin: 10px 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card-2);
}

.pref-item.pref-off {
  opacity: 0.62;
}

.pref-row-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.pref-desc {
  margin: 6px 0 0;
}

.pref-edit-row,
.pref-add {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.pref-edit-row input,
.pref-add input {
  flex: 1 1 130px;
  min-width: 90px;
}

.pref-edit-row button,
.pref-add button {
  flex: 0 0 auto;
  margin: 0;
  padding: 6px 10px;
  font-size: 12.5px;
}

.pref-meta {
  margin: 6px 0 0;
  font-size: 11.5px;
}

.field-group {
  margin: 18px 0;
}

.field-group label {
  display: block;
  font-size: 14px;
  line-height: 1.65;
  color: var(--ink-soft);
  margin-bottom: 6px;
}

.field-group label.muted {
  font-size: 13px;
  color: var(--ink-faint);
  margin: 8px 0 0;
}

#more-pref .field-group > label strong {
  font-weight: 700;
  color: inherit;
}

.appeal-nick-row {
  display: flex;
  align-items: stretch;
  gap: 8px;
}

.appeal-nick-row input {
  flex: 1 1 auto;
  min-width: 0;
}

.appeal-nick-row button {
  flex: 0 0 auto;
  margin: 0;
}

/* ---------- 信息行（行距与对比度重点优化） ---------- */
#status-box p {
  font-size: 15px;
  line-height: 1.9;
  margin: 0 0 6px;
  color: var(--ink);
  word-break: break-word;
}

#status-box p:last-child {
  margin-bottom: 0;
}

#status-box strong {
  font-weight: 700;
  color: inherit;
}

.row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  border-top: 1px solid var(--line);
  padding: 15px 0;
  font-size: 15px;
  line-height: 1.85;
}

.row > div {
  flex: 1 1 auto;
  min-width: 0;
  word-break: break-word;
}

.row > button {
  flex: 0 0 auto;
  margin: 2px 0 0;
}

.row:first-child {
  border-top: 0;
  padding-top: 2px;
}

.code {
  display: inline-block;
  font-weight: 600;
  font-size: 15px;
  line-height: 1.6;
  letter-spacing: 0.04em;
  color: var(--accent-ink);
}

/* ---------- 候选卡 ---------- */
.candidate {
  padding: 15px 0;
  line-height: 1.85;
}

/* 匹配列表刷新提示：每次点击「开始匹配」都换序号 / 时间，肉眼可见 */
.cand-refresh-note {
  margin: 0 0 10px;
  padding: 7px 10px;
  border-radius: 8px;
  background: var(--accent-soft, rgba(214, 138, 160, 0.12));
  color: var(--accent-ink);
  font-size: 13px;
  line-height: 1.6;
}

/* 本次匹配抽中的候选：置顶 + 粉金描边 + 角标 */
.candidate.current-match {
  margin: 4px 0 10px;
  padding: 12px 14px;
  border: 1px solid var(--accent, #d68aa0);
  border-radius: 12px;
  background: var(--accent-soft, rgba(214, 138, 160, 0.08));
}

.current-match-badge {
  display: inline-block;
  margin: 0 0 6px;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--accent, #d68aa0);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  line-height: 20px;
}

.cand-empty {
  margin: 8px 0;
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.7;
}

.candidate:first-child {
  padding-top: 4px;
}

.candidate p {
  margin: 0 0 6px;
  font-size: 15px;
}

.candidate p.code {
  margin-bottom: 8px;
}

.candidate .muted {
  font-size: 14px;
  color: var(--ink-soft);
}

.candidate .warn {
  margin-bottom: 8px;
}

/* 活人检测：超过 72 小时无活动 → 灰色「可能不在」标签 */
.stale-tag {
  display: inline-block;
  margin-left: 4px;
  padding: 0 6px;
  border-radius: 999px;
  background: #eee;
  color: #888;
  font-size: 12px;
  line-height: 18px;
  vertical-align: 1px;
}

.candidate button {
  margin-top: 4px;
}

/* v2 需求2：额外标签 chip（描边/浅底，与主 TAG 的实底视觉区分） */
.candidate-extra-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 2px 0 8px;
}

.extra-tag-chip {
  display: inline-block;
  padding: 2px 9px;
  border: 1px solid var(--accent-line);
  border-radius: 999px;
  background: var(--card);
  color: var(--accent-ink);
  font-size: 12.5px;
  line-height: 1.7;
}

.extra-tag-chip.more {
  background: var(--accent-soft);
  font-weight: 600;
}

/* v2 需求5：已自动打招呼的候选行 */
.candidate.auto-greeted {
  margin: 6px 0;
  padding: 12px;
  border-radius: 12px;
  background: var(--accent-soft);
  box-shadow: inset 0 0 0 1px var(--accent-line);
}

.auto-greet-badge {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 8px;
  border-radius: 999px;
  background: var(--accent-ink);
  color: #fff;
  font-size: 12px;
  line-height: 1.7;
  vertical-align: 1px;
}

.candidate button[disabled] {
  opacity: 0.65;
  cursor: default;
  filter: none;
}

.warn {
  color: #9a541b;
  font-size: 14px;
  line-height: 1.8;
  margin: 6px 0;
}

.ok {
  color: #2c7442;
  font-size: 14px;
  line-height: 1.8;
  margin-top: 10px;
}

.err {
  color: #a8332a;
  font-size: 14px;
  line-height: 1.8;
}

.hidden {
  display: none !important;
}

/* ---------- 口令登录 / 老用户补设口令 ---------- */
.passcode-hint {
  margin: -2px 0 4px;
  font-size: 12.5px;
}

button.btn-ghost {
  background: transparent;
  color: var(--accent-ink);
  border: 1px solid var(--accent-line);
  box-shadow: none;
}

button.btn-ghost:hover {
  background: var(--accent-soft);
  filter: none;
}

.passcode-tip {
  border-color: var(--accent-line);
}

.passcode-tip .tip {
  margin-top: 0;
}

/* 资料页常驻「登录口令」区块 */
.passcode-card .passcode-state {
  margin: 0 0 4px;
  font-size: 14.5px;
  line-height: 1.8;
  color: var(--ink-faint);
  word-break: break-word;
}

.passcode-card .passcode-state.on {
  color: var(--accent-ink);
  font-weight: 600;
}

.passcode-card .passcode-forgot {
  margin: 0 0 4px;
  font-size: 12.5px;
}

.passcode-card #btn-passcode-open {
  min-height: 44px;
  min-width: 44px;
  margin-top: 8px;
}

.passcode-card .passcode-form {
  margin-top: 14px;
  border-top: 1px solid var(--line);
  padding-top: 4px;
}

.passcode-card .passcode-form .field-group {
  margin: 12px 0;
}

.passcode-card .passcode-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.passcode-card .passcode-actions button {
  min-height: 44px;
  min-width: 44px;
  margin: 0;
}

.passcode-card .passcode-msg {
  margin: 8px 0 0;
}

.passcode-card .passcode-msg:empty {
  display: none;
}

/* ---------- 折叠区 ---------- */
details {
  margin-top: 14px;
}

details summary {
  cursor: pointer;
  color: var(--accent-ink);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.8;
  padding: 6px 0;
  list-style-position: inside;
}

details summary:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

details[open] summary {
  margin-bottom: 6px;
}

/* ---------- 公告弹窗（notice 玩家公告 / update 更新公告） ---------- */
.ann-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(58, 52, 56, 0.42);
}

.ann-modal-card {
  width: 100%;
  max-width: 520px;
  max-height: 82vh;
  display: flex;
  flex-direction: column;
  background: var(--card);
  border: 1px solid var(--accent-line);
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 22px 22px 16px;
}

.ann-modal-card h2 {
  color: var(--accent-ink);
  font-size: 17px;
  line-height: 1.6;
}

.ann-modal-body {
  overflow-y: auto;
  margin: 10px 0 16px;
  padding-right: 4px;
}

.ann-modal-foot {
  display: flex;
  justify-content: flex-end;
}

.ann-modal-foot button {
  min-width: 96px;
}

.ann-body {
  color: var(--ink);
  font-size: 15px;
  line-height: 1.85;
  white-space: pre-line; /* body 换行还原（内容已由 JS 用 textContent 写入，无注入风险） */
}

/* ---------- 更新公告横幅（仅 update 通道，可关闭） ---------- */
.ann-banner {
  position: sticky;
  top: 0;
  z-index: 900; /* 高于页面内容，低于公告弹窗（1000） */
  background: var(--accent-soft);
  border-bottom: 1px solid var(--accent-line);
  box-shadow: 0 2px 10px rgba(150, 110, 125, 0.1);
}

.ann-banner-inner {
  max-width: 720px;
  margin: 0 auto;
  padding: 8px 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
}

.ann-banner-tag {
  flex: 0 0 auto;
  padding: 1px 8px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.7;
}

.ann-banner-title {
  flex: 0 1 auto;
  min-width: 0;
  max-width: 40%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--accent-ink);
  font-weight: 600;
  font-size: 13.5px;
}

.ann-banner-summary {
  flex: 1 1 0;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--ink-soft);
  font-size: 13px;
}

.ann-banner-actions {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.ann-banner-inner button {
  flex: 0 0 auto;
  margin: 0;
  padding: 5px 12px;
  font-size: 13px;
  line-height: 1.5;
  border-radius: 999px;
  background: transparent;
  color: var(--accent-ink);
  border: 1px solid var(--accent-line);
  box-shadow: none;
}

.ann-banner-inner button:hover {
  background: var(--card);
  filter: none;
}

.ann-banner-close {
  padding: 3px 10px !important;
  font-size: 17px !important;
  line-height: 1.4 !important;
}

@media (max-width: 560px) {
  .ann-banner-inner {
    flex-wrap: wrap;
    padding: 7px 12px;
  }

  .ann-banner-title {
    max-width: 62%;
  }

  .ann-banner-summary {
    order: 5;
    flex: 1 1 100%;
  }

  .ann-banner-actions {
    margin-left: auto;
  }
}

/* ---------- 常驻公告入口 + 公告中心 ---------- */
.header-ann {
  margin-top: 8px;
}

#ann-entry-btn {
  margin: 0;
  padding: 5px 16px;
  font-size: 13px;
  line-height: 1.6;
  border-radius: 999px;
  background: transparent;
  color: var(--accent-ink);
  border: 1px solid var(--accent-line);
  box-shadow: none;
}

#ann-entry-btn:hover {
  background: var(--accent-soft);
  filter: none;
}

.ann-center-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.ann-center-x {
  flex: 0 0 auto;
  margin: 0;
  padding: 0 4px;
  background: transparent;
  color: var(--ink-soft);
  border: 0;
  box-shadow: none;
  font-size: 24px;
  line-height: 1.2;
}

.ann-center-x:hover {
  color: var(--accent-ink);
  filter: none;
}

.ann-center-item {
  padding: 12px 0 4px;
  border-top: 1px solid var(--line);
}

.ann-center-item:first-child {
  padding-top: 0;
  border-top: 0;
}

.ann-center-tag {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 999px;
  background: var(--accent-soft);
  border: 1px solid var(--accent-line);
  color: var(--accent-ink);
  font-size: 12px;
  line-height: 1.7;
}

.ann-center-item-title {
  margin: 5px 0 2px;
  color: var(--ink);
  font-size: 15.5px;
  line-height: 1.65;
}

.ann-center-item-body {
  margin-top: 2px;
}

.ann-center-empty {
  padding: 18px 0;
  text-align: center;
}

/* ---------- 翻页控件 ---------- */
.pager {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 14px;
}

.pager button.pg {
  padding: 7px 12px;
  font-size: 13.5px;
  margin: 0;
  background: var(--card-2);
  color: var(--ink-soft);
  border: 1px solid var(--line);
  box-shadow: none;
}

.pager button.pg:hover {
  border-color: var(--accent-line);
  color: var(--accent-ink);
}

.pager button.pg.pg-cur {
  background: var(--accent-deep);
  border-color: var(--accent-deep);
  color: #fff;
}

.pager button.pg[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
}

.pg-info {
  margin-left: 6px;
  font-size: 13px;
  color: var(--ink-faint);
}

.candidate + hr,
hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 12px 0;
}

/* ---------- 页脚 ---------- */
.foot {
  text-align: center;
  padding: 8px 2px 22px;
  font-size: 12.5px;
}

.foot-note {
  color: var(--ink-faint);
  letter-spacing: 0.02em;
  line-height: 1.9;
}

.foot a {
  color: var(--ink-faint);
  text-decoration: none;
}

.foot a:hover {
  color: var(--accent-ink);
}

.foot-ver {
  margin-top: 4px;
}

.ver-badge {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink-faint);
  font: inherit;
  font-size: 11.5px;
  letter-spacing: 0.04em;
  padding: 2px 9px;
  border-radius: 999px;
  cursor: pointer;
}

.ver-badge:hover,
.ver-badge[aria-expanded="true"] {
  color: var(--accent-ink);
  border-color: var(--accent-ink);
}

.ver-panel {
  margin: 8px auto 0;
  max-width: 520px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.55);
  color: var(--ink-faint);
  font-size: 12px;
  line-height: 1.9;
  text-align: left;
  word-break: break-all;
}

.ver-panel p {
  margin: 0;
}

.ver-panel code {
  font-size: 11.5px;
}

/* ---------- 管理控制台 ---------- */
.admin-grid {
  display: grid;
  gap: 10px;
}

table.adm {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
  line-height: 1.7;
}

table.adm th,
table.adm td {
  border-bottom: 1px solid var(--line);
  padding: 9px 6px;
  text-align: left;
  vertical-align: top;
  word-break: break-all;
}

table.adm th {
  color: var(--ink-soft);
  font-weight: 600;
}

.chk {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  line-height: 1.7;
  color: var(--ink-soft);
  cursor: pointer;
}

.chk input {
  width: auto;
  margin: 0;
}

/* 公告正文字数计数器（四改需求 2：与后端 1000 字上限实时同步，超限变红） */
.ann-count {
  margin-top: -2px;
  font-size: 13px;
  letter-spacing: 0.02em;
}

/* 额外标签库里的删除按钮（嵌在标签胶囊内） */
.tag-del {
  background: transparent;
  color: var(--ink-soft);
  padding: 0 0 0 6px;
  margin: 0;
  font-size: 14px;
  line-height: 1;
  border-radius: 0;
  box-shadow: none;
}

/* 五改：标签改名 / 排序按钮（同样嵌在标签胶囊内） */
.tag-move,
.tag-edit {
  background: transparent;
  color: var(--ink-soft);
  padding: 0 0 0 5px;
  margin: 0;
  font-size: 12.5px;
  line-height: 1;
  border-radius: 0;
  box-shadow: none;
}

.tag-move[disabled] {
  opacity: 0.35;
  cursor: default;
}

#user-detail {
  margin-top: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card-2);
}

#user-detail h3 {
  font-size: 16px;
  margin-bottom: 8px;
  color: var(--accent-ink);
}

/* ---------- 任务卡 B：玩家申诉（用户端） ---------- */
.appeal-item {
  padding: 12px;
  margin: 10px 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card-2);
}

.appeal-item:first-child {
  margin-top: 8px;
}

.appeal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}

.appeal-reason {
  margin: 6px 0 0;
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.8;
}

.appeal-note {
  margin: 8px 0 0;
  padding: 8px 10px;
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--ink-soft);
  font-size: 13.5px;
  line-height: 1.8;
  white-space: pre-wrap;
  word-break: break-word;
}

.appeal-highlight {
  border-color: var(--accent-line);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.badge {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 12.5px;
  line-height: 1.7;
  border: 1px solid transparent;
  white-space: nowrap;
}

.badge-pending { color: #8a6d1f; background: #fbf2d8; border-color: #ecd9a4; }
.badge-processing { color: #1f5c8a; background: #e3f1fb; border-color: #b9d9ee; }
.badge-approved { color: #2c7442; background: #e4f4e9; border-color: #b7ddc3; }
.badge-rejected { color: #a8332a; background: #fbe8e6; border-color: #eec4bf; }
.badge-none { color: #6f6a66; background: #f1efed; border-color: #ddd8d4; }

.toast {
  position: fixed;
  left: 50%;
  bottom: 26px;
  transform: translateX(-50%);
  z-index: 100;
  max-width: min(90vw, 460px);
  padding: 11px 18px;
  border-radius: 12px;
  background: var(--card);
  border: 1px solid var(--accent-line);
  box-shadow: var(--shadow);
  color: var(--ink);
  font-size: 14px;
  line-height: 1.7;
  text-align: center;
}

.toast.err {
  border-color: #eec4bf;
}

/* ---------- 任务卡 B：管理后台页签 / 申诉查询 ---------- */
.adm-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 16px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card);
  box-shadow: var(--shadow);
}

.adm-tab {
  margin: 0;
  padding: 8px 14px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  color: var(--ink-soft);
  box-shadow: none;
  font-size: 14px;
}

.adm-tab:hover {
  background: var(--card-2);
}

.adm-tab.active {
  background: var(--accent-soft);
  border-color: var(--accent-line);
  color: var(--ink);
}

.ap-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: flex-end;
}

.ap-row .field-group {
  flex: 1 1 180px;
  min-width: 150px;
  margin: 0;
}

.ap-row .field-group label {
  display: block;
}

.ap-note {
  width: 100%;
  min-width: 150px;
  margin: 6px 0;
  padding: 7px 9px;
  font-size: 13px;
}

.ap-status-cell {
  white-space: nowrap;
}

.ap-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.ap-actions button {
  margin: 0;
  padding: 5px 9px;
  font-size: 12.5px;
}

.ap-total {
  margin: 8px 0;
}

@media (max-width: 560px) {
  .adm-tabs {
    gap: 6px;
  }

  .adm-tab {
    padding: 7px 10px;
    font-size: 13px;
  }

  .ap-row .field-group {
    flex-basis: 100%;
  }
}

/* ---------- 单列布局（右栏内容已迁入悬浮按钮 + 模态） ---------- */
.layout {
  display: block;
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
}

.col {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

/* 使用人数统计行（GET /api/stats），只是一行文案 */
.stats-line {
  margin-top: 10px;
  padding: 9px 12px;
  background: var(--card-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--ink-soft);
}

@media (min-width: 1024px) {
  .app {
    max-width: 760px; /* 单列版心 */
  }
}

/* ---------- 窄屏 ---------- */
@media (max-width: 560px) {
  .app {
    padding: 14px 12px 26px;
  }

  h1 {
    font-size: 26px;
    letter-spacing: 0.12em;
    text-indent: 0.12em;
  }

  .card {
    padding: 17px 14px;
    border-radius: 20px;
  }

  .style-bar {
    border-radius: 14px;
  }

  .style-label {
    min-width: auto;
  }

  .style-note {
    margin-left: 0;
  }

  .row {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .row > button {
    align-self: flex-start;
    margin-top: 0;
  }

  .row > .row > button {
    margin-top: 0;
  }
}

/* ---------- UI 重构 v2：折叠卡片 / 主匹配区 / 悬浮按钮 / 反馈浮层 ---------- */
.app {
  padding-bottom: 104px; /* 给左下角悬浮按钮留出安全区，避免遮挡正文 */
}

.fold-head {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0;
  margin: 0;
  cursor: pointer;
  color: var(--ink);
}

.fold-head::-webkit-details-marker {
  display: none;
}

.fold-head:hover {
  text-decoration: none;
}

.fold-title {
  position: relative;
  padding-left: 12px;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: 0.03em;
}

.fold-title::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.32em;
  width: 3px;
  height: 1.05em;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--accent-line), var(--accent-soft));
}

.fold-mark {
  color: var(--accent-ink);
  font-size: 20px;
  line-height: 1;
  transition: transform 0.2s ease;
}

details[open] > .fold-head .fold-mark {
  transform: rotate(180deg);
}

.status-fold,
.side-fold {
  padding: 16px 18px;
}

.status-fold > .fold-head,
.side-fold > .fold-head {
  margin-bottom: 4px;
}

.status-fold > details {
  margin-top: 14px;
}

/* SUP-1：更多期望（可选）折叠区 */
.more-fold {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed var(--accent-line);
}

.more-fold > .fold-head {
  margin-bottom: 4px;
}

.more-fold .tags {
  margin: 8px 0 0;
}

.more-clear {
  margin-top: 10px;
  padding: 8px 14px;
  font-size: 14px;
}

/* 任务卡 2：更多期望 · 种族下拉选框 */
.race-picker {
  position: relative;
  margin-top: 8px;
}

.race-picker-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 14px;
  border: 1px solid var(--field-line);
  border-radius: 12px;
  background: var(--card-2);
  color: var(--ink-soft);
  font-size: 14px;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.18s, background 0.18s, color 0.18s;
}

.race-picker-btn:hover {
  border-color: var(--accent-line);
  color: var(--accent-ink);
}

.race-picker-btn.has-value {
  border-color: var(--accent-line);
  background: var(--accent-soft);
  color: var(--accent-ink);
  font-weight: 600;
}

.race-picker-btn::after {
  content: '⌄';
  font-size: 14px;
  line-height: 1;
  color: var(--accent);
  transition: transform 0.18s;
}

.race-picker-btn[aria-expanded="true"]::after {
  transform: rotate(180deg);
}

.race-picker-btn:focus-visible {
  outline: 2px solid var(--accent-deep);
  outline-offset: 2px;
}

.race-picker-menu {
  position: absolute;
  z-index: 20;
  left: 0;
  right: 0;
  margin-top: 6px;
  padding: 10px;
  border: 1px solid var(--accent-line);
  border-radius: 14px;
  background: var(--card);
  box-shadow: var(--shadow);
}

.race-picker-menu .tags {
  margin: 0;
}

.race-group + .race-group {
  margin-top: 10px;
}

.race-group-title {
  margin: 0 0 5px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--accent-ink);
}

.race-picker-menu .tag {
  font-size: 13px;
  padding: 6px 12px;
  background: var(--card-2);
}

/* 开始匹配：页面主功能，视觉层级最高 */
.match-primary {
  padding: 26px 22px;
  border: 2px solid var(--accent-line);
  background: linear-gradient(180deg, var(--card), var(--accent-soft));
  box-shadow: 0 14px 34px rgba(120, 84, 96, 0.14);
}

.match-primary h2 {
  font-size: 22px;
  margin-bottom: 8px;
}

.match-primary .tags {
  margin: 10px 0 4px;
}

.primary-action {
  width: 100%;
  margin-top: 14px;
  padding: 16px 20px;
  font-size: 19px;
  letter-spacing: 0.08em;
  border-radius: 14px;
  background: var(--accent-ink);
  color: #fff;
  border: none;
  box-shadow: 0 8px 20px rgba(120, 84, 96, 0.24);
}

.primary-action:hover {
  filter: brightness(1.06);
}

.match-state {
  margin: 10px 0 4px;
  min-height: 20px;
  color: var(--ink-faint);
  font-size: 14px;
}

.match-state.on {
  color: var(--accent-ink);
  font-weight: 600;
}

.match-state.err {
  color: #a8332a;
}

.match-result {
  padding: 18px;
  margin-top: 14px;
  border: 1px solid var(--accent-line);
  border-radius: 14px;
  background: var(--card-2);
}

.match-level-card {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  padding: 8px 14px;
  margin-bottom: 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  border: 1px solid var(--accent-line);
}

.match-level-stars {
  font-size: 24px;
  line-height: 1;
  color: var(--accent-ink);
  letter-spacing: 2px;
}

.match-level-label {
  font-size: 16px;
  font-weight: 700;
  color: var(--accent-ink);
}

.intent-reminder {
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--accent-soft);
  border: 1px solid var(--accent-line);
}

.info-tip {
  padding: 10px 12px;
  margin: 10px 0;
  border-radius: 10px;
  background: #eef6ff;
  border: 1px solid #b9d7f5;
  color: #1f4f7a;
  font-size: 14px;
  line-height: 1.6;
}

/* v2 需求4：24h 活动人数圆角胶囊（实时轮询，数字变化轻微高亮） */
.activity-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  margin: 8px 0 4px;
  padding: 8px 14px;
  border: 1px solid var(--accent-line);
  border-radius: 999px;
  background: var(--card-2);
  color: var(--accent-ink);
  font-size: 14px;
  line-height: 1.5;
}

.activity-dot {
  flex: 0 0 auto;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-ink);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.activity-pill strong {
  font-weight: 700;
}

.activity-pill.bump {
  animation: activity-bump 0.6s ease;
}

@keyframes activity-bump {
  0% { transform: scale(1); }
  35% { transform: scale(1.04); background: var(--accent-soft); }
  100% { transform: scale(1); }
}

/* v2 需求1：自动匹配选项圆角卡片，紧贴「开始匹配」按钮上方 */
.auto-match-card {
  margin: 14px 0 0;
  padding: 14px 16px;
  border: 1px solid var(--accent-line);
  border-radius: 16px;
  background: var(--card-2);
}

.auto-match-card .chk {
  margin: 0;
}

.auto-match-card .tip {
  margin: 6px 0 0;
  font-size: 13px;
  line-height: 1.6;
}

@media (max-width: 640px) {
  .auto-match-card {
    margin-left: 0;
    margin-right: 0;
    padding: 12px 14px;
  }

  .activity-pill {
    display: flex;
    width: 100%;
    border-radius: 999px;
  }
}

/* 左下角圆形悬浮按钮：中心文字就是「申诉」「反馈」 */
.float-tools {
  position: fixed;
  left: 20px;
  bottom: 100px;
  z-index: 900;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.float-btn {
  width: 58px;
  height: 58px;
  padding: 0;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--card);
  color: var(--accent-ink);
  border: 2px solid var(--accent-line);
  box-shadow: 0 8px 20px rgba(120, 84, 96, 0.22);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.float-btn:hover {
  background: var(--accent-soft);
  filter: none;
}

/* 申诉 / 反馈浮层（抽屉式，移动端同样可用） */
.tool-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(58, 52, 56, 0.42);
}

.tool-modal-card {
  width: 100%;
  max-width: 560px;
  max-height: 86vh;
  overflow-y: auto;
  background: var(--card);
  border: 1px solid var(--accent-line);
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 20px 20px 16px;
}

.tool-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
}

.tool-modal-head h2 {
  margin-bottom: 0;
}

.tool-close {
  width: 38px;
  height: 38px;
  padding: 0;
  border-radius: 50%;
  font-size: 22px;
  line-height: 1;
  background: var(--card-2);
  color: var(--ink-soft);
  border: 1px solid var(--line);
}

@media (max-width: 560px) {
  .float-tools {
    left: 14px;
    bottom: 86px;
  }

  .float-btn {
    width: 54px;
    height: 54px;
    font-size: 14px;
  }

  .match-primary {
    padding: 21px 15px;
  }

  .tool-modal {
    padding: 12px;
    align-items: flex-end;
  }

  .tool-modal-card {
    max-height: 90vh;
    border-radius: 16px 16px 12px 12px;
  }
}

/* =========================================================
   收信箱 / TAG 必选 / 资料提醒 / 实名展示（2026-10-18）
   ========================================================= */
.main-tabs {
  display: flex;
  gap: 8px;
  margin: 0 0 14px;
  flex-wrap: wrap;
}

.main-tab {
  position: relative;
  background: var(--card-2);
  color: var(--ink-soft);
  border: 1px solid var(--accent-line);
  border-radius: 999px;
  padding: 8px 20px;
  font-size: 15px;
}

.main-tab.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.unread-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #d64562;
  margin-left: 5px;
  vertical-align: middle;
}

.tab-dot {
  position: absolute;
  top: -6px;
  right: -10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  box-sizing: border-box;
  border-radius: 999px;
  background: #d64562;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  pointer-events: none;
}

.profile-tip {
  border-left: 4px solid var(--accent);
}

.profile-tip .row {
  margin-top: 8px;
}

.inbox-panel {
  margin-top: 4px;
  max-width: 100%;
  overflow-x: hidden;
}

.inbox-layout {
  display: grid;
  grid-template-columns: minmax(0, 300px) minmax(0, 1fr);
  gap: 16px;
  margin-top: 12px;
  min-height: 360px;
  min-width: 0;
  align-items: stretch;
}

.inbox-layout > * {
  min-width: 0;
}

.inbox-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  max-height: 560px;
  overflow-x: hidden;
  overflow-y: auto;
  padding-right: 4px;
  overscroll-behavior: contain;
}

.inbox-item {
  display: block;
  width: 100%;
  min-width: 0;
  margin: 0;
  overflow: hidden;
  text-align: left;
  background: var(--card-2);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 10px 12px;
}

.inbox-item.active {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.inbox-item-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}

.inbox-name {
  font-weight: 600;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.inbox-summary {
  display: block;
  max-width: 100%;
  min-width: 0;
  color: var(--ink-soft);
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.inbox-meta {
  display: block;
  color: var(--ink-faint);
  font-size: 12px;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.readonly-tag {
  color: var(--gold);
}

.inbox-thread {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  height: 560px;
  max-height: 560px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 12px;
  background: var(--card-2);
}

.thread-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
  overflow-wrap: anywhere;
  word-break: break-word;
}

.thread-head-main {
  flex: 1 1 auto;
  min-width: 0;
}

.thread-namecard-btn {
  flex: 0 0 auto;
}

.thread-messages {
  flex: 1 1 0;
  min-width: 0;
  min-height: 0;
  max-height: none;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  padding: 10px 4px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.bubble {
  max-width: 82%;
  min-width: 0;
  align-self: flex-start;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 8px 11px;
  overflow-wrap: anywhere;
}

.bubble.mine {
  align-self: flex-end;
  background: var(--accent-soft);
  border-color: var(--accent-line);
}

.bubble-body {
  white-space: pre-wrap;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.bubble-meta {
  margin-top: 4px;
  color: var(--ink-faint);
  font-size: 12px;
}

.msg-city {
  margin-top: 4px;
  font-size: 12px;
}

.contact-card {
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.contact-card p {
  margin: 2px 0;
}

.contact-namecard-btn {
  margin-top: 6px;
}

.copy-btn {
  padding: 1px 8px;
  font-size: 12px;
  border-radius: 8px;
}

.thread-compose {
  min-width: 0;
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

.thread-compose textarea {
  width: 100%;
  max-width: 100%;
  min-height: 66px;
  border-radius: 14px;
}

/* 会话输入区按钮组：发送 + 两个 reveal 按钮在窄栏里要能换行，别撑破 .inbox-thread */
.thread-compose .row {
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 8px;
}

/* 悬浮窗列表行：左侧只留 ID，右侧紧凑按钮组 */
.float-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  margin: 0 0 8px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--card-2);
}

.float-row:last-child {
  margin-bottom: 0;
}

.float-row-id {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
  padding: 5px 4px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--accent-ink);
  box-shadow: none;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  text-align: left;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.float-row-id:hover {
  background: var(--accent-soft);
  filter: none;
}

.float-row-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.mini-btn {
  flex: 0 0 auto;
  margin: 0;
  padding: 5px 9px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.35;
  white-space: nowrap;
}

.unlock-actions {
  display: flex;
  gap: 6px;
  flex-wrap: nowrap;
  justify-content: flex-end;
}

#greet-text {
  width: 100%;
  min-height: 90px;
}

.mailbox-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
}

@media (max-width: 720px) {
  .inbox-layout {
    grid-template-columns: minmax(0, 1fr);
    grid-auto-flow: row;
    align-items: start;
    gap: 12px;
    min-height: 0;
  }

  .inbox-layout > * {
    min-width: 0;
  }

  .inbox-list {
    max-height: 240px;
  }

  .inbox-thread {
    height: auto;
    max-height: none;
  }

  .thread-messages {
    flex: 1 1 auto;
    min-height: 200px;
    max-height: min(60vh, 380px);
    overflow-x: hidden;
    overflow-y: auto;
  }
}

.row > .unlock-actions {
  flex: 0 0 auto;
  justify-content: flex-end;
}

/* =========================================================
   会场主题扩充：夜色摩杜纳 / 黑铁穹顶 / 月影秘话 / 妖异紫焰
   每套均用 CSS 变量；暗色四套共用一张十二神徽记环 PNG 底纹，
   固定居中不重复平铺，仅以透明度（黑铁额外降饱和）区分。
   ========================================================= */
:root {
  --soft-bg: rgba(0, 0, 0, 0.04);
  --bubble-bg: #fffdfb;
  --system-bg: #f3edf0;
}

html[data-theme="moduna"] {
  --bg: #12172b;
  --card: #1a2140;
  --card-2: #161c35;
  --ink: #eef0ff;
  --ink-soft: #c4c9e4;
  --ink-faint: #aab0cb;
  --accent: #6553c4;
  --accent-deep: #4f3fa5;
  --accent-ink: #c9bfff;
  --accent-soft: #242a4d;
  --accent-line: #454f85;
  --line: #2a3157;
  --field-line: #7b84bd;
  --gold: #d8b46a;
  --deco-1: #1a2246;
  --deco-2: #201a3d;
  --petal: rgba(180, 170, 255, 0.22);
  --shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  --soft-bg: rgba(255, 255, 255, 0.07);
  --bubble-bg: #232b52;
  --system-bg: #242a4d;
}

html[data-theme="ironvault"] {
  --bg: #141516;
  --card: #1e2022;
  --card-2: #191b1d;
  --ink: #eceef0;
  --ink-soft: #c2c6cb;
  --ink-faint: #a9aeb4;
  --accent: #5f666c;
  --accent-deep: #474d52;
  --accent-ink: #d8dde2;
  --accent-soft: #2a2d30;
  --accent-line: #4a4f54;
  --line: #2d3033;
  --field-line: #767c83;
  --gold: #c9a86a;
  --deco-1: #202326;
  --deco-2: #1c1e20;
  --petal: rgba(210, 215, 220, 0.14);
  --shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  --soft-bg: rgba(255, 255, 255, 0.06);
  --bubble-bg: #26292c;
  --system-bg: #2a2d30;
}

html[data-theme="moonshade"] {
  --bg: #0f1a16;
  --card: #16241f;
  --card-2: #13201b;
  --ink: #e3f0e8;
  --ink-soft: #b8ccbf;
  --ink-faint: #a1b8aa;
  --accent: #3f7d61;
  --accent-deep: #2f6149;
  --accent-ink: #b7e3cb;
  --accent-soft: #1e332a;
  --accent-line: #39604f;
  --line: #243a31;
  --field-line: #628a77;
  --gold: #d4c58a;
  --deco-1: #173128;
  --deco-2: #1a2a33;
  --petal: rgba(170, 220, 195, 0.16);
  --shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  --soft-bg: rgba(255, 255, 255, 0.06);
  --bubble-bg: #1d332a;
  --system-bg: #1e332a;
}

html[data-theme="voidpurple"] {
  --bg: #160f22;
  --card: #211630;
  --card-2: #1b1229;
  --ink: #f0e6ff;
  --ink-soft: #cbb8e6;
  --ink-faint: #b29fd0;
  --accent: #7a3fc2;
  --accent-deep: #5f2e9e;
  --accent-ink: #e0c4ff;
  --accent-soft: #2c1c42;
  --accent-line: #563579;
  --line: #33224a;
  --field-line: #8768b0;
  --gold: #e0b86a;
  --deco-1: #241239;
  --deco-2: #2b1230;
  --petal: rgba(205, 160, 255, 0.2);
  --shadow: 0 8px 24px rgba(0, 0, 0, 0.42);
  --soft-bg: rgba(255, 255, 255, 0.07);
  --bubble-bg: #2a1a3e;
  --system-bg: #2c1c42;
}

/* 十二神图案层：12 个官方十二神徽记排成一张整体圆环图（透明底内嵌 SVG，素材见 img/twelve/SOURCES.txt）
   固定居中、不重复平铺；四个暗色主题共用同一套图形，以透明度区分，黑铁穹顶额外降饱和。 */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  display: none;
}

html[data-theme="moduna"] body::after,
html[data-theme="ironvault"] body::after,
html[data-theme="moonshade"] body::after,
html[data-theme="voidpurple"] body::after {
  display: block;
  background-image: url("/img/twelve/twelve-wheel-inline.svg");
  background-repeat: no-repeat;
  background-position: center center;
  background-size: min(96vmin, 1040px);
  opacity: 0.11;
}

html[data-theme="moduna"] body::after { opacity: 0.12; }
html[data-theme="ironvault"] body::after { opacity: 0.10; filter: grayscale(0.30); }
html[data-theme="moonshade"] body::after { opacity: 0.11; }
html[data-theme="voidpurple"] body::after { opacity: 0.13; }

@media (max-width: 768px) {
  html[data-theme="moduna"] body::after,
  html[data-theme="ironvault"] body::after,
  html[data-theme="moonshade"] body::after,
  html[data-theme="voidpurple"] body::after {
    background-size: min(170vw, 900px);
  }
}

/* 暗色主题下所有控件保持同色系，不出现白底白字 */
html[data-theme="moduna"] input,
html[data-theme="moduna"] select,
html[data-theme="moduna"] textarea,
html[data-theme="ironvault"] input,
html[data-theme="ironvault"] select,
html[data-theme="ironvault"] textarea,
html[data-theme="moonshade"] input,
html[data-theme="moonshade"] select,
html[data-theme="moonshade"] textarea,
html[data-theme="voidpurple"] input,
html[data-theme="voidpurple"] select,
html[data-theme="voidpurple"] textarea {
  background: var(--card-2);
  color: var(--ink);
}

html[data-theme="moduna"] .card,
html[data-theme="ironvault"] .card,
html[data-theme="moonshade"] .card,
html[data-theme="voidpurple"] .card {
  background: var(--card);
}

/* =========================================================
   资料编辑改版 / 右侧收纳悬浮窗 / 待处理气泡
   ========================================================= */
#status-box {
  background: var(--soft-bg, rgba(0, 0, 0, 0.05));
  border: 1px solid var(--accent-line, var(--line));
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 14px;
}

.hint-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  vertical-align: middle;
  margin: 6px 0 0 4px;
}

.hint-dot {
  width: 18px;
  height: 18px;
  min-width: 18px;
  padding: 0;
  margin: 0;
  border-radius: 50%;
  border: 0;
  background: var(--accent-soft);
  color: var(--accent-ink);
  font-size: 12px;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
  box-shadow: none;
}

.hint-pop {
  display: none;
  position: absolute;
  left: 50%;
  bottom: 26px;
  transform: translateX(-50%);
  width: max-content;
  max-width: 260px;
  padding: 8px 12px;
  border-radius: 10px;
  background: var(--card);
  color: var(--ink-soft);
  border: 1px solid var(--accent-line);
  box-shadow: var(--shadow);
  font-size: 13px;
  line-height: 1.6;
  z-index: 50;
}

.hint-wrap:hover .hint-pop,
.hint-wrap:focus-within .hint-pop,
.hint-wrap.open .hint-pop {
  display: block;
}

.server-row {
  display: flex;
  gap: 8px;
}

.server-row select {
  flex: 1 1 0;
}

.field-error {
  outline: 2px solid #d64562;
  outline-offset: 1px;
  border-color: #d64562 !important;
}

.custom-tags-note {
  margin-top: 6px;
}

/* 收信箱：右下角悬浮主按钮（替代顶部 tab） */
.app {
  padding-bottom: 108px;
}

.inbox-fab,
.profile-fab {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 900;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  height: 68px;
  min-height: 68px;
  max-width: calc(100vw - 28px);
  padding: 0 24px 0 16px;
  margin: 0;
  border: 1px solid var(--accent-line);
  border-radius: 999px;
  background: var(--card);
  color: var(--accent-ink);
  box-shadow: 0 12px 30px rgba(150, 90, 115, 0.24);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.02em;
  transition: background 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.inbox-fab:hover,
.profile-fab:hover {
  background: var(--accent-soft);
  box-shadow: 0 16px 36px rgba(150, 90, 115, 0.3);
}

.inbox-fab:active,
.profile-fab:active {
  transform: translateY(1px);
}

.inbox-fab-icon,
.profile-fab-icon {
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--accent-soft);
  font-size: 20px;
  line-height: 1;
}

.inbox-fab.is-inbox .inbox-fab-icon {
  background: var(--card-2);
}

.fab-dot {
  position: absolute;
  top: -6px;
  right: -6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  box-sizing: border-box;
  border-radius: 999px;
  background: #d64562;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  pointer-events: none;
}

@media (max-width: 767px) {
  .inbox-fab,
  .profile-fab {
    right: 14px;
    bottom: 14px;
    height: 60px;
    min-height: 60px;
    padding: 0 20px 0 14px;
    font-size: 16px;
  }

  .inbox-fab-icon,
  .profile-fab-icon {
    width: 34px;
    height: 34px;
    font-size: 18px;
  }

  .account-fab {
    left: 14px;
    right: auto;
    bottom: 14px;
  }

  .profile-fab {
    right: 14px;
    bottom: 86px;
  }
}

/* 左侧账号按钮 / 账号面板 */
.account-fab {
  position: fixed;
  z-index: 900;
}

@media (min-width: 768px) {
  .account-fab {
    left: 20px;
    right: auto;
    bottom: 20px;
  }
}

.account-fab.is-open {
  background: var(--accent-soft);
  box-shadow: 0 0 0 3px var(--accent-soft), 0 16px 36px rgba(150, 90, 115, 0.28);
}

.account-pop {
  position: fixed;
  left: 88px;
  bottom: 20px;
  z-index: 901;
  width: min(360px, calc(100vw - 28px));
  max-height: min(70vh, 560px);
  overflow: auto;
  padding: 16px 18px;
  border: 1px solid var(--accent-line);
  border-radius: 16px;
  background: var(--card);
  box-shadow: 0 18px 40px rgba(150, 90, 115, 0.24);
}

.account-pop .passcode-card {
  margin: 0;
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

@media (max-width: 767px) {
  .account-pop {
    left: 82px;
    bottom: 14px;
    width: min(360px, calc(100vw - 100px));
    max-height: 60vh;
  }
}

/* 右下角资料按钮（收信箱上方） */
@media (min-width: 768px) {
  .profile-fab {
    right: 20px;
    bottom: 102px;
  }
}

.profile-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(0, 0, 0, 0.42);
}

.profile-modal-card {
  display: flex;
  flex-direction: column;
  width: calc(100vw - 32px);
  max-width: 480px;
  max-height: 78vh;
  overflow: hidden;
  border: 1px solid var(--accent-line);
  border-radius: 18px;
  background: var(--card);
  box-shadow: 0 24px 60px rgba(60, 40, 48, 0.28);
}

.profile-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex: 0 0 auto;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
}

.profile-modal-head h2 {
  margin-bottom: 0;
}

.profile-modal-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 16px 18px;
}

.profile-modal-body #status-box {
  margin-bottom: 0;
}

.anon-tools {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.anon-tools > label {
  display: block;
  margin-bottom: 8px;
  color: var(--ink-soft);
}

.anon-tools-row {
  display: flex;
  gap: 8px;
  align-items: stretch;
  margin-bottom: 8px;
}

.anon-tools-row select {
  flex: 1 1 auto;
  min-width: 0;
}

.anon-tools-row button {
  flex: 0 0 auto;
  margin: 0;
}

#btn-anon-reroll {
  width: 100%;
  min-height: 40px;
}

.anon-tools .tip {
  margin: 8px 0 0;
}

.profile-modal-foot {
  flex: 0 0 auto;
  padding: 12px 18px 16px;
  border-top: 1px solid var(--line);
}

#btn-profile-edit {
  width: 100%;
  min-height: 46px;
  height: 46px;
  padding: 0 24px;
  margin: 0;
  border-radius: 12px;
  background: var(--accent-ink);
  color: #fff;
  font-size: 16px;
}

/* 修改资料：第二层固定高度模态 */
.profile-edit-modal {
  z-index: 1100;
}

.profile-edit-card {
  width: calc(100vw - 32px);
  max-width: 560px;
  height: min(80vh, 720px);
  max-height: none;
}

/* 修改资料：主标题加粗放大，次级标签保持弱化；仅作用于本模态 */
#profile-edit-modal .field-group > label:not(.muted) {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.65;
  color: var(--ink);
}

#profile-edit-modal .field-group > label.muted {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-faint);
}

/* 悬浮说明：固定定位于视口，避免被模态滚动容器裁切；坐标由 app.js 实测 hint-dot 计算 */
#profile-edit-modal .hint-pop {
  position: fixed;
  top: 0;
  left: 8px;
  right: auto;
  bottom: auto;
  transform: none;
  width: min(360px, calc(100vw - 32px));
  max-width: 360px;
  white-space: normal;
  word-break: break-word;
  line-height: 1.7;
  z-index: 1300;
}

#profile-edit-modal .hint-wrap:hover .hint-pop,
#profile-edit-modal .hint-wrap:focus-within .hint-pop {
  display: none;
}

#profile-edit-modal .hint-wrap.open .hint-pop {
  display: block;
}

@media (max-width: 640px) {
  #profile-edit-modal .hint-pop {
    left: 8px;
    right: 8px;
    width: auto;
    max-width: none;
  }
}

.profile-edit-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 6px 6px 16px 18px;
  scrollbar-width: thin;
  scrollbar-color: var(--accent-line) transparent;
}

.profile-edit-body::-webkit-scrollbar {
  width: 8px;
}

.profile-edit-body::-webkit-scrollbar-track {
  background: transparent;
}

.profile-edit-body::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: var(--accent-line);
}

.profile-edit-body::-webkit-scrollbar-thumb:hover {
  background: var(--accent-ink);
}

.profile-edit-foot {
  display: flex;
  gap: 10px;
  padding: 12px 18px 16px;
}

.profile-edit-foot button {
  flex: 1 1 0;
  min-height: 46px;
  height: 46px;
  margin: 0;
  padding: 0 24px;
  border-radius: 12px;
  font-size: 16px;
}

@media (max-width: 560px) {
  .profile-modal {
    padding: 12px;
  }

  .profile-modal-card {
    width: calc(100vw - 24px);
    max-height: 82vh;
  }

  .profile-edit-card {
    width: calc(100vw - 24px);
    height: 86vh;
  }
}

/* 右侧收纳悬浮窗 */
.float-dock {
  position: fixed;
  right: 16px;
  top: 112px;
  z-index: 60;
  display: flex;
  flex-direction: column;
  gap: 22px;
  align-items: flex-end;
  isolation: isolate;
}

.float-panel {
  position: relative;
  z-index: 1;
}

.float-panel.is-active {
  z-index: 5;
}

.float-panel-bar {
  display: flex;
  align-items: center;
  gap: 6px;
}

.float-panel-toggle {
  position: relative;
  width: 196px;
  min-width: 196px;
  height: 58px;
  min-height: 58px;
  padding: 7px 12px;
  margin: 0;
  border-radius: 20px;
  border: 1px solid var(--accent-line);
  background: var(--card);
  color: var(--accent-ink);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  line-height: 1.1;
  text-align: left;
  overflow: visible;
  transition: width 0.18s ease, height 0.18s ease, background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.float-panel-toggle:hover,
.float-panel.open .float-panel-toggle {
  background: var(--accent-soft);
}

.float-panel.collapsed .float-panel-toggle {
  width: 56px;
  min-width: 56px;
  height: 56px;
  min-height: 56px;
  padding: 0;
  justify-content: center;
  gap: 0;
}

.float-panel.collapsed .fp-text,
.float-panel.collapsed .fp-collapse {
  display: none;
}

.float-panel.is-active .float-panel-toggle,
.float-panel.is-active .fp-collapse {
  border-color: #d64562;
  box-shadow: 0 0 0 3px var(--accent-soft), 0 10px 26px rgba(150, 90, 115, 0.18);
}

.fp-icon {
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent-ink);
  font-size: 15px;
  font-weight: 700;
}

.float-panel.collapsed .fp-icon {
  width: 34px;
  height: 34px;
  background: transparent;
  font-size: 17px;
}

.fp-text {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.fp-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.2;
  white-space: nowrap;
}

.fp-sub {
  font-size: 10.5px;
  color: var(--ink-soft);
  line-height: 1.25;
  white-space: nowrap;
}

.fp-collapse {
  width: 24px;
  min-width: 24px;
  height: 26px;
  padding: 0;
  margin: 0;
  border-radius: 8px;
  border: 1px solid var(--accent-line);
  background: var(--card);
  color: var(--ink-soft);
  box-shadow: none;
  font-size: 13px;
  line-height: 1;
}

.fp-collapse:hover {
  background: var(--accent-soft);
  color: var(--accent-ink);
}

.fp-count {
  position: absolute;
  top: -6px;
  right: -8px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: #d64562;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
}

.float-panel:not(.collapsed) .fp-count {
  top: 5px;
  right: 5px;
}

.float-panel-body {
  position: absolute;
  right: 100%;
  top: 0;
  width: 300px;
  max-height: 62vh;
  overflow: auto;
  padding: 14px 16px;
  border-radius: 20px 0 0 20px;
  border: 1px solid var(--accent-line);
  border-right: 0;
  background: var(--card);
  color: var(--ink);
  box-shadow: -8px 10px 26px rgba(150, 90, 115, 0.14);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateX(6px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
}

.float-panel.open .float-panel-body {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(0);
}

.float-panel.is-active .float-panel-body {
  border-color: #d64562;
  box-shadow: 0 14px 34px rgba(150, 90, 115, 0.18);
}

/* 打开时：父项与子菜单拼成一体 */
.float-panel.open:not(.collapsed) .float-panel-toggle {
  background: var(--accent-soft);
  border-color: #d64562;
  border-radius: 0 20px 20px 0;
  box-shadow: -6px 10px 26px rgba(150, 90, 115, 0.16);
}

.float-panel.open .float-panel-body {
  border-color: #d64562;
  box-shadow: -8px 10px 26px rgba(150, 90, 115, 0.16);
}

.float-panel.open:not(.collapsed)::after {
  content: '';
  position: absolute;
  left: -5px;
  top: 24px;
  width: 10px;
  height: 10px;
  background: var(--accent-soft);
  border-top: 1px solid #d64562;
  border-right: 1px solid #d64562;
  transform: rotate(45deg);
  z-index: 6;
  pointer-events: none;
}

.fp-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.fp-head h3 {
  font-size: 16px;
}

.fp-close {
  width: 28px;
  height: 28px;
  min-width: 28px;
  padding: 0;
  margin: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--ink-soft);
  box-shadow: none;
  font-size: 18px;
}

.pending-bubble {
  position: absolute;
  right: 0;
  top: -62px;
  display: flex;
  align-items: center;
  gap: 6px;
  max-width: 240px;
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid var(--accent-line);
  background: var(--bubble-bg);
  color: var(--ink);
  box-shadow: var(--shadow);
  font-size: 13px;
  line-height: 1.4;
}

.pending-bubble::after {
  content: '';
  position: absolute;
  right: 20px;
  bottom: -6px;
  width: 10px;
  height: 10px;
  background: var(--bubble-bg);
  border-right: 1px solid var(--accent-line);
  border-bottom: 1px solid var(--accent-line);
  transform: rotate(45deg);
}

.pending-bubble-text {
  padding: 0;
  margin: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
  color: var(--ink);
  font-size: 13px;
  text-align: left;
}

.pending-bubble-close {
  padding: 0 2px;
  margin: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
  color: var(--ink-faint);
  font-size: 17px;
  line-height: 1;
}

.sys-msg {
  align-self: center;
  max-width: 90%;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--system-bg);
  color: var(--ink-soft);
  font-size: 13px;
  text-align: center;
}

.bubble-body .sys-msg-value {
  font-weight: 700;
  color: var(--accent-ink);
}

@media (min-width: 768px) and (max-width: 900px) {
  .app {
    padding-right: 84px;
  }
}

@media (max-width: 767px) {
  .float-dock {
    top: auto;
    bottom: 160px;
    right: 12px;
  }

  .float-dock .float-panel .float-panel-body {
    position: fixed;
    right: 12px;
    top: 88px;
    width: 50vw;
    min-width: 260px;
    max-height: min(68vh, calc(100vh - 180px));
    border-radius: 20px;
    border-right: 1px solid var(--accent-line);
    box-shadow: var(--shadow);
  }

  .float-panel.open:not(.collapsed) .float-panel-toggle {
    border-radius: 20px;
    box-shadow: 0 0 0 3px var(--accent-soft), 0 10px 26px rgba(150, 90, 115, 0.18);
  }

  .float-panel.open:not(.collapsed)::after {
    display: none;
  }

  .pending-bubble {
    position: fixed;
    right: 12px;
    bottom: 240px;
    top: auto;
  }

  .pending-bubble::after {
    display: none;
  }
}

@media (max-width: 640px) {
  .float-dock {
    gap: 14px;
  }
}

/* =========================================================
   任务 1/7：反馈会话 + 交流群（2026-10-18 第二轮）
   ========================================================= */
.feedback-threads {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px dashed var(--line);
}

.feedback-threads h3 {
  font-size: 16px;
  margin-bottom: 8px;
}

.feedback-thread-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 210px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.feedback-thread-item {
  width: 100%;
  text-align: left;
  padding: 9px 11px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--card-2);
  color: var(--ink);
  box-shadow: none;
}

.feedback-thread-item.active {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.feedback-thread-item-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.feedback-thread-time,
.feedback-thread-meta {
  color: var(--ink-faint);
  font-size: 12px;
}

.feedback-thread-summary {
  display: block;
  margin: 4px 0 2px;
  color: var(--ink-soft);
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.feedback-status {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 999px;
  font-size: 12px;
  line-height: 1.7;
  border: 1px solid var(--accent-line);
  color: var(--accent-ink);
  background: var(--accent-soft);
}

.feedback-status.handled {
  border-color: #8fbf9a;
  color: #2f6b3d;
  background: #eaf7ee;
}

.feedback-thread-detail {
  margin-top: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card-2);
}

.feedback-thread-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.feedback-thread-msgs {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 260px;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 4px 2px;
}

.feedback-msg {
  max-width: 88%;
  padding: 7px 10px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--card);
}

.feedback-msg.from-user {
  align-self: flex-end;
  background: var(--accent-soft);
  border-color: var(--accent-line);
}

.feedback-msg.from-admin {
  align-self: flex-start;
}

.feedback-msg-meta {
  color: var(--ink-faint);
  font-size: 12px;
  margin-bottom: 2px;
}

.feedback-msg-text {
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 14px;
  line-height: 1.65;
}

.feedback-reply {
  display: flex;
  gap: 8px;
  align-items: flex-end;
  margin-top: 10px;
}

.feedback-reply textarea {
  flex: 1;
  min-width: 0;
}

.feedback-reply button {
  flex: 0 0 auto;
  min-height: 44px;
}

/* 左下角交流群按钮：跟申诉 / 反馈同列同尺寸（58px 圆形），面板向上展开 */
.community-widget {
  position: relative;
  display: flex;
}

.community-toggle:hover {
  background: var(--accent-soft);
  filter: none;
}

.community-panel {
  position: absolute;
  left: 0;
  bottom: calc(100% + 10px);
  width: min(300px, calc(100vw - 32px));
  max-height: min(56vh, 420px);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 12px;
  border: 1px solid var(--accent-line);
  border-radius: 14px;
  background: var(--card);
  color: var(--ink);
  box-shadow: var(--shadow);
}

.community-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.community-close {
  width: 28px;
  min-width: 28px;
  height: 28px;
  min-height: 28px;
  padding: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--ink-soft);
  box-shadow: none;
  font-size: 18px;
  line-height: 1;
}

.community-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.community-item {
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--card-2);
}

.community-item-main {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.community-name {
  font-weight: 700;
}

.community-qq {
  color: var(--ink-soft);
  font-size: 13px;
}

.community-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 7px;
}

.community-actions button,
.community-link {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 10px;
  border-radius: 8px;
  border: 1px solid var(--accent-line);
  background: var(--card);
  color: var(--accent-ink);
  font-size: 13px;
  text-decoration: none;
  box-shadow: none;
}

.community-actions button:hover,
.community-link:hover {
  background: var(--accent-soft);
  filter: none;
}

/* 后台：反馈会话 / 交流群表格 */
.fb-cell-text {
  max-width: 280px;
  word-break: break-word;
}

.fb-last {
  margin-top: 3px;
  font-size: 12px;
}

.fb-cell-receipt {
  max-width: 220px;
  word-break: break-word;
  color: var(--ink-soft);
}

.fb-detail {
  margin-top: 16px;
  padding: 14px;
  border: 1px solid var(--accent-line);
  border-radius: 12px;
  background: var(--card-2);
}

.fb-detail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.fb-detail-msgs {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 300px;
  overflow-y: auto;
  overscroll-behavior: contain;
  margin: 10px 0;
  padding: 4px 2px;
}

.fb-msg {
  max-width: 86%;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--card);
}

.fb-msg.from-admin {
  align-self: flex-end;
  background: var(--accent-soft);
  border-color: var(--accent-line);
}

.fb-msg-meta {
  color: var(--ink-faint);
  font-size: 12px;
}

.fb-msg-text {
  white-space: pre-wrap;
  word-break: break-word;
}

.fb-templates {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

@media (max-width: 640px) {
  .feedback-thread-msgs {
    max-height: 220px;
  }

  .fb-cell-text,
  .fb-cell-receipt {
    max-width: 160px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .float-panel-body,
  .pending-bubble,
  .fold-mark,
  .ann-banner,
  .ann-banner button,
  #ann-entry-btn,
  .ann-center-x {
    transition: none !important;
    animation: none !important;
  }
}

/* 匹配 v3：TAG 严格模式 + 性向 chip */
.strict-tag-switch {
  margin: 4px 0 2px;
  font-weight: 600;
  color: var(--accent-ink);
}

.strict-tag-tip {
  margin: -2px 0 8px;
}

.ori-chip {
  display: inline-block;
  padding: 2px 10px;
  border: 1px solid var(--accent-line);
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-ink);
  font-size: 12.5px;
  line-height: 1.7;
}

.candidate-orientation {
  margin: 2px 0 6px;
}

/* =========================================================
   1.3.0-test：顶部三 Tab / 广场测试版 / 快捷屏蔽
   ========================================================= */
.main-tabs {
  display: flex;
  gap: 6px;
  margin: 0 0 14px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--card);
  box-shadow: var(--shadow);
}

.main-tab {
  flex: 1 1 0;
  min-width: 0;
  margin: 0;
  padding: 9px 6px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  box-shadow: none;
  color: var(--ink-soft);
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
}

.main-tab:hover {
  background: var(--accent-soft);
  color: var(--accent-ink);
}

.main-tab.active {
  background: var(--accent-deep);
  color: #fff;
}

.main-tab .beta-badge {
  margin-left: 2px;
  vertical-align: 2px;
}

.beta-badge {
  display: inline-block;
  padding: 0 6px;
  border: 1px solid var(--accent-line);
  border-radius: 999px;
  background: var(--card-2);
  color: var(--ink-faint);
  font-size: 11px;
  font-weight: 500;
  line-height: 17px;
  letter-spacing: 0;
  white-space: nowrap;
}

.plaza-head h2 {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}

.plaza-form-wrap {
  margin: 14px 0;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card-2);
}

.plaza-form-wrap > summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--accent-ink);
  line-height: 1.8;
}

.plaza-form {
  margin-top: 10px;
}

.plaza-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 16px 0 6px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card-2);
}

.plaza-filters label {
  font-size: 12.5px;
  color: var(--ink-faint);
}

.plaza-filters select {
  flex: 1 1 118px;
  min-width: 96px;
  margin: 0;
}

.plaza-filters .row {
  flex: 1 1 100%;
  margin: 2px 0 0;
  gap: 6px;
}

.plaza-filters .row button {
  margin: 0;
  padding: 6px 12px;
  font-size: 13px;
}

.plaza-list {
  margin-top: 8px;
}

.plaza-post {
  padding: 13px 2px;
  line-height: 1.8;
}

.plaza-post h3 {
  margin: 0 0 4px;
  font-size: 16px;
  line-height: 1.6;
}

.plaza-post .code {
  font-size: 14px;
}

.plaza-post p {
  margin: 0 0 5px;
  font-size: 14px;
  color: var(--ink-soft);
}

.plaza-post .plaza-title-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-bottom: 5px;
}

.plaza-chip {
  display: inline-block;
  padding: 1px 8px;
  border: 1px solid var(--accent-line);
  border-radius: 999px;
  background: var(--card);
  color: var(--accent-ink);
  font-size: 12px;
  line-height: 1.7;
}

.plaza-chip.warm {
  background: var(--accent-soft);
  font-weight: 600;
}

.plaza-post .plaza-remaining {
  color: var(--accent-ink);
  font-weight: 600;
}

.plaza-post .row {
  margin-top: 6px;
  gap: 6px;
}

.plaza-post .row button {
  margin: 0;
  padding: 5px 11px;
  font-size: 13px;
}

.plaza-detail-card {
  max-width: 560px;
}

.plaza-detail-body p {
  margin: 0 0 8px;
  line-height: 1.8;
}

.plaza-empty {
  margin: 10px 0;
  padding: 14px;
  border-radius: 10px;
  background: var(--card-2);
  color: var(--ink-soft);
  font-size: 14px;
}

.groups-panel .community-list {
  margin-top: 10px;
}

.cand-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
}

.cand-actions button {
  margin: 0;
}

.quick-block-btn {
  margin-left: auto;
  padding: 4px 10px;
  border: 1px solid rgba(176, 64, 64, 0.35);
  border-radius: 8px;
  background: transparent;
  color: #a13d3d;
  font-size: 13px;
  line-height: 1.6;
  box-shadow: none;
}

.quick-block-btn:hover {
  border-color: rgba(176, 64, 64, 0.7);
  background: rgba(176, 64, 64, 0.06);
  color: #8e2f2f;
}

.candidate.blocked-out {
  opacity: 0.45;
}

@media (max-width: 560px) {
  .main-tab {
    padding: 8px 3px;
    font-size: 14px;
  }

  .beta-badge {
    font-size: 10px;
  }

  .plaza-filters select {
    flex-basis: 100%;
  }

  .plaza-detail-card {
    max-width: none;
  }
}

@media (max-width: 720px) {
  .float-panel-body .row {
    flex-wrap: wrap;
    gap: 10px;
  }

  .float-panel-body .row > div {
    flex: 1 1 100%;
    min-width: 0;
  }

  .float-panel-body .row > .unlock-actions {
    flex: 1 1 100%;
    width: 100%;
    justify-content: flex-start;
  }

  .float-panel-body .row > .unlock-actions > button {
    flex: 0 0 auto;
  }
}

@media (max-width: 767px) {
  .float-dock.has-open-panel .float-panel:not(.is-active) {
    display: none;
  }

  .float-dock.has-open-panel .float-panel.is-active {
    z-index: 80;
  }

  .float-dock.has-open-panel .float-panel.is-active .float-panel-body {
    position: fixed;
    left: 12px;
    right: 12px;
    top: 88px;
    width: auto;
    min-width: 0;
    max-width: none;
    max-height: calc(100vh - 330px);
    border-radius: 20px;
    border-right: 1px solid var(--accent-line);
    z-index: 81;
  }
}

/* =========================================================
   悬浮窗 ID 行：宽度 / 滚动条 / 不横向溢出（2026-10-18）
   ========================================================= */
/* 顶部条：加宽给副标题留足空间；收起态仍走 56px 图标规则 */
#unlocked-float:not(.collapsed) .float-panel-toggle {
  width: 220px;
  min-width: 220px;
}

#unlocked-float .fp-sub {
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 滚动只留在纵向，禁止横向滚动条把内容切成两半 */
#unlocked-panel,
#pending-panel {
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--accent-line) transparent;
}

#unlocked-panel::-webkit-scrollbar,
#pending-panel::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

#unlocked-panel::-webkit-scrollbar-track,
#pending-panel::-webkit-scrollbar-track {
  background: transparent;
}

#unlocked-panel::-webkit-scrollbar-thumb,
#pending-panel::-webkit-scrollbar-thumb {
  background: var(--accent-line);
  border-radius: 999px;
}

/* 列表项：ID 可收缩省略，按钮区保持自身宽度 */
#unlock-box,
#greet-box,
.float-row {
  min-width: 0;
}

.float-row {
  flex-wrap: nowrap;
}

.float-row-actions {
  flex-wrap: nowrap;
}

/* 桌面端给面板 300–320px，让 ID 与按钮并排且不竖排 */
@media (min-width: 768px) {
  #unlocked-float .float-panel-body,
  #pending-float .float-panel-body {
    width: 316px;
  }
}

/* =========================================================
   玩家名片悬浮窗（2026-10-18）
   深色 / 粉白婚礼风共用主题变量，移动端改为底部全宽卡片
   ========================================================= */
.namecard-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(58, 52, 56, 0.46);
}

.namecard-card {
  position: relative;
  width: min(420px, calc(100vw - 32px));
  max-height: min(82vh, 640px);
  overflow-x: hidden;
  overflow-y: auto;
  padding: 24px 22px 20px;
  border: 1px solid var(--accent-line);
  border-radius: 22px;
  background: var(--card);
  color: var(--ink);
  box-shadow: 0 24px 60px rgba(60, 40, 48, 0.28);
  scrollbar-width: thin;
  scrollbar-color: var(--accent-line) transparent;
}

.namecard-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  min-width: 36px;
  margin: 0;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--card-2);
  color: var(--ink-soft);
  box-shadow: none;
  font-size: 22px;
  line-height: 1;
}

.namecard-close:hover {
  background: var(--accent-soft);
  filter: none;
}

.namecard-head {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  padding-right: 38px;
}

.namecard-avatar {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 58px;
  height: 58px;
  border: 1px solid var(--accent-line);
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-soft), var(--card-2));
  color: var(--accent-ink);
  font-family: "Noto Serif SC", "Source Han Serif SC", "Songti SC", "STSong", serif;
  font-size: 26px;
  font-weight: 700;
  line-height: 1;
}

.namecard-title-wrap {
  min-width: 0;
}

.namecard-title {
  margin: 0;
  color: var(--accent-ink);
  font-size: 22px;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: 0.02em;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.namecard-code {
  margin: 3px 0 0;
  color: var(--ink-faint);
  font-size: 13px;
  overflow-wrap: anywhere;
}

.namecard-fields {
  display: flex;
  flex-direction: column;
  gap: 11px;
  margin: 18px 0 0;
  padding: 14px 0 0;
  border-top: 1px dashed var(--accent-line);
}

.namecard-row {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  min-width: 0;
}

.namecard-row dt {
  color: var(--ink-faint);
  font-size: 12.5px;
  line-height: 1.8;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.namecard-row dd {
  min-width: 0;
  margin: 0;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.7;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.namecard-row.is-bio dd {
  white-space: pre-wrap;
}

.namecard-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.namecard-tag {
  display: inline-block;
  padding: 2px 9px;
  border: 1px solid var(--accent-line);
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-ink);
  font-size: 12px;
  line-height: 1.5;
}

.namecard-empty {
  margin: 18px 0 0;
  padding-top: 14px;
  border-top: 1px dashed var(--accent-line);
  color: var(--ink-faint);
  font-size: 13px;
  text-align: center;
}

@media (max-width: 640px) {
  .namecard-modal {
    align-items: flex-end;
    padding: 0;
  }

  .namecard-card {
    width: 100%;
    max-height: 80vh;
    padding: 26px 18px calc(20px + env(safe-area-inset-bottom, 0px));
    border-radius: 22px 22px 0 0;
  }
}

/* =========================================================
   免登录申诉 / 空口令登录强制设口令（2026-10-18）
   ========================================================= */
.link-btn {
  display: inline;
  width: auto;
  margin: 6px 0 0;
  padding: 2px 0;
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
  color: var(--accent-ink);
  font: inherit;
  font-size: 13px;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.link-btn:hover {
  background: none;
  filter: none;
  color: var(--accent);
}

.header-appeal-link {
  margin: 0 0 0 10px;
  color: var(--ink-soft);
  font-size: 12px;
}

.reg-appeal-link {
  display: block;
  margin: 10px auto 0;
}

.anon-appeal-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.anon-appeal-row label {
  margin-top: 0;
}

@media (max-width: 560px) {
  .anon-appeal-row {
    grid-template-columns: 1fr;
    gap: 0;
  }
}
