/* 只补 Bootstrap 没有覆盖的项目布局。字号按 14px，避免宽屏标题被放大。 */

body {
  font-family: system-ui, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 14px;
}

.card:not(:has(.card-body)) { padding: 0.75rem 1rem; }

h1, .h1 { font-size: 1.35rem; }
h2, .h2 { font-size: 1.15rem; }
h3, .h3 { font-size: 1rem; }

.navbar .nav-link.active { font-weight: 600; }

.identity,
.planet-head,
.page-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
}

.portrait {
  width: 4rem;
  height: 4rem;
  object-fit: cover;
  border-radius: var(--bs-border-radius);
}

button.item-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0;
  padding: 0.1rem 0.2rem;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  line-height: 1.25;
}

button.item-chip:hover { background: var(--bs-tertiary-bg); border-radius: var(--bs-border-radius); }

.type-icon {
  width: 1.75rem;
  height: 1.75rem;
  object-fit: contain;
  border-radius: var(--bs-border-radius-sm);
  background: var(--bs-tertiary-bg);
}

.item-text { display: flex; flex-direction: column; }
.item-en { color: var(--bs-secondary-color); font-size: 0.8125rem; }
.item-zh { font-weight: 600; }

.chain { display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem; }
.chains { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.4rem; }
.chain-arrow { color: var(--bs-secondary-color); }

dialog {
  width: min(72rem, calc(100vw - 2rem));
  max-width: calc(100vw - 2rem);
  max-height: calc(100vh - 2rem);
  padding: 0;
  border: var(--bs-border-width) solid var(--bs-border-color);
  border-radius: var(--bs-border-radius-lg);
  background: var(--bs-body-bg);
  color: var(--bs-body-color);
}

dialog::backdrop { background: rgba(0, 0, 0, 0.45); }

.copy-toast {
  position: fixed;
  left: 50%;
  bottom: 1rem;
  z-index: 1080;
  transform: translateX(-50%);
}
