:root {
  color-scheme: light;
  --bg: #f3f5f7;
  --surface: #ffffff;
  --surface-soft: #eef4f6;
  --ink: #172126;
  --muted: #65727a;
  --line: #d8e0e4;
  --brand: #0d6e7c;
  --brand-strong: #094d59;
  --accent: #c85d35;
  --accent-soft: #fff1ea;
  --danger: #b54135;
  --shadow: 0 16px 38px rgba(23, 33, 38, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(180deg, #e8f0f2 0, var(--bg) 280px),
    var(--bg);
  color: var(--ink);
  /* 中文栈补齐安卓侧(HarmonyOS/MiSans/Noto),字形平滑——去"默认宋黑混排"的糙感 */
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "HarmonyOS Sans SC", "MiSans",
    "Noto Sans SC", "Segoe UI", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a {
  color: var(--brand);
  text-decoration: none;
}

a:hover {
  color: var(--brand-strong);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 32px;
  background: rgba(243, 245, 247, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-weight: 700;
}

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 32px;
  background: var(--brand);
  color: #ffffff;
  border-radius: 8px;
  font-size: 12px;
  letter-spacing: 0;
}

.nav {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
}

.nav a {
  padding: 8px 10px;
  border-radius: 8px;
  color: var(--ink);
}

.nav .primary-link {
  background: var(--brand);
  color: #ffffff;
}

main {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 48px;
}

.hero {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  padding: 28px 0 22px;
}

.hero.compact {
  padding-bottom: 14px;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.hero-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid rgba(13, 110, 124, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.68);
  color: var(--muted);
  font-size: 13px;
}

h1,
h2 {
  margin: 0;
  letter-spacing: 0;
}

h1 {
  font-size: 42px;
  line-height: 1.08;
}

h2 {
  font-size: 18px;
  line-height: 1.25;
}

.hero-actions,
.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 15px;
  border: 1px solid var(--brand);
  border-radius: 8px;
  background: var(--brand);
  color: #ffffff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.button-small {
  min-height: 38px;
  padding: 0 12px;
  font-size: 14px;
}

.button:hover {
  background: var(--brand-strong);
  color: #ffffff;
}

.button-muted {
  border-color: var(--line);
  background: var(--surface);
  color: var(--ink);
}

.button-muted:hover {
  background: var(--surface-soft);
  color: var(--ink);
}

.metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 8px 0 18px;
}

.metric,
.panel,
.form-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.metric {
  position: relative;
  overflow: hidden;
  padding: 16px;
}

.metric::after {
  content: "";
  position: absolute;
  right: 14px;
  bottom: 12px;
  width: 42px;
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--brand), var(--accent));
  opacity: 0.38;
}

.metric span {
  display: block;
  color: var(--muted);
  font-size: 13px;
}

.metric strong {
  display: block;
  margin-top: 8px;
  font-size: 31px;
  line-height: 1;
}

.panel {
  margin-top: 16px;
  overflow: hidden;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
  background: #fbfcfd;
}

.panel-head p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 1.4fr) repeat(3, minmax(130px, 0.8fr)) auto auto;
  align-items: end;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  background: #ffffff;
}

.toolbar-field {
  gap: 6px;
}

.toolbar-check {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
}

.toolbar-check input {
  width: 16px;
  min-height: auto;
  height: 16px;
  margin: 0;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 1280px;
}

tr[hidden] {
  display: none;
}

th,
td {
  padding: 13px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
  white-space: nowrap;
}

th {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.sort-button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: inherit;
  padding: 0;
  cursor: pointer;
}

.sort-button::after {
  content: "";
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid #9aa6ad;
  opacity: 0.55;
}

.sort-button.is-active {
  color: var(--brand);
}

.sort-button.is-active::after {
  border-top: 0;
  border-bottom: 5px solid var(--brand);
  opacity: 1;
}

.sort-button.is-active.is-desc::after {
  border-top: 5px solid var(--brand);
  border-bottom: 0;
}

td {
  font-size: 14px;
}

tr:last-child td {
  border-bottom: 0;
}

small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.rank {
  color: var(--accent);
  font-weight: 700;
}

.strong,
.player-link {
  font-weight: 700;
}

.muted {
  color: var(--muted);
  font-size: 13px;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  background: rgba(13, 110, 124, 0.11);
  color: var(--brand-strong);
  font-size: 12px;
  font-weight: 700;
}

.badge-muted {
  background: #f0f2f4;
  color: var(--muted);
}

.badge-status {
  min-width: 72px;
  justify-content: center;
}

.badge-ok {
  background: rgba(13, 110, 124, 0.12);
  color: var(--brand-strong);
}

.badge-warn {
  background: var(--accent-soft);
  color: #a14320;
}

.badge-bad {
  background: #fff0f0;
  color: var(--danger);
}

.progress-pill {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 92px;
  height: 26px;
  overflow: hidden;
  border-radius: 999px;
  background: #edf2f4;
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
}

.progress-pill span {
  position: absolute;
  inset: 0 auto 0 0;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(13, 110, 124, 0.32), rgba(200, 93, 53, 0.28));
}

.progress-pill strong {
  position: relative;
  z-index: 1;
}

.empty {
  padding: 28px;
  color: var(--muted);
  text-align: center;
}

.flash-wrap {
  width: min(1180px, calc(100% - 32px));
  margin: 16px auto 0;
  position: sticky;       /* 保存后仍可见确认消息(不被滚动顶掉) */
  top: 8px;
  z-index: 30;
}

.flash {
  padding: 12px 14px;
  border: 1px solid rgba(181, 65, 53, 0.28);
  border-radius: 8px;
  background: #fff4ef;
  color: var(--danger);
}

.form-panel {
  padding: 0;
  overflow: hidden;
}

.form-section {
  padding: 18px;
  border-bottom: 1px solid var(--line);
}

.form-section:last-of-type {
  border-bottom: 0;
}

.form-section h2 {
  margin-bottom: 14px;
}

.field-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

label {
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-width: 0;
}

label span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  font: inherit;
  padding: 9px 11px;
  outline: none;
}

input[type="file"] {
  padding: 8px;
}

textarea {
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(29, 111, 90, 0.14);
}

.wide {
  grid-column: span 2;
}

.form-actions {
  padding: 18px;
  border-top: 1px solid var(--line);
  background: #fbfcfd;
}

.upload-field input {
  background: var(--surface-soft);
}

.upload-preview {
  display: grid;
  place-items: center;
  gap: 8px;
  min-height: 150px;
  padding: 12px;
  border: 1px dashed #b6c2c8;
  border-radius: 8px;
  background: #fbfcfd;
  color: var(--muted);
  text-align: center;
}

.upload-preview img {
  display: block;
  max-width: 100%;
  max-height: 220px;
  object-fit: contain;
  border-radius: 8px;
  border: 1px solid var(--line);
}

.upload-preview strong {
  max-width: 100%;
  overflow: hidden;
  color: var(--ink);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr);
  gap: 16px;
}

.profile-layout,
.alliance-grid,
.management-grid {
  display: grid;
  gap: 16px;
  margin-top: 16px;
}

.profile-layout,
.alliance-grid {
  grid-template-columns: minmax(0, 1.25fr) minmax(300px, 0.75fr);
}

.management-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.profile-panel {
  margin-top: 0;
}

.attribute-bars,
.role-distribution {
  display: grid;
  gap: 14px;
  padding: 18px;
}

.attribute-row,
.role-row {
  display: grid;
  gap: 8px;
}

.attribute-label,
.role-row-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.attribute-label span,
.role-row-head span {
  color: var(--muted);
  font-size: 13px;
}

.attribute-label strong,
.role-row-head strong {
  font-size: 14px;
}

.attribute-track {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #edf2f4;
}

.attribute-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--brand), var(--accent));
}

.role-card {
  display: grid;
  gap: 12px;
  padding: 18px;
}

.role-card div {
  display: grid;
  gap: 7px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
}

.role-card span {
  color: var(--muted);
  font-size: 13px;
}

.role-card strong {
  font-size: 24px;
  line-height: 1.1;
}

.trend-panel {
  color: var(--brand);
}

.trend-chart {
  padding: 18px;
}

.trend-chart svg {
  display: block;
  width: 100%;
  height: 180px;
  color: var(--brand);
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(#eef4f6 1px, transparent 1px) 0 0 / 100% 25%,
    #fbfcfd;
}

.trend-chart circle {
  fill: var(--accent);
  stroke: #ffffff;
  stroke-width: 0.8;
}

.filter-strip {
  display: grid;
  grid-template-columns: minmax(220px, 360px);
  gap: 12px;
  margin-bottom: 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.compact-list {
  padding-top: 10px;
}

.compact-table {
  overflow-x: auto;
}

.compact-table table {
  min-width: 560px;
}

.compact-table th,
.compact-table td {
  padding: 12px 14px;
}

.stat-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  margin: 0;
  padding: 6px 18px 18px;
}

.stat-list div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.stat-list dt {
  color: var(--muted);
  font-size: 13px;
}

.stat-list dd {
  margin: 0;
  font-weight: 700;
  text-align: right;
}

.notes {
  margin: 0;
  padding: 0 18px 18px;
  color: var(--muted);
}

.screenshot {
  display: block;
  padding: 14px;
}

.screenshot-gallery {
  display: grid;
  gap: 12px;
  padding: 12px;
  background: rgba(13, 27, 67, 0.18);
}

.screenshot-gallery .screenshot {
  padding: 0;
}

.screenshot-gallery small {
  margin: 0 0 6px;
  color: #b8c8f6;
  font-weight: 700;
}

.screenshot img {
  display: block;
  width: 100%;
  max-height: 520px;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

@media (max-width: 860px) {
  .topbar,
  .hero {
    align-items: flex-start;
    flex-direction: column;
  }

  main {
    width: min(100% - 24px, 1180px);
    padding-top: 18px;
  }

  .metrics,
  .toolbar,
  .field-grid,
  .detail-grid,
  .profile-layout,
  .alliance-grid,
  .management-grid,
  .stat-list {
    grid-template-columns: 1fr;
  }

  .toolbar {
    align-items: stretch;
  }

  .toolbar-check {
    justify-content: flex-start;
  }

  .wide {
    grid-column: auto;
  }

  .hero-actions,
  .form-actions {
    width: 100%;
  }

  .button {
    flex: 1 1 150px;
  }
}

/* Visual refresh: operations dashboard */
:root {
  --bg: #eef2f3;
  --surface: #ffffff;
  --surface-soft: #f6f8f8;
  --surface-tint: #e8f4f2;
  --ink: #16201d;
  --ink-strong: #0b1210;
  --muted: #61706b;
  --line: #d2dcda;
  --line-strong: #aebfba;
  --brand: #0a7c72;
  --brand-strong: #075a54;
  --accent: #c66a2f;
  --accent-strong: #9b461d;
  --gold: #b98b1d;
  --danger: #b33d39;
  --danger-soft: #fff0ee;
  --ok-soft: #e7f5ef;
  --warn-soft: #fff3e6;
  --shadow: 0 18px 44px rgba(22, 32, 29, 0.10);
  --shadow-soft: 0 10px 24px rgba(22, 32, 29, 0.06);
}

body {
  background:
    linear-gradient(90deg, rgba(10, 124, 114, 0.06) 1px, transparent 1px) 0 0 / 56px 56px,
    linear-gradient(0deg, rgba(198, 106, 47, 0.045) 1px, transparent 1px) 0 0 / 56px 56px,
    linear-gradient(180deg, #f8faf9 0, #eef2f3 360px, #e9eeec 100%);
  color: var(--ink);
}

.topbar {
  top: 12px;
  width: min(1180px, calc(100% - 32px));
  margin: 12px auto 0;
  padding: 10px;
  border: 1px solid rgba(10, 124, 114, 0.24);
  border-radius: 8px;
  background: rgba(16, 28, 25, 0.92);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.brand {
  min-height: 42px;
  color: #f8fbfa;
  padding: 0 8px;
}

.brand-mark {
  width: 50px;
  height: 34px;
  background: linear-gradient(135deg, var(--brand), var(--accent));
  color: #ffffff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}

.nav {
  gap: 4px;
  padding: 4px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
}

.nav a {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  color: rgba(248, 251, 250, 0.78);
  border: 1px solid transparent;
}

.nav a:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.nav .primary-link {
  background: #f6f1e8;
  border-color: rgba(246, 241, 232, 0.4);
  color: #17201d;
}

main {
  width: min(1180px, calc(100% - 32px));
  padding-top: 34px;
}

.hero {
  align-items: center;
  padding: 30px 0 24px;
}

.eyebrow {
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 700;
}

h1 {
  color: var(--ink-strong);
  font-size: 42px;
  line-height: 1.08;
  font-weight: 700;
}

h2 {
  color: var(--ink-strong);
  font-size: 18px;
  font-weight: 700;
}

.hero-meta span {
  border-color: rgba(10, 124, 114, 0.18);
  background: rgba(255, 255, 255, 0.78);
  color: #53635e;
  box-shadow: var(--shadow-soft);
}

.button {
  border-color: rgba(10, 124, 114, 0.2);
  background: linear-gradient(180deg, #0b8d82, #076860);
  color: #ffffff;
  box-shadow: 0 10px 20px rgba(10, 124, 114, 0.18);
}

.button:hover {
  background: linear-gradient(180deg, #097d74, #064f49);
}

.button-muted {
  border-color: var(--line);
  background: #ffffff;
  color: var(--ink);
  box-shadow: var(--shadow-soft);
}

.button-muted:hover {
  background: #f4f7f6;
  color: var(--ink-strong);
}

.metrics {
  gap: 14px;
  margin: 6px 0 20px;
}

.metric {
  min-height: 112px;
  padding: 18px;
  border-color: rgba(10, 124, 114, 0.14);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(246, 248, 248, 0.96)),
    var(--surface);
}

.metric::after {
  right: 18px;
  bottom: 16px;
  width: 54px;
  background: linear-gradient(90deg, var(--brand), var(--accent), var(--gold));
  opacity: 0.62;
}

.metric span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.metric strong {
  margin-top: 12px;
  color: var(--ink-strong);
  font-size: 31px;
  font-weight: 700;
}

.panel,
.form-panel {
  border-color: rgba(10, 124, 114, 0.14);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
}

.panel {
  margin-top: 18px;
}

.panel-head {
  padding: 17px 20px;
  background:
    linear-gradient(90deg, rgba(10, 124, 114, 0.08), transparent 56%),
    #fbfdfc;
}

.panel-head p {
  color: var(--muted);
}

.toolbar,
.filter-strip {
  border-color: rgba(10, 124, 114, 0.12);
  background: #fbfdfc;
}

input,
select,
textarea {
  border-color: #cbd8d5;
  background: #ffffff;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(10, 124, 114, 0.13);
}

.toolbar-check {
  border-color: #cbd8d5;
  background: #f1f6f5;
}

table {
  background: #ffffff;
}

th {
  background: #f4f7f6;
  color: #52635e;
}

td {
  color: #22302c;
}

tbody tr:hover td {
  background: #f8fbfa;
}

.rank {
  color: var(--accent-strong);
}

.player-link {
  color: var(--brand-strong);
}

.badge {
  background: rgba(10, 124, 114, 0.10);
  color: var(--brand-strong);
}

.badge-muted {
  background: #edf1f0;
  color: var(--muted);
}

.badge-ok {
  background: var(--ok-soft);
  color: #13664c;
}

.badge-warn {
  background: var(--warn-soft);
  color: var(--accent-strong);
}

.badge-bad {
  background: var(--danger-soft);
  color: var(--danger);
}

.progress-pill {
  background: #edf2f0;
}

.progress-pill span {
  background: linear-gradient(90deg, rgba(10, 124, 114, 0.36), rgba(198, 106, 47, 0.32), rgba(185, 139, 29, 0.26));
}

.attribute-track {
  height: 12px;
  background: #edf2f0;
}

.attribute-track span {
  background: linear-gradient(90deg, var(--brand), var(--gold), var(--accent));
}

.role-card div {
  background:
    linear-gradient(135deg, rgba(10, 124, 114, 0.08), rgba(198, 106, 47, 0.04)),
    #fbfdfc;
}

.role-card strong {
  color: var(--ink-strong);
  font-size: 28px;
  font-weight: 700;
}

.trend-panel {
  color: var(--brand-strong);
}

.trend-chart svg {
  color: var(--brand-strong);
  background:
    linear-gradient(#dfe8e5 1px, transparent 1px) 0 0 / 100% 25%,
    linear-gradient(90deg, rgba(10, 124, 114, 0.08), rgba(198, 106, 47, 0.05)),
    #fbfdfc;
}

.trend-chart circle {
  fill: var(--accent);
}

.form-section {
  background: #ffffff;
}

.form-section:nth-of-type(even) {
  background: #fbfdfc;
}

.upload-preview {
  border-color: #aebfba;
  background:
    linear-gradient(135deg, rgba(10, 124, 114, 0.06), rgba(198, 106, 47, 0.04)),
    #fbfdfc;
}

.empty {
  color: var(--muted);
  background: #fbfdfc;
}

@media (max-width: 860px) {
  .topbar {
    top: 8px;
    width: min(100% - 20px, 1180px);
    margin-top: 8px;
    flex-wrap: wrap;
    row-gap: 10px;
  }

  .nav {
    width: 100%;
    overflow-x: auto;
    flex-wrap: nowrap;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x proximity;
    -webkit-mask-image: linear-gradient(90deg, #000 0, #000 92%, transparent 100%);
            mask-image: linear-gradient(90deg, #000 0, #000 92%, transparent 100%);
  }

  .nav::-webkit-scrollbar { display: none; }

  .nav a {
    white-space: nowrap;
    flex: 0 0 auto;
    scroll-snap-align: start;
  }

  main {
    width: min(100% - 24px, 1180px);
    padding-top: 22px;
  }

  h1 {
    font-size: 30px;
  }

  .metric {
    min-height: 96px;
  }

  .metric strong {
    font-size: 28px;
  }

  .panel-head {
    align-items: flex-start;
    flex-direction: column;
  }
}

/* Game profile skin */
/* 2026-07-08 质感重定调:紫蓝系(#5665b3/#293f83/粉红accent)整组退役——
   全站统一霜夜墨蓝(#0A1420 系,与统帅卡/即梦美术同调),accent=火橘(全站唯一行动色)。 */
:root {
  color-scheme: dark;
  --bg: #0A1420;
  --surface: rgba(17, 31, 47, 0.92);
  --surface-soft: rgba(26, 45, 64, 0.62);
  --surface-tint: rgba(159, 216, 239, 0.10);
  --ink: #E8F2F9;
  --ink-strong: #ffffff;
  --muted: #9FB6C8;
  --line: rgba(159, 216, 239, 0.20);
  --line-strong: rgba(190, 228, 246, 0.42);
  --brand: #9FD8EF;
  --brand-strong: #D9F0FB;
  --accent: #F07F2D;
  --accent-strong: #FFA75C;
  --gold: #E8C476;
  --danger: #E86A6A;
  --danger-soft: rgba(232, 106, 106, 0.16);
  --ok-soft: rgba(111, 207, 151, 0.15);
  --warn-soft: rgba(232, 196, 118, 0.16);
  --shadow: 0 18px 42px rgba(2, 6, 14, 0.5);
  --shadow-soft: 0 10px 26px rgba(2, 8, 18, 0.4);
}

html {
  background: #060D18;
}

body {
  position: relative;
  overflow-x: hidden;
  /* 档位用百分比:页面长短不同也不会"逐页变色"(评审共识) */
  background:
    linear-gradient(180deg, #060D18 0, #0A1626 8%, #142C43 34%, #0D1F31 70%, #08111C 100%),
    #0A1420;
  color: var(--ink);
}

body::before {
  content: "";
  position: fixed;
  inset: 70px 0 0;
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(159, 216, 239, 0.08) 0, rgba(159, 216, 239, 0.03) 34%, transparent 72%),
    repeating-linear-gradient(90deg, rgba(232, 250, 255, 0.02) 0 1px, transparent 1px 92px);
  opacity: 0.8;
}

body::after {
  content: "";
  position: fixed;
  inset: auto 0 0;
  height: 60px;
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(180deg, transparent, rgba(4, 10, 20, 0.3));
}

a {
  color: var(--brand-strong);
}

a:hover {
  color: #ffffff;
}

.topbar {
  top: 0;
  width: 100%;
  margin: 0;
  padding: 12px max(18px, calc((100vw - 1180px) / 2 + 18px));
  border: 0;
  border-bottom: 1px solid rgba(157, 218, 255, 0.16);
  border-radius: 0;
  background: linear-gradient(180deg, rgba(5, 15, 31, 0.98), rgba(8, 22, 47, 0.94));
  box-shadow: 0 10px 26px rgba(4, 8, 24, 0.34);
  backdrop-filter: blur(18px);
}

.brand {
  min-height: 46px;
  padding: 0;
  color: #ffffff;
  text-shadow: 0 1px 2px rgba(2, 8, 16, 0.6);
}

.brand-mark {
  width: 54px;
  height: 36px;
  border: 1px solid rgba(232, 196, 118, 0.5);
  border-radius: 8px;
  background: linear-gradient(180deg, #1A2E44, #101E30);
  color: #E8C476;
  box-shadow: none;
  text-shadow: none;
}

/* 导航去"盒中盒":容器透明,链接=纯文字,激活态=ember 下划线(评审共识:玻璃药丸退役) */
.nav {
  gap: 4px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.nav a {
  min-height: 38px;
  padding: 0 11px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: #C8DEEB;
  box-shadow: none;
  text-shadow: none;
  font-weight: 600;
}

.nav a:hover {
  border-color: transparent;
  background: rgba(159, 216, 239, 0.08);
  color: #ffffff;
}

.nav .primary-link {
  border-color: rgba(255, 190, 120, 0.55);
  background: linear-gradient(180deg, #FFA75C, #E86F1E);
  color: #26160A;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.3),
    0 0 14px rgba(240, 127, 45, 0.35);
}

main {
  width: min(1180px, calc(100% - 32px));
  padding-top: 36px;
  padding-bottom: 62px;
}

.hero {
  position: relative;
  align-items: center;
  min-height: 178px;
  margin-top: 4px;
  padding: 28px 24px;
  overflow: hidden;
  border: 1px solid rgba(159, 216, 239, 0.22);
  border-radius: 10px;
  background:
    linear-gradient(135deg, rgba(159, 216, 239, 0.08), transparent 40%),
    linear-gradient(180deg, rgba(23, 41, 60, 0.92), rgba(13, 25, 39, 0.94));
  box-shadow: var(--shadow);
}

/* (2026-07-08 评审:模糊多边形装饰看着像没加载出来的图,删) */

.hero > * {
  position: relative;
  z-index: 1;
}

.hero.compact {
  min-height: 128px;
}

.eyebrow {
  color: var(--gold);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .14em;
  text-shadow: none;
}

h1 {
  color: #ffffff;
  font-size: 42px;
  line-height: 1.08;
  font-weight: 700;
  text-shadow: 0 1px 2px rgba(2, 8, 16, 0.55);
}

h2 {
  color: #ffffff;
  font-size: 18px;
  font-weight: 700;
  text-shadow: 0 1px 0 rgba(8, 14, 36, 0.72);
}

.hero-meta span {
  min-height: 30px;
  border-color: rgba(159, 216, 239, 0.22);
  border-radius: 8px;
  background: rgba(17, 30, 46, 0.7);
  color: #D6EAF6;
  box-shadow: none;
}

/* 2010 水光蓝果冻钮退役——全站主按钮统一 ember 橙(与统帅卡/frost 同语言) */
.button {
  min-height: 42px;
  border-color: rgba(255, 205, 150, 0.55);
  border-radius: 9px;
  background: linear-gradient(180deg, #FFA75C, #F07F2D);
  color: #26160A;
  font-weight: 700;
  letter-spacing: .04em;
  box-shadow: 0 8px 18px -10px rgba(224, 110, 31, 0.5);
  text-shadow: none;
}

.button:hover {
  background: linear-gradient(180deg, #FFB877, #F8903F);
  color: #26160A;
}

.button-muted {
  border-color: rgba(159, 216, 239, 0.32);
  background: rgba(17, 30, 46, 0.6);
  color: #DCEEF7;
  box-shadow: none;
  text-shadow: none;
}

.button-muted:hover {
  background: rgba(30, 52, 74, 0.75);
  color: #ffffff;
}

.metrics {
  gap: 14px;
  margin: 18px 0;
}

.metric,
.panel,
.form-panel,
.filter-strip {
  border: 1px solid rgba(213, 244, 255, 0.22);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(62, 82, 162, 0.82), rgba(36, 55, 115, 0.9)),
    rgba(36, 55, 115, 0.88);
  box-shadow:
    var(--shadow),
    inset 0 1px 0 rgba(255, 255, 255, 0.14);
}

.metric {
  min-height: 112px;
  padding: 18px;
}

.metric::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: linear-gradient(90deg, var(--accent), var(--gold), var(--brand));
  opacity: 0.86;
}

.metric::after {
  right: 16px;
  bottom: 14px;
  width: 58px;
  height: 5px;
  border-radius: 8px;
  background: linear-gradient(90deg, rgba(255, 104, 120, 0.9), rgba(255, 217, 92, 0.92), rgba(139, 232, 255, 0.9));
  opacity: 0.72;
}

.metric span {
  color: #bcd1ff;
  font-size: 12px;
  font-weight: 700;
}

.metric strong {
  margin-top: 12px;
  color: #ffffff;
  font-size: 31px;
  font-weight: 700;
  text-shadow: 0 2px 0 rgba(11, 18, 48, 0.7), 0 0 16px rgba(147, 230, 255, 0.36);
}

.panel,
.form-panel {
  margin-top: 18px;
  overflow: hidden;
}

.panel-head {
  padding: 17px 20px;
  border-bottom: 1px solid rgba(216, 246, 255, 0.18);
  background:
    linear-gradient(90deg, rgba(255, 99, 116, 0.18), rgba(126, 196, 255, 0.13) 42%, rgba(28, 42, 99, 0.28)),
    rgba(25, 41, 91, 0.62);
}

.panel-head p {
  color: #b7c9f2;
}

.toolbar,
.filter-strip,
.form-actions {
  border-color: rgba(217, 246, 255, 0.2);
  background: rgba(23, 38, 88, 0.72);
}

.toolbar {
  border-bottom: 1px solid rgba(217, 246, 255, 0.16);
}

label span,
.attribute-label span,
.role-row-head span,
.role-card span,
.stat-list dt,
small,
.muted,
.notes {
  color: #b8c8f6;
}

input,
select,
textarea {
  border-color: rgba(202, 238, 255, 0.28);
  background: rgba(10, 24, 61, 0.72);
  color: #f2fbff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

input::placeholder,
textarea::placeholder {
  color: rgba(204, 222, 255, 0.66);
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(157, 237, 255, 0.82);
  box-shadow: 0 0 0 3px rgba(103, 213, 255, 0.18), 0 0 18px rgba(103, 213, 255, 0.22);
}

.toolbar-check {
  border-color: rgba(202, 238, 255, 0.24);
  background: rgba(48, 70, 145, 0.68);
  color: #e8faff;
}

.toolbar-check input {
  accent-color: #8be8ff;
}

.table-wrap,
.compact-table {
  background: rgba(13, 27, 67, 0.38);
}

table {
  background: transparent;
}

th,
td {
  border-bottom-color: rgba(218, 246, 255, 0.14);
}

th {
  background: rgba(14, 28, 68, 0.78);
  color: #c5d7ff;
}

td {
  color: #eef7ff;
}

tbody tr:nth-child(even) td {
  background: rgba(255, 255, 255, 0.025);
}

tbody tr:hover td {
  background: rgba(116, 177, 255, 0.12);
}

.sort-button::after {
  border-top-color: #badfff;
}

.sort-button.is-active {
  color: #ffffff;
}

.sort-button.is-active::after {
  border-bottom-color: #8be8ff;
}

.sort-button.is-active.is-desc::after {
  border-top-color: #8be8ff;
}

.rank {
  color: var(--gold);
  text-shadow: 0 0 10px rgba(255, 214, 90, 0.34);
}

.strong,
.player-link,
.stat-list dd,
.attribute-label strong,
.role-row-head strong {
  color: #ffffff;
}

.player-link {
  text-shadow: 0 0 12px rgba(139, 232, 255, 0.24);
}

.badge {
  border: 1px solid rgba(182, 232, 255, 0.24);
  border-radius: 8px;
  background: rgba(91, 138, 216, 0.3);
  color: #dff9ff;
}

.badge-muted {
  background: rgba(26, 39, 83, 0.58);
  color: #aabbe8;
}

.badge-ok {
  background: rgba(36, 188, 133, 0.18);
  color: #8ff0c9;
}

.badge-warn {
  background: rgba(255, 205, 92, 0.18);
  color: #ffe08a;
}

.badge-bad {
  background: rgba(255, 94, 108, 0.2);
  color: #ffb2ba;
}

.progress-pill {
  border: 1px solid rgba(220, 246, 255, 0.22);
  background: rgba(9, 22, 57, 0.68);
  color: #ffffff;
}

.progress-pill span {
  background: linear-gradient(90deg, rgba(105, 201, 255, 0.6), rgba(255, 217, 95, 0.68), rgba(255, 94, 112, 0.68));
}

.flash {  /* 默认中性(信息蓝)——多数是「已保存」之类确认，不再一律红色像报错 */
  border-color: rgba(120, 170, 255, 0.44);
  background: rgba(27, 42, 78, 0.92);
  color: #dbe7ff;
}
.flash.flash-error, .flash.flash-danger {
  border-color: rgba(255, 130, 143, 0.44);
  background: rgba(61, 27, 58, 0.9);
  color: #ffd9de;
}
.flash.flash-success {
  border-color: rgba(120, 220, 150, 0.46);
  background: rgba(24, 56, 44, 0.9);
  color: #c9f3d8;
}
/* 后台成员搜索框 + 表内搜索 */
.admin-table-search {
  width: 100%; box-sizing: border-box; margin: 0 0 10px; padding: 9px 12px;
  border-radius: 9px; border: 1px solid rgba(120,170,255,.3);
  background: rgba(12,22,44,.6); color: #eaf2ff; font-size: 14px;
}
/* 后台分区快速导航(吸顶) */
.admin-subnav {
  position: sticky; top: 0; z-index: 5; display: flex; flex-wrap: wrap; gap: 8px;
  padding: 10px 12px; margin: 0 0 14px; border-radius: 10px;
  background: rgba(9,18,40,.92); border: 1px solid rgba(120,170,255,.18);
}
.admin-subnav a {
  font-size: 13px; padding: 5px 12px; border-radius: 999px; white-space: nowrap;
  background: rgba(40,70,130,.35); color: #cfe0ff; border: 1px solid rgba(120,170,255,.25);
}
.admin-subnav a:hover { background: rgba(60,110,200,.5); }
/* 管理三步走 引导 */
.admin-steps { list-style: none; margin: 0; padding: 6px 16px 16px; display: flex; flex-direction: column; gap: 10px; }
.admin-steps li { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; background: rgba(40,70,130,.18); border: 1px solid rgba(120,170,255,.18); }
.admin-steps .step-no { flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; color: #06223c; background: linear-gradient(180deg,#ffe9a6,#f8d55f); }
.admin-steps .step-body { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.admin-steps .step-body strong { font-size: 14px; }
.admin-steps .step-body span { font-size: 12.5px; opacity: .82; }
@media (max-width: 860px) {
  .admin-steps li { flex-wrap: wrap; }
  .admin-steps .step-body { flex-basis: calc(100% - 40px); }
  .admin-steps li .button { margin-left: 40px; }
}

.form-section {
  border-bottom-color: rgba(218, 246, 255, 0.14);
  background: rgba(29, 47, 105, 0.74);
}

.form-section:nth-of-type(even) {
  background: rgba(23, 39, 91, 0.78);
}

.upload-field input {
  background: rgba(10, 24, 61, 0.72);
}

.upload-preview {
  border-color: rgba(164, 224, 255, 0.38);
  background:
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.04) 0 10px, transparent 10px 20px),
    rgba(10, 24, 61, 0.44);
  color: #c7d9ff;
}

.upload-preview strong {
  color: #ffffff;
}

.upload-preview img,
.screenshot img {
  border-color: rgba(220, 246, 255, 0.26);
  background: rgba(9, 20, 52, 0.7);
}

.attribute-bars,
.role-distribution,
.role-card {
  background: rgba(13, 27, 67, 0.18);
}

.attribute-track {
  height: 12px;
  border: 1px solid rgba(218, 246, 255, 0.16);
  background: rgba(7, 18, 48, 0.72);
  box-shadow: inset 0 1px 4px rgba(4, 10, 28, 0.42);
}

.attribute-track span {
  background: linear-gradient(90deg, #63d7ff, #ffe062 58%, #ff6373);
  box-shadow: 0 0 12px rgba(112, 224, 255, 0.38);
}

.role-card div {
  border-color: rgba(218, 246, 255, 0.18);
  background:
    linear-gradient(135deg, rgba(255, 96, 112, 0.16), rgba(105, 167, 255, 0.12)),
    rgba(11, 24, 61, 0.5);
}

.role-card strong {
  color: #ffffff;
  font-size: 28px;
  font-weight: 700;
}

.trend-panel {
  color: #8be8ff;
}

.trend-chart svg {
  color: #8be8ff;
  border-color: rgba(220, 246, 255, 0.18);
  background:
    linear-gradient(rgba(208, 239, 255, 0.12) 1px, transparent 1px) 0 0 / 100% 25%,
    linear-gradient(90deg, rgba(98, 213, 255, 0.1), rgba(255, 99, 118, 0.08)),
    rgba(8, 20, 56, 0.72);
}

.trend-chart circle {
  fill: #ff6877;
  stroke: #ffffff;
}

.filter-strip {
  box-shadow: var(--shadow);
}

.stat-list div {
  border-bottom-color: rgba(218, 246, 255, 0.14);
}

.screenshot {
  background: rgba(13, 27, 67, 0.18);
}

.empty {
  color: #b8c8f6;
  background: rgba(14, 27, 65, 0.4);
}

.troop-detail-table table {
  min-width: 640px;
}

.advanced-list {
  grid-template-columns: 1fr;
  padding-top: 12px;
}

.advanced-list div {
  align-items: flex-start;
}

.advanced-list dd {
  white-space: normal;
}

.hero-actions-stack {
  align-items: flex-end;
  flex-direction: column;
}

.mode-switch {
  display: inline-grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  min-width: 220px;
  padding: 4px;
  border: 1px solid rgba(220, 246, 255, 0.24);
  border-radius: 8px;
  background: rgba(8, 20, 56, 0.46);
}

.mode-pill,
.nav-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 11px;
  border: 1px solid rgba(220, 246, 255, 0.14);
  border-radius: 8px;
  background: var(--surface-tint);
  color: #dff6ff;
  font-size: 13px;
  font-weight: 700;
}

.mode-pill.is-active,
.nav-chip.is-active {
  border-color: rgba(255, 205, 150, 0.55);
  background: linear-gradient(180deg, #FFA75C, #F07F2D);
  color: #26160A;
  box-shadow:
    inset 0 1px 0 rgba(255, 220, 180, 0.35),
    0 0 14px rgba(240, 127, 45, 0.30);
}

.public-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0;
}

.public-alliance-grid,
.public-player-grid {
  display: grid;
  gap: 14px;
}

.public-alliance-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.public-player-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 16px;
  background: rgba(13, 27, 67, 0.18);
}

.alliance-card,
.public-player-card {
  display: grid;
  gap: 14px;
  min-width: 0;
  padding: 16px;
  border: 1px solid rgba(159, 216, 239, 0.16);
  border-radius: 8px;
  background:
    linear-gradient(180deg, #13212F, #0F1B29),
    #0F1B29;
  box-shadow:
    var(--shadow-soft),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

a.alliance-card:hover,
.public-player-card:hover {
  border-color: rgba(220, 246, 255, 0.38);
  background:
    linear-gradient(180deg, #17293A, #122032),
    #122032;
}

.alliance-card-head,
.public-player-card-head,
.alliance-card-footer,
.public-player-footer {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.alliance-card-head span,
.alliance-card-footer span,
.public-player-card-head span,
.public-player-stats span {
  color: #b8c8f6;
  font-size: 12px;
  font-weight: 700;
}

.alliance-card h2,
.public-player-card h3 {
  margin: 4px 0 0;
  color: #ffffff;
  font-size: 22px;
  line-height: 1.15;
  text-shadow: 0 1px 0 rgba(8, 14, 36, 0.72);
}

.alliance-card-head > strong {
  min-height: 32px;
  padding: 6px 10px;
  border: 1px solid rgba(255, 224, 138, 0.26);
  border-radius: 8px;
  background: rgba(255, 205, 92, 0.16);
  color: #ffe08a;
  font-size: 14px;
}

.alliance-card-stats,
.public-player-stats {
  display: grid;
  gap: 8px;
}

.alliance-card-stats {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.public-player-stats {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.alliance-card-stats div,
.public-player-stats div {
  min-width: 0;
  padding: 10px;
  border: 1px solid rgba(218, 246, 255, 0.14);
  border-radius: 8px;
  background: rgba(8, 20, 56, 0.36);
}

.alliance-card-stats strong,
.public-player-stats strong {
  display: block;
  margin-top: 5px;
  overflow: hidden;
  color: #ffffff;
  font-size: 17px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.alliance-card-footer {
  align-items: center;
}

.alliance-card-footer .attribute-track {
  flex: 1 1 120px;
}

.alliance-card-footer strong {
  color: #ffffff;
  font-size: 13px;
}

.public-player-card small,
.public-player-footer small {
  color: #b8c8f6;
}

.public-player-footer {
  align-items: center;
}

.lord-setup-body {
  display: grid;
  gap: 16px;
  padding: 16px;
  background: rgba(13, 27, 67, 0.18);
}

.setup-section {
  display: grid;
  gap: 12px;
}

.section-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.section-title-row h3 {
  margin: 0;
  color: #ffffff;
  font-size: 17px;
  line-height: 1.25;
}

.section-title-row span {
  min-height: 26px;
  padding: 4px 9px;
  border: 1px solid rgba(220, 246, 255, 0.2);
  border-radius: 8px;
  background: rgba(8, 20, 56, 0.42);
  color: #b8c8f6;
  font-size: 12px;
  font-weight: 700;
}

.gear-grid,
.gem-grid {
  display: grid;
  gap: 10px;
}

.gear-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.gem-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.gear-card,
.gem-card {
  position: relative;
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(238, 248, 255, 0.24);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(191, 47, 62, 0.82), rgba(93, 34, 72, 0.82)),
    rgba(32, 48, 108, 0.9);
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.18),
    0 10px 20px rgba(4, 10, 30, 0.24);
}

.gear-card::before,
.gem-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: linear-gradient(90deg, #ff6674, #f8d55f, #8be8ff);
}

.gear-card {
  display: grid;
  gap: 9px;
  min-height: 112px;
  padding: 14px 12px 12px;
}

.gear-slot,
.gem-card span {
  color: #dff6ff;
  font-size: 12px;
  font-weight: 700;
}

.gear-card strong,
.gem-card strong {
  color: #ffffff;
  font-size: 23px;
  line-height: 1.05;
  text-shadow: 0 2px 0 rgba(8, 14, 36, 0.72);
}

.gear-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.gear-meta span {
  min-height: 24px;
  padding: 4px 7px;
  border: 1px solid rgba(220, 246, 255, 0.18);
  border-radius: 8px;
  background: rgba(8, 20, 56, 0.34);
  color: #ffe08a;
  font-size: 12px;
  font-weight: 700;
}

.gem-card {
  display: grid;
  gap: 8px;
  min-height: 108px;
  padding: 14px 14px 12px;
}

.gem-card-1 {
  background:
    linear-gradient(180deg, rgba(42, 187, 88, 0.72), rgba(35, 83, 84, 0.82)),
    rgba(32, 48, 108, 0.9);
}

.gem-card-2 {
  background:
    linear-gradient(180deg, rgba(49, 190, 241, 0.72), rgba(32, 72, 140, 0.84)),
    rgba(32, 48, 108, 0.9);
}

.gem-card-3 {
  background:
    linear-gradient(180deg, rgba(255, 169, 54, 0.78), rgba(133, 57, 47, 0.82)),
    rgba(32, 48, 108, 0.9);
}

.gem-card small {
  margin: 0;
  color: #e4efff;
  font-size: 12px;
  font-weight: 700;
}

.gem-reference-table table {
  min-width: 760px;
}

.gem-reference-table .is-current td {
  background: rgba(255, 216, 91, 0.12);
}

.reference-archive {
  border: 1px solid rgba(220, 246, 255, 0.18);
  border-radius: 8px;
  background: rgba(7, 18, 48, 0.38);
}

.reference-archive summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 14px;
  color: #ffffff;
  cursor: pointer;
  list-style: none;
}

.reference-archive summary::-webkit-details-marker {
  display: none;
}

.reference-archive summary span {
  font-weight: 700;
}

.reference-archive summary strong {
  min-height: 26px;
  padding: 4px 9px;
  border-radius: 8px;
  background: rgba(96, 126, 216, 0.34);
  color: #dff6ff;
  font-size: 12px;
}

.reference-gallery {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  padding: 0 12px 12px;
}

.reference-shot {
  display: grid;
  gap: 6px;
  min-width: 0;
  padding: 8px;
  border: 1px solid rgba(220, 246, 255, 0.16);
  border-radius: 8px;
  background: var(--surface-tint);
}

.reference-shot span {
  overflow: hidden;
  color: #dff6ff;
  font-size: 12px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.reference-shot img {
  display: block;
  width: 100%;
  height: 220px;
  object-fit: cover;
  object-position: top;
  border: 1px solid rgba(220, 246, 255, 0.18);
  border-radius: 8px;
  background: rgba(9, 20, 52, 0.7);
}

@media (max-width: 860px) {
  .topbar {
    top: 0;
    width: 100%;
    margin-top: 0;
    padding: 10px 12px;
  }

  .brand {
    min-height: 40px;
  }

  .brand-mark {
    width: 50px;
    height: 34px;
  }

  .nav {
    width: 100%;
    overflow-x: auto;
  }

  .nav a {
    flex: 0 0 auto;
    white-space: nowrap;
  }

  .hero-actions-stack,
  .mode-switch {
    align-items: stretch;
    width: 100%;
  }

  .public-alliance-grid,
  .public-player-grid {
    grid-template-columns: 1fr;
  }

  /* 联盟卡战力(总/最高/平均)手机上保持 3 列紧凑,别一行一个把卡片撑高 */
  .alliance-card-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
  }

  .alliance-card-stats div {
    padding: 8px 6px;
  }

  /* 玩家 4 维手机上压成 2 列(4 列在 390 太挤) */
  .public-player-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .public-player-grid {
    padding: 12px;
  }

  .alliance-card-head,
  .public-player-card-head,
  .alliance-card-footer,
  .public-player-footer {
    flex-direction: column;
    align-items: stretch;
  }

  /* 完整度进度条:列布局里必须复位 flex,否则 flex-basis 被当高度→12px 细条被撑成 120px 空盒 */
  .alliance-card-footer .attribute-track,
  .public-player-footer .attribute-track {
    flex: 0 0 auto;
    width: 100%;
    height: 10px;
  }

  main {
    width: min(100% - 24px, 1180px);
    padding-top: 20px;
  }

  .hero {
    min-height: 154px;
    padding: 22px 16px;
  }

  .hero::before {
    top: 16px;
    right: 4%;
    width: 190px;
    height: 120px;
  }

  h1 {
    font-size: 30px;
  }

  .metric {
    min-height: 98px;
  }

  .metric strong {
    font-size: 28px;
  }
}

.assignment-panel-head {
  align-items: center;
}

.assignment-panel-head form {
  margin: 0;
}

.assignment-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  padding: 16px;
  background: rgba(13, 27, 67, 0.18);
}

.assignment-card {
  display: grid;
  gap: 14px;
  min-width: 0;
  padding: 14px;
  border: 1px solid rgba(159, 216, 239, 0.16);
  border-radius: 8px;
  background:
    linear-gradient(180deg, #13212F, #0F1B29),
    #0F1B29;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.assignment-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.assignment-card-head span,
.assignment-stat-row span {
  color: #b8c8f6;
  font-size: 12px;
  font-weight: 700;
}

.assignment-card h3 {
  margin: 4px 0 0;
  color: #ffffff;
  font-size: 22px;
  line-height: 1.15;
  text-shadow: 0 1px 0 rgba(8, 14, 36, 0.72);
}

.assignment-stat-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.assignment-stat-row div {
  min-width: 0;
  padding: 10px;
  border: 1px solid rgba(218, 246, 255, 0.16);
  border-radius: 8px;
  background: rgba(8, 20, 56, 0.44);
}

.assignment-stat-row strong {
  display: block;
  margin-top: 5px;
  color: #ffffff;
  font-size: 17px;
}

.assignment-picker {
  display: block;
  max-height: 290px;
  min-height: 116px;
  overflow: auto;
  padding: 8px;
  border: 1px solid rgba(218, 246, 255, 0.14);
  border-radius: 8px;
  background: rgba(6, 16, 45, 0.48);
}

.assignment-option + .assignment-option {
  margin-top: 8px;
}

.assignment-option {
  display: grid;
  gap: 8px;
  min-height: 0;
  padding: 8px;
  border: 1px solid rgba(190, 231, 255, 0.14);
  border-radius: 8px;
  background: var(--surface-tint);
}

.assignment-option:hover {
  border-color: rgba(220, 246, 255, 0.34);
  background: rgba(99, 127, 211, 0.32);
}

.assignment-option-toggle {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.assignment-option-toggle input[type="checkbox"] {
  width: 18px;
  height: 18px;
  min-height: auto;
  margin: 0;
  accent-color: #8be8ff;
}

.assignment-option-toggle > span {
  min-width: 0;
}

.assignment-option strong {
  display: block;
  overflow: hidden;
  color: #ffffff;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.assignment-config {
  padding: 8px;
  border: 1px solid rgba(218, 246, 255, 0.12);
  border-radius: 8px;
  background: rgba(7, 18, 48, 0.38);
}

.assignment-config:not([open]) > :not(summary) {
  display: none;
}

.assignment-config[open] > :not(summary) {
  margin-top: 8px;
}

.assignment-config summary {
  display: grid;
  gap: 3px;
  color: #ffffff;
  cursor: pointer;
  list-style: none;
}

.assignment-config summary::-webkit-details-marker {
  display: none;
}

.assignment-config summary span {
  font-size: 13px;
  font-weight: 700;
}

.assignment-config summary small {
  overflow: hidden;
  color: #b8c8f6;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.assignment-config-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  color: #b8c8f6;
  font-size: 12px;
}

.assignment-config-summary > span:not(.badge) {
  min-height: 24px;
  padding: 4px 7px;
  border: 1px solid rgba(190, 231, 255, 0.13);
  border-radius: 8px;
  background: var(--surface-tint);
}

.assignment-config-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.assignment-config-grid span {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.assignment-config-grid em {
  color: #b8c8f6;
  font-size: 12px;
  font-style: normal;
  font-weight: 700;
}

.assignment-config-grid input {
  min-height: 34px;
  padding: 7px 8px;
}

.assignment-note-field {
  grid-column: 1 / -1;
}

.assignment-actions {
  display: flex;
  justify-content: flex-end;
}

@media (max-width: 860px) {
  .assignment-grid,
  .assignment-stat-row {
    grid-template-columns: 1fr;
  }

  .assignment-panel-head {
    align-items: stretch;
  }

  .assignment-panel-head form,
  .assignment-panel-head .button,
  .assignment-actions .button {
    width: 100%;
  }

  .assignment-card-head {
    flex-direction: column;
  }

  .assignment-picker {
    max-height: none;
  }

  .assignment-config-grid {
    grid-template-columns: 1fr;
  }

  .assignment-note-field {
    grid-column: 1 / -1;
  }

  .gear-grid,
  .gem-grid,
  .reference-gallery {
    grid-template-columns: 1fr;
  }

  .gear-card,
  .gem-card {
    min-height: 92px;
  }

  .reference-shot img {
    height: 260px;
  }

  .troop-detail-table table {
    min-width: 0;
    width: 100%;
    table-layout: auto;
  }

  .troop-detail-table thead {
    display: none;
  }

  .troop-detail-table tbody,
  .troop-detail-table tr,
  .troop-detail-table td {
    display: block;
  }

  .troop-detail-table tr {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    padding: 10px;
    border-bottom: 1px solid rgba(218, 246, 255, 0.14);
  }

  .troop-detail-table tr:last-child {
    border-bottom: 0;
  }

  .troop-detail-table th,
  .troop-detail-table td {
    padding: 8px;
    border: 1px solid rgba(218, 246, 255, 0.12);
    border-radius: 8px;
    background: rgba(8, 20, 56, 0.32);
    white-space: normal;
  }

  .troop-detail-table td::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 4px;
    color: #b8c8f6;
    font-size: 12px;
    font-weight: 700;
  }

  .troop-detail-table td:first-child {
    grid-column: 1 / -1;
    background: var(--surface-tint);
  }

  .troop-detail-table td:first-child::before {
    display: none;
  }

  .troop-detail-table .badge {
    min-height: 22px;
    padding: 0 6px;
  }
}

/* Usability layer: active nav, hero lead, new-player guide, footer, form help */
.nav a.is-active:not(.primary-link) {
  border-color: rgba(223, 250, 255, 0.55);
  background: linear-gradient(180deg, rgba(140, 232, 255, 0.36), rgba(54, 79, 158, 0.92));
  color: #ffffff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22), 0 0 14px rgba(120, 225, 255, 0.28);
}

.nav .primary-link.is-active {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.4),
    0 0 18px rgba(255, 86, 108, 0.55);
}

.hero-lead {
  margin: 12px 0 0;
  max-width: 660px;
  color: #d8e6ff;
  font-size: 15px;
  line-height: 1.5;
  text-shadow: 0 1px 0 rgba(10, 18, 45, 0.55);
}

.guide {
  margin-top: 18px;
}

.guide-head h2 {
  color: #ffffff;
}

.guide-head p {
  margin: 4px 0 0;
  color: #b8c8f6;
  font-size: 13px;
}

.guide-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}

.guide-step {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  align-items: start;
  gap: 14px;
  min-width: 0;
  padding: 16px;
  border: 1px solid rgba(213, 244, 255, 0.22);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(62, 82, 162, 0.72), rgba(36, 55, 115, 0.86)),
    rgba(36, 55, 115, 0.86);
  box-shadow: var(--shadow-soft), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.guide-step-no {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(220, 246, 255, 0.5);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(236, 255, 255, 0.96), rgba(123, 222, 255, 0.94) 48%, rgba(53, 125, 227, 0.96));
  color: #123461;
  font-size: 20px;
  font-weight: 700;
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.7);
}

.guide-step-body {
  min-width: 0;
}

.guide-step-body h3 {
  margin: 2px 0 6px;
  color: #ffffff;
  font-size: 16px;
  font-weight: 700;
}

.guide-step-body p {
  margin: 0;
  color: #c7d6f5;
  font-size: 13px;
  line-height: 1.5;
}

.guide-link {
  display: inline-block;
  margin-top: 8px;
  color: #8be8ff;
  font-size: 13px;
  font-weight: 700;
}

.guide-link:hover {
  color: #ffffff;
}

.mode-exit {
  display: inline-flex;
  align-items: center;
  align-self: flex-end;
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid rgba(220, 246, 255, 0.24);
  border-radius: 8px;
  background: rgba(8, 20, 56, 0.5);
  color: #cdddff;
  font-size: 13px;
  font-weight: 700;
}

.mode-exit:hover {
  border-color: rgba(220, 246, 255, 0.44);
  background: rgba(20, 36, 84, 0.7);
  color: #ffffff;
}

.form-intro {
  display: block;
  margin-bottom: 16px;
  padding: 14px 16px;
  border: 1px solid rgba(139, 232, 255, 0.3);
  border-left: 3px solid #8be8ff;
  border-radius: 8px;
  background: rgba(13, 27, 67, 0.55);
  color: #d8e6ff;
  font-size: 14px;
  line-height: 1.55;
}

.form-intro strong {
  margin-right: 6px;
  color: #ffffff;
  font-weight: 700;
}

.form-section h2 {
  margin-bottom: 8px;
}

.form-hint {
  margin: 0 0 14px;
  color: #9fb0da;
  font-size: 13px;
  line-height: 1.5;
}

.req {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 7px;
  border-radius: 8px;
  background: rgba(255, 94, 108, 0.22);
  color: #ffb2ba;
  font-size: 11px;
  font-style: normal;
  font-weight: 700;
  vertical-align: middle;
}

.site-footer {
  width: min(1180px, calc(100% - 32px));
  margin: 10px auto 30px;
}

.site-footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 18px;
  border: 1px solid rgba(213, 244, 255, 0.18);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(20, 33, 74, 0.82), rgba(12, 22, 47, 0.92));
  box-shadow: var(--shadow-soft);
}

.site-footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.site-footer-brand strong {
  display: block;
  color: #eaf4ff;
  font-size: 15px;
  font-weight: 700;
}

.site-footer-brand small {
  margin-top: 2px;
  color: #93a6d6;
  font-size: 12px;
}

.site-footer-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.site-footer-links a {
  padding: 6px 10px;
  border-radius: 8px;
  color: #c2d4f7;
  font-size: 13px;
  font-weight: 700;
}

.site-footer-links a:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #ffffff;
}

.site-footer-links .admin-entry {
  margin-left: 4px;
  color: #6f80aa;
  font-size: 12px;
  font-weight: 600;
}

.site-footer-links .admin-entry:hover {
  background: transparent;
  color: #b9c7ec;
}

.site-footer-icp {
  flex-basis: 100%;
  text-align: center;
}

.site-footer-icp a {
  color: #6f80aa;
  font-size: 12px;
}

.site-footer-icp a:hover {
  color: #b9c7ec;
}

@media (max-width: 860px) {
  .guide-grid {
    grid-template-columns: 1fr;
  }

  .hero-lead {
    font-size: 14px;
  }

  .site-footer {
    width: min(100% - 24px, 1180px);
  }

  .site-footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .site-footer-links {
    width: 100%;
  }
}

/* ============ Platform tools layer ============ */
.tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.tool-card {
  position: relative;
  display: grid;
  align-content: start;
  gap: 8px;
  min-height: 152px;
  padding: 18px;
  overflow: hidden;
  border: 1px solid rgba(159, 216, 239, 0.16);
  border-radius: 8px;
  background:
    linear-gradient(180deg, #13212F, #0F1B29),
    #0F1B29;
  box-shadow: var(--shadow-soft), inset 0 1px 0 rgba(255, 255, 255, 0.12);
  color: var(--ink);
}

.tool-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: linear-gradient(90deg, var(--accent), var(--gold), var(--brand));
}

.tool-card:hover {
  border-color: rgba(220, 246, 255, 0.42);
  background:
    linear-gradient(180deg, #17293A, #122032),
    #122032;
}

.tool-card h2 {
  margin: 0;
  color: #ffffff;
  font-size: 19px;
}

.tool-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.tool-tag {
  justify-self: start;
  min-height: 22px;
  padding: 3px 9px;
  border: 1px solid rgba(255, 224, 138, 0.3);
  border-radius: 8px;
  background: rgba(255, 205, 92, 0.16);
  color: #ffe08a;
  font-size: 12px;
  font-weight: 700;
}

.tool-go {
  margin-top: 4px;
  color: var(--brand-strong);
  font-size: 13px;
  font-weight: 700;
}

.tool-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(300px, 0.92fr);
  gap: 16px;
  margin-top: 18px;
  align-items: start;
}

.calc-body {
  padding: 16px 18px 18px;
}

.calc-troop-block {
  padding: 12px 0;
  border-bottom: 1px solid rgba(218, 246, 255, 0.12);
}

.calc-troop-block:last-child {
  border-bottom: 0;
}

.calc-troop-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  color: #ffffff;
  font-size: 15px;
  font-weight: 700;
}

.calc-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.calc-fields-charm {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.quick-fill {
  flex-direction: row;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.quick-fill span {
  font-size: 12px;
}

.quick-fill select {
  width: auto;
  min-height: 32px;
  padding: 4px 8px;
}

.troop-dot {
  display: inline-block;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  box-shadow: 0 0 8px currentColor;
}

.troop-1 { color: #63d7ff; background: #63d7ff; }
.troop-2 { color: #f8d55f; background: #f8d55f; }
.troop-3 { color: #ff6674; background: #ff6674; }
.counter-node.troop-1 { background: rgba(99, 215, 255, 0.18); color: #cdeeff; border-color: rgba(99, 215, 255, 0.5); }
.counter-node.troop-2 { background: rgba(248, 213, 95, 0.18); color: #ffe9a6; border-color: rgba(248, 213, 95, 0.5); }
.counter-node.troop-3 { background: rgba(255, 102, 116, 0.18); color: #ffc2c8; border-color: rgba(255, 102, 116, 0.5); }

.calc-result {
  display: grid;
  gap: 12px;
  padding: 16px 18px;
}

.result-troop {
  display: grid;
  gap: 4px;
  padding: 14px;
  border: 1px solid rgba(218, 246, 255, 0.16);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 96, 112, 0.08), rgba(105, 167, 255, 0.08)),
    rgba(11, 24, 61, 0.5);
}

.result-troop-head {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #cfe0ff;
  font-size: 13px;
  font-weight: 700;
}

.result-troop strong {
  color: #ffffff;
  font-size: 27px;
  font-weight: 700;
  text-shadow: 0 0 14px rgba(147, 230, 255, 0.3);
}

.result-troop small {
  margin: 0;
  color: #b8c8f6;
}

.calc-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  border-top: 1px solid rgba(218, 246, 255, 0.16);
}

.calc-total span {
  color: #b8c8f6;
  font-weight: 700;
}

.calc-total strong {
  color: var(--gold);
  font-size: 24px;
  font-weight: 700;
  text-shadow: 0 0 12px rgba(255, 214, 90, 0.3);
}

.ratio-readout {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin: 16px 0 10px;
}

.ratio-cell {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #cfe0ff;
  font-size: 14px;
  font-weight: 700;
}

.ratio-cell strong {
  color: #ffffff;
  font-size: 19px;
}

.ratio-bar {
  display: flex;
  height: 18px;
  overflow: hidden;
  border: 1px solid rgba(218, 246, 255, 0.2);
  border-radius: 8px;
  background: rgba(7, 18, 48, 0.7);
}

.ratio-seg {
  height: 100%;
  transition: width 0.2s ease;
}

.ratio-seg.seg-1 { background: linear-gradient(180deg, #7fe1ff, #3aa9e0); }
.ratio-seg.seg-2 { background: linear-gradient(180deg, #ffe069, #d6a324); }
.ratio-seg.seg-3 { background: linear-gradient(180deg, #ff8792, #df4356); }

.counter-ring {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 18px;
}

.counter-node {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  padding: 0 16px;
  border: 1px solid rgba(220, 246, 255, 0.3);
  border-radius: 8px;
  font-size: 15px;
  font-weight: 700;
}

.counter-arrow {
  color: #b8c8f6;
  font-size: 12px;
  font-weight: 700;
}

.title-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
  padding: 16px 18px;
}

.title-card {
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid rgba(218, 246, 255, 0.18);
  border-radius: 8px;
  background: rgba(11, 24, 61, 0.5);
}

.title-card.title-ruler {
  border-color: rgba(255, 224, 138, 0.34);
  background:
    linear-gradient(135deg, rgba(255, 205, 92, 0.12), transparent),
    rgba(11, 24, 61, 0.5);
}

.title-card-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.title-card-head strong {
  color: #ffffff;
  font-size: 16px;
}

.title-card-head span {
  color: #9fb2e0;
  font-size: 12px;
}

.title-card p {
  margin: 0;
  color: #cfe0ff;
  font-size: 14px;
}

.priority-list {
  margin: 0;
  padding: 16px 18px 18px 36px;
  display: grid;
  gap: 10px;
  color: #dfeaff;
}

.priority-list li {
  line-height: 1.55;
}

td small {
  color: #9fb2e0;
}

@media (max-width: 860px) {
  .tool-layout {
    grid-template-columns: 1fr;
  }

  .calc-fields,
  .calc-fields-charm {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .calc-troop-title {
    flex-wrap: wrap;
  }

  .quick-fill {
    margin-left: 0;
  }
}

.value-band {
  margin-top: 22px;
}

.value-head h2 {
  font-size: 22px;
}

.value-head p {
  margin: 6px 0 0;
  color: #b8c8f6;
  font-size: 14px;
}

.value-band .tool-grid {
  margin-top: 14px;
}

.kingdom-chip {
  gap: 6px;
  font-weight: 700;
}

.kingdom-chip a {
  margin-left: 8px;
  padding: 3px 9px;
  border: 1px solid rgba(255, 224, 138, 0.42);
  border-radius: 8px;
  background: rgba(255, 205, 92, 0.16);
  color: #ffe08a;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.kingdom-chip a:hover {
  background: rgba(255, 205, 92, 0.26);
  color: #ffffff;
}

/* ===== 对战模拟器 ===== */
.sim-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 18px;
}

.sim-side.side-a {
  border-color: rgba(255, 102, 116, 0.4);
}

.sim-side.side-b {
  border-color: rgba(139, 232, 255, 0.4);
}

.sim-side.side-a .panel-head {
  background: linear-gradient(90deg, rgba(255, 99, 116, 0.22), transparent 60%), rgba(25, 41, 91, 0.62);
}

.sim-side.side-b .panel-head {
  background: linear-gradient(90deg, rgba(105, 201, 255, 0.22), transparent 60%), rgba(25, 41, 91, 0.62);
}

.sim-fields {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(108px, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.sim-ratio {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(218, 246, 255, 0.12);
}

.sim-ratio-label {
  align-self: center;
  color: #b8c8f6;
  font-size: 13px;
  font-weight: 700;
}

.sim-ratio label {
  flex: 1 1 70px;
  max-width: 110px;
}

.sim-ratio label > span {
  display: flex;
  align-items: center;
  gap: 5px;
}

.sim-result-panel {
  margin-top: 16px;
}

.sim-result {
  padding: 18px;
}

.sim-verdict {
  display: grid;
  gap: 4px;
  padding: 16px 18px;
  text-align: center;
  border: 1px solid rgba(218, 246, 255, 0.2);
  border-radius: 8px;
  background: rgba(11, 24, 61, 0.5);
}

.sim-verdict.win-a {
  border-color: rgba(255, 102, 116, 0.5);
  background: linear-gradient(180deg, rgba(255, 102, 116, 0.16), rgba(11, 24, 61, 0.5));
}

.sim-verdict.win-b {
  border-color: rgba(139, 232, 255, 0.5);
  background: linear-gradient(180deg, rgba(105, 201, 255, 0.16), rgba(11, 24, 61, 0.5));
}

.sim-verdict-label {
  color: #ffffff;
  font-size: 26px;
  font-weight: 700;
  text-shadow: 0 0 16px rgba(147, 230, 255, 0.3);
}

.sim-verdict-sub {
  color: #b8c8f6;
  font-size: 13px;
}

.sim-scorebar {
  display: flex;
  height: 30px;
  margin: 16px 0;
  overflow: hidden;
  border: 1px solid rgba(218, 246, 255, 0.2);
  border-radius: 8px;
  background: rgba(7, 18, 48, 0.7);
}

.sim-seg {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  transition: width 0.25s ease;
}

.sim-seg-a {
  background: linear-gradient(180deg, #ff8792, #df4356);
}

.sim-seg-b {
  background: linear-gradient(180deg, #7fe1ff, #3aa9e0);
}

.sim-breakdown {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.sim-bd {
  padding: 14px;
  border: 1px solid rgba(218, 246, 255, 0.16);
  border-radius: 8px;
  background: rgba(11, 24, 61, 0.5);
}

.sim-bd.side-a {
  border-color: rgba(255, 102, 116, 0.32);
}

.sim-bd.side-b {
  border-color: rgba(139, 232, 255, 0.32);
}

.sim-bd-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 4px;
}

.sim-bd-head strong {
  color: #ffffff;
  font-size: 15px;
}

.sim-bd-head span {
  color: var(--gold);
  font-weight: 700;
}

.sim-bd small {
  color: #b8c8f6;
}

/* ===== 联盟数据看板 + 成员表 ===== */
.alliance-dash {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(260px, 0.8fr);
  gap: 16px;
  margin-top: 16px;
}

.alliance-dash .panel {
  margin-top: 0;
}

.dist-body {
  display: grid;
  gap: 12px;
  padding: 18px;
}

.dist-row {
  display: grid;
  grid-template-columns: 56px 1fr 36px;
  align-items: center;
  gap: 12px;
}

.dist-label {
  color: #b8c8f6;
  font-size: 13px;
  font-weight: 700;
}

.dist-track {
  height: 14px;
  overflow: hidden;
  border: 1px solid rgba(218, 246, 255, 0.16);
  border-radius: 8px;
  background: rgba(7, 18, 48, 0.72);
}

.dist-track span {
  display: block;
  height: 100%;
  min-width: 2px;
  border-radius: inherit;
  background: linear-gradient(90deg, #63d7ff, #ffe062 60%, #ff6373);
}

.dist-count {
  color: #ffffff;
  font-size: 15px;
  text-align: right;
}

.panel-head-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.toolbar-single {
  grid-template-columns: minmax(220px, 360px);
}

.sim-heroes {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(218, 246, 255, 0.12);
}

.sim-hero-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 8px;
}

.sim-hero-row select {
  min-height: 36px;
  padding: 4px 8px;
  font-size: 13px;
}

.sim-troop-table {
  margin-top: 16px;
  overflow-x: auto;
}

.sim-troop-table table {
  width: 100%;
  min-width: 0;
}

.sim-troop-table th,
.sim-troop-table td {
  padding: 9px 10px;
  font-size: 13px;
  white-space: nowrap;
}

.sim-troop-table th {
  background: rgba(14, 28, 68, 0.6);
  color: #c5d7ff;
}

.sim-troop-table td .troop-dot {
  margin-right: 6px;
}

@media (max-width: 860px) {
  .sim-grid,
  .sim-breakdown,
  .alliance-dash {
    grid-template-columns: 1fr;
  }
}

/* 模拟器 v3：活动模式 + 英雄槽 + 专武 + 战报 */
.sim-mode-panel { margin-top: 18px; }
.sim-mode-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 16px 18px 4px;
}
.sim-mode-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid rgba(220, 246, 255, 0.22);
  border-radius: 8px;
  background: rgba(8, 20, 56, 0.46);
  color: #dff6ff;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
.sim-mode-pill:has(input:checked) {
  border-color: rgba(255, 205, 150, 0.55);
  background: linear-gradient(180deg, #FFA75C, #F07F2D);
  color: #26160A;
}
.sim-mode-pill input { width: 14px; height: 14px; min-height: auto; margin: 0; }
.sim-counter-toggle { margin-left: auto; }
.sim-mode-note { color: #b8c8f6; }

.sim-hero-slot {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}
.sim-hero-slot select { flex: 1 1 auto; min-height: 36px; }
.sim-weapon {
  flex: 0 0 auto;
  flex-direction: row;
  align-items: center;
  gap: 5px;
  min-height: 36px;
  padding: 0 10px;
  border: 1px solid rgba(255, 224, 138, 0.34);
  border-radius: 8px;
  background: rgba(255, 205, 92, 0.12);
  color: #ffe08a;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
}
.sim-weapon input { width: 14px; height: 14px; min-height: auto; margin: 0; accent-color: #f8d55f; }
.sim-weapon span { color: #ffe08a; }

.sim-troopline {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
  font-size: 12px;
  color: #cfe0ff;
}
.sim-troopline span { display: inline-flex; align-items: center; gap: 4px; }

.sim-roundlog {
  margin-top: 14px;
  border: 1px solid rgba(218, 246, 255, 0.16);
  border-radius: 8px;
  background: rgba(7, 18, 48, 0.4);
}
.sim-roundlog summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  color: #fff;
  cursor: pointer;
  list-style: none;
}
.sim-roundlog summary::-webkit-details-marker { display: none; }
.sim-roundlog summary strong { color: var(--gold); }
.sim-roundlog .sim-troop-table { margin: 0 12px 12px; max-height: 280px; overflow-y: auto; }

.auth-form { max-width: 520px; margin: 18px auto 0; }

.sim-role { color: #ffe08a; font-size: 13px; font-weight: 700; }
.sim-cas { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; font-size: 12px; font-weight: 700; }
.sim-cas .cas-dead { color: #ff8b93; }
.sim-cas .cas-sev { color: #ffd36b; }
.sim-cas .cas-light { color: #8be8ff; }
.sim-trig { padding: 10px 14px; display: grid; gap: 4px; font-size: 12px; color: #cfe0ff; max-height: 220px; overflow-y: auto; }
.sim-trig .empty { color: #b8c8f6; padding: 4px 0; }

.sim-analysis { margin: 14px 18px 0; padding: 14px 16px; border-radius: 14px; background: linear-gradient(180deg, rgba(43,86,160,.22), rgba(28,46,86,.30)); border: 1px solid rgba(120,170,255,.28); }
.sim-ana-head { font-weight: 700; color: #ffe08a; margin-bottom: 8px; }
.sim-ana-concl { font-weight: 700; color: #eaf2ff; margin-bottom: 10px; }
.sim-ana-sec { margin-top: 8px; }
.sim-ana-sec strong { display: block; font-size: 12px; color: #9fc0ff; letter-spacing: .04em; margin-bottom: 4px; }
.sim-ana-sec ul { margin: 0; padding-left: 18px; display: grid; gap: 3px; }
.sim-ana-sec li { font-size: 13px; color: #d8e4ff; line-height: 1.5; }

/* 英雄图鉴 codex */
.codex-filters { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; padding: 4px 2px 16px; }
.codex-fgroup { display: inline-flex; gap: 6px; background: rgba(20,34,64,.5); padding: 4px; border-radius: 12px; }
.codex-fgroup .chip { cursor: pointer; border: none; background: transparent; color: #cfe0ff; font-weight: 700; font-size: 13px; padding: 6px 12px; border-radius: 9px; display: inline-flex; align-items: center; gap: 5px; }
.codex-fgroup .chip.active { background: linear-gradient(180deg,#3f6fd6,#2f56a0); color: #fff; }
.codex-search { flex: 1; min-width: 160px; padding: 9px 14px; border-radius: 11px; border: 1px solid rgba(120,170,255,.3); background: rgba(12,22,44,.6); color: #eaf2ff; font-size: 14px; }
.codex-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 12px; }
.hero-card { background: linear-gradient(180deg, #13212F, #0F1B29); border: 1px solid rgba(159, 216, 239, 0.16); border-radius: 14px; padding: 13px 14px; }
.hc-top { display: flex; align-items: center; gap: 11px; margin-bottom: 10px; }
.hc-avatar { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; font-size: 20px; font-weight: 700; color: #fff; flex: none; }
.hc-avatar.cls-盾兵 { background: linear-gradient(160deg,#5aa6ff,#2f6fd0); }
.hc-avatar.cls-矛兵 { background: linear-gradient(160deg,#ffce5a,#d99a1e); color:#3a2a00; }
.hc-avatar.cls-射手 { background: linear-gradient(160deg,#ff7b84,#d33b46); }
.hc-id strong { display: block; font-size: 15px; color: #f2f6ff; }
.hc-cap { color: #ffd86b; }
.hc-id small { color: #a9c0ee; font-size: 12px; }
.hc-global { color: #ffb37a; }
.hc-stats { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 9px; }
.hc-stats span { font-size: 11.5px; font-weight: 700; color: #d7e6ff; background: rgba(60,100,180,.28); border-radius: 7px; padding: 3px 8px; }
.hc-stats .hc-wpn { background: rgba(180,140,40,.28); color: #ffe0a0; }
.hc-skills { margin: 0; padding-left: 16px; display: grid; gap: 3px; }
.hc-skills li { font-size: 12px; color: #c6d6f5; line-height: 1.45; }
.codex-empty { text-align: center; color: #b8c8f6; padding: 20px; }
.codex-troopskills { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.ts-col { background: rgba(20,34,64,.4); border-radius: 12px; padding: 10px 12px; }
.ts-head { font-weight: 700; color: #eaf2ff; display: flex; align-items: center; gap: 6px; margin-bottom: 7px; }
.ts-row { display: flex; gap: 8px; padding: 4px 0; border-top: 1px solid rgba(120,170,255,.12); font-size: 12px; }
.ts-tier { flex: none; width: 36px; font-weight: 700; color: #ffd86b; }
.ts-eff { color: #cdddf8; }
@media (max-width: 720px){ .codex-troopskills { grid-template-columns: 1fr; } }

/* OCR 上传 */
.sim-ocr-btn { display: inline-flex; align-items: center; cursor: pointer; margin-top: 8px; }
.sim-ocr-btn span { font-size: 12.5px; font-weight: 700; color: #cfe0ff; background: rgba(60,110,200,.28); border: 1px dashed rgba(130,180,255,.5); border-radius: 10px; padding: 8px 12px; transition: background .15s; }
.sim-ocr-btn:hover span { background: rgba(60,110,200,.45); }
.sim-ocr-status { font-size: 12px; margin: 6px 0 0; min-height: 14px; }
.sim-ocr-status.loading { color: #ffd86b; }
.sim-ocr-status.ok { color: #8be8a0; }
.sim-ocr-status.err { color: #ff9aa2; }

/* 战报页 */
.sim-ocr-opt { font-size: 12.5px; color: #cfe0ff; margin-left: 14px; }
.sim-ocr-opt select { margin-left: 4px; padding: 4px 6px; border-radius: 7px; border: 1px solid rgba(120,170,255,.3); background: rgba(12,22,44,.6); color: #eaf2ff; }
.rep-table { margin: 12px 0; border-radius: 12px; overflow: hidden; border: 1px solid rgba(120,170,255,.22); }
.rep-row { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 9px 14px; border-top: 1px solid rgba(120,170,255,.12); }
.rep-row:first-child { border-top: none; }
.rep-row span:first-child { text-align: right; color: #8be8a0; font-weight: 700; }
.rep-row span:last-child { text-align: left; color: #ff9aa2; font-weight: 700; }
.rep-head span { color: #9fc0ff !important; font-size: 12px; }
.rep-lbl { color: #c6d6f5 !important; font-weight: 700 !important; font-size: 12px; padding: 0 16px; }
.rep-attrs { padding: 10px 14px; display: grid; gap: 5px; }
.rep-arow { display: grid; grid-template-columns: 78px 1fr 96px 78px; align-items: center; gap: 8px; font-size: 12px; }
.rep-arow .rep-m { text-align: right; color: #8fd8a0; } .rep-arow .rep-m.hi { color: #6dff9a; font-weight: 700; }
.rep-arow .rep-e { color: #ff9aa2; } .rep-arow .rep-e.hi { color: #ff6b78; font-weight: 700; }
.rep-arow .rep-lbl2 { color: #9fc0ff; text-align: center; }
.rep-bar { height: 7px; background: rgba(220,90,100,.5); border-radius: 4px; overflow: hidden; }
.rep-bar i { display: block; height: 100%; background: linear-gradient(90deg,#54d98a,#3fae6a); }
.rep-replay-real { font-weight: 700; color: #ffe08a; margin-bottom: 6px; }
.rep-replay-row { font-size: 13px; color: #dce8ff; padding: 2px 0; }

/* 管理后台 */
.role-chip { display: inline-block; padding: 2px 9px; border-radius: 8px; font-size: 12px; font-weight: 700; }
.role-chip.role-owner { background: linear-gradient(180deg,#ffcf5a,#e0a020); color: #3a2a00; }
.role-chip.role-operator { background: linear-gradient(180deg,#ff8b6b,#d9542f); color: #fff; }
.role-chip.role-king { background: linear-gradient(180deg,#5aa6ff,#2f6fd0); color: #fff; }
.role-chip.role-leader { background: linear-gradient(180deg,#54d98a,#2f9a5e); color: #06301a; }
.role-chip.role-user { background: rgba(120,140,180,.4); color: #dce6ff; }
.admin-table { overflow-x: auto; padding: 4px 14px 14px; }
.admin-table table { width: 100%; border-collapse: collapse; font-size: 13px; }
.admin-table th { text-align: left; color: #9fc0ff; font-size: 12px; padding: 8px 10px; border-bottom: 1px solid rgba(120,170,255,.2); }
.admin-table td { padding: 9px 10px; border-bottom: 1px solid rgba(120,170,255,.1); color: #e2ebff; vertical-align: middle; }
.admin-table .empty { color: #9fb2dd; text-align: center; }
.admin-roleform { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; }
.admin-roleform select { padding: 5px 7px; border-radius: 7px; border: 1px solid rgba(120,170,255,.3); background: rgba(12,22,44,.6); color: #eaf2ff; font-size: 12px; }
.admin-inline-form { display: inline-flex; flex-wrap: wrap; gap: 7px; align-items: center; padding: 6px 16px 0; color: #cfe0ff; font-size: 13px; }
.admin-inline-form input, .admin-inline-form select { padding: 7px 10px; border-radius: 8px; border: 1px solid rgba(120,170,255,.3); background: rgba(12,22,44,.6); color: #eaf2ff; font-size: 13px; }
.admin-forms-row { display: flex; flex-wrap: wrap; gap: 16px; padding-top: 6px; }
.admin-chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 6px 16px; }
.member-unassigned { color: #ffb454; font-size: 12px; font-weight: 700; white-space: nowrap; }
.kingdom-on { color: #6ddf9a; font-size: 12px; font-weight: 700; white-space: nowrap; }
.kingdom-pending { border-left: 3px solid #ffb454 !important; }
.kingdom-pending .panel-eyebrow { color: #ffb454; }
.member-uid { color: #8ba3d6; font-size: 11px; }
.button-small { padding: 6px 12px; font-size: 12.5px; }
.me-manual { margin-top: 14px; }
.me-manual summary { cursor: pointer; color: #9fc0ff; font-size: 13px; padding: 6px 0; font-weight: 700; }
.troop-attr-grid { display: grid; grid-template-columns: 56px repeat(4, 1fr); gap: 8px; align-items: center; }
.troop-attr-grid .tah { font-size: 12px; color: #9fc0ff; text-align: center; font-weight: 700; }
.troop-attr-grid .tar { font-size: 13px; color: #dce8ff; font-weight: 700; }
.troop-attr-grid input { width: 100%; padding: 9px 8px; border-radius: 8px; border: 1px solid rgba(120,170,255,.3); background: rgba(12,22,44,.6); color: #eaf2ff; font-size: 14px; text-align: center; box-sizing: border-box; }
.hint-mini { font-style: normal; font-size: 11px; color: #8fb0e8; font-weight: 600; }
.setup-refs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; padding: 4px 16px 10px; }
.setup-ref { margin: 0; text-align: center; }
.setup-ref img { width: 100%; max-width: 190px; border-radius: 10px; border: 1px solid rgba(120,170,255,.3); display: block; margin: 0 auto; }
.setup-ref figcaption { display: block; font-size: 13px; font-weight: 700; color: #eaf2ff; padding-top: 6px; }
.setup-ref figcaption em { display: block; font-style: normal; font-size: 12px; color: #9fc0ff; font-weight: 600; }
.setup-ref figcaption small { display: block; font-size: 11px; color: #8fb0e8; padding-top: 2px; }
.hero-pick-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.hero-pick { display: flex; flex-direction: column; gap: 6px; background: rgba(12,22,44,.4); border: 1px solid rgba(120,170,255,.2); border-radius: 10px; padding: 10px; }
.hero-pick .hp-cls { font-size: 12px; font-weight: 700; color: #9fc0ff; text-align: center; }
.hero-pick select { padding: 8px; border-radius: 8px; border: 1px solid rgba(120,170,255,.3); background: rgba(12,22,44,.6); color: #eaf2ff; font-size: 13px; }
@media (max-width: 560px){ .hero-pick-grid { grid-template-columns: 1fr; } .hero-pick { flex-direction: row; align-items: center; } .hero-pick .hp-cls { width: 40px; } .hero-pick select { flex: 1; } }
.feed-banner { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin: 16px 0; padding: 16px 20px; border-radius: 14px; background: linear-gradient(120deg, rgba(217,84,47,.22), rgba(224,160,32,.18)); border: 1px solid rgba(255,150,90,.4); }
.feed-banner .fb-txt strong { font-size: 16px; color: #ffd9a8; }
.feed-banner .fb-txt span { display: block; font-size: 13px; color: #f0e0cf; margin-top: 3px; }
.nav a.feed-nav { color: #ffcf5a; font-weight: 700; }
.hc-avatar { overflow: hidden; }
.hc-avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; display: block; }
.hero-card { text-decoration: none; }
.hc-more { display: block; margin-top: 8px; font-size: 12px; color: #9fc0ff; font-weight: 700; }
.hd-head { display: flex; gap: 16px; align-items: center; }
.hd-portrait { width: 92px; height: 92px; border-radius: 14px; object-fit: cover; border: 2px solid rgba(120,170,255,.4); flex-shrink: 0; }
.hd-portrait.cls-盾兵 { border-color: #5aa6ff; }
.hd-portrait.cls-矛兵 { border-color: #54d98a; }
.hd-portrait.cls-射手 { border-color: #ff8b6b; }
.hd-skills { display: flex; flex-direction: column; gap: 10px; padding: 4px 16px 14px; }
.hd-skill { background: rgba(12,22,44,.4); border: 1px solid rgba(120,170,255,.2); border-radius: 10px; padding: 10px 12px; }
.hd-skill-raw { font-size: 14px; color: #eaf2ff; font-weight: 600; }
.hd-skill-no { display: inline-block; font-size: 11px; font-weight: 700; color: #9fc0ff; background: rgba(90,166,255,.18); padding: 1px 7px; border-radius: 6px; margin-right: 8px; }
.hd-skill-fx { margin-top: 7px; display: flex; flex-wrap: wrap; gap: 6px; }
.fxchip { font-size: 12px; color: #cfe0ff; background: rgba(90,166,255,.14); border: 1px solid rgba(120,170,255,.25); border-radius: 7px; padding: 2px 8px; }
.fxchip.muted { color: #8fa3c8; background: transparent; }
.me-update-setup { margin-top: 16px; }
.me-update-setup > summary { cursor: pointer; color: #9fc0ff; font-weight: 700; font-size: 13px; padding: 8px 2px; }
.setup-upload { margin: 8px 16px; }
.setup-actions { padding: 0 16px 10px; }
@media (max-width: 560px){ .setup-refs { gap: 6px; padding: 4px 10px 8px; } .setup-ref figcaption { font-size: 11px; } .setup-ref figcaption em { font-size: 10px; } .setup-ref figcaption small { display: none; } }
@media (max-width: 560px){ .troop-attr-grid { grid-template-columns: 42px repeat(4, 1fr); gap: 5px; } .troop-attr-grid input { padding: 8px 3px; font-size: 13px; } .troop-attr-grid .tah { font-size: 10px; } .troop-attr-grid .tar { font-size: 12px; } }

/* ===== 冬日视觉精修（细雪 + 卡片悬浮） ===== */
.snowfall {
  position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: .5;
  background-repeat: repeat;
  background-image:
    radial-gradient(2px 2px at 24px 36px, rgba(255,255,255,.85), transparent),
    radial-gradient(2px 2px at 150px 90px, rgba(214,238,255,.7), transparent),
    radial-gradient(1.6px 1.6px at 88px 170px, rgba(255,255,255,.75), transparent),
    radial-gradient(1.6px 1.6px at 210px 240px, rgba(206,232,255,.6), transparent),
    radial-gradient(1.3px 1.3px at 50px 262px, rgba(255,255,255,.6), transparent);
  background-size: 280px 320px;
  animation: snowdrift 26s linear infinite;
}
@keyframes snowdrift {
  from { background-position: 0 -320px, 0 -320px, 0 -320px, 0 -320px, 0 -320px; }
  to   { background-position: 12px 320px, -50px 320px, 36px 320px, -24px 320px, 18px 320px; }
}
@media (prefers-reduced-motion: reduce) { .snowfall { animation: none; opacity: .3; } }

.tool-card, .panel, .metric, .feed-banner { transition: transform .2s cubic-bezier(.2,.7,.3,1), box-shadow .2s ease, border-color .2s ease; }
.tool-card:hover { transform: translateY(-4px); box-shadow: 0 22px 46px rgba(4,10,34,.42), 0 0 0 1px rgba(139,232,255,.32); }
.metric:hover { transform: translateY(-2px); }

/* ===== 上传优先 · 手动折叠 ===== */
.upload-primary { border: 1px solid rgba(139,232,255,.42); background: linear-gradient(180deg, rgba(90,166,255,.16), rgba(41,60,119,.5)); }
.up-badge { font-size: 11px; font-weight: 700; color: #06301a; background: linear-gradient(180deg,#54d98a,#2f9a5e); padding: 2px 9px; border-radius: 8px; vertical-align: middle; margin-left: 8px; }
.sim-ocr-btn.up-big { font-size: 15px; padding: 16px; margin: 8px 0 4px; }
.manual-fold { margin: 6px 0 16px; border: 1px solid rgba(120,170,255,.2); border-radius: 12px; background: rgba(12,22,44,.3); }
.manual-fold > summary { cursor: pointer; padding: 14px 18px; font-weight: 700; color: #cfe0ff; font-size: 14px; list-style: none; }
.manual-fold > summary::-webkit-details-marker { display: none; }
.manual-fold > summary::before { content: "▸ "; color: #8be8ff; font-weight: 700; }
.manual-fold[open] > summary::before { content: "▾ "; }
.manual-fold[open] > summary { border-bottom: 1px solid rgba(120,170,255,.18); }
.manual-fold .form-section { border: 0; box-shadow: none; background: transparent; }

/* ===== 首页排版 · 核心重点突出 ===== */
.tool-card-hero {
  display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap;
  margin-bottom: 16px; padding: 26px 30px;
  background: linear-gradient(120deg, rgba(90,166,255,.24), rgba(139,232,255,.1) 58%, rgba(41,60,119,.5));
  border: 1px solid rgba(139,232,255,.5);
  box-shadow: 0 22px 50px rgba(4,10,34,.42), inset 0 0 0 1px rgba(139,232,255,.14);
}
.tool-card-hero .thc-main { flex: 1 1 420px; }
.tool-card-hero h2 { font-size: 30px; margin: 10px 0 8px; }
.tool-card-hero p { font-size: 15px; color: #dce8ff; max-width: 640px; line-height: 1.6; }
.tag-core { background: linear-gradient(180deg,#ffd95a,#e0a020); color: #3a2a00; font-weight: 700; }
.tool-go.big { font-size: 16px; font-weight: 700; padding: 13px 26px; border-radius: 12px; background: linear-gradient(180deg,#8be8ff,#4aa6e0); color: #06223c; white-space: nowrap; box-shadow: 0 8px 22px rgba(74,166,224,.4); }
.tool-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.stat-strip { display: flex; flex-wrap: wrap; gap: 10px 26px; padding: 12px 20px; margin: 14px 0; border-radius: 12px; background: rgba(12,22,44,.4); border: 1px solid rgba(120,170,255,.16); font-size: 13px; color: #b8c8f6; }
.stat-strip strong { color: #eaf2ff; font-size: 18px; font-weight: 700; margin-right: 5px; }
@media (max-width: 760px){
  .tool-grid-3 { grid-template-columns: 1fr; }
  .tool-card-hero { padding: 20px; gap: 14px; }
  .tool-card-hero h2 { font-size: 24px; }
  .tool-go.big { width: 100%; text-align: center; }
  .stat-strip { gap: 8px 16px; justify-content: space-between; }
  .stat-strip strong { font-size: 16px; }
}

/* ===== 核心=战力家底：总览条 + 核心面板 ===== */
.stat-overview { gap: 16px 30px; padding: 16px 22px; align-items: flex-end; }
.stat-overview span { display: inline-flex; flex-direction: column; gap: 1px; }
.stat-overview em { font-style: normal; font-size: 12px; color: #9fb2dd; order: 2; font-weight: 600; }
.stat-overview strong { font-size: 21px; color: #eaf2ff; margin: 0; line-height: 1.05; }
.stat-overview .so-main strong { font-size: 32px; color: #ffd95a; }
.stat-overview .so-main em { color: #ffcf6b; }
.panel-eyebrow { font-size: 12px; font-weight: 700; color: #ffd95a; letter-spacing: .4px; margin: 0 0 4px; }
.panel-core { border: 1px solid rgba(255,217,90,.3); box-shadow: 0 22px 52px rgba(4,10,34,.44), inset 0 0 0 1px rgba(255,217,90,.09); }
.value-head.sub h2 { font-size: 21px; }
.value-head.sub { opacity: .9; }
@media (max-width: 760px){ .stat-overview { gap: 12px 20px; } .stat-overview strong { font-size: 18px; } .stat-overview .so-main strong { font-size: 26px; } }

.home-alliance-grid { padding: 4px 16px 18px; }

/* === 车头车身部署 deploy layer === */
.deploy-entry-actions { display: flex; gap: 12px; flex-wrap: wrap; margin: 12px 16px 18px; }
.deploy-entry-actions .button { flex: 1 1 200px; text-align: center; }
.deploy-scope-switch { margin: 12px 0; }
.deploy-scope-switch select { padding: 6px 10px; border-radius: 6px; }
.deploy-mine { border-left: 3px solid #ffd95a; }
.deploy-mine-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; margin-top: 10px; padding: 0 16px 14px; }
.deploy-mine-grid span { display: block; font-size: 12px; opacity: .7; }
.deploy-mine-grid strong { font-size: 15px; }
.deploy-mine-empty { opacity: .85; }
.deploy-board { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; padding: 4px 16px 18px; }
.deploy-car { border: 1px solid rgba(255,255,255,.12); border-radius: 8px; padding: 12px; background: rgba(255,255,255,.03); }
.deploy-car-head { display: flex; flex-direction: column; gap: 2px; padding-bottom: 8px; border-bottom: 1px solid rgba(255,255,255,.1); }
.deploy-car-no { font-size: 12px; opacity: .7; }
.deploy-car-head small { font-size: 12px; opacity: .75; }
.deploy-body-list { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.deploy-body-list li { display: grid; grid-template-columns: 28px 1fr; gap: 6px; align-items: baseline; font-size: 13px; }
.deploy-body-list li.is-mine { background: rgba(255,217,90,.16); border-radius: 6px; padding: 4px 6px; }
.deploy-body-list .deploy-board-order { font-weight: 700; opacity: .8; }
.deploy-body-list .deploy-body-cfg { grid-column: 2; font-size: 12px; opacity: .72; }
.deploy-pick-title { font-size: 13px; opacity: .8; margin: 4px 0 8px; }
.deploy-head-cfg { border: 1px dashed rgba(255,255,255,.18); border-radius: 8px; padding: 10px; margin: 10px 0; }
.deploy-head-cfg legend { font-size: 12px; opacity: .7; padding: 0 6px; }
.deploy-add-form { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding: 0 16px 12px; }
.deploy-delete-form { margin-top: 8px; }
.deploy-legacy-hint { font-size: 13px; margin-top: 6px; }
/* 排车可视化：成员 E 数据家底（兵阶/火晶/主英雄）*/
.deploy-estate { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; margin: 4px 0 6px; font-size: 12px; }
.deploy-estate .est-label { font-style: normal; opacity: .55; margin-right: 2px; }
.deploy-estate .est-troop { display: inline-flex; align-items: center; gap: 5px; opacity: .9; white-space: nowrap; }
.deploy-estate .est-troop .troop-dot { width: 9px; height: 9px; }
.deploy-estate .est-none { opacity: .5; font-style: italic; }
.assignment-option .deploy-estate { padding: 0 0 2px 28px; }
.deploy-head-cfg .deploy-estate { margin: 0 0 8px; }
@media (max-width: 860px) {
  .deploy-entry-actions .button { flex-basis: 100%; }
  .deploy-board { grid-template-columns: 1fr; }
  .assignment-option .deploy-estate { padding-left: 4px; }
}

/* 模拟器·战时增益（大小药/官职/宠物） */
.sim-buffs { margin-top: 4px; }
.sim-buff-grid label select { width: 100%; }
.sim-buff-hint { font-size: 12px; opacity: .72; margin: 8px 2px 2px; line-height: 1.5; }
.sim-buff-sublabel { display:block; font-size:12px; opacity:.82; margin:12px 2px 6px; font-weight:700; }
.sim-pet-items { display:grid; grid-template-columns:repeat(auto-fit,minmax(148px,1fr)); gap:8px; }
.sim-pet-item { display:flex; flex-direction:column; gap:3px; font-size:12px; }
.sim-pet-item select { width:100%; }
/* 上传口参考图提示 */
.upload-ref { display:flex; align-items:center; gap:8px; margin:6px 0 2px; font-size:12px; opacity:.85; }
.upload-ref-thumb { width:54px; height:auto; max-height:78px; border-radius:6px; border:1px solid rgba(120,170,255,.4); object-fit:cover; cursor:zoom-in; flex:none; }
.upload-ref b { color:#ffd95a; }
/* 提交·兵种与英雄采集行 */
.th-row { display:flex; flex-wrap:wrap; align-items:flex-end; gap:8px; padding:8px 0; border-bottom:1px solid rgba(120,170,255,.12); }
.th-row .th-name { font-weight:700; min-width:40px; align-self:center; }
.th-row label { display:flex; flex-direction:column; gap:2px; font-size:11px; }
.th-row label em { opacity:.7; font-style:normal; }
.th-row label.th-hero { min-width:132px; }
.th-row select { padding:4px 6px; border-radius:5px; }
/* 投喂战报·3张示例图 */
.feed-ref-grid { display:flex; gap:10px; margin:10px 0 4px; flex-wrap:wrap; }
.feed-ref-grid figure { margin:0; flex:1 1 28%; min-width:92px; text-align:center; }
.feed-ref-grid img { width:100%; max-height:170px; object-fit:cover; border-radius:8px; border:1px solid rgba(120,170,255,.4); cursor:zoom-in; }
.feed-ref-grid figcaption { font-size:11px; opacity:.82; margin-top:4px; line-height:1.3; }
/* 投喂战报·选填英雄阵容 */
.hero-optional > summary { cursor:pointer; list-style:none; padding:4px 0; }
.hero-optional > summary::-webkit-details-marker { display:none; }
.hero-optional > summary h2 { display:inline; margin:0; }
.hero-optional > summary::before { content:"▸ "; color:#ffd95a; }
.hero-optional[open] > summary::before { content:"▾ "; }
.hero-pick-row { display:flex; flex-wrap:wrap; align-items:center; gap:8px; padding:6px 0; }
.hero-pick-row .hp-side { font-weight:700; min-width:38px; color:#ffd95a; }
.hp-cell { display:flex; align-items:center; gap:4px; }
.hp-cell em { font-style:normal; opacity:.65; font-size:12px; }
.hp-cell select { padding:4px 6px; border-radius:5px; }
/* OCR 排队条 */
.ocr-queue-banner { display:flex; align-items:center; gap:10px; margin:14px 0;
  padding:12px 16px; border-radius:10px; background:var(--surface); color:var(--ink);
  border:1px solid var(--line); font-size:14px; box-shadow:var(--shadow); }
.ocr-queue-banner.is-error { background:var(--accent-soft); border-color:var(--accent); color:var(--accent); }
.ocr-queue-spinner { width:16px; height:16px; border-radius:50%; flex:0 0 auto;
  border:2px solid var(--line); border-top-color:var(--brand); animation:ocrspin .8s linear infinite; }
.ocr-queue-banner.is-error .ocr-queue-spinner { display:none; }
@keyframes ocrspin { to { transform:rotate(360deg); } }
.hp-cell .hp-wl { max-width:66px; }

/* ============ Migration layer 移民管理 ============ */
.hero-compact { padding-block: 18px; }
.mig-kingdom-switch { margin: 0 0 12px; }
.mig-kingdom-switch select { margin-left: 8px; padding: 6px 10px; border-radius: 6px; }

.mig-quota-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.mig-quota-card { background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.08); border-radius: 8px; padding: 12px 14px; display: flex; flex-direction: column; gap: 4px; }
.mig-quota-card.is-over { border-color: #d9534f; background: rgba(217,83,79,.12); }
.mqc-name { font-size: 13px; opacity: .8; }
.mqc-num { font-size: 26px; font-weight: 700; }
.mqc-num small { font-size: 14px; opacity: .6; font-weight: 400; }
.mqc-left { font-size: 12px; opacity: .75; }
.mig-quota-card.is-over .mqc-left { color: #ff9b97; }

.mig-form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px 14px; margin: 12px 0; }
.mig-form label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.mig-form input, .mig-form select { padding: 7px 10px; border-radius: 6px; border: 1px solid rgba(255,255,255,.14); background: rgba(0,0,0,.18); color: inherit; }
.mig-form .mig-full { display: block; margin-top: 6px; }
.mig-form-actions { display: flex; gap: 10px; align-items: center; margin-top: 6px; }
.mig-table th button { background: none; border: 0; color: inherit; font: inherit; cursor: pointer; }
.mig-tag { font-size: 11px; background: rgba(80,160,255,.18); border-radius: 4px; padding: 1px 5px; }
.mig-slot { font-size: 12px; border-radius: 4px; padding: 2px 7px; background: rgba(255,255,255,.08); white-space: nowrap; }
.mig-slot-特殊邀请 { background: rgba(214,158,46,.22); }
.mig-slot-自由位 { background: rgba(80,160,255,.18); }
.mig-status { font-size: 12px; border-radius: 4px; padding: 2px 7px; background: rgba(255,255,255,.06); white-space: nowrap; }
.mig-status-已迁入 { background: rgba(82,170,100,.22); }
.mig-status-已取消 { opacity: .55; text-decoration: line-through; }
.mig-elig { font-size: 12px; opacity: .85; }
.mig-elig.is-full { color: #7bd88f; font-weight: 700; }
.mig-row-edit > summary { display: inline-block; list-style: none; }
.mig-row-edit > summary::-webkit-details-marker { display: none; }
.mig-edit-form { margin-top: 10px; padding: 12px; border: 1px solid rgba(255,255,255,.1); border-radius: 8px; }
.mig-elig-box { border: 1px solid rgba(255,255,255,.12); border-radius: 8px; padding: 8px 12px; margin: 8px 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px,1fr)); gap: 4px 12px; }
.mig-elig-box legend { font-size: 12px; opacity: .75; padding: 0 6px; }
.mig-check { display: flex; align-items: center; gap: 6px; font-size: 13px; }
.mig-del-form { margin-top: 10px; }
.button-danger { background: #b94a46; }

@media (max-width: 860px) {
  .mig-quota-grid { grid-template-columns: 1fr; }
  .mig-form-grid { grid-template-columns: 1fr 1fr; }
}
/* —— 前台第二阶段：联盟卡片 A 定位分布条 —— */
.role-dist { display: grid; gap: 6px; }
.role-bar { display: flex; height: 9px; border-radius: 6px; overflow: hidden; background: rgba(8,20,56,.5); }
.role-bar i { display: block; height: 100%; min-width: 3px; }
.role-legend { display: flex; flex-wrap: wrap; gap: 4px 10px; }
.role-legend .rl { color: #cdd9ff; font-size: 11px; font-weight: 700; }
.role-legend .rl::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 4px; vertical-align: middle; }
.rb-1 { background: #f0a35e; } .role-legend .rb-1::before { background: #f0a35e; }
.rb-2 { background: #e6c84e; } .role-legend .rb-2::before { background: #e6c84e; }
.rb-3 { background: #5b8def; } .role-legend .rb-3::before { background: #5b8def; }
.rb-4 { background: #6fc28a; } .role-legend .rb-4::before { background: #6fc28a; }
.rb-5 { background: #9aa3b5; } .role-legend .rb-5::before { background: #9aa3b5; }
.rb-6 { background: #5b6475; } .role-legend .rb-6::before { background: #5b6475; }

/* —— 前台第二阶段：手机成员卡片(B) + 响应式切换 —— */
.member-cards { display: grid; gap: 10px; }
.member-card { border: 1px solid var(--line); border-radius: 10px; padding: 11px 12px; background: var(--surface); box-shadow: 0 6px 16px rgba(23,33,38,.06); }
.member-card .mc-top { display: flex; align-items: baseline; gap: 8px; }
.member-card .mc-rank { color: var(--accent); font-weight: 700; }
.member-card .mc-top .player-link { font-weight: 700; flex: 1; }
.member-card .mc-role { background: rgba(13,110,124,.11); color: var(--brand-strong); font-weight: 700; font-size: 11px; padding: 2px 8px; border-radius: 999px; }
.member-card .mc-mid { display: flex; justify-content: space-between; margin-top: 7px; color: var(--muted); font-size: 13px; }
.member-card .mc-mid em { font-style: normal; margin-right: 4px; }
.member-card .mc-mid strong { color: var(--brand-strong); font-weight: 700; font-size: 15px; }
.member-card .mc-stats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 5px; margin-top: 9px; }
.member-card .mc-stats div { background: var(--surface-soft); border: 1px solid var(--line); border-radius: 7px; padding: 4px 0; text-align: center; }
.member-card .mc-stats b { display: block; color: var(--ink); font-size: 13px; font-weight: 700; }
.member-card .mc-stats span { color: var(--muted); font-size: 10px; }
.member-card .mc-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 9px; }
@media (max-width: 860px) {
  [data-member-list] .table-wrap { display: none; }
  [data-member-list] .member-cards[hidden] { display: grid; }
}

/* —— 前台第二阶段：成员筛选栏 —— */
.member-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.member-filters .chip-row { display: flex; flex-wrap: wrap; gap: 6px; flex: 1 1 100%; min-width: 0; }
.fchip { min-height: 30px; padding: 4px 11px; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: var(--ink); font-size: 13px; font-weight: 600; cursor: pointer; }
.fchip.is-on { background: var(--brand); border-color: var(--brand); color: #fff; }

/* —— 前台第二阶段：完整度缺项弹层 —— */
.cmpl { display: inline-block; }
.cmpl > summary { list-style: none; cursor: pointer; }
.cmpl > summary::-webkit-details-marker { display: none; }
.missing-pop { margin-top: 6px; padding: 5px 9px; border: 1px solid var(--line); border-radius: 7px; background: var(--accent-soft); color: var(--accent); font-size: 12px; font-weight: 600; white-space: nowrap; }

/* —— 国战战术安排 war_tactics —— */
.war-timeline-panel { padding: 12px 16px; }
.war-timeline { list-style: none; display: flex; gap: 4px; margin: 8px 0 0; padding: 0; overflow-x: auto; }
.war-timeline li { flex: 1 1 0; min-width: 68px; text-align: center; padding: 8px 4px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface-soft); }
.war-timeline li .war-t { display: block; font-weight: 700; font-size: 13px; }
.war-timeline li .war-l { display: block; font-size: 10px; color: var(--muted); margin-top: 2px; }
.war-timeline li.is-mine { border-color: var(--gold); background: var(--accent-soft); }
.war-mine { border-left: 3px solid var(--gold); }
.war-mine h2 { margin: 4px 0 10px; }
.war-mine-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 8px; }
.war-mine-grid > div { border: 1px solid var(--line); border-radius: 8px; padding: 7px 10px; background: var(--surface-soft); }
.war-mine-grid span { display: block; font-size: 11px; color: var(--muted); }
.war-mine-grid strong { font-size: 14px; }
.war-tip { margin-top: 10px; font-size: 12px; color: var(--muted); }
.war-overview > summary { cursor: pointer; font-size: 15px; padding: 4px 0; font-weight: 700; }
.war-roles { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 10px; }
.war-role-col { flex: 1 1 220px; }
.war-role-col h3 { margin: 0 0 2px; font-size: 15px; color: var(--gold); }
.war-role-al { font-size: 12px; color: var(--muted); margin: 0 0 8px; }
.war-car { border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; margin-bottom: 8px; background: var(--surface-soft); }
.war-car.is-mine { border-color: var(--gold); background: var(--accent-soft); }
.war-car-head { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.war-car-head span { font-size: 11px; color: var(--muted); }
.war-car-head small { font-size: 11px; color: var(--muted); margin-left: auto; }
.war-car-cfg { font-size: 12px; color: var(--ink); margin: 3px 0; }
.war-body-list { list-style: none; margin: 4px 0 0; padding: 0; }
.war-body-list li { display: flex; align-items: center; gap: 6px; font-size: 12px; padding: 2px 0; }
.war-body-list li > span:first-child { min-width: 18px; height: 18px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; background: var(--line); font-size: 10px; }
.war-body-list li small { color: var(--muted); margin-left: auto; }
.war-body-list li.is-mine { color: var(--gold); font-weight: 700; }
.war-garrison-view ul { list-style: none; padding: 0; margin: 6px 0 0; }
.war-garrison-view li { padding: 4px 0; font-size: 13px; border-bottom: 1px dashed var(--line); }
.war-garrison-view li.is-mine { color: var(--gold); }
.war-playbook { margin-top: 12px; padding: 10px 12px; border-radius: 8px; background: var(--surface-soft); border: 1px solid var(--line); }
.war-playbook h3 { margin: 0 0 4px; font-size: 14px; }
.war-role-edit { display: flex; flex-direction: column; gap: 6px; }
.war-role-row { display: flex; align-items: center; gap: 8px; }
.war-role-name { flex: 1; font-weight: 600; }
.war-car-meta { display: flex; gap: 10px; flex-wrap: wrap; margin: 6px 0; }
.war-lock { display: flex; align-items: center; gap: 6px; }
.war-garrison-row { flex-wrap: wrap; }
.war-garrison-cfg { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }

/* ===== 霜龙王城专区 frost layer（暗色冰蓝，随主站深蓝主题） ===== */
.frost-entry {
  position: relative;
  overflow: hidden;
  border-color: rgba(139, 232, 255, 0.42);
  background:
    radial-gradient(120% 160% at 100% 0%, rgba(139, 232, 255, 0.2), transparent 55%),
    linear-gradient(180deg, rgba(21, 48, 104, 0.92), var(--surface));
  box-shadow: 0 0 0 1px rgba(139, 232, 255, 0.08), var(--shadow-soft);
}
.frost-entry::after {
  content: "❄";
  position: absolute;
  right: 18px;
  bottom: -14px;
  font-size: 92px;
  line-height: 1;
  color: rgba(139, 232, 255, 0.14);
  pointer-events: none;
}
.frost-entry .panel-head {
  background: transparent;
  border-bottom-color: rgba(139, 232, 255, 0.28);
}
.frost-entry .panel-eyebrow { color: var(--brand); }
.frost-entry h2 { color: var(--ink-strong); }
.frost-soon-chip {
  flex: none;
  align-self: flex-start;
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid rgba(139, 232, 255, 0.55);
  background: rgba(10, 30, 66, 0.72);
  color: var(--brand-strong);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  white-space: nowrap;
}
.frost-soon-chip-big { display: inline-block; margin-top: 14px; font-size: 13px; padding: 7px 16px; }
.frost-hero {
  border-color: rgba(139, 232, 255, 0.42);
  background:
    radial-gradient(130% 170% at 100% 0%, rgba(139, 232, 255, 0.22), transparent 60%),
    linear-gradient(180deg, rgba(21, 48, 104, 0.94), var(--surface));
}
.frost-preview-note { border-style: dashed; }
.frost-soon-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 12px;
  padding: 14px 16px 18px;
}
.frost-soon-card {
  border: 1px solid rgba(139, 232, 255, 0.3);
  border-radius: 12px;
  padding: 12px 14px;
  background: linear-gradient(180deg, rgba(30, 58, 120, 0.75), rgba(17, 38, 84, 0.85));
}
.frost-soon-card h3 { margin: 8px 0 4px; font-size: 15px; color: var(--ink-strong); }
.frost-soon-card p { margin: 0; font-size: 12.5px; color: var(--muted); line-height: 1.55; }
@media (max-width: 640px) {
  .frost-entry .panel-head { flex-direction: column; align-items: flex-start; }
  .frost-entry::after { font-size: 64px; }
}

/* 霜龙部署页（复用 war-* 骨架，这里只补差异件；暗色冰蓝） */
.frost-checklist { margin-top: 14px; padding: 10px 12px; border: 1px dashed rgba(139, 232, 255, 0.4); border-radius: 10px; background: rgba(15, 36, 80, 0.55); }
.frost-checklist h3 { margin: 0 0 6px; font-size: 14px; color: var(--ink-strong); }
.frost-checklist h3 small { color: var(--muted); font-weight: 600; margin-left: 6px; }
.frost-checklist ul { list-style: none; margin: 0; padding: 0; }
.frost-checklist li { display: flex; align-items: center; gap: 8px; padding: 4px 0; font-size: 13px; }
.frost-checklist li.is-done span { color: var(--muted); text-decoration: line-through; }
.frost-checklist form { display: inline; margin: 0; }
.frost-check-btn { border: none; background: none; font-size: 16px; cursor: pointer; padding: 0 2px; line-height: 1; }
.frost-rules { list-style: none; margin: 10px 0 0; padding: 0; }
.frost-rules li { display: flex; gap: 8px; align-items: flex-start; padding: 5px 0; font-size: 13px; border-bottom: 1px dashed var(--line); }
.frost-rule-tag { flex: none; min-width: 40px; text-align: center; font-size: 11px; padding: 2px 6px; border-radius: 6px; background: rgba(139, 232, 255, 0.14); color: var(--brand); border: 1px solid rgba(139, 232, 255, 0.4); }
.frost-captain-line { margin: 10px 0 0; font-size: 13px; }
.frost-readiness { margin-top: 12px; padding: 10px 12px; border-radius: 8px; background: var(--surface-soft); border: 1px solid var(--line); }
.frost-readiness h3 { margin: 0 0 6px; font-size: 14px; }
.frost-readiness ul { list-style: none; margin: 0; padding: 0; }
.frost-readiness li { display: flex; align-items: center; gap: 8px; padding: 3px 0; font-size: 12.5px; }
.frost-ready-label { flex: 1 1 auto; min-width: 0; }
.frost-ready-bar { flex: 0 0 120px; height: 8px; border-radius: 999px; background: rgba(184, 225, 255, 0.18); overflow: hidden; }
.frost-ready-bar i { display: block; height: 100%; background: linear-gradient(90deg, #8be8ff, #4f9fe8); }

/* ── 2026-07-08 视觉体检落地(10画像评审共识)────────────────────
   页脚钉底(短页不再拖空腔);注册页字段栅格 2 列(520px 容器里 4 列=110px 迷你输入框)。 */
body {
  display: flex;
  flex-direction: column;
}

main {
  flex: 1 0 auto;
}

.auth-form .field-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

/* ═══════════ 移动端底部标签栏 v2(2026-07-09 会议 IA · 2026-07-10 按定稿图回炉:
   人人可见(含未登录)、大图标+标签、active=ember,中央 ➕=分享统帅卡) ═══════════ */
.tabbar { display: none; }
@media (max-width: 860px) {
  /* 定稿图:手机端无顶部导航链(只留品牌行),导航全走底部标签栏 */
  .topbar .nav { display: none; }
  .tabbar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
    display: flex; align-items: stretch; justify-content: space-around;
    background: rgba(10, 20, 31, .97); backdrop-filter: blur(12px);
    border-top: 1px solid rgba(159, 216, 239, .12);
    box-shadow: 0 -10px 30px -18px rgba(0, 0, 0, .9);
    padding: 8px 4px calc(8px + env(safe-area-inset-bottom));
  }
  .tabbar a {
    display: flex; flex-direction: column; align-items: center; gap: 3px; flex: 1;
    font-size: 12px; font-weight: 600; color: #7C90A5; text-decoration: none; padding: 2px 0;
  }
  .tabbar a .tb-i { font-size: 22px; line-height: 1; }
  .tabbar a.is-active { color: var(--fz-ember-hi, #F5983B); }
  .tabbar a.is-active .tb-i { filter: drop-shadow(0 0 8px rgba(240, 127, 45, .55)); }
  .tabbar .tabbar-share { flex: 0 0 58px; margin-top: -20px; }
  .tabbar .tb-plus {
    width: 48px; height: 48px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 28px; font-weight: 700; color: #26160A;
    background: linear-gradient(135deg, #F8D55F, #E88D3D);
    box-shadow: 0 6px 18px rgba(232, 141, 61, .5), 0 0 0 4px rgba(232, 141, 61, .14);
  }
  body.has-tabbar main { padding-bottom: 84px; }
  body.has-tabbar .site-footer { padding-bottom: 96px; }
}

/* ═══ 「钉到桌面」一次性提示条(2026-07-10 用户灵感:快捷图标指引) ═══ */
.a2hs-tip { display: none; }
@media (max-width: 860px) {
  .a2hs-tip {
    position: fixed; left: 10px; right: 10px; z-index: 59;
    bottom: calc(74px + env(safe-area-inset-bottom));
    display: flex; align-items: center; gap: 10px;
    padding: 11px 13px; border-radius: 14px;
    background: rgba(16, 31, 48, .97); backdrop-filter: blur(10px);
    border: 1px solid rgba(232, 196, 118, .35);
    box-shadow: 0 14px 30px -16px rgba(0, 0, 0, .9);
    font-size: 13px; color: var(--fz-snow, #EAF4FA);
  }
  .a2hs-tip[hidden] { display: none; }
  .a2hs-tip span { flex: 1; min-width: 0; }
  .a2hs-tip a {
    flex: none; font-weight: 800; color: #26160A; text-decoration: none;
    background: linear-gradient(180deg, #F8D55F, #E88D3D);
    border-radius: 999px; padding: 6px 13px;
  }
  .a2hs-tip button {
    flex: none; width: 26px; height: 26px; border: 0; border-radius: 50%; cursor: pointer;
    background: rgba(159, 216, 239, .1); color: #7C90A5; font-size: 12px;
  }
}

/* ═══ 「我」红点(留存P0·轻通知:被赞/被回应/盟新投票) ═══ */
.nv-dot {
  position: absolute; top: -2px; right: -8px;
  width: 8px; height: 8px; border-radius: 50%;
  background: #E8552F; box-shadow: 0 0 0 2px rgba(10, 20, 31, .9);
}
.tabbar .nv-dot { top: 2px; right: calc(50% - 18px); }
