/* 成就：设置页「成就」栏目 + 解锁弹窗。
 * 设置页部分只用账户模块的主题变量（--ta-*），随亮/暗色一起变；印章固定米底朱砂，两种主题下都清楚。
 * 类名统一 ach- 前缀（账户模块占用了 tta-）。 */
:root {
  --ach-ink: #b23a2e;
  --ach-paper: #e9dcc3;
  --ach-gold: #c9a24b;
}

/* 方印：米底朱砂；稀有度用印框层数和纹样区分 */
.ach-seal {
  position: relative; flex: 0 0 auto; width: 52px; height: 52px; box-sizing: border-box;
  display: grid; place-items: center; background: var(--ach-paper); color: var(--ach-ink);
  border: 2px solid var(--ach-ink); border-radius: 3px;
  font: 700 26px/1 "STKaiti", "KaiTi", "Kaiti SC", "Songti SC", "SimSun", serif; user-select: none;
}
.ach-seal::before, .ach-seal::after { content: ""; position: absolute; pointer-events: none; }
.ach-seal .ach-art { display: block; width: 66%; height: 66%; }
.ach-seal .ach-art svg { display: block; }
.ach-seal.ach-t-rare, .ach-seal.ach-t-epic { box-shadow: inset 0 0 0 3px var(--ach-paper), inset 0 0 0 4px var(--ach-ink); }
.ach-seal.ach-t-epic::before { inset: 5px; border: 1px dashed var(--ach-ink); opacity: .55; }
.ach-seal.ach-t-legend { border-color: var(--ach-gold); box-shadow: 0 0 0 2px var(--ach-ink), 0 0 12px rgba(201, 162, 75, .5), inset 0 0 0 3px var(--ach-paper), inset 0 0 0 4px var(--ach-ink); }
.ach-seal.ach-t-legend::before { inset: 5px; border: 1px dashed var(--ach-ink); opacity: .55; }
.ach-seal.ach-t-legend::after { width: 6px; height: 6px; right: -3px; top: -3px; background: var(--ach-gold); transform: rotate(45deg); }
.ach-seal.ach-locked { filter: grayscale(1); opacity: .5; }

/* 设置页栏目 */
.ach-page .ttw-source-card { padding: 2px 18px; }
.ach-row { display: flex; align-items: center; gap: 14px; padding: 14px 0; }
.ach-row + .ach-row { border-top: 1px solid var(--ta-line); }
.ach-body { flex: 1 1 auto; min-width: 0; }
.ach-title { margin: 0; font-size: 14px; font-weight: 550; color: var(--ta-strong); }
.ach-cond { margin: 3px 0 0; font-size: 12.5px; color: var(--ta-text); }
.ach-flavor { margin: 3px 0 0; font-size: 12px; font-style: italic; color: var(--ta-muted); line-height: 1.6; }
.ach-meta { margin: 4px 0 0; font-size: 11.5px; color: var(--ta-muted); }
.ach-pts { flex: 0 0 auto; align-self: flex-start; padding: 2px 8px; border: 1px solid color-mix(in srgb, var(--ach-ink) 70%, transparent); border-radius: 6px; color: var(--ach-ink); font-size: 12px; font-weight: 550; white-space: nowrap; font-variant-numeric: tabular-nums; }
.ach-row.ach-is-locked .ach-title { color: var(--ta-muted); font-weight: 500; }
.ach-row.ach-is-locked .ach-pts { color: var(--ta-muted); border-color: var(--ta-line); }
.ach-tier { display: inline-block; margin-right: 6px; padding: 0 6px; border-radius: 4px; background: var(--ta-selected); color: var(--ta-muted); font-size: 11px; line-height: 18px; }
.ach-tier.ach-t-rare { color: #4f7fc4; } .ach-tier.ach-t-epic { color: #9568c4; } .ach-tier.ach-t-legend { color: #b8892a; }
.ach-empty { padding: 28px 0; text-align: center; color: var(--ta-muted); font-size: 13px; }
@media (max-width: 640px) { .ach-row { gap: 10px; } .ach-seal { width: 44px; height: 44px; } }

/* 解锁弹窗：Steam 式深色横条卡 */
#ach-toasts { position: fixed; top: 18px; right: 18px; z-index: 2147483000; display: flex; flex-direction: column; gap: 10px; width: 360px; max-width: calc(100vw - 24px); pointer-events: none; }
.ach-toast { pointer-events: auto; cursor: pointer; animation: ach-in .5s cubic-bezier(.2, .8, .2, 1) both; filter: drop-shadow(0 8px 22px rgba(0, 0, 0, .4)); }
.ach-toast.ach-out { animation: ach-out .4s ease-in both; }
.ach-toast .ach-card {
  display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; grid-template-areas: "seal kicker pts" "seal title title" "seal say say";
  column-gap: 12px; row-gap: 3px; align-items: center; box-sizing: border-box; padding: 10px 12px 10px 10px;
  background: linear-gradient(90deg, #232a3b, #1b2130); color: #eef0f5; border: 1px solid rgba(255, 255, 255, .06); border-left: 3px solid #6b7488; border-radius: 6px;
}
.ach-toast .ach-card.ach-t-rare { border-left-color: #6f8fc4; }
.ach-toast .ach-card.ach-t-epic { border-left-color: #a87bd0; }
.ach-toast .ach-card.ach-t-legend { border-left-color: var(--ach-gold); background: linear-gradient(90deg, #2d2a22, #1b2130); }
.ach-toast .ach-seal { grid-area: seal; width: 48px; height: 48px; align-self: center; }
.ach-toast .ach-kicker { grid-area: kicker; font-size: 11px; line-height: 20px; letter-spacing: .2em; color: var(--ach-gold); }
.ach-toast .ach-pts { grid-area: pts; align-self: center; padding: 0 7px; line-height: 20px; color: #e5675a; border-color: #b23a2e; }
.ach-toast .ach-title { grid-area: title; margin: 0; color: #fff; font-size: 15px; line-height: 1.35; }
.ach-toast .ach-say { grid-area: say; display: grid; grid-template-columns: 20px minmax(0, 1fr); column-gap: 7px; align-items: start; margin: 0; color: #c8cedb; font-size: 12.5px; line-height: 20px; }
.ach-toast .ach-say img { width: 20px; height: 20px; border-radius: 50%; background: #2b3345; object-fit: cover; }
@keyframes ach-in { from { opacity: 0; transform: translateX(40px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes ach-out { to { opacity: 0; transform: translateX(40px); } }
@media (max-width: 760px) { #ach-toasts { top: 10px; right: 10px; } }
@media (prefers-reduced-motion: reduce) { .ach-toast, .ach-toast.ach-out { animation: none; } }
