:root {
  --bg: #0b0916;
  --panel: #151126;
  --panel-2: #1b1630;
  --line: rgba(255, 255, 255, 0.07);
  --text: #ece9f7;
  --muted: #8f88ad;
  --accent: #8b6cff;
  --accent-2: #b9a8ff;
  --green: #5ee6a0;
  --red: #ff8095;
  --orange: #ffb45e;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
}

[v-cloak] { display: none; }

button, input, select, textarea { font: inherit; }
button { cursor: pointer; }

.app {
  max-width: 820px;
  margin: 0 auto;
  min-height: 100vh;
  padding-bottom: calc(92px + env(safe-area-inset-bottom));
}

.loading {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  letter-spacing: 2px;
}

/* 登录 */
.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(600px 400px at 80% 0%, rgba(139, 108, 255, 0.25), transparent 60%),
    radial-gradient(500px 400px at 0% 100%, rgba(255, 120, 180, 0.12), transparent 60%),
    var(--bg);
}

.login-orb {
  position: absolute;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  border: 1px solid rgba(139, 108, 255, 0.18);
  filter: blur(2px);
}

.login-card {
  position: relative;
  width: 100%;
  max-width: 360px;
  text-align: center;
}

.emblem {
  width: 84px;
  height: 84px;
  margin: 0 auto 18px;
  border-radius: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 38px;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(145deg, #9b7dff, #6a4bff);
  box-shadow: 0 18px 50px rgba(139, 108, 255, 0.45);
}

.login-card h1 {
  margin: 0;
  font-size: 34px;
  letter-spacing: 6px;
}

.login-card .muted { margin: 10px 0 26px; }

.input, .textarea, select {
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 12px;
  padding: 12px 14px;
  outline: none;
  font-size: 15px;
}

.field input, .field select, .field textarea {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 9px;
  padding: 8px 10px;
  outline: none;
  font-size: 14px;
  color-scheme: dark;
}

.input:focus, .textarea:focus, select:focus {
  border-color: rgba(139, 108, 255, 0.65);
}

.textarea {
  min-height: 150px;
  resize: vertical;
  line-height: 1.6;
}

.btn {
  border: 0;
  border-radius: 12px;
  padding: 11px 18px;
  font-size: 14px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.07);
}

.btn.primary { background: linear-gradient(135deg, #9b7dff, #724fff); color: #fff; }
.btn.ghost { background: rgba(255, 255, 255, 0.05); color: #c8c1e3; border: 1px solid var(--line); }
.btn.danger { background: rgba(255, 90, 110, 0.12); color: #ff9aa8; border: 1px solid rgba(255, 90, 110, 0.25); }
.btn.sm { padding: 7px 12px; font-size: 13px; border-radius: 9px; }
.btn.block { display: block; width: 100%; margin-top: 12px; }
.btn:disabled { opacity: 0.6; }

.login-card .btn { margin-top: 16px; padding: 14px; font-size: 16px; letter-spacing: 6px; }

.error { color: var(--red); font-size: 13px; min-height: 18px; margin: 10px 0 0; }

.muted { color: var(--muted); }
.small { font-size: 12px; }
.center { text-align: center; }

/* 顶栏 */
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: calc(10px + env(safe-area-inset-top)) 20px 10px;
  background: rgba(11, 9, 22, 0.9);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.topbar-title {
  flex: 1;
  font-size: 16px;
  font-weight: 700;
  text-align: center;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.icon-btn {
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  font-size: 24px;
  line-height: 1;
}

.pill {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  color: var(--accent-2);
  background: rgba(139, 108, 255, 0.14);
  border: 1px solid rgba(139, 108, 255, 0.2);
}

.pill.owner { color: #ffd28a; background: rgba(255, 180, 94, 0.12); border-color: rgba(255, 180, 94, 0.24); }

.main { padding: 18px 20px 20px; }

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin: 8px 2px 12px;
}

.section-head h2, .section-head h3 { margin: 0; font-size: 20px; }
.section-head h3 { font-size: 16px; }

.card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.015));
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 14px;
}

.intro {
  color: #b9b2d0;
  font-size: 13px;
  line-height: 1.65;
  margin: 8px 0 14px;
}

.stats { display: flex; gap: 12px; }
.stat { flex: 1; }
.stat b { display: block; font-size: 22px; }
.stat span { font-size: 12px; color: var(--muted); }
.guild-card .stats {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  grid-template-rows: auto auto;
  align-items: end;
  column-gap: 12px;
  row-gap: 0;
}
.guild-card .stat { display: contents; }
.guild-card .stat b {
  display: block;
  grid-row: 1;
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
}
.guild-card .stat span { display: block; grid-row: 2; }
.guild-card .stat:nth-child(1) b,
.guild-card .stat:nth-child(1) span { grid-column: 1; }
.guild-card .stat:nth-child(2) b,
.guild-card .stat:nth-child(2) span { grid-column: 2; }
.top-stat { min-width: 0; }
.guild-card .top-stat { min-width: 0; }
.top-stat span { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.home-list-head { align-items: center; justify-content: space-between; }
.rank-title { color: var(--text); font-size: 18px; font-weight: 700; }

.guild-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.guild-card { cursor: pointer; margin: 0; }
.guild-card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.guild-card h3 { margin: 0; font-size: 19px; }
.guild-hero { margin-bottom: 14px; }
.guild-hero-head { display: flex; justify-content: space-between; align-items: baseline; }
.guild-hero h2 { margin: 0; font-size: 24px; }

.tabs { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 14px; }

.history-tabs { margin: 0 0 12px; padding-bottom: 0; }
.tab {
  flex: none;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.035);
  color: #b9b2d0;
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 14px;
}
.tab.active { background: var(--accent); color: #fff; border-color: transparent; }

.module-head { display: flex; justify-content: space-between; align-items: baseline; }
.module-head h3 { margin: 0; font-size: 22px; }
.module-stats { display: flex; flex-wrap: wrap; gap: 14px; color: #b9b2d0; font-size: 13px; margin-top: 10px; }
.module-actions { display: flex; gap: 8px; align-items: center; margin-top: 14px; flex-wrap: wrap; }
.module-actions .delta { margin-right: auto; }

.list-card { padding: 8px 14px; }
.list-head {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 10px 0;
  font-size: 12px;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
}

.rank-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  font-size: 14px;
  cursor: pointer;
}
.rank-row:last-child { border-bottom: 0; }
.rank-no {
  flex: none;
  width: 28px;
  height: 28px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: #9a94b5;
  background: rgba(255, 255, 255, 0.04);
}
.rank-no.r1 { background: #ffcf6e; color: #3b2a00; }
.rank-no.r2 { background: #dfe4f5; color: #30364a; }
.rank-no.r3 { background: #e7a46b; color: #3a1c00; }
.guild-tag { flex: none; font-size: 10px; padding: 2px 6px; border-radius: 5px; color: #fff; }
.rank-name { flex: 1; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.rank-value { font-weight: 700; font-variant-numeric: tabular-nums; }
.prev { display: block; }
.avatar {
  flex: none;
  width: 30px;
  height: 30px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(139, 108, 255, 0.22);
  color: var(--accent-2);
  font-size: 13px;
  font-weight: 700;
}

.delta { font-size: 12px; padding: 2px 7px; border-radius: 6px; white-space: nowrap; }
.delta.up { color: var(--green); background: rgba(94, 230, 160, 0.1); }
.delta.down { color: var(--red); background: rgba(255, 128, 149, 0.1); }
.delta.flat { color: var(--muted); background: rgba(255, 255, 255, 0.04); }
.delta.new { color: var(--orange); background: rgba(255, 180, 94, 0.1); }

.empty { padding: 30px 10px; text-align: center; color: var(--muted); font-size: 13px; }

.member-note {
  margin: 4px 0 10px;
  padding: 8px 12px;
  border-radius: 10px;
  font-size: 12px;
  color: #9f97bd;
  background: rgba(139, 108, 255, 0.07);
  border: 1px solid rgba(139, 108, 255, 0.14);
}
.member-head { display: flex; justify-content: space-between; align-items: center; border-bottom: 0; }
.member-row { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.04); cursor: pointer; }
.member-row:last-child { border-bottom: 0; }
.member-rank { width: 26px; text-align: center; font-size: 12px; color: #9a94b5; }
.member-name { flex: 1; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.reward-cell { flex: none; width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; }
.reward-check {
  flex: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: transparent;
  color: #fff;
  font-size: 17px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}
.reward-check.on { background: #34c77b; border-color: #34c77b; }
.reward-check.readonly { cursor: default; }
.member-missed { flex: none; width: 44px; text-align: right; line-height: 1.05; }
.member-missed b { display: block; font-size: 16px; color: #6f688b; }
.member-missed small { font-size: 10px; color: var(--muted); }
.member-missed.has b { color: #ff9aa8; }
.clear-reward { margin-top: 8px; }

.member-hero { padding: 6px 4px 14px; }
.member-hero h2 { margin: 8px 0 4px; font-size: 28px; }

.form-card { padding: 12px 16px; }
.field { display: flex; align-items: center; gap: 12px; padding: 9px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.04); }
.field:last-of-type { border-bottom: 0; }
.field > span { flex: none; width: 52px; font-size: 13px; color: var(--muted); }
.field > input, .field > select, .field > textarea { flex: 1; }
.field > textarea { min-height: 70px; }
.field > b { flex: 1; font-weight: 400; }
.readonly { color: #c8c1e3; }

.recent-card { padding: 16px; }
.recent-top { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); }
.recent-value { font-size: 28px; font-weight: 700; margin: 6px 0 2px; }
.recent-value small { font-size: 12px; color: var(--muted); margin-left: 4px; }

.chart-card { padding: 8px 6px 12px; }
.chart { width: 100%; height: auto; display: block; }
.chart .grid { stroke: rgba(255, 255, 255, 0.06); stroke-width: 1; }
.chart .line { fill: none; stroke: var(--green); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.chart .dot { fill: #c9b8ff; stroke: #0b0916; stroke-width: 2; }
.chart .axis { fill: #7f799e; font-size: 11px; }
.chart .last-value { fill: #e8e3ff; font-size: 12px; }

.part-grid { display: flex; gap: 4px; }
.part-cell { flex: 1; min-width: 0; text-align: center; }
.part-mark {
  height: 30px;
  line-height: 30px;
  border-radius: 8px;
  font-size: 13px;
  color: #5d5878;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.06);
}
.part-cell.on .part-mark { color: var(--green); background: rgba(94, 230, 160, 0.14); border-color: rgba(94, 230, 160, 0.34); }
.part-label { margin-top: 4px; font-size: 9px; color: var(--muted); white-space: nowrap; }

.history-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  cursor: pointer;
}
.history-row:last-child { border-bottom: 0; }
.history-row b { display: block; }
.history-right { text-align: right; }
.history-right b { font-variant-numeric: tabular-nums; }

.record-stats { display: flex; text-align: center; }
.record-stats > div { flex: 1; }
.record-stats b { display: block; font-size: 19px; }
.record-stats span { font-size: 11px; color: var(--muted); }
.bar { flex: 1; height: 5px; border-radius: 3px; background: rgba(255, 255, 255, 0.05); overflow: hidden; min-width: 40px; }
.bar i { display: block; height: 100%; background: linear-gradient(90deg, #8b6cff, #b9a8ff); }

.seg { display: flex; gap: 8px; margin: 12px 0; }
.seg button { flex: 1; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.03); color: var(--muted); border-radius: 10px; padding: 9px; }
.seg button.active { color: #fff; border-color: rgba(139, 108, 255, 0.5); background: rgba(139, 108, 255, 0.16); }

.edit-row {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 8px;
  padding: 6px;
  border-radius: 10px;
  border: 1px solid transparent;
}
.edit-row input {
  flex: 1;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 9px;
  padding: 8px 10px;
  outline: none;
  font-size: 14px;
}
.edit-row input[type="number"] { max-width: 100px; flex: none; width: 92px; }
.edit-index { flex: none; width: 20px; text-align: center; font-size: 11px; color: var(--muted); }
.edit-name { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.edit-name input { width: 100%; flex: none; }
.edit-name small { color: var(--muted); font-size: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.edit-row.unmatched { background: rgba(255, 90, 110, 0.08); border-color: rgba(255, 90, 110, 0.28); }
.edit-row.existing { background: rgba(255, 180, 94, 0.055); border-color: rgba(255, 180, 94, 0.2); }
.edit-row.duplicate { background: rgba(255, 180, 94, 0.08); border-color: rgba(255, 180, 94, 0.28); }
.edit-row.missing { background: rgba(255, 180, 94, 0.1); border-color: rgba(255, 180, 94, 0.4); }
.match-badge {
  flex: none;
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 5px;
  white-space: nowrap;
  color: var(--green);
  background: rgba(94, 230, 160, 0.12);
}
.match-badge.bad { color: var(--red); background: rgba(255, 90, 110, 0.12); }
.match-badge.warn { color: var(--orange); background: rgba(255, 180, 94, 0.12); }
.match-badge.ok { color: var(--orange); background: rgba(255, 180, 94, 0.12); }

.threshold-row input.range { flex: 1; accent-color: var(--accent); padding: 0; border: 0; background: transparent; }
.threshold-row b { flex: none; width: 44px; text-align: right; font-size: 13px; }

.thumb-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin: 10px 0;
}
.thumb-grid img {
  width: 100%;
  height: 78px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
}

.drop-zone {
  border: 1px dashed rgba(139, 108, 255, 0.45);
  border-radius: 12px;
  padding: 14px;
  margin: 10px 0;
  text-align: center;
  background: rgba(139, 108, 255, 0.055);
}
.drop-zone b { display: block; margin-bottom: 4px; }
.drop-zone .btn { margin-top: 8px; }
.hidden-file { display: none; }

.modal-mask {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(0, 0, 0, 0.65);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 16px;
}
.modal {
  width: 100%;
  max-width: 420px;
  background: #151126;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 20px;
}
.modal h3 { margin: 0 0 8px; }

.row-actions { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }

.pc-row {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  padding: 13px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}
.pc-row:last-child { border-bottom: 0; }
.pc-info { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.pc-info b { font-size: 15px; line-height: 1.35; }
.pc-row .row-actions {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  width: 100%;
  justify-content: stretch;
}
.pc-row .row-actions .btn {
  width: 100%;
  padding: 8px 2px;
  font-size: 12px;
  white-space: nowrap;
}
@media (min-width: 640px) {
  .pc-row { flex-direction: row; align-items: center; }
  .pc-row .row-actions {
    display: flex;
    flex-wrap: wrap;
    width: auto;
    justify-content: flex-end;
  }
  .pc-row .row-actions .btn { width: auto; font-size: 13px; }
}
.pc-form { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.pc-form h4 { margin: 0 0 10px; }
.pc-form .input { margin-bottom: 8px; }
.check { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); margin: 8px 0; }
.guild-form { padding: 8px 0 16px; border-bottom: 1px solid var(--line); }
.guild-form:last-child { border-bottom: 0; }

.tabbar {
  position: fixed;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 100%;
  max-width: 820px;
  display: flex;
  background: rgba(18, 14, 34, 0.96);
  border-top: 1px solid var(--line);
  padding: 8px 6px calc(8px + env(safe-area-inset-bottom));
  backdrop-filter: blur(16px);
  z-index: 30;
}
.tabbar button {
  flex: 1;
  border: 0;
  background: transparent;
  color: #7d7796;
  font-size: 12px;
  padding: 6px 2px;
  border-radius: 10px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.tabbar button.active { color: var(--accent-2); background: rgba(139, 108, 255, 0.1); }

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(90px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  z-index: 60;
  max-width: 80vw;
  padding: 9px 16px;
  border-radius: 10px;
  background: rgba(30, 24, 55, 0.96);
  border: 1px solid var(--line);
  color: #e8e3ff;
  font-size: 13px;
  text-align: center;
}

@media (max-width: 520px) {
  .guild-cards { grid-template-columns: 1fr; }
  .main { padding: 16px 22px 20px; }
  .rank-row { gap: 7px; font-size: 13px; }
  .rank-value { font-size: 13px; }
  .prev { display: none; }
  .module-stats { gap: 8px; font-size: 12px; }
  .member-missed { width: 40px; }
}

/* ===== 视觉精修层：仅颜色、材质、圆角、阴影、字重与过渡 ===== */
:root {
  --bg: #08070f;
  --panel: #141124;
  --panel-2: #1a1630;
  --line: rgba(255, 255, 255, 0.075);
  --text: #f3f0ff;
  --muted: #9b94b8;
  --accent: #8f74ff;
  --accent-2: #c4b5fd;
  --green: #5ee6a0;
  --red: #ff8298;
  --orange: #ffbd6b;
}

html { background: var(--bg); }

body {
  background:
    radial-gradient(1100px 540px at 50% -240px, rgba(124, 92, 255, 0.18), transparent 66%),
    radial-gradient(820px 520px at 108% 12%, rgba(82, 190, 255, 0.055), transparent 62%),
    var(--bg);
  background-attachment: fixed;
  text-rendering: optimizeLegibility;
}

::selection { background: rgba(143, 116, 255, 0.35); color: #fff; }

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.14);
  border: 2px solid transparent;
  border-radius: 999px;
  background-clip: padding-box;
}

:where(button, a, input, select, textarea):focus-visible {
  outline: 2px solid rgba(196, 181, 253, 0.85);
  outline-offset: 2px;
}

.card {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.012)),
    linear-gradient(158deg, rgba(30, 25, 52, 0.92), rgba(16, 13, 29, 0.97));
  border-color: rgba(255, 255, 255, 0.078);
  border-radius: 18px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 18px 42px -28px rgba(0, 0, 0, 0.95);
}

.topbar {
  background: rgba(9, 7, 18, 0.8);
  border-bottom-color: rgba(255, 255, 255, 0.065);
  box-shadow: 0 14px 34px -28px #000;
}

.topbar-title { letter-spacing: 0.3px; font-weight: 750; }

.icon-btn {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.035));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.055);
  transition: background 0.18s ease, box-shadow 0.18s ease;
}

.pill {
  background: rgba(143, 116, 255, 0.13);
  border-color: rgba(167, 139, 250, 0.22);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.pill.owner {
  background: rgba(255, 189, 107, 0.11);
  border-color: rgba(255, 189, 107, 0.24);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.section-head h2, .section-head h3 { letter-spacing: 0.2px; }
.section-head h2 { font-weight: 800; }

.btn {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.085), rgba(255, 255, 255, 0.045));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.055);
  transition: filter 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.btn.primary {
  background: linear-gradient(135deg, #a88cff 0%, #7658ff 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.24),
    0 10px 24px -14px rgba(124, 92, 255, 0.9);
}

.btn.ghost {
  background: rgba(255, 255, 255, 0.042);
  border-color: rgba(255, 255, 255, 0.09);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

.btn.danger {
  background: linear-gradient(180deg, rgba(255, 96, 118, 0.16), rgba(255, 96, 118, 0.09));
  border-color: rgba(255, 120, 138, 0.24);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.btn:hover { filter: brightness(1.06); }
.btn:active { filter: brightness(0.98); }
.btn:disabled { filter: saturate(0.55); box-shadow: none; }

.input, .textarea, select,
.field input, .field select, .field textarea {
  background: rgba(255, 255, 255, 0.045);
  border-color: rgba(255, 255, 255, 0.085);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.input:focus, .textarea:focus, select:focus,
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: rgba(167, 139, 250, 0.72);
  box-shadow:
    0 0 0 3px rgba(124, 92, 255, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.login-wrap {
  background:
    radial-gradient(620px 420px at 82% -6%, rgba(124, 92, 255, 0.28), transparent 60%),
    radial-gradient(520px 420px at -6% 104%, rgba(255, 120, 180, 0.1), transparent 60%),
    radial-gradient(700px 500px at 50% 50%, rgba(20, 16, 38, 0.6), transparent 70%),
    var(--bg);
}

.login-orb { border-color: rgba(167, 139, 250, 0.14); }

.emblem {
  background: linear-gradient(145deg, #b09bff 0%, #7658ff 62%, #6845ef 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.3),
    0 22px 54px -16px rgba(124, 92, 255, 0.72);
}

.login-card h1 { text-shadow: 0 10px 34px rgba(124, 92, 255, 0.25); }

.guild-card {
  transition: box-shadow 0.22s ease, border-color 0.22s ease;
}

.guild-card h3 { font-weight: 800; letter-spacing: 0.2px; }
.intro { color: #bdb6d5; }
.stat b { font-weight: 800; letter-spacing: -0.2px; }
.stat span { color: #9991b6; }
.rank-title { letter-spacing: 0.2px; }

.tabs { scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }

.tab {
  background: rgba(255, 255, 255, 0.035);
  border-color: rgba(255, 255, 255, 0.08);
  transition: color 0.18s ease, background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.tab.active {
  background: linear-gradient(135deg, #9c82ff 0%, #7658ff 100%);
  border-color: rgba(196, 181, 253, 0.28);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    0 8px 20px -12px rgba(124, 92, 255, 0.85);
}

.list-card { background-clip: padding-box; }
.list-head { border-bottom-color: rgba(255, 255, 255, 0.06); }

.rank-row {
  border-bottom-color: rgba(255, 255, 255, 0.045);
  border-radius: 10px;
  transition: background 0.16s ease;
}

.rank-no {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.025));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.045);
  color: #aaa2c8;
}

.rank-no.r1 {
  background: linear-gradient(145deg, #ffe08a 0%, #f2b544 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.6),
    0 5px 14px -7px rgba(255, 193, 7, 0.7);
}

.rank-no.r2 {
  background: linear-gradient(145deg, #f1f3fb 0%, #c9d1e6 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7), 0 5px 14px -8px rgba(210, 220, 240, 0.5);
}

.rank-no.r3 {
  background: linear-gradient(145deg, #f2bd88 0%, #d99055 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45), 0 5px 14px -8px rgba(217, 144, 85, 0.55);
}

.guild-tag {
  border-radius: 6px;
  font-weight: 700;
  letter-spacing: 0.2px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}

.avatar {
  background: linear-gradient(145deg, rgba(143, 116, 255, 0.34), rgba(84, 60, 178, 0.2));
  box-shadow: inset 0 0 0 1px rgba(196, 181, 253, 0.1);
  color: #dbd0ff;
}

.delta { font-weight: 600; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04); }
.delta.up { background: rgba(94, 230, 160, 0.11); }
.delta.down { background: rgba(255, 130, 152, 0.11); }
.delta.new { background: rgba(255, 189, 107, 0.11); }

.member-note {
  color: #aea5cc;
  background: linear-gradient(135deg, rgba(143, 116, 255, 0.095), rgba(143, 116, 255, 0.03));
  border-color: rgba(167, 139, 250, 0.18);
  border-radius: 12px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.member-row {
  border-bottom-color: rgba(255, 255, 255, 0.045);
  transition: background 0.16s ease;
}

.reward-check {
  background: rgba(255, 255, 255, 0.025);
  border-color: rgba(255, 255, 255, 0.2);
  transition: background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.reward-check.on {
  background: linear-gradient(145deg, #4ce29a, #23b96f);
  border-color: rgba(94, 230, 160, 0.55);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.4),
    0 6px 16px -9px rgba(52, 199, 123, 0.9);
}

.member-missed b { color: #766e94; }
.member-missed.has b { color: #ff9bab; }

.form-card .field { border-bottom-color: rgba(255, 255, 255, 0.045); }
.field > span { color: #9c94b9; }

.recent-value { letter-spacing: -0.4px; }

.chart .line {
  stroke: #63e6a4;
  filter: drop-shadow(0 0 6px rgba(94, 230, 160, 0.28));
}

.chart .dot {
  fill: #d9ceff;
  filter: drop-shadow(0 0 5px rgba(196, 181, 253, 0.35));
}

.chart .grid { stroke: rgba(255, 255, 255, 0.055); }
.chart .axis { fill: #8a82a8; }

.chart-x-axis {
  display: flex;
  justify-content: space-between;
  gap: 2px;
  padding: 2px 6% 0;
  color: #8a82a8;
  font-size: 10px;
  white-space: nowrap;
}

.member-chart .chart .grid { stroke: rgba(255, 255, 255, 0.065); }
.member-chart .chart .axis { fill: #8a82a8; }
.member-chart .chart .line {
  stroke: #63e6a4;
  stroke-width: 3;
  filter: drop-shadow(0 0 6px rgba(94, 230, 160, 0.28));
}
.member-chart .chart .dot {
  fill: #d9ceff;
  stroke: #0b0916;
  stroke-width: 2;
  filter: drop-shadow(0 0 5px rgba(196, 181, 253, 0.35));
}
.member-chart .chart .last-value { fill: #f0e8ff; }
.member-chart .chart-x-axis { color: #8a82a8; }
.member-chart .muted.small.center { color: #8a82a8; }

/* 首页公会卡：紧凑单行信息卡 */
.guild-card {
  display: flex;
  align-items: center;
  height: 42px;
  padding: 0 9px 0 12px;
  border-radius: 12px;
  border-color: rgba(255, 255, 255, 0.09);
  background: linear-gradient(90deg, #1a1b22 0%, #131419 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.045),
    0 8px 18px -16px rgba(0, 0, 0, 0.9);
  transition: transform 0.15s ease, border-color 0.15s ease, filter 0.15s ease, box-shadow 0.15s ease;
}
.guild-card:hover {
  border-color: rgba(167, 139, 250, 0.3);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 10px 22px -16px rgba(0, 0, 0, 0.95);
}
.guild-card:active {
  transform: translateY(1px) scale(0.99);
  filter: brightness(0.96);
}
.guild-card::before {
  display: none;
}
.guild-card-main {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  width: 100%;
  flex-wrap: nowrap;
}
.guild-card h3 {
  flex: 0 0 auto;
  max-width: 90px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.2px;
  line-height: 1;
}
.guild-card-stats {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  flex: none;
}
.guild-card-name-divider {
  flex: none;
  display: block;
  width: 1px;
  height: 13px;
  border-left: 1px dashed rgba(255, 255, 255, 0.2);
  margin: 0 1px;
}
.guild-color-dot {
  flex: none;
  display: block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  box-shadow: 0 0 7px rgba(255, 255, 255, 0.22);
}
.guild-card-stat {
  display: flex;
  align-items: baseline;
  gap: 2px;
  white-space: nowrap;
}
.guild-card-stat b {
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
}
.guild-card-stat span {
  color: #a1a1aa;
  font-size: 8px;
  line-height: 1;
}
.guild-card-divider {
  display: block;
  width: 1px;
  height: 9px;
  background: rgba(255, 255, 255, 0.15);
}
.guild-card-tags {
  display: flex;
  flex-wrap: nowrap;
  justify-content: flex-start;
  gap: 4px;
  margin-left: 2px;
  min-width: 0;
  flex: 0 1 auto;
  overflow: hidden;
}
.guild-meta-tag {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  min-width: 0;
  max-width: 100px;
  height: 18px;
  padding: 0 4px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.06);
  color: #a1a1aa;
  font-size: 8px;
  white-space: nowrap;
  overflow: hidden;
  flex: 0 1 auto;
}
.guild-meta-tag.highlight {
  border-color: rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.08);
}
.guild-meta-tag b {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #ffffff;
  font-weight: 600;
}
.guild-card-chevron {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  align-self: center;
  width: 9px;
  height: 100%;
  margin-left: auto;
}
.guild-card-chevron::before {
  content: "";
  width: 6px;
  height: 6px;
  border-top: 1.5px solid #8b84a2;
  border-right: 1.5px solid #8b84a2;
  transform: rotate(45deg);
}
.rank-title { font-size: 15px; font-weight: 700; }
@media (max-width: 380px) {
  .guild-card { padding: 0 8px 0 10px; height: 40px; }
  .guild-card h3 { max-width: 86px; font-size: 14px; }
  .guild-card-stat b { font-size: 11px; }
  .guild-meta-tag { max-width: 88px; padding: 0 3px; font-size: 7.5px; }
}

.part-mark {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.06);
}

.part-cell.on .part-mark {
  background: rgba(94, 230, 160, 0.13);
  border-color: rgba(94, 230, 160, 0.28);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.history-row {
  border-bottom-color: rgba(255, 255, 255, 0.045);
  transition: background 0.16s ease;
}

.bar { background: rgba(255, 255, 255, 0.06); }
.bar i {
  background: linear-gradient(90deg, #8f74ff, #c4b5fd);
  box-shadow: 0 0 12px rgba(143, 116, 255, 0.35);
}

.seg button {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.08);
  transition: color 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.seg button.active {
  background: linear-gradient(135deg, rgba(143, 116, 255, 0.24), rgba(118, 88, 255, 0.12));
  border-color: rgba(167, 139, 250, 0.45);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.edit-row { transition: background 0.16s ease, border-color 0.16s ease; }
.edit-row input { background: rgba(255, 255, 255, 0.045); border-color: rgba(255, 255, 255, 0.08); }

.match-badge { box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04); }

.drop-zone {
  background: linear-gradient(135deg, rgba(143, 116, 255, 0.09), rgba(143, 116, 255, 0.025));
  border-color: rgba(167, 139, 250, 0.4);
  border-radius: 14px;
}

.thumb-grid img {
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: 0 10px 22px -16px #000;
}

.modal {
  background: linear-gradient(165deg, #1b1532 0%, #100d1e 100%);
  border-color: rgba(255, 255, 255, 0.09);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 34px 80px -34px #000;
}

.pc-row { border-bottom-color: rgba(255, 255, 255, 0.045); }
.pc-info b { letter-spacing: 0.1px; }

.drop-zone b, .pc-form h4 { letter-spacing: 0.1px; }

.tabbar {
  background: rgba(14, 11, 27, 0.9);
  border-top-color: rgba(255, 255, 255, 0.065);
  box-shadow: 0 -18px 44px -32px #000;
}

.tabbar button {
  color: #8b83a6;
  transition: color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.tabbar button.active {
  color: #e9e2ff;
  background: linear-gradient(135deg, rgba(143, 116, 255, 0.24), rgba(143, 116, 255, 0.08));
  box-shadow: inset 0 0 0 1px rgba(196, 181, 253, 0.08);
}

.toast {
  background: rgba(25, 20, 45, 0.94);
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 18px 44px -22px #000;
  backdrop-filter: blur(14px);
}

.empty { color: #8f87ad; }
.error { color: #ff8da1; }

@media (hover: hover) and (pointer: fine) {
  .guild-card:hover {
    border-color: rgba(167, 139, 250, 0.18);
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.05),
      0 22px 48px -28px rgba(0, 0, 0, 0.98);
  }

  .rank-row:hover,
  .member-row:hover,
  .history-row:hover {
    background: rgba(255, 255, 255, 0.028);
  }

  .btn.ghost:hover {
    background: rgba(255, 255, 255, 0.065);
    border-color: rgba(255, 255, 255, 0.14);
  }

  .tab:hover,
  .seg button:hover {
    color: #e6deff;
    border-color: rgba(167, 139, 250, 0.25);
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* 首页公会卡：轻微压缩高度，统一卡片上下间距 */
.guild-cards { margin-bottom: 12px; }
.guild-card { padding-top: 14px; padding-bottom: 14px; }
.guild-card .intro { margin-top: 6px; margin-bottom: 10px; }

/* ===== 字阶、卡片质感与参考图比例 ===== */
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", sans-serif;
  font-size: 14px;
  color: var(--text);
}

.card {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.032), rgba(255, 255, 255, 0.006)),
    linear-gradient(160deg, rgba(23, 20, 34, 0.96), rgba(12, 10, 20, 0.985));
  border-color: rgba(255, 255, 255, 0.072);
  border-radius: 17px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.035),
    0 16px 38px -30px rgba(0, 0, 0, 0.95);
}

.guild-card {
  position: relative;
  overflow: hidden;
  padding-top: 14px;
  padding-bottom: 14px;
}

.guild-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: var(--guild-accent, #8f74ff);
  opacity: 0.95;
  pointer-events: none;
}

.guild-cards .guild-card:nth-child(1) { --guild-accent: #8f74ff; }
.guild-cards .guild-card:nth-child(2) { --guild-accent: #ff9e4a; }

.guild-card h3 {
  font-size: 20px;
  font-weight: 750;
  letter-spacing: 0.2px;
}

.guild-card .intro {
  font-size: 12.5px;
  line-height: 1.6;
  color: #a9a2bf;
  margin-top: 6px;
  margin-bottom: 10px;
}

.guild-card .stats { position: relative; }
.guild-card .stats::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -8px;
  border-top: 1px dashed rgba(255, 255, 255, 0.1);
  pointer-events: none;
}

.stat b { font-size: 23px; font-weight: 700; }
.stat span { font-size: 11.5px; color: #938cab; }

.section-head h2 { font-size: 22px; font-weight: 750; }
.section-head h3 { font-size: 15px; font-weight: 650; color: #d7d0ea; }
.topbar-title { font-size: 17px; font-weight: 650; }

.rank-title { font-size: 17px; font-weight: 700; }
.list-head { font-size: 11.5px; }

.rank-row {
  padding: 12px 0;
  font-size: 14px;
  border-radius: 0;
  background: transparent;
}

.rank-no {
  width: 27px;
  height: 27px;
  border-radius: 8px;
  font-size: 11px;
}

.rank-name { font-weight: 500; }
.rank-value { font-size: 15px; font-weight: 700; }
.guild-tag { font-size: 9px; padding: 1px 5px; border-radius: 4px; }
.delta { font-size: 11px; padding: 2px 6px; }

.member-name { font-size: 14px; font-weight: 500; }
.member-missed b { font-size: 15px; }
.member-note { font-size: 11.5px; line-height: 1.6; }

.tabs { padding-bottom: 12px; }
.tab { font-size: 13px; padding: 7px 14px; }
.module-head h3 { font-size: 21px; font-weight: 700; }
.module-stats { font-size: 12px; }
.list-card { padding: 8px 13px; }

.btn { font-size: 13.5px; font-weight: 500; }
.btn.sm { font-size: 12px; }
.field > span { font-size: 12px; }
.field input, .field select, .field textarea { font-size: 13.5px; }
.input, .textarea, select { font-size: 14px; }
.form-card .field { padding: 8px 0; }
.pc-info b { font-size: 14px; }
.pc-row .row-actions .btn { font-size: 11.5px; }
.check { font-size: 12px; }
.member-hero h2 { font-size: 26px; }
.recent-value { font-size: 26px; }
.empty { font-size: 12px; }

/* ===== 字阶收敛：拉开主次层级 ===== */
body { font-size: 13.5px; }
.small { font-size: 11px; }
.topbar-title { font-size: 16px; }
.pill { font-size: 10px; padding: 2px 9px; }

.guild-card .intro { font-size: 12px; line-height: 1.55; }
.stat span { font-size: 10.5px; }
.section-head h3 { font-size: 14px; }

.list-head { font-size: 10.5px; }
.rank-row { font-size: 13px; }
.rank-name { font-weight: 500; }
.rank-value { font-size: 15px; }
.rank-no { font-size: 10.5px; }
.guild-tag { font-size: 8px; }
.delta { font-size: 10px; }
.prev { font-size: 11px; }

.member-row { font-size: 13px; }
.member-name { font-size: 13.5px; }
.member-missed b { font-size: 14px; }
.member-note { font-size: 10.5px; }

.tab { font-size: 12px; }
.module-stats { font-size: 11px; }
.module-head h3 { font-size: 20px; }

.btn { font-size: 12.5px; }
.btn.sm { font-size: 11px; }
.field > span { font-size: 11px; }
.field input, .field select, .field textarea { font-size: 12.5px; }
.input, .textarea, select { font-size: 13px; }
.pc-info b { font-size: 13px; }
.pc-row .row-actions .btn { font-size: 10.5px; }
.check { font-size: 11px; }
.pc-form h4 { font-size: 13px; }

.empty { font-size: 11px; }
.history-row { font-size: 13px; }
.threshold-row b { font-size: 12px; }

.list-head > span:first-child:not(.rank-title) {
  font-size: 13.5px;
  font-weight: 600;
  color: #d3cbe8;
}

.detail-link { margin-left: auto; }

.record-missing-head { margin-top: 16px; }
.missing-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}
.missing-row:last-child { border-bottom: 0; }
.missing-row .member-name { flex: 1; min-width: 0; }
.missing-row .muted { flex: none; }

/* 设置页折叠与日志 */
.settings-fold {
  margin: 0 0 14px;
}
.settings-fold > summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 13px 15px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.033), rgba(255, 255, 255, 0.008)),
    rgba(14, 12, 24, 0.92);
  color: #e8e2f7;
  cursor: pointer;
  box-shadow: 0 12px 28px -26px rgba(0, 0, 0, 0.9);
  transition: border-color 0.18s ease, background 0.18s ease;
}
.settings-fold > summary::-webkit-details-marker { display: none; }
.settings-fold > summary::after {
  content: "›";
  flex: none;
  color: #8f87a8;
  font-size: 18px;
  line-height: 1;
  transform: rotate(90deg);
  transition: transform 0.18s ease;
}
.settings-fold[open] > summary {
  border-bottom-left-radius: 8px;
  border-bottom-right-radius: 8px;
  border-color: rgba(167, 139, 250, 0.24);
}
.settings-fold[open] > summary::after { transform: rotate(-90deg); }
.settings-fold > .card { margin-top: 10px; }
.settings-summary span {
  font-size: 17px;
  font-weight: 750;
  letter-spacing: 0.2px;
}
.settings-summary small {
  margin-left: auto;
  color: #938cab;
  font-size: 10.5px;
  font-weight: 400;
}

.log-fold > summary { border-color: rgba(94, 230, 160, 0.13); }
.log-row {
  padding: 10px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.045);
}
.log-row:last-child { border-bottom: 0; }
.log-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}
.log-action { color: #e6dfff; font-size: 12px; font-weight: 650; }
.log-time { flex: none; color: #8f87a8; font-size: 10px; }
.log-target { margin-top: 3px; color: #c9c1de; font-size: 11px; }
.log-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 3px 10px;
  margin-top: 3px;
  color: #8f87a8;
  font-size: 10px;
}

.danger-fold {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px dashed rgba(255, 255, 255, 0.09);
}
.danger-fold > summary {
  list-style: none;
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 6px 0;
  color: #ff9bab;
  font-size: 12px;
  cursor: pointer;
}
.danger-fold > summary::-webkit-details-marker { display: none; }
.danger-fold > summary span { flex: none; font-weight: 600; }
.danger-fold > summary small {
  margin-left: auto;
  color: #8f87a8;
  font-size: 10px;
  font-weight: 400;
  text-align: right;
}
.danger-fold > summary::after {
  content: "›";
  flex: none;
  color: #ff9bab;
  font-size: 16px;
  line-height: 1;
  transform: rotate(90deg);
  transition: transform 0.18s ease;
}
.danger-fold[open] > summary::after { transform: rotate(-90deg); }
.danger-fold .btn { margin-top: 8px; }

.data-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.file-picker {
  position: relative;
  overflow: hidden;
  text-align: center;
}
.file-picker input[type="file"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.tab { font-size: 13px; }
.btn { font-size: 13px; }
.btn.sm { font-size: 11.5px; }
.pc-row .row-actions .btn { font-size: 11px; }

/* 首页公会卡数据：整体居中，数字略收 */
.guild-card .stats {
  grid-template-columns: max-content max-content;
  justify-content: center;
  column-gap: clamp(48px, 13vw, 80px);
}
.guild-card .stat b { font-size: 21px; }

/* 成员数/最高分：数字略缩，最高分数字居中于下方说明 */
.guild-card .stat b { font-size: 20px; }
.guild-card .stat:nth-child(2) b { justify-self: center; }

/* 数字标点收敛：换用比例数字与更紧凑的逗号字形 */
.stat b,
.rank-value,
.delta,
.history-right b,
.record-stats b,
.recent-value,
.module-stats,
.list-head {
  font-family: "SF Pro Display", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-variant-numeric: proportional-nums;
  font-feature-settings: "pnum" 1, "tnum" 0;
}

/* 数字再收一点，逗号同步变小 */
.stat b,
.rank-value,
.delta,
.history-right b,
.record-stats b,
.recent-value {
  font-family: Arial, "Helvetica Neue", Roboto, sans-serif;
  font-weight: 600;
  letter-spacing: -0.1px;
}

.guild-card .stat b { font-size: 19px; }
.rank-value { font-size: 14px; }

/* 中文标点也使用更紧凑的半角比例字形（支持的字体生效） */
body,
.intro,
.member-note,
.module-stats,
.list-head {
  font-variant-east-asian: proportional-width;
  font-feature-settings: "halt" 1, "pwid" 1, "pnum" 1, "tnum" 0;
}

/* 公会页顶部卡片：与首页公会卡保持同一排版和字阶 */
.guild-hero {
  position: relative;
  overflow: hidden;
  padding-top: 14px;
  padding-bottom: 14px;
}

.guild-hero::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: var(--guild-accent, #8f74ff);
  opacity: 0.95;
  pointer-events: none;
}

.guild-hero-head { flex-wrap: wrap; }
.guild-hero h2 {
  font-size: 20px;
  font-weight: 750;
  letter-spacing: 0.2px;
}

.guild-hero .intro {
  font-size: 12px;
  line-height: 1.55;
  color: #a9a2bf;
  margin-top: 6px;
  margin-bottom: 10px;
}

.guild-hero .stats {
  position: relative;
  display: grid;
  grid-template-columns: max-content max-content;
  grid-template-rows: auto auto;
  align-items: end;
  justify-content: center;
  column-gap: clamp(48px, 13vw, 80px);
  row-gap: 0;
}

.guild-hero .stats::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -8px;
  border-top: 1px dashed rgba(255, 255, 255, 0.1);
  pointer-events: none;
}

.guild-hero .stat { display: contents; }
.guild-hero .stat b {
  display: block;
  grid-row: 1;
  font-size: 19px;
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
}
.guild-hero .stat span {
  display: block;
  grid-row: 2;
  font-size: 10.5px;
  color: #938cab;
}
.guild-hero .stat:nth-child(1) b,
.guild-hero .stat:nth-child(1) span { grid-column: 1; }
.guild-hero .stat:nth-child(2) b,
.guild-hero .stat:nth-child(2) span { grid-column: 2; }
.guild-hero .stat:nth-child(2) b { justify-self: center; }

/* 成员页顶部：与探索期数卡同构 */
.member-summary .module-head { margin-bottom: 2px; }
.member-summary .module-head h3 {
  font-size: 21px;
  font-weight: 750;
  letter-spacing: 0.2px;
}
.member-summary-count {
  margin-top: 2px;
  font-size: 11px;
  color: #938cab;
}
.member-summary-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
  margin-top: 9px;
  font-size: 11px;
  color: #9b93b7;
}
.member-summary-meta b {
  color: #eee9fb;
  font-weight: 600;
}
.summary-sep { color: #5f5877; }
.member-sort-control {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
}
.member-sort-control > span {
  flex: none;
  color: #8f87a8;
}
.member-sort-control select {
  min-width: 0;
  max-width: 170px;
  padding: 2px 12px 2px 0;
  border: 0;
  background: transparent;
  color: #d3cbe8;
  font-size: 10.5px;
  font-weight: 600;
}
.member-summary-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}
.member-summary-divider {
  margin-top: 14px;
  border-top: 1px dashed rgba(255, 255, 255, 0.1);
}
.member-rank-head {
  margin: 16px 2px 10px;
}
.member-rank-head h3 {
  font-size: 16px;
  font-weight: 700;
  color: #d7d0ea;
}

.member-list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-bottom: 10px;
  font-size: 10.5px;
  color: #938cab;
}
.member-list-head span:last-child {
  flex: none;
  color: #b9b2cc;
  white-space: nowrap;
}
.member-list-divider {
  margin-bottom: 2px;
  border-top: 1px dashed rgba(255, 255, 255, 0.1);
}

.home-list-head .rank-title { font-size: 15px; font-weight: 700; }

/* 公会卡最终覆盖：确保单行、字号与排行榜标题一致 */
.guild-cards .guild-card {
  display: flex;
  align-items: center;
  height: 42px;
  padding: 0 9px 0 12px;
  border-radius: 12px;
  border-color: rgba(255, 255, 255, 0.09);
  background: linear-gradient(90deg, #1a1b22 0%, #131419 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.045),
    0 8px 18px -16px rgba(0, 0, 0, 0.9);
  transition: transform 0.15s ease, border-color 0.15s ease, filter 0.15s ease, box-shadow 0.15s ease;
}
.guild-cards .guild-card:hover {
  border-color: rgba(167, 139, 250, 0.3);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 10px 22px -16px rgba(0, 0, 0, 0.95);
}
.guild-cards .guild-card:active {
  transform: translateY(1px) scale(0.99);
  filter: brightness(0.96);
}
.guild-cards .guild-card::before { display: none; }
.guild-cards .guild-card h3 {
  font-size: 15px;
  font-weight: 800;
  line-height: 1;
  max-width: 90px;
}
@media (max-width: 380px) {
  .guild-cards .guild-card { height: 40px; padding: 0 8px 0 10px; }
  .guild-cards .guild-card h3 { max-width: 86px; font-size: 14px; }
}

/* 公会页小卡片：与首页保持同一套视觉 */
.guild-page-card {
  display: flex;
  align-items: center;
  height: 42px;
  padding: 0 9px 0 12px;
  margin-bottom: 14px;
  border-radius: 12px;
  border-color: rgba(255, 255, 255, 0.09);
  background: linear-gradient(90deg, #1a1b22 0%, #131419 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.045),
    0 8px 18px -16px rgba(0, 0, 0, 0.9);
  cursor: default;
}
.guild-page-card::before { display: none; }
.guild-page-card h3 {
  max-width: 90px;
  font-size: 15px;
  font-weight: 800;
  line-height: 1;
}
.guild-page-card:active {
  transform: none;
  filter: none;
}
@media (max-width: 380px) {
  .guild-page-card { height: 40px; padding: 0 8px 0 10px; }
  .guild-page-card h3 { max-width: 86px; font-size: 14px; }
}

/* 设置-公会名称：名称、输入框、保存同一行 */
.settings-fold .guild-form {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 0;
}
.settings-fold .guild-form .field {
  flex: 1;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  min-width: 0;
  margin: 0;
}
.settings-fold .guild-form .field > span {
  flex: none;
  margin: 0;
  color: #a9a2c0;
  font-size: 12px;
  white-space: nowrap;
}
.settings-fold .guild-form .field input {
  flex: 1;
  width: auto;
  min-width: 0;
  margin: 0;
}
.settings-fold .guild-form .btn { flex: none; }

/* 统一公会卡与列表卡背景；压缩昵称行上下间距 */
.guild-cards .guild-card,
.guild-page-card {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.032), rgba(255, 255, 255, 0.006)),
    linear-gradient(160deg, rgba(23, 20, 34, 0.96), rgba(12, 10, 20, 0.985));
}
.rank-row { padding: 8px 0; }
.member-row { padding: 8px 0; }
.history-row { padding: 9px 0; }

/* 成员列表：进一步压缩昵称行高度 */
.member-row { padding: 5px 0; }
.member-row .avatar { width: 28px; height: 28px; border-radius: 9px; }
.member-row .reward-cell { width: 34px; height: 34px; }
.member-row .reward-check { width: 28px; height: 28px; }
.member-row .member-missed b { font-size: 14px; }

/* 录入页：成员对照下拉框 */
.edit-name select {
  width: 100%;
  flex: none;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 9px;
  padding: 8px 10px;
  outline: none;
  font-size: 14px;
}

/* 排名列表卡：第一条昵称上方到卡片顶部的留白压缩约三分之一 */
.list-card { padding-top: 5px; }
.list-head { padding-top: 6px; padding-bottom: 6px; }
.member-list-card { padding-top: 10px; }
.member-list-head { padding-bottom: 6px; }

/* 公会页（萌锐小屋/萌锐阁）：沿用首页的上下间距与紧凑卡片尺寸 */
.guild-page > .card:not(.guild-page-card) { margin-bottom: 12px; }
.guild-page .tabs { padding-bottom: 10px; }
.guild-page .module-card { padding: 13px; }
.guild-page .module-card .module-stats { margin-top: 8px; }
.guild-page .module-card .module-actions { margin-top: 10px; }

/* 设置页：卡片高度压缩约三分之一，标题字号与总排行榜一致 */
.settings-fold { margin-bottom: 12px; }
.settings-fold > summary { padding: 7px 12px; }
.settings-summary span { font-size: 15px; line-height: 1.2; }
.settings-fold > .card { padding: 8px 12px; margin-top: 8px; }
.settings-fold .guild-form { padding: 4px 0; }
.settings-fold .guild-form .field input {
  height: 32px;
  padding: 0 9px;
}
.settings-fold .guild-form .btn {
  height: 32px;
  padding: 0 12px;
}

.settings-fold > summary { padding: 5px 12px; }
.settings-fold .guild-form { padding: 2px 0; }
.settings-fold .guild-form .field { height: 32px; }

/* 设置卡在当前基础上增加约三分之一高度 */
.settings-fold > summary { padding: 10px 12px; }
.settings-fold > .card { padding: 14px 12px; }
.settings-fold .guild-form { padding: 6px 0; }
.settings-fold .guild-form .field { height: 36px; }
.settings-fold .guild-form .field input { height: 36px; }
.settings-fold .guild-form .btn { height: 36px; }

/* 公会名称内卡和退出卡片略矮 */
.settings-fold > .card { padding: 10px 12px; }
.settings-fold .guild-form { padding: 4px 0; }
.settings-fold .guild-form .field { height: 34px; }
.settings-fold .guild-form .field input { height: 34px; }
.settings-fold .guild-form .btn { height: 34px; }
.settings-account-card { padding: 10px 12px; }
.settings-account-card p { margin: 0 0 6px; }
.settings-account-card .btn { height: 36px; }

/* 公会名称：横线上下留白加大，名称框和保存按钮再矮一点 */
.settings-fold .guild-form { padding: 8px 0; }
.settings-fold .guild-form .field { height: 30px; }
.settings-fold .guild-form .field input { height: 30px; padding: 0 9px; }
.settings-fold .guild-form .btn { height: 30px; padding: 0 11px; }

/* 公会名称：输入框长度收短，整行居中更规整 */
.settings-fold .guild-form { justify-content: center; }
.settings-fold .guild-form .field { flex: 0 0 auto; }
.settings-fold .guild-form .field input { width: 180px; max-width: 180px; flex: none; }
@media (max-width: 380px) {
  .settings-fold .guild-form .field input { width: 160px; max-width: 160px; }
}

.settings-fold .guild-form { justify-content: flex-start; }
.settings-fold .guild-form .field { gap: 4px; }

.settings-fold .guild-form .field { gap: 6px; }

.settings-fold .guild-form .field > span { width: auto; min-width: 0; }

/* 公会名称内卡：上下空白压缩约三分之一 */
.guild-name-card { padding-top: 4px; padding-bottom: 4px; }

.settings-fold > .card.guild-name-card { padding-top: 4px; padding-bottom: 4px; }

/* 页面上下留白收紧 */
.main { padding: 10px 20px 12px; }
.app { padding-bottom: calc(78px + env(safe-area-inset-bottom)); }
.topbar { padding: calc(8px + env(safe-area-inset-top)) 20px 8px; }
.tabbar { padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); }

/* 顶部标题栏和底部导航栏减薄 */
.topbar { padding: calc(4px + env(safe-area-inset-top)) 16px 4px; }
.tabbar { padding: 2px 4px calc(2px + env(safe-area-inset-bottom)); }
.tabbar button { padding: 4px 2px; }
.app { padding-bottom: calc(42px + env(safe-area-inset-bottom)); }
.toast { bottom: calc(44px + env(safe-area-inset-bottom)); }

/* 顶栏和底栏留一点内边距，避免文字贴边 */
.topbar { padding: calc(6px + env(safe-area-inset-top)) 16px 6px; }
.tabbar { padding: 4px 8px calc(4px + env(safe-area-inset-bottom)); }
.tabbar button { padding: 5px 2px; }

/* 顶部右上角菜单导航（替代底部导航） */
.topbar-right { display: flex; align-items: center; gap: 6px; flex: none; }
.topbar-nav { position: relative; }
.menu-toggle {
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  font-size: 14px;
  line-height: 1;
}
.menu-toggle.active { color: #f1ecff; border-color: rgba(167, 139, 250, 0.35); }
.nav-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 40;
  display: flex;
  flex-direction: column;
  gap: 2px;
  width: 168px;
  padding: 6px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  background: rgba(20, 16, 34, 0.98);
  box-shadow: 0 18px 40px -18px rgba(0, 0, 0, 0.95);
  backdrop-filter: blur(16px);
}
.nav-menu-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 8px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #b8b0ce;
  font-size: 12.5px;
  text-align: left;
  white-space: nowrap;
}
.nav-menu-item.active {
  color: #f3eeff;
  background: rgba(143, 116, 255, 0.22);
}
.nav-menu-dot {
  flex: none;
  width: 6px;
  height: 6px;
  border-radius: 50%;
}
.menu-backdrop {
  position: fixed;
  inset: 0;
  z-index: 19;
  background: transparent;
}
.app { padding-bottom: 0; }
.toast { bottom: 22px; }

/* 顶部栏再压缩，菜单按钮加宽约三分之一 */
.topbar { padding: calc(4px + env(safe-area-inset-top)) 12px 4px; }
.menu-toggle { width: 34px; height: 24px; padding: 0; }

.menu-toggle { width: 40px; }

/* 标题居中，三横线等宽加宽 */
.topbar-title {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: max-content;
  max-width: calc(100% - 170px);
  pointer-events: none;
  text-align: center;
}
.menu-toggle { width: 40px; height: 24px; }
.menu-lines {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 19px;
  height: 12px;
}
.menu-lines i {
  display: block;
  width: 100%;
  height: 1.5px;
  border-radius: 2px;
  background: currentColor;
}

.topbar-right { margin-left: auto; }

/* 标题左右、上下都居中 */
.topbar-title {
  top: 0;
  bottom: 0;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: translateX(-50%);
  line-height: 1;
}

/* 只保留左右居中，上下还原 */
.topbar-title {
  top: 50%;
  bottom: auto;
  height: auto;
  display: block;
  transform: translate(-50%, -50%);
  line-height: normal;
}

/* 标题只左右居中，上下不再做居中 */
.topbar-title {
  top: 3px;
  bottom: auto;
  height: auto;
  display: block;
  transform: translateX(-50%);
  line-height: 1.2;
}

/* 标题上下恢复原位；顶部内容空间缩小三分之一 */
.topbar-title {
  top: 0;
  bottom: 0;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: translateX(-50%);
  line-height: 1.2;
}
.main { padding-top: 7px; }

/* 菜单里的账号功能 */
.nav-menu-sep {
  height: 1px;
  margin: 4px 3px;
  background: rgba(255, 255, 255, 0.09);
}
.nav-menu-item.danger { color: #ff9eab; }

/* 登录口令弹窗 */
.passcode-modal {
  width: min(92vw, 430px);
  max-height: 82vh;
  overflow: auto;
}
.passcode-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}
.passcode-head h3 { margin: 0; font-size: 16px; }
.passcode-head .icon-btn { flex: none; }
.passcode-body { min-width: 0; }

/* 菜单设置面板 */
.nav-menu { max-height: calc(100vh - 52px); overflow-y: auto; }
.settings-panel-modal {
  width: min(92vw, 430px);
  max-height: 82vh;
  overflow: auto;
}
.settings-panel-modal .guild-name-card { padding: 0; }
.settings-panel-modal .guild-form {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}
.settings-panel-modal .guild-form:last-child { border-bottom: 0; }
.settings-panel-modal .field {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  margin: 0;
}
.settings-panel-modal .field > span {
  flex: none;
  width: auto;
  min-width: 0;
  margin: 0;
  color: #a9a2c0;
  font-size: 12px;
  white-space: nowrap;
}
.settings-panel-modal .field input {
  width: 180px;
  max-width: 180px;
  height: 32px;
  flex: none;
  padding: 0 9px;
  margin: 0;
}
.settings-panel-modal .btn { height: 32px; padding: 0 12px; }
.settings-panel-body { min-width: 0; }

/* 网站日志：字号和对比度提高，方便查看具体操作 */
.log-row { padding: 12px 0; }
.log-action { font-size: 13.5px; color: #f0e9ff; }
.log-time { font-size: 10.5px; color: #a099b5; }
.log-target { margin-top: 4px; font-size: 12.5px; color: #ddd5ee; }
.log-meta { margin-top: 4px; font-size: 11.5px; color: #b2aac6; }

/* 恢复日志原有字号和颜色，仅保留具体操作内容 */
.log-row { padding: 10px 0; }
.log-action { font-size: 12px; color: #e6dfff; }
.log-time { font-size: 10px; color: #8f87a8; }
.log-target { margin-top: 3px; font-size: 11px; color: #c9c1de; }
.log-meta { margin-top: 3px; font-size: 12px; color: #8f87a8; }

/* 登录口令：名称、修改、删除同一行 */
.pc-row {
  flex-direction: row;
  align-items: center;
  gap: 8px;
}
.pc-row .pc-info {
  flex: 1;
  min-width: 0;
}
.pc-row .row-actions {
  display: flex;
  flex: none;
  width: auto;
  gap: 6px;
  justify-content: flex-end;
}
.pc-row .row-actions .btn {
  width: auto;
  padding: 6px 10px;
  font-size: 11.5px;
}

/* 口令列表的基础管理员标识 */
.passcode-admin {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 1px 6px 1px 4px;
  border: 1px solid rgba(167, 139, 250, 0.25);
  border-radius: 5px;
  background: rgba(143, 116, 255, 0.12);
  color: #cabfe8;
  font-size: 9px;
  line-height: 1.5;
}
.passcode-admin i {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(94, 230, 160, 0.18);
  color: #8df0bd;
  font-size: 7px;
  font-style: normal;
}

/* 登录口令：编辑表单跟随当前口令 */
.passcode-edit-form {
  margin: 0 0 10px;
  padding: 10px;
  border-radius: 10px;
  background: rgba(143, 116, 255, 0.07);
  border: 1px solid rgba(167, 139, 250, 0.16);
}

.passcode-actions {
  justify-content: flex-end;
  margin-bottom: 8px;
}

.passcode-actions { padding-right: 15px; }

/* 登录口令：低调的添加按钮 */
.passcode-add-btn {
  height: 28px;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
  color: #a9a1bd;
  font-size: 11.5px;
  line-height: 1;
}
.passcode-add-btn:active {
  background: rgba(255, 255, 255, 0.07);
  color: #ded6ef;
}

.passcode-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 15px;
}
.passcode-section-title {
  color: #e8e2f7;
  font-size: 15px;
  font-weight: 700;
  line-height: 1;
}

.topbar-title { transform: translate(-50%, 1px); }

/* 标题只左右居中，贴近标题栏底部 */
.topbar-title {
  top: auto;
  bottom: 5px;
  height: auto;
  display: block;
  transform: translateX(-50%);
  line-height: 1;
}

.topbar-title { bottom: 8px; }

.passcode-title-group {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.passcode-title-group .pill { flex: none; }

/* 菜单里的权限标签 */
.nav-menu-role {
  margin-left: auto;
  padding: 1px 5px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.045);
  color: #a9a1bd;
  font-size: 9px;
  font-weight: 400;
  line-height: 1.4;
}
.nav-menu-item.locked { color: #7f7895; }
.nav-menu-item.locked .nav-menu-role { color: #777089; }

.nav-menu-role { margin-left: 6px; }

.nav-menu-role { margin-left: 1px; }

.passcode-menu-item { gap: 2px; }
.passcode-menu-item .nav-menu-role { margin-left: 0; }
.home-list-head .rank-title {
  font-size: 13.5px;
  font-weight: 600;
  color: #d3cbe8;
}

.passcode-menu-item { align-items: baseline; }
.passcode-menu-item .nav-menu-role {
  align-self: baseline;
  line-height: 1;
  padding-top: 0;
  padding-bottom: 0;
}

.manual-refresh { margin-top: 10px; }

/* 公会名完整显示，不省略 */
.guild-cards .guild-card h3,
.guild-page-card h3 {
  max-width: none;
  overflow: visible;
  text-overflow: clip;
  white-space: nowrap;
}
@media (max-width: 380px) {
  .guild-cards .guild-card h3,
  .guild-page-card h3 { max-width: none; }
}

/* 远征最高完整显示，优先压缩会长标签 */
.guild-meta-tag.highlight {
  flex: 0 0 auto;
  max-width: none;
}
.guild-meta-tag.highlight b {
  overflow: visible;
  text-overflow: clip;
}
.guild-meta-tag:not(.highlight) {
  flex: 0 1 auto;
}
.guild-card-tags {
  flex: 1 1 auto;
  justify-content: flex-end;
}

/* 最高标签位置固定，名字过长向右侧压缩省略 */
.guild-meta-tag.highlight {
  flex: 0 0 100px;
  width: 100px;
  max-width: 100px;
}
.guild-meta-tag.highlight b {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 远征最高标签改为自然宽度，并整体左移 */
.guild-meta-tag.highlight {
  flex: 0 0 auto;
  width: auto;
  max-width: none;
}
.guild-meta-tag.highlight b {
  overflow: visible;
  text-overflow: clip;
}
.guild-card-tags {
  flex: 0 1 auto;
  justify-content: flex-start;
  margin-left: 2px;
}

.topbar-home {
  pointer-events: auto;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

.topbar-home {
  font-size: 16px;
  font-weight: 700;
  line-height: 1;
}

/* 顶栏固定高度，避免不同浏览器/安全区导致高低不一 */
.topbar {
  height: 34px;
  padding: 0 12px;
}
.topbar-title { bottom: 9px; }

.topbar { height: 37px; }
.topbar-title { bottom: 10px; }

/* 菜单设置弹窗压缩上下留白 */
.settings-panel-modal {
  padding: 12px 14px 10px;
  border-radius: 14px;
}
.settings-panel-modal .passcode-head {
  margin-bottom: 4px;
}
.settings-panel-modal .passcode-head .icon-btn {
  width: 30px;
  height: 30px;
}
.settings-panel-modal .guild-form {
  padding: 3px 0;
  gap: 6px;
}
.settings-panel-modal .field input {
  height: 30px;
}
.settings-panel-modal .threshold-row {
  padding: 2px 0;
  margin: 0;
}
.settings-panel-modal .threshold-row + .muted.small {
  margin: 4px 0 0;
  font-size: 10.5px;
  line-height: 1.35;
}

.settings-panel-modal { padding: 8px 12px; }
.settings-panel-modal .passcode-head { margin-bottom: 2px; }
.settings-panel-modal .guild-form {
  height: 38px;
  padding: 0;
}
.settings-panel-modal .guild-form .field { height: 30px; }
.settings-panel-modal .guild-form .field input { height: 30px; }
.settings-panel-modal .guild-form .btn { height: 30px; padding: 0 11px; }

/* 设置弹窗居中、留白和输入框居中 */
.settings-panel-mask {
  align-items: center;
  padding-bottom: 16px;
}
.settings-panel-modal { padding: 12px; }
.settings-panel-modal .guild-form input { text-align: center; }
.settings-panel-modal .passcode-head .icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  font-size: 18px;
  line-height: 1;
}

/* 公会页玩法/成员卡片压缩，标题与页面标题接近 */
.guild-page .tabs { padding-bottom: 7px; }
.guild-page > .card:not(.guild-page-card) { margin-bottom: 10px; }
.guild-page .module-card { padding: 11px 13px; }
.guild-page .module-head h3 { font-size: 16px; font-weight: 700; }
.guild-page .module-stats {
  margin-top: 5px;
  gap: 8px;
  font-size: 11px;
}
.guild-page .module-actions {
  margin-top: 8px;
  gap: 6px;
}
.guild-page .member-summary { padding: 11px 13px; }
.guild-page .member-summary .module-head h3 {
  font-size: 16px;
  font-weight: 700;
}
.guild-page .member-summary-meta {
  margin-top: 5px;
  gap: 6px;
  font-size: 10.5px;
  line-height: 1.35;
}
.guild-page .member-summary-actions {
  margin-top: 7px;
  gap: 6px;
}

.logs-page .section-head h2 {
  font-size: 16px;
  font-weight: 700;
}

.settings-panel-modal .guild-form { height: 46px; }

.settings-panel-modal .guild-form { justify-content: center; }

/* 历史与单期详情：标题和卡片压缩 */
.history-page .section-head h2,
.record-page .section-head h2 {
  font-size: 16px;
  font-weight: 700;
}
.history-page .history-row {
  padding: 8px 0;
}
.record-page .record-stats {
  padding: 10px 12px;
}
.record-page .record-stats b {
  font-size: 16px;
}
.record-page .record-stats span {
  font-size: 10px;
}

/* 登录口令卡片行距参考排行榜 */
.pc-row {
  padding: 8px 0;
  gap: 6px;
}

.topbar { height: 40px; }
.topbar-title { bottom: 12px; }
.icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.topbar-back { padding-left: 3px; }

/* 返回箭头用纯 CSS，几何居中 */
.topbar-back { padding: 0; }
.back-chevron {
  display: block;
  width: 9px;
  height: 9px;
  border-left: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
}

.back-icon {
  display: block;
  width: 10px;
  height: 16px;
}

/* 娱乐抽奖 */
.lottery-page > .card { margin-bottom: 10px; }
.lottery-main { padding: 12px 13px; }
.lottery-count {
  margin: 0 0 10px;
  text-align: center;
  font-size: 11px;
  color: #a79fc0;
}
.lottery-winner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}
.lottery-avatar {
  flex: none;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(160deg, #8b6cff, #6a4fe0);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
}
.lottery-avatar.sm { width: 26px; height: 26px; border-radius: 9px; font-size: 11px; }
.lottery-winner-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.lottery-winner-info b { font-size: 14px; }
.lottery-winner-info span { font-size: 10.5px; color: #a79fc0; }
.lottery-badge {
  flex: none;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(74, 222, 128, 0.16);
  color: #6ee7a0;
  font-size: 10px;
}
.lottery-badge.wait { background: rgba(255, 255, 255, 0.06); color: #9b93b7; }
.lottery-winner.pending .lottery-avatar { background: rgba(255, 255, 255, 0.08); color: #b3abc9; }
.lottery-block { padding: 10px 0 0; }
.lottery-block h4 {
  margin: 0 0 6px;
  font-size: 12px;
  font-weight: 700;
  color: #d3cbe8;
}
.lottery-block p { margin: 0 0 3px; font-size: 11px; color: #9b93b7; line-height: 1.5; }
.lottery-prize {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 3px 0;
  font-size: 11.5px;
  color: #cfc7e4;
}
.lottery-prize b { font-weight: 600; color: #e8e2f7; }
.lottery-actions { display: flex; gap: 8px; margin-top: 12px; }
.lottery-actions .btn { flex: 1; }
.lottery-sponsor {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 13px;
  min-height: 40px;
}
.lottery-sponsor-label { flex: none; font-size: 11.5px; color: #cfc7e4; font-weight: 600; }
.lottery-sponsor-tags { flex: 1; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.lottery-tag {
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid rgba(167, 139, 250, 0.35);
  background: rgba(143, 116, 255, 0.12);
  color: #cfc4f5;
  font-size: 10.5px;
}
.lottery-comments { padding: 10px 13px; }
.lottery-comments .list-head { margin-bottom: 8px; }
.lottery-comments .list-head b { font-size: 13px; }
.lottery-form { display: flex; flex-direction: column; gap: 6px; padding-bottom: 10px; }
.lottery-form input {
  height: 32px;
  padding: 0 10px;
  border-radius: 9px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  background: rgba(255, 255, 255, 0.045);
  color: inherit;
  font-size: 12px;
}
.lottery-form .btn { align-self: flex-end; }
.lottery-comment {
  display: flex;
  gap: 8px;
  padding: 8px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}
.lottery-comment-body { flex: 1; min-width: 0; }
.lottery-comment-top { display: flex; align-items: baseline; gap: 6px; }
.lottery-comment-top b { font-size: 12px; }
.lottery-comment-body p { margin: 2px 0 0; font-size: 11.5px; color: #cfc7e4; line-height: 1.45; word-break: break-word; }
.lottery-draw { margin-top: 4px; }
.lottery-list-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 12px;
}
.lottery-list-row:last-child { border-bottom: 0; }
.lottery-list-row b { font-size: 12.5px; }
.lottery-modal input {
  width: 100%;
  height: 32px;
  padding: 0 10px;
  border-radius: 9px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  background: rgba(255, 255, 255, 0.045);
  color: inherit;
  font-size: 12px;
}
.lottery-modal-actions { display: flex; justify-content: flex-end; gap: 6px; margin-top: 8px; }

.lottery-name-hint { margin: -2px 0 2px; font-size: 10.5px; color: #9b93b7; }
.lottery-name-hint.ok { color: #6ee7a0; }
.lottery-name-hint.bad { color: #ff8a9a; }
.lottery-form .btn[disabled] { opacity: 0.45; }

.lottery-window { margin: -6px 0 8px; text-align: center; font-size: 10.5px; color: #938cab; }
.lottery-window.open { color: #6ee7a0; }
.lottery-closed {
  margin: 0 0 8px;
  padding: 7px 10px;
  border-radius: 9px;
  background: rgba(255, 138, 154, 0.08);
  color: #ff9aa8;
  font-size: 11px;
  text-align: center;
}
.lottery-comment-list { max-height: 320px; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.lottery-sponsor-edit {
  height: 22px;
  padding: 0 8px;
  border-radius: 6px;
  font-size: 10px;
  line-height: 1;
}
.lottery-history-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 12px;
}
.lottery-history-row:last-child { border-bottom: 0; }
.lottery-history-period { flex: none; width: 58px; color: #938cab; font-size: 10.5px; }
.lottery-history-row b { flex: 1; font-size: 12.5px; }
.lottery-settings .field { margin-bottom: 8px; }
.lottery-settings .field > span { display: block; margin-bottom: 3px; }
.lottery-settings input,
.lottery-settings textarea {
  width: 100%;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  background: rgba(255, 255, 255, 0.045);
  color: inherit;
  font-size: 12px;
  padding: 6px 9px;
  font-family: inherit;
}
.lottery-modal-actions .btn.danger { margin-right: auto; }

/* 全站页面标题不超过顶部标题字号 */
.section-head h2 { font-size: 16px; }

.lottery-history-row {
  width: 100%;
  background: transparent;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 0;
  color: inherit;
  text-align: left;
  cursor: pointer;
  font: inherit;
}
.lottery-history-row:active { background: rgba(255, 255, 255, 0.04); }
.lottery-history-row .muted { margin-left: auto; }
.lottery-settings-page .field { margin-bottom: 10px; }
.lottery-settings-page .field > span { display: block; margin-bottom: 4px; font-size: 11.5px; color: #cfc7e4; }
.lottery-settings-page input,
.lottery-settings-page textarea {
  width: 100%;
  border-radius: 9px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  background: rgba(255, 255, 255, 0.045);
  color: inherit;
  font-size: 12.5px;
  padding: 8px 10px;
  font-family: inherit;
}

.lottery-publish-hint {
  margin: 6px 0 0;
  text-align: center;
  font-size: 10.5px;
  color: #ff9aa8;
}

.lottery-test-badge {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 6px;
  border-radius: 999px;
  background: rgba(255, 196, 84, 0.16);
  color: #ffc454;
  font-size: 9.5px;
  vertical-align: 1px;
}

.nav-menu-arrow {
  margin-left: auto;
  color: #8d86a6;
  font-size: 14px;
  line-height: 1;
  transition: transform 0.15s ease;
}
.nav-menu-arrow.open { transform: rotate(90deg); }
.nav-submenu { padding-left: 10px; }
.nav-menu-item.nav-subitem {
  padding-left: 12px;
  font-size: 12px;
  color: #b6aed0;
}
.nav-menu-item.nav-subitem.active { color: #e8e2f7; }
.guild-add-btn { margin-top: 10px; }

/* 公会名称弹窗按钮文字横排，不被挤成竖排 */
.settings-panel-modal .guild-form .btn {
  flex: 0 0 auto;
  white-space: nowrap;
  padding: 0 9px;
}
.settings-panel-modal .guild-form .field {
  flex: 1 1 auto;
  min-width: 0;
}
.settings-panel-modal .guild-form .field input {
  width: 100%;
  min-width: 0;
}

.settings-panel-modal .guild-form { gap: 6px; }
.settings-panel-modal .guild-form .field { gap: 6px; }
.settings-panel-modal .guild-form .field > span { margin: 0; }

.settings-panel-modal .guild-form .field {
  justify-content: flex-start;
  gap: 6px;
}
.settings-panel-modal .guild-form .field input {
  flex: 1 1 auto;
  width: auto;
  margin: 0;
}

.settings-panel-modal .guild-form .field input {
  max-width: none;
  flex: 1 1 auto;
}

/* 公会二级小卡片：显示在菜单左侧 */
.guild-flyout {
  position: absolute;
  right: calc(100% + 8px);
  top: 44px;
  width: 132px;
  padding: 5px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: #1b1532;
  box-shadow: 0 18px 40px -18px #000;
  z-index: 30;
}
.guild-flyout-item {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  height: 32px;
  padding: 0 9px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #ded6f0;
  font-size: 12px;
  text-align: left;
  white-space: nowrap;
}
.guild-flyout-item.active { background: rgba(139, 108, 255, 0.18); color: #fff; }
.nav-menu-arrow, .nav-submenu { display: none; }

.guild-flyout {
  right: 176px;
  top: calc(100% + 50px);
}

.nav-menu-arrow {
  display: inline-block;
  margin-left: auto;
  color: #8d86a6;
  font-size: 14px;
  line-height: 1;
  transform: translateY(-0.5px);
}
.nav-submenu { display: none; }

.guild-flyout {
  right: 182px;
  box-shadow: 0 12px 28px -16px #000;
}

/* 折叠式二级卡片：与菜单贴合，无缝隙 */
.guild-flyout {
  right: 168px;
  width: 140px;
  border-right: 0;
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
  border-top-left-radius: 12px;
  border-bottom-left-radius: 12px;
  box-shadow: -14px 18px 30px -22px #000;
  background: #1b1532;
}
.guild-flyout-item { height: 34px; }

.guild-flyout {
  right: 164px;
  z-index: 50;
}

.guild-flyout {
  right: 164px;
  z-index: 50;
  border-right: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
}

/* 小工具全屏面板 */
.tool-overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(0, 0, 0, 0.6);
}
.tool-sheet {
  width: 100%;
  max-width: 520px;
  height: 92vh;
  display: flex;
  flex-direction: column;
  background: #0b0917;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-bottom: 0;
  border-radius: 16px 16px 0 0;
  overflow: hidden;
}
.tool-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  background: #120f22;
}
.tool-head b { font-size: 14px; }
.tool-head .icon-btn { width: 28px; height: 28px; font-size: 18px; }
.tool-frame { flex: 1; width: 100%; border: 0; background: #08070f; }

.tool-overlay { top: 40px; }
.tool-sheet { height: calc(100vh - 40px); }
.tool-head b {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.3px;
}

.tool-sheet { position: relative; }
.tool-head {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 3;
  padding: 0;
  border: 0;
  background: transparent;
}
.tool-head .icon-btn {
  background: rgba(20, 16, 38, 0.85);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
}

/* 工具标题栏恢复：位于萌锐公会下方，标题同字号 */
.tool-head {
  position: static;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  background: #120f22;
}
.tool-head b {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.3px;
}
.tool-head .icon-btn {
  width: 28px;
  height: 28px;
  font-size: 18px;
  background: rgba(255, 255, 255, 0.06);
  box-shadow: none;
}

/* 秘境潮汐计算器独立页面 */
.treasure-frame {
  display: block;
  width: 100%;
  height: calc(100vh - 120px);
  border: 0;
  border-radius: 12px;
  background: #08070f;
}

/* 计算器页标题与卡片对齐、压缩上下空隙 */
.treasure-page .section-head {
  padding-left: 12px;
  margin: 2px 0 6px;
}

/* 计算器页与网站日志标题样式统一 */
.treasure-page .section-head {
  padding-left: 0;
  margin: 8px 0 10px;
}

.treasure-page .section-head {
  padding-left: 0;
  margin: 8px 2px 12px;
}

.treasure-page .section-head {
  padding-left: 0;
  margin: 8px 2px 12px;
}

.guild-flyout.tools-flyout {
  top: calc(100% + 118px);
}

.ladder-mode { flex: none; }
.ladder-mode button {
  border: 0;
  background: transparent;
  color: #9b94b8;
  font: inherit;
  font-size: 11.5px;
  padding: 4px 9px;
  border-radius: 7px;
}
.ladder-mode button.on {
  background: rgba(143,116,255,.25);
  color: #f3eeff;
}
