/* ============================================================
   家 · 团本报名 —— 共用主题（清新 / fresh）
   团员首页与管理后台共用，改这里两边一起变。
   ============================================================ */

:root {
  /* 底色：薄荷白 → 天空白，极浅 */
  --bg: #f3faf7;
  --bg-mint: #e2f5ec;
  --bg-sky: #e6f2fd;
  --bg-lilac: #f1eefc;

  --surface: #ffffff;
  --surface2: #f4faf7;
  --surface3: #e8f3ee;

  --border: #dcece5;
  --border2: #bcdccb;

  --ink: #1f3730;
  --text: #2c453c;
  --text2: #6d847b;
  --text-on-dark: #2c453c;
  --text-on-dark-2: #7d938a;

  --accent: #2fae83;
  --accent2: #23916b;
  --accent-dim: rgba(47, 174, 131, .10);
  --accent-soft: #e6f8f0;
  --sun: #f7c948;
  --teal: #2aa8a2;
  --blue: #4b9ae0;

  --danger: #de6a63;
  --danger-soft: #fdeeec;
  --success: #2f9d6f;
  --success-soft: #e8f8f0;

  --t-color: #3f8ede;
  --n-color: #e0718f;
  --dps-color: #d9982f;

  --radius: 12px;
  --radius-lg: 18px;
  --radius-pill: 999px;

  --shadow: 0 6px 20px rgba(31, 85, 66, .07);
  --shadow-md: 0 10px 26px rgba(31, 85, 66, .09);
  --shadow-lg: 0 16px 40px rgba(31, 85, 66, .13);

  --font: system-ui, -apple-system, "Segoe UI", "PingFang SC",
          "Microsoft YaHei", "Noto Sans SC", sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font);
  color: var(--text);
  min-height: 100vh;
  background-color: var(--bg);
  background-image:
    radial-gradient(900px 520px at 6% -10%, var(--bg-mint) 0%, transparent 62%),
    radial-gradient(820px 500px at 102% -4%, var(--bg-sky) 0%, transparent 58%),
    radial-gradient(700px 620px at 50% 108%, var(--bg-lilac) 0%, transparent 62%);
  background-attachment: fixed;
  background-repeat: no-repeat;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ---------------- 顶栏 ---------------- */

header {
  position: sticky;
  top: 0;
  z-index: 50;
  padding: 12px 24px;
  background: rgba(255, 255, 255, .82);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 2px 14px rgba(31, 85, 66, .05);
}

.header-inner {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

header .logo {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  color: inherit;
  text-decoration: none;
}

.brand-mark {
  width: 48px;
  height: 48px;
  flex: 0 0 auto;
  display: block;
  border-radius: 50%;
  background: #fff;
  border: 2px solid #fff;
  box-shadow: 0 4px 14px rgba(31, 85, 66, .16), 0 0 0 1px var(--border);
}

.brand-copy { min-width: 0; }

header h1 {
  color: var(--ink);
  font-size: 19px;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: .2px;
  white-space: nowrap;
}

header h1 span { color: var(--accent); font-weight: 700; }

.brand-copy p {
  margin-top: 2px;
  color: var(--text2);
  font-size: 11px;
  line-height: 1.3;
}

header .links,
header .nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

header .links a,
header .nav a {
  color: var(--text2);
  text-decoration: none;
  font-size: 13px;
  padding: 8px 15px;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  background: var(--surface2);
  transition: color .18s, background .18s, border-color .18s;
}

header .links a:hover,
header .nav a:hover {
  color: var(--accent2);
  background: var(--accent-soft);
  border-color: var(--border2);
}

/* ---------------- 版心 / 通用 ---------------- */

.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 28px 20px 56px;
}

.page-lead {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin: 0 0 20px;
}

.page-lead h2 {
  color: var(--ink);
  font-size: 25px;
  font-weight: 700;
  letter-spacing: .3px;
  line-height: 1.3;
}

.page-lead p {
  color: var(--text2);
  font-size: 13px;
  margin-top: 5px;
}

.page-lead .lead-stamp {
  color: var(--accent2);
  background: var(--accent-soft);
  border: 1px solid var(--border2);
  padding: 7px 14px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.loading {
  text-align: center;
  padding: 70px 20px;
  color: var(--text2);
  font-size: 14px;
}

.loading .spinner {
  width: 34px;
  height: 34px;
  margin: 0 auto 16px;
  border: 3px solid var(--surface3);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin .85s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 0%, 100% { opacity: .45; } 50% { opacity: 1; } }

.empty-state {
  text-align: center;
  padding: 56px 20px;
  color: var(--text2);
  font-size: 14px;
}

.empty-state .icon {
  font-size: 44px;
  margin-bottom: 10px;
  opacity: .5;
}

.empty-panel {
  max-width: 430px;
  margin: 54px auto;
  padding: 40px 28px;
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.empty-panel .empty-emoji {
  font-size: 42px;
  line-height: 1;
  margin-bottom: 14px;
}

.empty-panel h3 {
  color: var(--ink);
  font-size: 17px;
  font-weight: 700;
}

.empty-panel p {
  color: var(--text2);
  font-size: 13px;
  margin: 7px 0 20px;
}

/* ---------------- 活动卡片 ---------------- */

.activity-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px 24px;
  margin-bottom: 20px;
  box-shadow: var(--shadow);
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}

.activity-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 24px;
  right: 24px;
  height: 3px;
  border-radius: 0 0 3px 3px;
  background: linear-gradient(90deg, #6fd6b3, #8fdcf0 55%, #c3d8ff);
  opacity: .9;
}

.activity-card:hover {
  transform: translateY(-3px);
  border-color: var(--border2);
  box-shadow: var(--shadow-lg);
}

.activity-card .top,
.activity-card .row1 {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 12px;
}

.activity-card h2 {
  color: var(--ink);
  font-size: 19px;
  font-weight: 700;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.activity-card h3 {
  color: var(--ink);
  font-size: 17px;
  font-weight: 700;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.activity-card .desc {
  color: var(--text2);
  font-size: 13px;
  margin-top: 5px;
  line-height: 1.6;
}

.activity-card .meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
  font-size: 12.5px;
  color: var(--text2);
}

.activity-card .meta span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 11px;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  background: var(--surface2);
  white-space: nowrap;
}

.activity-card .meta b {
  color: var(--ink);
  font-weight: 700;
  margin-right: 2px;
}

.activity-card .actions {
  display: flex;
  gap: 8px;
  margin-top: 16px;
  flex-wrap: wrap;
}

.waitlist-meta {
  color: #a8701a !important;
  background: #fff5e2 !important;
  border-color: #f0d9ac !important;
  font-weight: 600;
}

/* 进度条 */

.progress-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
}

.progress-track {
  flex: 1;
  height: 9px;
  background: var(--surface3);
  border-radius: var(--radius-pill);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  border-radius: var(--radius-pill);
  transition: width .45s ease;
}

.progress-fill.under {
  background: linear-gradient(90deg, #4fc79d, #8be0c2);
}

.progress-fill.full {
  background: linear-gradient(90deg, #ef8d86, #f7b0aa);
}

.progress-text {
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
  min-width: 38px;
  text-align: right;
}

/* 团队面板：按 T / 奶 / 内功 / 外功 分列，卡片用门派配色 */

.team-panel-wrap { margin-top: 18px; }

.team-cols {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  align-items: start;
}

.team-col { display: flex; flex-direction: column; gap: 6px; min-width: 0; }

.team-col-head {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 2px 0 4px;
  color: var(--text2);
  font-size: 12px;
  font-weight: 700;
}

.team-col-head b { margin-left: auto; color: var(--ink); font-size: 11.5px; }

.col-dot { width: 8px; height: 8px; border-radius: 50%; flex: 0 0 auto; }
.col-dot.t { background: var(--t-color); }
.col-dot.n { background: var(--n-color); }
.col-dot.inner { background: #7a6bb5; }
.col-dot.outer { background: #c4822c; }

.team-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 12px;
  font-weight: 700;
  overflow: hidden;
}

.chip-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

.chip-school {
  margin-left: auto;
  flex: 0 0 auto;
  font-size: 10.5px;
  font-weight: 500;
  opacity: .72;
  white-space: nowrap;
}

.chip-iron {
  flex: 0 0 auto;
  font-size: 9.5px;
  padding: 0 4px;
  border-radius: 4px;
  background: rgba(255, 255, 255, .72);
}

.team-slot {
  height: 38px;
  border-radius: 10px;
  border: 1.5px dashed #d7e9e0;
  background: #fbfefc;
  cursor: default;
}

/* 定位统计 */

.role-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
  font-size: 12px;
}

.role-bar .rb-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text);
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 5px 12px;
}

.role-bar .rb-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

.role-bar .rb-dot.t-dot { background: var(--t-color); }
.role-bar .rb-dot.n-dot { background: var(--n-color); }
.role-bar .rb-dot.d-dot { background: var(--dps-color); }

.role-bar .rb-num { color: var(--ink); font-weight: 700; }

/* 我的报名 */

.my-signup {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 16px;
  padding: 12px 14px;
  background: var(--accent-soft);
  border: 1px solid var(--border2);
  border-radius: var(--radius);
}

.my-signup > div:first-child {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
}

.my-label {
  color: var(--text2);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .5px;
}

.my-signup strong {
  color: var(--ink);
  font-size: 14px;
  overflow-wrap: anywhere;
}

.my-status {
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.my-status.confirmed { color: #1c6f52; background: #cdf0e0; }
.my-status.waiting { color: #9a6712; background: #ffeec6; }

.my-actions { display: flex; gap: 6px; flex: 0 0 auto; }

/* 小铁 */

.iron-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
  border: 1px solid transparent;
}

.iron-chip.free { color: #8a6a1e; background: #fff6e2; border-color: #f0dcae; }
.iron-chip.taken { color: #7a4b8f; background: #f7ecfc; border-color: #ddc8ea; }

.form-group label.iron-option {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 0;
  padding: 11px 13px;
  border: 1px solid var(--border2);
  border-radius: 10px;
  background: var(--surface2);
  cursor: pointer;
  font-size: 13px;
  font-weight: 400;
  color: var(--ink);
  transition: border-color .16s, background .16s;
}

.form-group label.iron-option:hover { border-color: var(--accent); background: var(--accent-soft); }

.form-group label.iron-option input {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
  flex: 0 0 auto;
}

.iron-option em {
  margin-left: auto;
  font-style: normal;
  font-size: 11.5px;
  color: var(--text2);
  text-align: right;
}

.form-group label.iron-option:has(input:disabled) {
  opacity: .62;
  cursor: not-allowed;
  background: var(--surface3);
}

/* 我的报名列表 */

.my-list-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  margin-bottom: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.mli-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.mli-main strong { color: var(--ink); font-size: 14px; }
.mli-sub { color: var(--text2); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mli-status { display: flex; align-items: center; gap: 6px; flex: 0 0 auto; }
.mli-actions { display: flex; gap: 6px; flex: 0 0 auto; }
.mli-count { font-size: 12px; font-weight: 600; color: var(--text2); margin-left: 6px; }

/* ---------------- 按钮 ---------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 40px;
  padding: 9px 19px;
  border-radius: 10px;
  font-family: var(--font);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform .16s, box-shadow .16s, background .16s, color .16s, border-color .16s;
  white-space: nowrap;
}

.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, #3bbd8e, #279a70);
  border-color: #26946c;
  box-shadow: 0 4px 14px rgba(47, 174, 131, .26);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #34af83, #1f8560);
  transform: translateY(-1px);
  box-shadow: 0 7px 18px rgba(47, 174, 131, .32);
}

.btn-primary:active { transform: translateY(0); box-shadow: 0 3px 10px rgba(47, 174, 131, .24); }

.btn-outline {
  color: var(--ink);
  background: #fff;
  border-color: var(--border2);
}

.btn-outline:hover {
  color: var(--accent2);
  border-color: var(--accent);
  background: var(--accent-soft);
}

.btn-danger {
  color: var(--danger);
  background: #fff;
  border-color: #f1c9c4;
}

.btn-danger:hover { color: #fff; background: var(--danger); border-color: var(--danger); }

.btn-success { color: #fff; background: var(--success); border-color: var(--success); }
.btn-success:hover { background: #27855d; border-color: #27855d; }

.btn-sm { min-height: 34px; padding: 6px 13px; font-size: 12.5px; }
.btn-xs { min-height: 30px; padding: 4px 11px; font-size: 12px; }

.btn:disabled,
.btn[disabled] { opacity: .45; cursor: not-allowed; transform: none; box-shadow: none; }

/* ---------------- 弹窗 / 表单 ---------------- */

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  padding: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(31, 55, 48, .38);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  animation: fadeIn .18s ease;
}

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.modal {
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 26px;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: var(--shadow-lg);
  animation: popIn .2s ease;
}

@keyframes popIn {
  from { opacity: 0; transform: translateY(10px) scale(.985); }
  to { opacity: 1; transform: none; }
}

.modal h2 {
  color: var(--ink);
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 8px;
  line-height: 1.4;
}

.modal h2 .m-icon { width: 20px; height: 20px; color: var(--accent); flex: 0 0 auto; }

.modal-wide { max-width: 1120px; }

.form-group { margin-bottom: 15px; }

.form-group label {
  display: block;
  color: var(--text2);
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 5px;
  letter-spacing: .2px;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 10px 13px;
  color: var(--ink);
  background: var(--surface2);
  border: 1px solid var(--border2);
  border-radius: 10px;
  font-size: 14px;
  font-family: var(--font);
  outline: none;
  transition: border-color .16s, box-shadow .16s, background .16s;
}

.form-group input::placeholder,
.form-group textarea::placeholder { color: #a3b7ad; opacity: 1; }

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  background: #fff;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
}

.form-group textarea { resize: vertical; min-height: 78px; }

/* 语音输入 */

.voice-field { position: relative; }

.voice-field > input { padding-right: 46px; }

.mic-btn {
  position: absolute;
  top: 50%;
  right: 6px;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  color: var(--accent2);
  background: #fff;
  border: 1px solid var(--border2);
  border-radius: 50%;
  cursor: pointer;
  transition: background .16s, color .16s, border-color .16s, transform .16s;
}

.mic-btn:hover { background: var(--accent-soft); border-color: var(--accent); }

.mic-btn.listening {
  color: #fff;
  background: var(--accent);
  border-color: var(--accent);
  animation: micPulse 1.25s ease-out infinite;
}

.mic-btn svg { display: block; }

@keyframes micPulse {
  0% { box-shadow: 0 0 0 0 rgba(47, 174, 131, .38); }
  70% { box-shadow: 0 0 0 9px rgba(47, 174, 131, 0); }
  100% { box-shadow: 0 0 0 0 rgba(47, 174, 131, 0); }
}

.voice-hint {
  margin-top: 6px;
  padding: 9px 12px;
  color: #9a6712;
  background: #fff8e9;
  border: 1px solid #f2dcb0;
  border-radius: 10px;
  font-size: 12px;
  line-height: 1.55;
}

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.form-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 20px;
}

/* 门派联想 */

.autocomplete-wrap { position: relative; }

.autocomplete-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  z-index: 100;
  display: none;
  max-height: 240px;
  overflow-y: auto;
  background: #fff;
  border: 1px solid var(--border2);
  border-radius: 12px;
  box-shadow: var(--shadow-md);
}

.autocomplete-dropdown.show { display: block; }

.auto-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 13px;
  color: var(--text);
  font-size: 13px;
  cursor: pointer;
  transition: background .1s;
}

.auto-item:hover,
.auto-item.active { background: var(--accent-soft); color: var(--accent2); }

.auto-item .ai-tag {
  font-size: 11px;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: var(--radius-pill);
}

.auto-item .ai-tag.t { background: rgba(63, 142, 222, .14); color: var(--t-color); }
.auto-item .ai-tag.n { background: rgba(224, 113, 143, .14); color: var(--n-color); }
.auto-item .ai-tag.d { background: rgba(217, 152, 47, .16); color: var(--dps-color); }

/* 心法选择 */

.xinfa-pills { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 2px; }

.xinfa-pill {
  flex: 1;
  min-width: 82px;
  padding: 7px 12px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--border2);
  border-radius: 10px;
  font-size: 12px;
  text-align: center;
  cursor: pointer;
  transition: .16s;
}

.xinfa-pill:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.xinfa-pill.selected {
  color: var(--accent2);
  background: var(--accent-soft);
  border-color: var(--accent);
  font-weight: 700;
  box-shadow: 0 0 0 3px var(--accent-dim);
}

.xinfa-pill .pill-role {
  display: block;
  margin-top: 1px;
  font-size: 10px;
  opacity: .65;
}

/* ---------------- 标签 / 表格 ---------------- */

.tag {
  display: inline-block;
  padding: 3px 9px;
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.4;
}

.tag-t { background: rgba(63, 142, 222, .13); color: var(--t-color); }
.tag-n { background: rgba(224, 113, 143, .14); color: var(--n-color); }
.tag-dps { background: rgba(217, 152, 47, .16); color: var(--dps-color); }

.status-pill {
  display: inline-block;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.status-confirmed { color: #1c6f52; background: #d3f1e3; }
.status-waiting { color: #9a6712; background: #ffeec6; }

.signup-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  margin-top: 4px;
}

.signup-table th {
  text-align: left;
  padding: 9px 11px;
  color: var(--text2);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  border-bottom: 1px solid var(--border);
  background: var(--surface2);
}

.signup-table th:first-child { border-radius: 10px 0 0 0; }
.signup-table th:last-child { border-radius: 0 10px 0 0; }

.signup-table td {
  padding: 9px 11px;
  color: var(--text);
  border-bottom: 1px solid #eef6f2;
  vertical-align: middle;
  white-space: nowrap;
}

.signup-table tbody tr { transition: background .14s; }
.signup-table tbody tr:hover { background: #f8fdfb; }

/* ---------------- 提示 ---------------- */

.alert {
  padding: 11px 14px;
  border-radius: 10px;
  font-size: 13px;
  margin-bottom: 12px;
  border: 1px solid transparent;
}

.alert-success { color: #1c6f52; background: var(--success-soft); border-color: #bfe8d5; }
.alert-error { color: #a84742; background: var(--danger-soft); border-color: #f5cdc9; }

.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  padding: 12px 18px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 600;
  box-shadow: var(--shadow-md);
  animation: slideIn .22s ease;
  border: 1px solid transparent;
  background: #fff;
}

.toast-success { color: #1c6f52; border-color: #bfe8d5; box-shadow: inset 4px 0 0 var(--success), var(--shadow-md); }
.toast-error { color: #a84742; border-color: #f5cdc9; box-shadow: inset 4px 0 0 var(--danger), var(--shadow-md); }

@keyframes slideIn {
  from { transform: translateX(110%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* ---------------- 后台：登录 & 概览 ---------------- */

.login-page {
  max-width: 430px;
  margin: 54px auto 0;
  text-align: center;
  padding: 0 6px;
}

.login-avatar {
  width: 108px;
  height: 108px;
  display: block;
  margin: 0 auto 18px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid #fff;
  box-shadow: 0 10px 26px rgba(31, 85, 66, .18), 0 0 0 1px var(--border);
}

.login-page h2 {
  color: var(--ink);
  font-size: 23px;
  font-weight: 700;
  letter-spacing: .3px;
}

.login-page p {
  color: var(--text2);
  font-size: 13px;
  margin: 6px 0 22px;
}

.login-box {
  padding: 26px;
  text-align: left;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

.dashboard-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin: 2px 0 18px;
}

.dashboard-header h2 {
  color: var(--ink);
  font-size: 24px;
  font-weight: 700;
  letter-spacing: .3px;
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 22px;
}

.stat-card {
  padding: 15px 17px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.stat-card .num {
  color: var(--ink);
  font-size: 27px;
  font-weight: 700;
  line-height: 1.15;
}

.stat-card:nth-child(1) .num { color: var(--accent2); }
.stat-card:nth-child(2) .num { color: var(--teal); }
.stat-card:nth-child(3) .num { color: var(--blue); }
.stat-card:nth-child(4) .num { color: #c98614; }

.stat-card .label {
  color: var(--text2);
  font-size: 12.5px;
  font-weight: 600;
  margin-top: 2px;
}

.badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 9px;
  border-radius: var(--radius-pill);
  vertical-align: middle;
  white-space: nowrap;
}

.badge-active { color: #1c6f52; background: var(--success-soft); border: 1px solid #bfe8d5; }
.badge-closed { color: var(--text2); background: var(--surface3); border: 1px solid var(--border); }

/* 数据概览面板 */

.stats-panel {
  margin: 0 0 22px;
  padding: 18px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.stats-panel:empty { display: none; }

.stats-panel-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 14px;
}

.stats-panel-head h3 { color: var(--ink); font-size: 15px; font-weight: 700; }
.stats-panel-head span { color: var(--text2); font-size: 12px; }

.stats-mini {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.stats-mini > div {
  padding: 10px 12px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 10px;
}

.stats-mini b {
  display: block;
  color: var(--accent2);
  font-size: 20px;
  line-height: 1.25;
}

.stats-mini span { color: var(--text2); font-size: 11.5px; }

.stats-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }

.stats-block h4 {
  color: var(--text2);
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 8px;
}

.bar-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  font-size: 12px;
}

.bar-name {
  width: 50px;
  flex: 0 0 auto;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bar-track {
  flex: 1;
  height: 8px;
  background: var(--surface3);
  border-radius: var(--radius-pill);
  overflow: hidden;
}

.bar-track i {
  display: block;
  height: 100%;
  border-radius: var(--radius-pill);
  background: linear-gradient(90deg, #5fcba6, #8fe0c4);
}

.bar-track i.r-t { background: linear-gradient(90deg, #6aa9ee, #9cc7f5); }
.bar-track i.r-n { background: linear-gradient(90deg, #eb93ac, #f7bccb); }
.bar-track i.r-d { background: linear-gradient(90deg, #e8b45c, #f5d08c); }

.bar-num { width: 28px; flex: 0 0 auto; text-align: right; color: var(--text2); }
.stats-empty { color: var(--text2); font-size: 12px; }

.row-actions { display: flex; gap: 5px; flex-wrap: nowrap; }

/* 活动分组 */

.head-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.group-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 4px 0 12px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
}

.group-head em,
.history-group summary em {
  font-style: normal;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent2);
  background: var(--accent-soft);
  border: 1px solid var(--border2);
  border-radius: var(--radius-pill);
  padding: 1px 9px;
}

.history-group {
  margin: 18px 0 0;
  border-top: 1px dashed var(--border);
  padding-top: 14px;
}

.history-group summary {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text2);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
  padding: 6px 2px;
  user-select: none;
}

.history-group summary::-webkit-details-marker { display: none; }

.history-group summary::before {
  content: "▸";
  color: var(--accent);
  font-size: 12px;
  transition: transform .18s;
}

.history-group[open] summary::before { transform: rotate(90deg); }
.history-group[open] summary { margin-bottom: 12px; }

.mid {
  font-family: Consolas, "Courier New", monospace;
  font-size: 11.5px;
  color: var(--accent2);
  background: var(--accent-soft);
  border: 1px solid var(--border2);
  border-radius: 6px;
  padding: 1px 6px;
  letter-spacing: .3px;
}

.muted { color: var(--text2); }

.modal-hint {
  color: var(--text2);
  font-size: 12px;
  margin: -10px 0 14px;
}

/* ---------------- 可访问性 / 响应式 ---------------- */

button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

@media (max-width: 760px) {
  header { padding: 10px 14px; }
  .header-inner { gap: 10px; }
  .brand-mark { width: 42px; height: 42px; }
  header h1 { font-size: 16px; }
  .brand-copy p { display: none; }
  header .links a,
  header .nav a { padding: 7px 11px; font-size: 12px; }
  .container { padding: 20px 12px 44px; }
  .page-lead { align-items: flex-start; flex-direction: column; gap: 8px; margin-bottom: 16px; }
  .page-lead h2 { font-size: 21px; }
  .page-lead .lead-stamp { font-size: 11px; }
  .activity-card { padding: 17px 15px; }
  .activity-card::before { left: 15px; right: 15px; }
  .activity-card h2 { font-size: 17px; }
  .activity-card .top .btn { width: 100%; }
  .slot-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; }
  .slot-card { min-height: 64px; padding: 5px 6px; }
  .slot-icon { width: 18px; height: 18px; }
  .slot-name { font-size: 11px; }
  .slot-xinfa, .slot-score { font-size: 9.5px; }
  .team-chip { font-size: 11.5px; padding: 7px 9px; min-height: 36px; }
  .role-bar .rb-item { padding: 4px 9px; font-size: 11px; }
  .my-signup { align-items: flex-start; flex-direction: column; gap: 9px; }
  .my-actions { width: 100%; }
  .my-actions .btn { flex: 1; }
  .my-list-item { flex-wrap: wrap; gap: 8px; }
  .mli-main { flex: 1 1 100%; }
  .mli-actions { margin-left: auto; }
  .modal { padding: 20px 16px; border-radius: 16px; }
  .login-page { margin: 26px auto 0; }
  .login-avatar { width: 92px; height: 92px; }
  .login-box { padding: 20px 16px; }
  .dashboard-header h2 { font-size: 21px; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
  .stats-mini { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats-grid { grid-template-columns: 1fr; gap: 14px; }
  .stats-panel { padding: 15px 14px; }
  .stat-card { padding: 12px 14px; }
  .stat-card .num { font-size: 23px; }
  .form-row { grid-template-columns: 1fr; }
  .toast-container { top: 12px; right: 12px; left: 12px; }
  .toast { font-size: 12.5px; }
  .signup-table { font-size: 12px; }
  .signup-table th,
  .signup-table td { padding: 7px 8px; }
}

.build-tag {
  position: fixed;
  right: 10px;
  bottom: 8px;
  z-index: 5;
  font-size: 10px;
  font-weight: 600;
  color: #9db3a9;
  opacity: .8;
  pointer-events: none;
  user-select: none;
}


/* 团牌 / 公告 / 福利 */

.team-badge {
  display: inline-block;
  margin-right: 8px;
  padding: 2px 9px;
  border-radius: 8px;
  background: var(--accent-soft);
  border: 1px solid var(--border2);
  color: var(--accent2);
  font-size: 12px;
  font-weight: 700;
  vertical-align: middle;
}

.notice {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 14px 16px;
  margin-bottom: 14px;
  background: #fffdf4;
  border: 1px solid #f0e2b8;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.notice-icon { font-size: 18px; line-height: 1.4; flex: 0 0 auto; }
.notice-body { flex: 1; min-width: 0; }
.notice-body strong { display: block; color: var(--ink); font-size: 14px; margin-bottom: 2px; }
.notice-body p { color: #6f5a2e; font-size: 13px; line-height: 1.65; overflow-wrap: anywhere; }

.notice-close {
  flex: 0 0 auto;
  border: 0;
  background: transparent;
  color: #b9a77a;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  padding: 0 4px;
}

.notice-close:hover { color: #8a7333; }

.welfare-strip {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 12px 16px;
  margin-bottom: 16px;
  background: #fbf6ff;
  border: 1px solid #e3d6f2;
  border-radius: var(--radius-lg);
}

.ws-icon { font-size: 20px; flex: 0 0 auto; }
.ws-body { min-width: 0; }
.ws-body strong { color: #6b4b8f; font-size: 14px; }
.ws-prize { margin-left: 8px; font-size: 12px; color: #8a6aa8; }
.ws-body p { color: var(--text2); font-size: 12.5px; margin-top: 2px; overflow-wrap: anywhere; }


/* 福利 & 团长管理 */

.welfare-form {
  padding: 14px;
  margin-bottom: 16px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.welfare-form .form-actions { margin-top: 0; justify-content: flex-start; }
.welfare-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }

.welfare-item {
  padding: 14px 16px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.wi-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; flex-wrap: wrap; }
.wi-title strong { color: var(--ink); font-size: 14px; }
.wi-actions { display: flex; gap: 6px; align-items: center; }
.wi-meta { color: var(--text2); font-size: 12px; margin-top: 4px; }
.wi-desc { color: var(--text); font-size: 12.5px; margin-top: 4px; }

.wi-winners {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  font-size: 12px;
  color: var(--text2);
}

.winner-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  background: #f7ecfc;
  border: 1px solid #ddc8ea;
  color: #6b4b8f;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.winner-chip.done { background: var(--success-soft); border-color: #bfe8d5; color: #1c6f52; }


/* 福利中心（独立页） */

.welfare-card {
  padding: 16px 18px;
  margin-bottom: 12px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.wc-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.wc-head strong { color: var(--ink); font-size: 15px; }
.wc-meta { color: var(--text2); font-size: 12.5px; margin-top: 5px; }
.wc-desc { color: var(--text); font-size: 13px; margin-top: 5px; }
.wc-mine { margin-top: 8px; }

.list-tools { margin: 0 0 12px; }

.search-input {
  width: 100%;
  max-width: 320px;
  padding: 9px 13px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: 10px;
  font-size: 13px;
  font-family: var(--font);
  outline: none;
}

.search-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-dim); }


/* 候补队列 */

.queue-box {
  margin-top: 14px;
  border: 1px dashed var(--border2);
  border-radius: var(--radius);
  background: var(--surface2);
  padding: 10px 14px;
}

.queue-box summary {
  cursor: pointer;
  list-style: none;
  color: var(--text2);
  font-size: 12.5px;
  font-weight: 700;
}

.queue-box summary::-webkit-details-marker { display: none; }
.queue-box summary::before { content: "▸ "; color: var(--accent); }
.queue-box[open] summary::before { content: "▾ "; }

.queue-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 2px;
  font-size: 12.5px;
  color: var(--text);
  border-bottom: 1px solid var(--border);
}

.queue-row:last-child { border-bottom: 0; }
.queue-role { flex: 0 0 auto; color: var(--text2); font-weight: 700; width: 32px; }
.queue-pos { flex: 0 0 auto; color: var(--accent2); font-size: 11.5px; }
.queue-row strong { color: var(--ink); }
.queue-school { margin-left: auto; color: var(--text2); font-size: 11.5px; }


.wc-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 10px; }


.merge-box {
  margin-top: 18px;
  padding: 14px;
  background: var(--surface2);
  border: 1px dashed var(--border2);
  border-radius: var(--radius);
}

.merge-box h4 { color: var(--ink); font-size: 14px; margin-bottom: 4px; }
.merge-box .modal-hint { margin: 0 0 10px; }
.merge-box select { width: 100%; }

.force-pwd { z-index: 3000; }
.force-pwd .modal { border-top: 4px solid var(--accent); }

.site-foot {
  max-width: 1180px;
  margin: 0 auto 26px;
  padding: 0 20px;
  text-align: center;
  color: #9db3a9;
  font-size: 12px;
}

.site-foot a { color: #7d938a; text-decoration: none; }
.site-foot a:hover { color: var(--accent2); text-decoration: underline; }


/* 批量发布 */

.batch-head, .batch-row {
  display: grid;
  grid-template-columns: 1.8fr 1.4fr 0.7fr 0.5fr 0.5fr 0.5fr;
  gap: 8px;
  align-items: center;
}

.batch-head {
  margin: 6px 0 6px;
  color: var(--text2);
  font-size: 11.5px;
  font-weight: 700;
}

.batch-row { margin-bottom: 8px; }

.batch-row input {
  width: 100%;
  padding: 8px 10px;
  color: var(--ink);
  background: var(--surface2);
  border: 1px solid var(--border2);
  border-radius: 8px;
  font-size: 13px;
  font-family: var(--font);
  outline: none;
}

.batch-row input:focus { border-color: var(--accent); background: #fff; }
.batch-actions { margin: 4px 0 6px; }

@media (max-width: 760px) {
  .batch-head { display: none; }
  .batch-row { grid-template-columns: 1fr 1fr; }
  .batch-row .b-title { grid-column: 1 / -1; }
}


.only-banner {
  margin-bottom: 14px;
  padding: 10px 14px;
  border-radius: var(--radius);
  background: var(--accent-soft);
  border: 1px solid var(--border2);
  color: var(--accent2);
  font-size: 13px;
  font-weight: 600;
}

.only-banner a { color: var(--accent2); text-decoration: underline; }

.link-btn {
  border: 1px dashed var(--border2);
  background: transparent;
  color: var(--text2);
  font-size: 12px;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  font-family: var(--font);
}

.link-btn:hover { color: var(--accent2); border-color: var(--accent); background: var(--accent-soft); }


.badge-ended { color: #7a6b5a; background: #f1ece3; border: 1px solid #ddd2c2; }

.sort-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: -6px 0 12px;
  font-size: 12.5px;
  color: var(--text2);
}

.sort-bar select {
  padding: 5px 10px;
  border: 1px solid var(--border2);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-size: 12.5px;
  font-family: var(--font);
}

tr.rank-top td { background: #f7fdf9; }
tr.rank-top td:first-child { color: #c9862f; font-weight: 700; }


.subtitle, .card-subtitle {
  margin-top: 2px;
  color: var(--accent2);
  font-size: 13.5px;
  font-weight: 600;
}

.card-subtitle { color: var(--text2); font-weight: 500; }


.chip-badge {
  flex: 0 0 auto;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  line-height: 1;
  font-weight: 700;
  color: #fff;
  background: #6D847B;
  margin-right: 5px;
  letter-spacing: 0;
  text-shadow: 0 1px 1px rgba(0,0,0,.15);
}

.auto-item .chip-badge { height: 18px; min-width: 18px; font-size: 9.5px; }

.row-icon {
  width: 20px;
  height: 20px;
  object-fit: contain;
  vertical-align: -5px;
  margin-right: 5px;
}

.xinfa-pill.taken {
  opacity: .45;
  cursor: not-allowed;
  text-decoration: line-through;
  background: #f2f2f2;
}

.chip-icon {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  object-fit: contain;
  margin-right: 5px;
  filter: drop-shadow(0 1px 1px rgba(0,0,0,.12));
}

.auto-item .chip-icon { width: 18px; height: 18px; }


/* 按职业配色：T 红 / 奶 绿 / DPS 蓝 */

.team-chip.role-t { background: #fbe9e8; border-color: #efb6b1; color: #8f2f28; }
.team-chip.role-heal { background: #eaf5ec; border-color: #bfdcc4; color: #2f6b38; }
.team-chip.role-dps { background: #eaf2fd; border-color: #c2d8f5; color: #2a5f9e; }

.reserve-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  margin-top: 14px;
  padding: 10px 12px;
  border: 1px dashed var(--border2);
  border-radius: var(--radius);
  background: var(--surface2);
}

.reserve-label {
  color: var(--text2);
  font-size: 12px;
  font-weight: 700;
  margin-right: 2px;
}

.reserve-chip {
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  background: #fff;
  border: 1px solid var(--border2);
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
}


/* 团队面板：坑位格子 */

.slot-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.slot-card {
  min-height: 76px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #fff;
  padding: 6px 8px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  overflow: hidden;
}

.slot-card.role-t { background: #fbe9e8; border-color: #efb6b1; }
.slot-card.role-heal { background: #eaf5ec; border-color: #bfdcc4; }
.slot-card.role-dps { background: #eaf2fd; border-color: #c2d8f5; }
.slot-card.role-none { background: #f6f4ee; border-color: #ded6c4; }

.slot-head { display: flex; align-items: center; gap: 5px; min-width: 0; }

.slot-icon { width: 22px; height: 22px; flex: 0 0 auto; object-fit: contain; }

.slot-icon-text {
  width: 22px; height: 22px; flex: 0 0 auto;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%; background: var(--surface3);
  font-size: 10px; font-weight: 700; color: var(--text2);
}

.slot-name {
  font-size: 12px;
  font-weight: 700;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

.slot-role {
  margin-left: auto;
  flex: 0 0 auto;
  font-size: 9.5px;
  font-weight: 700;
  opacity: .7;
}

.slot-body { display: flex; align-items: center; gap: 5px; min-width: 0; }

.slot-xinfa {
  font-size: 10.5px;
  color: var(--text2);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.slot-score { margin-left: auto; font-size: 10.5px; color: var(--text2); flex: 0 0 auto; }

.slot-iron {
  flex: 0 0 auto;
  font-size: 9px;
  padding: 0 4px;
  border-radius: 4px;
  background: rgba(255,255,255,.75);
  color: #7a4b8f;
  font-weight: 700;
}

.slot-card.reserve {
  border-style: dashed;
  justify-content: center;
  opacity: .92;
}

.slot-card.reserve .slot-name { font-size: 12px; }
.slot-card.reserve .slot-xinfa { font-size: 10px; opacity: .7; }

.slot-card.empty {
  border: 1.5px dashed #d7e9e0;
  background: #fbfefc;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* ===== 移动端修正（放在最后，覆盖前面的基础样式） ===== */
@media (max-width: 760px) {
  header .header-inner { flex-wrap: wrap; row-gap: 8px; }
  header .nav, header .links { flex-wrap: wrap; gap: 6px; }

  .slot-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; }
  .slot-card { min-height: 62px; padding: 5px 6px; border-radius: 8px; }
  .slot-head { gap: 4px; }
  .slot-icon { width: 17px; height: 17px; }
  .slot-icon-text { width: 17px; height: 17px; font-size: 9px; }
  .slot-name { font-size: 11px; }
  .slot-role { font-size: 8.5px; }
  .slot-xinfa, .slot-score { font-size: 9.5px; }

  .meta { flex-wrap: wrap; row-gap: 6px; }
  .meta span, .meta .iron-chip, .meta .link-btn { flex: 0 0 auto; }

  .role-bar { flex-wrap: wrap; row-gap: 6px; }
}

/* 角色小卡片 */
.modal-overlay { position: fixed; inset: 0; background: rgba(20,40,34,.38); display: flex; align-items: center; justify-content: center; padding: 20px; z-index: 90; }
.char-card {
  position: relative;
  width: 100%;
  max-width: 320px;
  background: #fff;
  border-radius: 16px;
  padding: 18px 18px 14px;
  box-shadow: 0 18px 48px rgba(20,40,34,.22);
}
.char-close {
  position: absolute; top: 8px; right: 10px;
  border: 0; background: transparent; font-size: 20px; line-height: 1;
  color: #9aa7a1; cursor: pointer; padding: 4px;
}
.char-top { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.char-icon { width: 42px; height: 42px; flex: 0 0 auto; object-fit: contain; }
.char-id { min-width: 0; flex: 1; }
.char-name { font-size: 17px; font-weight: 800; color: var(--ink); overflow-wrap: anywhere; }
.char-sub { font-size: 11.5px; color: var(--text2); margin-top: 2px; }
.char-role {
  flex: 0 0 auto; font-size: 11px; font-weight: 700;
  padding: 3px 9px; border-radius: 999px;
}
.char-role.role-t { background: #fbe9e8; color: #8f2f28; }
.char-role.role-heal { background: #eaf5ec; color: #2f6b38; }
.char-role.role-dps { background: #eaf2fd; color: #2a5f9e; }
.char-role.role-none { background: #f1efe7; color: #6f6449; }
.char-rows { display: flex; flex-direction: column; gap: 8px; }
.char-row { display: flex; justify-content: space-between; gap: 12px; font-size: 12.5px; }
.char-row span { color: var(--text2); }
.char-row b { color: var(--ink); font-weight: 700; text-align: right; overflow-wrap: anywhere; }

.slot-card { cursor: pointer; transition: transform .12s ease, box-shadow .12s ease; }
.slot-card:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(20,40,34,.10); }
.slot-card.empty { cursor: default; }
.slot-card.empty:hover { transform: none; box-shadow: none; }

@media (max-width: 480px) {
  .slot-grid { grid-template-columns: repeat(5, minmax(0, 1fr)) !important; gap: 4px; }
  .slot-card { min-height: 70px; padding: 7px 8px; }
  .slot-name { font-size: 12.5px; white-space: normal; line-height: 1.2; }
  .slot-xinfa, .slot-score { font-size: 10.5px; }
}

/* 手机端防止横向溢出 */
@media (max-width: 760px) {
  html, body { max-width: 100%; overflow-x: hidden; }
  .container { width: 100%; max-width: 100%; }
  .activity-card, .activity-card .top, .team-panel-wrap { min-width: 0; max-width: 100%; }
  .activity-card .top { flex-wrap: wrap; gap: 10px; }
  header .header-inner { flex-wrap: wrap; row-gap: 8px; max-width: 100%; }
  header .nav { flex-wrap: wrap; gap: 6px; }
  header .nav a { padding: 6px 10px; font-size: 12px; }
  .meta > * { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
}

/* 手机端五列紧凑版 */
@media (max-width: 760px) {
  .slot-card { min-height: 54px; padding: 4px 4px; border-radius: 7px; gap: 2px; }
  .slot-head { gap: 2px; }
  .slot-icon { width: 12px; height: 12px; }
  .slot-icon-text { width: 12px; height: 12px; font-size: 7px; }
  .slot-name { font-size: 9px; white-space: nowrap; }
  .slot-role { font-size: 7px; opacity: .75; }
  .slot-xinfa, .slot-score { font-size: 8px; }
  .slot-iron { font-size: 7px; padding: 0 2px; }
  .activity-card { padding: 14px 12px; }
}
