/* ============================================================
   角色摘要 / 道籍命牌 / 侧栏组件
   ============================================================ */

/* ---------- 左栏：道号区 ---------- */
.identity {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.identity__name {
  font-family: var(--serif);
  font-size: 21px;
  letter-spacing: 0.12em;
  line-height: 1.4;
  /* 关键：让背景盒子贴合文字宽度，否则流光只显示第一个色标 */
  width: fit-content;
  max-width: 100%;
}

.identity__sub {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11.5px;
  color: var(--t-2);
}

.identity__realm {
  color: var(--qing);
}

/* ---------- 进度条 ---------- */
.bar {
  height: 4px;
  background: var(--ink-3);
  border-radius: 2px;
  overflow: hidden;
  position: relative;
}

.bar > i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--qing-dim), var(--qing));
  border-radius: 2px;
  transition: width 0.5s var(--ease);
}

.bar--exp > i {
  background: linear-gradient(90deg, #2c6353, #5dcaa5);
}

.bar--hp > i {
  background: linear-gradient(90deg, #6a2b29, #c0504d);
}

.bar--mp > i {
  background: linear-gradient(90deg, #1e4a6b, #7fd4ff);
}

.bar-row {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-bottom: 10px;
}

.bar-row__label {
  display: flex;
  justify-content: space-between;
  font-size: 10.5px;
  color: var(--t-2);
  letter-spacing: 0.08em;
}

.bar-row__label b {
  font-weight: 400;
  color: var(--t-1);
  font-variant-numeric: tabular-nums;
}

/* 「已满 · 余 76」里的余量：附注，不该比主数字更响 */
.bar-row__label b i {
  font-style: normal;
  margin-left: 0.5em;
  color: var(--t-3);
}

/* ---------- 属性（星级） ---------- */
.attrs {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.attr {
  display: grid;
  grid-template-columns: 34px 1fr auto;
  align-items: center;
  gap: 8px;
  font-size: 12px;
}

.attr__k {
  color: var(--t-2);
  font-size: 11.5px;
}

.attr__stars {
  letter-spacing: 0.08em;
  font-size: 11px;
  color: var(--jin);
}

.attr__stars .off {
  color: var(--t-3);
}

.attr__desc {
  font-size: 11px;
  color: var(--t-1);
  text-align: right;
}

/* ---------- 侧栏小标题 ---------- */
.side-title {
  font-size: 10.5px;
  letter-spacing: 0.22em;
  color: var(--t-3);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.side-title::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line-soft);
}

/* 可点的标题（行囊 → 全部） */
.side-title--act {
  cursor: pointer;
  transition: color 0.16s var(--ease);
}

.side-title--act::after {
  order: 1;
}

.side-title--act:hover {
  color: var(--t-1);
}

.side-title__more {
  order: 2;
  flex: none;
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--t-3);
  transition: color 0.16s var(--ease);
}

.side-title--act:hover .side-title__more {
  color: var(--qing);
}

/* ---------- 任务卡 ---------- */
.quest {
  border: 1px solid var(--line);
  border-left: 2px solid var(--jin-dim);
  border-radius: var(--r-sm);
  padding: 11px 12px;
  background: var(--ink-2);
  margin-bottom: 9px;
  transition: border-color 0.2s var(--ease);
  cursor: pointer;
}

.quest:hover {
  border-color: var(--line-bright);
  border-left-color: var(--jin);
}

.quest__title {
  font-size: 12.5px;
  color: var(--t-0);
  margin-bottom: 4px;
  line-height: 1.5;
}

.quest__meta {
  display: flex;
  gap: 8px;
  font-size: 10.5px;
  color: var(--t-2);
}

.quest__tag {
  padding: 0 5px;
  border: 1px solid var(--line);
  border-radius: 2px;
  font-size: 10px;
  line-height: 1.6;
}

.quest__tag--global {
  color: var(--jin);
  border-color: var(--jin-dim);
}

.quest__tag--llm {
  color: var(--zi);
  border-color: #4a3d63;
}

/* ---------- 世界动态 ---------- */
.feed {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.feed__item {
  font-size: 11.5px;
  color: var(--t-2);
  line-height: 1.6;
  padding-left: 12px;
  position: relative;
}

.feed__item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--line-bright);
}

.feed__item em {
  font-style: normal;
  color: var(--t-1);
}

.feed__item--hot em {
  color: var(--jin);
}

/* 行囊里的稀有度：只提亮名字，不加图标 */
.feed__item em.is-rare {
  color: var(--jin);
}

.feed__item em.is-unique {
  color: var(--zi);
}

.feed__item--dim {
  color: var(--t-3);
}

/* 新落下的线索：轻微入场，别用弹跳——这是修仙，不是抽卡 */
.quest--new {
  animation: quest-in 0.5s var(--ease-out) both;
  border-left-color: var(--zi) !important;
}

@keyframes quest-in {
  from {
    opacity: 0;
    transform: translateX(-6px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* ============================================================
   道籍命牌（覆盖层）
   ============================================================ */
.overlay {
  position: fixed;
  inset: 0;
  z-index: 150;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
  background: rgba(6, 7, 9, 0.78);
  backdrop-filter: blur(3px);
  animation: overlay-in 0.22s var(--ease-out) both;
}

@keyframes overlay-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.panel {
  width: min(660px, 100%);
  max-height: 88vh;
  overflow-y: auto;
  background: linear-gradient(180deg, var(--ink-2), var(--ink-1));
  border: 1px solid var(--line-bright);
  border-radius: var(--r-md);
  position: relative;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.7);
  animation: panel-in 0.32s var(--ease-out) both;
}

@keyframes panel-in {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.99);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* 四角装饰 */
.panel::before,
.panel::after,
.panel__corner::before,
.panel__corner::after {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  border: 1px solid var(--jin);
  opacity: 0.55;
  pointer-events: none;
}
.panel::before {
  top: -1px;
  left: -1px;
  border-right: 0;
  border-bottom: 0;
}
.panel::after {
  top: -1px;
  right: -1px;
  border-left: 0;
  border-bottom: 0;
}
.panel__corner::before {
  bottom: -1px;
  left: -1px;
  border-right: 0;
  border-top: 0;
}
.panel__corner::after {
  bottom: -1px;
  right: -1px;
  border-left: 0;
  border-top: 0;
}

.panel__head {
  padding: 26px 30px 18px;
  border-bottom: 1px solid var(--line-soft);
  background: linear-gradient(180deg, rgba(217, 164, 65, 0.055), transparent 72%);
  position: relative;
}

.panel__head::after {
  content: "";
  position: absolute;
  left: 30px;
  right: 30px;
  bottom: -1px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(217, 164, 65, 0.45), rgba(201, 167, 255, 0.3), transparent);
  opacity: 0.7;
}

.panel__eyebrow {
  font-size: 10px;
  letter-spacing: 0.4em;
  color: var(--t-3);
  margin-bottom: 12px;
}

.panel__name {
  font-family: var(--serif);
  font-size: 28px;
  letter-spacing: 0.1em;
  line-height: 1.3;
  margin-bottom: 10px;
  /* 同上：背景盒子贴合文字，流光才能铺满 */
  width: fit-content;
  max-width: 100%;
}

.panel__sub {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  color: var(--t-2);
}

.panel__sub b {
  font-weight: 400;
  color: var(--qing);
  letter-spacing: 0.1em;
}

.panel__body {
  padding: 20px 30px 26px;
}

.panel__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px 26px;
  margin-bottom: 4px;
}

.kv {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-size: 12.5px;
  min-width: 0;
}

.kv > span {
  color: var(--t-2);
  font-size: 11.5px;
  flex: none;
  width: 30px;
}

.kv > b {
  font-weight: 400;
  color: var(--t-0);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.kv .uniq {
  color: var(--jin);
  font-size: 11px;
  margin-left: 4px;
}

.panel__deeds {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--line-soft);
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.deed-line {
  display: flex;
  gap: 12px;
  font-size: 12.5px;
  line-height: 1.7;
}

.deed-line > span {
  color: var(--t-2);
  font-size: 11.5px;
  flex: none;
  width: 30px;
}

.deed-line > p {
  margin: 0;
  color: var(--t-1);
}

.deed-line--now > p {
  color: var(--t-0);
}

.panel__foot {
  padding: 12px 30px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  color: var(--t-3);
}

@media (max-width: 620px) {
  .panel__grid {
    grid-template-columns: 1fr;
  }
  .panel__head,
  .panel__body {
    padding-left: 20px;
    padding-right: 20px;
  }
}

/* ---------- 收尾补的三处小字 ----------
   都是"原本该有、一直空着"的位置。共同点是：字号比正文再小一档，
   颜色退到 t-3——它们是注解，不是内容。 */

/* 六维后面那个真数。星级是给眼睛的，数字是给算账的：
   只画星的话，三根骨和四根骨都差一颗星，玩家会怀疑自己到底涨没涨 */
.attr__num {
  margin-left: 5px;
  font-size: 10px;
  color: var(--t-3);
  letter-spacing: 0;
  font-variant-numeric: tabular-nums;
}

/* 世界栏的时辰。压在行首，小到不抢正文 */
.feed__at {
  display: inline-block;
  margin-right: 6px;
  font-size: 10px;
  color: var(--t-3);
  font-variant-numeric: tabular-nums;
}

/* 最要紧的那条（身死道消）。以前只给 em 上色，
   可世界栏的正文是纯文本，没有 em——于是"高亮"从来没亮过 */
.feed__item--hot {
  color: var(--zi);
}

/* 道籍：修为条底下那行"还差多少" */
.panel__expnote {
  margin-top: 9px;
  font-size: 10.5px;
  color: var(--t-3);
  letter-spacing: 0.08em;
  font-variant-numeric: tabular-nums;
}

/* 行囊标题后面的件数。原来是另起一行"还有 N 件"——
   那一行在 900 高的屏上正好把整个行囊挤出可见区。
   挪进标题，省一行，也省得读的人自己算 */
.side-title__n {
  margin-left: 8px;
  font-style: normal;
  font-size: 10px;
  letter-spacing: 0.06em;
  color: var(--t-3);
  font-variant-numeric: tabular-nums;
}
