/* Thưởng/phạt thấy được, lên cấp, thành tựu (ui/grow.js) */
/* chip ▲▼ sau dòng nhật ký */
.dcs { display: inline-flex; flex-wrap: wrap; gap: 3px; vertical-align: 1px; margin-left: 2px; }
.dc { display: inline-flex; align-items: center; gap: 1px; font-size: 11px; font-weight: 800; line-height: 1; padding: 2px 5px 2px 4px; border-radius: 999px; white-space: nowrap; }
.dc i { font-style: normal; font-size: 9px; letter-spacing: -1px; }
.dc.up { background: #5ee0a026; } .dc.up i { color: #6ff0b0; }
.dc.dn { background: #ff6f9126; } .dc.dn i { color: #ff8fa8; }

/* dòng lên cấp / thành tựu / vết đen */
.log li.lv, .feed li.lv { color: var(--acc); font-weight: 700; }
.log li.lv > span:last-child, .feed li.lv > span { background: linear-gradient(90deg, #ffcf5a26, transparent); border-radius: 6px; padding: 0 6px; margin-left: -6px; }
.log li.ach, .feed li.ach { color: #ffe39a; font-weight: 700; }
.log li.ach > span:last-child, .feed li.ach > span { background: linear-gradient(90deg, #ffcf5a40, #ff6f9118); border: 1px solid #ffcf5a55; border-radius: 8px; padding: 1px 7px; margin-left: -4px; }
.log li.xbad, .feed li.xbad { color: #ff9aaf; font-weight: 700; }
.log li.xbad > span:last-child, .feed li.xbad > span { background: #ff4f7b1c; border: 1px solid #ff4f7b55; border-radius: 8px; padding: 1px 7px; margin-left: -4px; }

/* 🔥 trên bộ chọn trọng tâm */
.gw-fire { color: #ffb347; font-weight: 800; margin-left: 2px; }
.chip.on .gw-fire { color: #b0400a; }
.gw-fhint { margin: 2px 0 0; font-size: 12px; color: var(--mut); }
.gw-fhint.on { color: #ffcf8a; } .gw-fhint.off { color: #d9a7b8; }

/* tab Tài năng */
.gw { display: flex; flex-direction: column; gap: 8px; }
.gw .sec-h { margin-top: 6px; }
.gw .sec-h:first-child { margin-top: 0; }
.gw-ic { width: 26px; text-align: center; font-size: 18px; flex: 0 0 auto; }
.gw-genes { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.gw-g { display: grid; grid-template-columns: 26px 1fr; grid-template-rows: auto auto auto; column-gap: 4px; align-items: center; background: #0002; border: 1px solid var(--line); border-radius: 12px; padding: 6px 8px; min-width: 0; }
.gw-g .gw-ic { grid-row: 1 / span 3; }
.gw-g b { font-size: 12.5px; font-weight: 600; line-height: 1.2; }
.gw-g small { font-size: 11px; line-height: 1.25; }
.gw-pips { font-style: normal; letter-spacing: 1.5px; font-size: 12px; color: var(--acc); line-height: 1.2; }
.gw-pips u { text-decoration: none; opacity: .22; }
.gw-tal { font-size: 13px; color: var(--mut); background: #0002; border: 1px dashed var(--line); border-radius: 10px; padding: 6px 10px; }
.gw-tal.on { color: var(--acc); border: 1px solid #ffcf5a66; background: linear-gradient(90deg, #ffcf5a1f, transparent); font-weight: 700; }
.gw-sks { display: flex; flex-direction: column; gap: 7px; }
.gw-sk { display: flex; gap: 6px; align-items: center; }
.gw-skb { flex: 1; min-width: 0; }
.gw-skh { display: flex; align-items: baseline; gap: 6px; font-size: 13px; }
.gw-skh b { flex: 1; font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gw-lv { font-weight: 800; color: var(--acc); font-size: 12.5px; white-space: nowrap; }
.gw-sp { font-size: 13px; }
.gw-sk .gw-fire { font-size: 12px; }
.gw-bar { position: relative; height: 9px; margin-top: 3px; border-radius: 5px; background: #ffffff12; overflow: visible; }
.gw-fill { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 5px; background: linear-gradient(90deg, #ffb02e, #ffcf5a); transition: width .5s ease; }
/* 10 ô = 10 cấp */
.gw-bar::after { content: ""; position: absolute; inset: 0; border-radius: 5px; background: repeating-linear-gradient(90deg, transparent 0 calc(10% - 2px), var(--bg2) calc(10% - 2px) 10%); pointer-events: none; }
.gw-cap { position: absolute; top: -3px; bottom: -3px; width: 3px; margin-left: -1.5px; border-radius: 2px; background: #e9e3ff; box-shadow: 0 0 4px #000a; z-index: 1; }
.gw-sk.over .gw-fill { background: linear-gradient(90deg, #ffb02e, #ffcf5a 70%, #b49cff); }
.gw-sk.tal .gw-fill { background: linear-gradient(90deg, #ff6f91, #ffcf5a); }
.gw-sk.none { opacity: .5; }
.gw-sk.none .gw-lv { color: var(--mut); font-weight: 600; }
.gw-gh { font-size: 12.5px; font-weight: 700; color: #d8d0f0; margin-top: 4px; }
.gw-gh.bad { color: #ff9aaf; }
.gw-achs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.gw-a { display: flex; gap: 6px; align-items: center; background: #0002; border: 1px solid var(--line); border-radius: 12px; padding: 6px 8px; min-width: 0; }
.gw-a > div { min-width: 0; display: flex; flex-direction: column; }
.gw-a b { font-size: 12.5px; font-weight: 700; line-height: 1.25; }
.gw-a small { font-size: 11px; }
.gw-ai { font-size: 22px; flex: 0 0 auto; width: 30px; text-align: center; }
.gw-a.got { border-color: #ffcf5a77; background: linear-gradient(135deg, #ffcf5a22, #ff6f910d); }
.gw-a.got b { color: #ffe39a; }
.gw-a.lock .gw-ai { filter: grayscale(1) brightness(.3) contrast(1.4); opacity: .8; }
.gw-a.lock b { color: var(--mut); font-weight: 600; font-style: italic; }
.gw-a.bad { border-color: #ff4f7b77; background: #ff4f7b14; }
.gw-a.bad b { color: #ff9aaf; }
.gw-end .gw-achs { margin-bottom: 4px; }
.gw-go { width: 100%; text-align: left; }

/* huy hiệu lên cấp (gộp theo năm) */
.gw-lvpop { position: fixed; left: 50%; top: 150px; transform: translateX(-50%); z-index: 44; pointer-events: none; text-align: center; max-width: calc(100vw - 24px);
  background: linear-gradient(135deg, #3a2a10f2, #2e2550f2); border: 2px solid var(--acc); border-radius: 16px; padding: 6px 14px 8px; box-shadow: 0 0 0 4px #ffcf5a22, 0 10px 30px -8px #ffcf5a88; }
.gw-lvpop small { display: block; color: var(--acc); font-weight: 900; letter-spacing: 2px; font-size: 11px; }
.gw-lvpop div { display: flex; flex-wrap: wrap; gap: 4px 10px; justify-content: center; font-weight: 800; font-size: 15px; }
.gw-lvpop .up { color: #fff3c4; text-shadow: 0 0 10px #ffcf5a; }
.gw-lvpop .dn { color: #ff9aaf; font-size: 13px; }
.gw-lvpop.quiet { border-width: 1px; box-shadow: none; padding: 4px 12px; }
.gw-lvpop.quiet div { font-size: 13px; }
.gw-lvpop.out { animation: gwOut calc(.3s * var(--k, 1)) forwards; }
.gw-pop { animation: gwPop calc(.5s * var(--k, 1)) cubic-bezier(.3, 1.6, .5, 1); }
.gw-lvpop.gw-pop { animation: gwPopC calc(.5s * var(--k, 1)) cubic-bezier(.3, 1.6, .5, 1); }
@keyframes gwPop { 0% { transform: scale(.6); } 60% { transform: scale(1.15); } 100% { transform: none; } }
@keyframes gwPopC { 0% { transform: translateX(-50%) scale(.5); opacity: 0; } 60% { transform: translateX(-50%) scale(1.12); opacity: 1; } 100% { transform: translateX(-50%); } }
@keyframes gwOut { to { opacity: 0; transform: translateX(-50%) translateY(-12px); } }

/* thẻ thành tựu / vết đen */
.gw-achpop { position: fixed; left: 50%; top: 10px; z-index: 46; width: min(360px, calc(100vw - 24px)); display: flex; gap: 10px; align-items: center; padding: 10px 14px; border-radius: 16px; cursor: pointer;
  background: linear-gradient(135deg, #4a3712, #2e2550 70%); border: 2px solid var(--acc); box-shadow: 0 0 0 4px #ffcf5a26, 0 14px 34px -8px #000c, 0 0 28px -6px #ffcf5a;
  transform: translateX(-50%); animation: gwDrop calc(.55s * var(--k, 1)) cubic-bezier(.25, 1.5, .5, 1) both; }
.gw-achpop .gw-ai { font-size: 30px; width: 46px; height: 46px; display: grid; place-items: center; border-radius: 50%; background: radial-gradient(#ffcf5a55, #ffcf5a10 70%); animation: gwSpin calc(.8s * var(--k, 1)) .15s both; }
.gw-achpop > div { display: flex; flex-direction: column; min-width: 0; }
.gw-achpop small { color: var(--acc); font-weight: 900; letter-spacing: 2px; font-size: 11px; }
.gw-achpop b { font-size: 16px; line-height: 1.25; }
.gw-achpop em { font-style: normal; font-size: 13px; font-weight: 800; color: #fff3c4; }
.gw-achpop.bad { background: linear-gradient(135deg, #4a1222, #2e2550 70%); border-color: #ff4f7b; box-shadow: 0 0 0 4px #ff4f7b22, 0 14px 34px -8px #000c; animation: gwDrop calc(.4s * var(--k, 1)) ease-out both, gwShake calc(.5s * var(--k, 1)) calc(.4s * var(--k, 1)) both; }
.gw-achpop.bad .gw-ai { background: radial-gradient(#ff4f7b44, transparent 70%); animation: none; }
.gw-achpop.bad small { color: #ff8fa8; } .gw-achpop.bad em { color: #ff9aaf; }
.gw-achpop.out { animation: gwUp calc(.3s * var(--k, 1)) forwards; }
@keyframes gwDrop { from { transform: translateX(-50%) translateY(-130%); opacity: 0; } }
@keyframes gwUp { to { transform: translateX(-50%) translateY(-130%); opacity: 0; } }
@keyframes gwSpin { from { transform: scale(.3) rotate(-200deg); } 70% { transform: scale(1.2) rotate(10deg); } }
@keyframes gwShake { 20%, 60% { transform: translateX(calc(-50% - 7px)); } 40%, 80% { transform: translateX(calc(-50% + 7px)); } }
@media (prefers-reduced-motion: reduce) {
  .gw-achpop, .gw-achpop .gw-ai, .gw-lvpop, .gw-pop { animation-duration: .01ms !important; animation-delay: 0s !important; }
}
