/* =========================================================
   Infestation Việt Nam — inner pages
   Tin tức / Kho đồ / Xếp hạng / Hồ sơ / Đăng nhập / Đăng ký
   Dùng kèm main.css
   ========================================================= */

/* ---------- Page hero ---------- */
.page-hero {
  position: relative;
  display: flex;
  align-items: flex-start;
  min-height: 273px;
  padding-block: 56px 40px;
  background: var(--cross) repeat center / 640px auto;
  overflow: hidden;
}
.page-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(110% 130% at 12% 0%, rgba(19, 21, 18, .15), rgba(19, 21, 18, .88) 72%);
  pointer-events: none;
}
.page-hero > .wrap { position: relative; z-index: 1; }

.crumbs {
  font-family: var(--cond);
  font-size: 16px;
  line-height: 1.2;
  font-weight: 600;
  letter-spacing: .03em;
  color: var(--muted);
}
.crumbs a { text-decoration: none; }
.crumbs a:hover { color: var(--accent-text); }
.crumbs span { color: var(--text-2); }

.page-title {
  margin-top: 16px;
  font-family: var(--display);
  font-size: 64px;
  font-weight: 900;
  line-height: 1.17;
  letter-spacing: .005em;
  color: var(--text);
}
.page-lead {
  max-width: 760px;
  margin-top: 17px;
  font-size: 20px;
  line-height: 1.6;
  color: var(--text-2);
}

.page-body { padding-block: 48px 84px; }

/* ---------- Filter pills ---------- */
.filters {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.filters__pills {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.pill {
  display: inline-flex;
  align-items: center;
  height: 46px;
  padding: 0 20px;
  border: 0;
  background: transparent;
  font-family: var(--cond);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: .03em;
  line-height: 1;
  color: var(--text-2);
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color .16s ease, color .16s ease;
}
.pill:hover { color: var(--text); background: rgba(255, 255, 255, .04); }
.pill.is-active { background: var(--accent); color: var(--bg-dark); }
.pill.is-active:hover { background: var(--accent-text); }

/* Icon line dùng chung cho tab xếp hạng + tiêu đề cột */
.rank-icon {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: square;
  stroke-linejoin: miter;
}
.filters__count {
  flex: 0 0 auto;
  font-family: var(--cond);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: .03em;
  color: var(--muted);
}

/* ---------- Featured article ---------- */
.feature {
  display: grid;
  grid-template-columns: 640px minmax(0, 1fr);
  margin-top: 32px;
  background: var(--card);
  box-shadow: inset 0 0 0 1px var(--line);
}
/* ca the bai viet la mot lien ket */
.feature[data-article] {
  cursor: pointer;
  transition: box-shadow .16s ease;
}
.feature[data-article]:hover {
  box-shadow: inset 0 0 0 1px var(--line-strong);
}
.feature[data-article]:hover .feature__title {
  color: var(--accent-text);
}
.feature[data-article]:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
.feature__media {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 388px;
  margin: 1px 0 1px 1px;
  padding: 40px;
  background-color: var(--card-alt);
  background-image: var(--cross);
  background-repeat: repeat;
  background-size: 640px auto;
  box-shadow: inset 0 0 0 1px var(--line);
  overflow: hidden;
}
.feature__media img {
  width: 100%;
  max-width: 420px;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 18px 24px rgba(0, 0, 0, .45));
}
.feature__body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 54px 48px 49px;
}
.feature__eyebrow {
  font-family: var(--cond);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: .04em;
  line-height: 1.2;
  color: var(--accent-text);
}
.feature__caption {
  position: absolute;
  left: 24px;
  bottom: 24px;
  display: flex;
  flex-direction: column;
  padding-left: 13px;
  border-left: 3px solid var(--accent);
}
.feature__caption b {
  font-family: var(--cond);
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
}
.feature__caption small {
  font-family: var(--cond);
  font-size: 16px;
  font-weight: 600;
  color: var(--muted);
}
.feature__title {
  margin-top: 26px;
  font-family: var(--cond);
  font-size: 44px;
  font-weight: 700;
  line-height: 1.14;
  color: var(--text);
  transition: color .16s ease;
}
.feature__text {
  margin-top: 20px;
  font-size: 20px;
  line-height: 1.6;
  color: var(--text-2);
}
.feature__meta {
  margin-top: 20px;
  font-family: var(--semi);
  font-size: 18px;
  color: var(--muted);
}
.feature__body .btn { margin-top: 17px; height: 44px; padding: 0 24px; font-size: 16px; }

/* ---------- Article list ---------- */
.post-list { margin-top: 37px; }
.post-list a {
  display: grid;
  grid-template-columns: 156px minmax(0, 1fr) 100px;
  align-items: center;
  min-height: 63px;
  text-decoration: none;
  transition: background-color .16s ease;
}
.post-list a:hover { background: rgba(255, 255, 255, .025); }
.post-list .tag { margin-left: 27px; }
.post-list__title {
  padding-right: 24px;
  font-family: var(--cond);
  font-size: 24px;
  font-weight: 600;
  line-height: 1.25;
  color: var(--text);
  transition: color .16s ease;
}
.post-list a:hover .post-list__title { color: var(--accent-text); }
.post-list__date {
  font-family: var(--semi);
  font-size: 18px;
  color: var(--muted);
  text-align: right;
}
.tag--accent { border-color: var(--accent); color: var(--accent-text); }
.tag--solid {
  border-color: transparent;
  background: var(--text);
  color: var(--bg-dark);
}
.tag--dim { background: var(--line); border-color: transparent; color: var(--text); }

/* ---------- Pagination ---------- */
.pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 39px;
}
.pagination a,
.pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 47px;
  height: 46px;
  padding: 0 10px;
  font-family: var(--cond);
  font-size: 18px;
  font-weight: 600;
  color: var(--text-2);
  text-decoration: none;
}
.pagination a:hover { background: rgba(255, 255, 255, .05); color: var(--text); }
.pagination .is-active { min-width: 39px; background: var(--accent); color: var(--bg-dark); }
.pagination .is-disabled { color: var(--muted); }

/* ---------- Search field ---------- */
.search {
  display: flex;
  align-items: center;
  height: 52px;
  padding: 0 17px;
  background: var(--bg-dark);
  box-shadow: inset 0 0 0 1px var(--line);
}
.search input {
  width: 100%;
  border: 0;
  background: transparent;
  font-family: var(--body);
  font-size: 18px;
  color: var(--text);
  outline: none;
}
.search input::placeholder { color: var(--muted); }
.field__label {
  display: block;
  font-family: var(--cond);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: .03em;
  color: var(--text-2);
}
.field__hint {
  margin-top: 8px;
  font-family: var(--cond);
  font-size: 16px;
  color: var(--muted);
}

/* ---------- Store layout ---------- */
.store-layout {
  display: grid;
  grid-template-columns: 288px minmax(0, 1fr);
  gap: 64px;
  align-items: start;
}
.cat-title {
  margin-top: 36px;
  font-family: var(--cond);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: .03em;
  color: var(--muted);
}
.cat-list { margin-top: 16px; }
.cat-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  height: 48px;
  padding: 0 16px;
  border: 0;
  background: transparent;
  font-family: var(--cond);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: .02em;
  color: var(--text-2);
  text-align: left;
  cursor: pointer;
  transition: background-color .16s ease, color .16s ease;
}
.cat-item span:last-child { color: var(--muted); }
.cat-item:hover { background: rgba(255, 255, 255, .04); color: var(--text); }
.cat-item.is-active { background: var(--card-alt); color: var(--text); }
.cat-item.is-active span:last-child { color: var(--accent-text); }

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.toolbar__count {
  font-family: var(--cond);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: .03em;
  color: var(--muted);
}
.sort { display: flex; align-items: center; gap: 12px; }
.sort__label {
  font-family: var(--cond);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: .03em;
  color: var(--muted);
}

.item-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  margin-top: 32px;
}
.store-main .pagination { margin-top: 44px; }
.item-grid .item-card { position: relative; }
.item-grid .item-card__media { height: 170px; aspect-ratio: auto; }
.badge {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  height: 28px;
  padding: 0 12px;
  background: var(--accent);
  font-family: var(--cond);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: .02em;
  color: var(--bg-dark);
}

/* ---------- Item detail ---------- */
.detail {
  display: grid;
  grid-template-columns: 400px minmax(0, 1fr);
  min-height: 434px;
  margin-top: 20px;
  background: var(--card);
  box-shadow: inset 0 0 0 1px var(--line);
}
.detail__media {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  background-color: var(--card-alt);
  background-image: var(--cross);
  background-repeat: repeat;
  background-size: 640px auto;
  box-shadow: inset 0 0 0 1px var(--line);
}
.detail__media img { max-width: 360px; max-height: 220px; object-fit: contain; }
.detail__body { display: flex; flex-direction: column; padding: 48px; }
.detail__title {
  margin-top: 10px;
  font-family: var(--cond);
  font-size: 44px;
  font-weight: 700;
  line-height: 1.14;
  color: var(--text);
}
.detail__text {
  max-width: 640px;
  margin-top: 16px;
  font-size: 18px;
  line-height: 1.55;
  color: var(--text-2);
}
.spec-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 32px 48px;
  max-width: 480px;
  margin-top: 40px;
}
.spec__label {
  font-family: var(--cond);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: .03em;
  color: var(--muted);
}
.spec__value {
  margin-top: 6px;
  font-family: var(--semi);
  font-size: 28px;
  font-weight: 600;
  line-height: 1.15;
  color: var(--text);
}

/* ---------- Ranking ---------- */
.tabs { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 34px; }
.tabs--rank .pill { gap: 8px; }
.rank-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 40px;
}
.rank-count { display: none; }
.rank-search {
  display: grid;
  grid-template-columns: 360px auto;
  justify-content: end;
  align-items: start;
  gap: 12px;
}
.btn--square { height: 52px; padding: 0 24px; }

.me-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 36px;
}
.me-head .dash { width: 24px; height: 3px; background: var(--accent); }
.me-head h2 {
  font-family: var(--cond);
  font-size: 18px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: .04em;
  color: var(--accent-text);
}
.rank-me {
  display: grid;
  grid-template-columns: 72px 52px minmax(0, 1fr) 200px;
  align-items: center;
  min-height: 72px;
  margin-top: 12px;
  padding-inline: 16px;
  background: var(--card-alt);
  box-shadow: inset 0 0 0 1px var(--line);
}

.rank-table { margin-top: 40px; }
.rank-table__head,
.rank-table__row {
  display: grid;
  grid-template-columns: 72px 52px minmax(0, 1fr) 200px;
  align-items: center;
  padding-inline: 16px;
}
.rank-table__head {
  min-height: 29px;
  font-family: var(--cond);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: .03em;
  color: var(--muted);
}
.rank-table__head span:first-child { grid-column: span 2; }
.rank-table__head .num { text-align: right; }
.rank-table__metric {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  min-width: 0;
}
.rank-table__metric .rank-icon {
  width: 16px;
  height: 16px;
  color: var(--accent-text);
}
.rank-table__metric-label { min-width: 0; }
.rank-table__row {
  min-height: 69px;
  background: var(--card-alt);
  box-shadow: inset 0 -1px 0 var(--bg);
  text-decoration: none;
  transition: background-color .16s ease;
}
.rank-table__row:hover { background: #262b23; }

.rank-table__pos {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--semi);
  font-size: 28px;
  font-weight: 600;
  line-height: 1;
  color: var(--muted);
}
.rank-table__medal {
  display: inline-flex;
  flex: 0 0 auto;
}
.rank-table__medal svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: square;
  stroke-linejoin: miter;
}
.rank-table__num { font: inherit; }

/* ---------- Top 5: hạng 1/2/3 màu riêng + hiệu ứng, hạng 4/5 highlight nhẹ ---------- */
.rank-table__row.is-rank-1,
.rank-table__row.is-rank-2,
.rank-table__row.is-rank-3 { position: relative; overflow: hidden; }

.rank-table__row.is-rank-1 {
  background:
    linear-gradient(90deg, rgba(255, 198, 74, .24) 0%, rgba(255, 198, 74, .07) 46%, rgba(255, 198, 74, 0) 78%),
    var(--card-alt);
  animation: rank-glow 3.2s ease-in-out infinite;
}
.rank-table__row.is-rank-1 .rank-table__pos {
  color: #ffd97a;
  text-shadow: 0 0 10px rgba(255, 198, 74, .95), 0 0 26px rgba(255, 198, 74, .55), 0 1px 0 rgba(0, 0, 0, .55);
}
.rank-table__row.is-rank-1 .rank-table__who b {
  color: #fff4d2;
  text-shadow: 0 0 12px rgba(255, 198, 74, .5), 0 1px 0 rgba(0, 0, 0, .5);
}
.rank-table__row.is-rank-1 .rank-table__val {
  color: #ffe6a3;
  text-shadow: 0 0 12px rgba(255, 198, 74, .55), 0 1px 0 rgba(0, 0, 0, .5);
}
.rank-table__row.is-rank-1 .rank-table__medal {
  color: #ffd76a;
  filter: drop-shadow(0 0 7px rgba(255, 198, 74, .8));
  animation: crown-bob 2.6s ease-in-out infinite;
}
.rank-table__row.is-rank-1 .rank-table__avatar img {
  filter: drop-shadow(0 0 8px rgba(255, 198, 74, .55));
}
.rank-table__row.is-rank-1::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 36%, rgba(255, 255, 255, .2) 50%, transparent 64%);
  transform: translateX(-120%);
  animation: rank-shine 4s ease-in-out infinite;
  pointer-events: none;
}
@keyframes rank-shine {
  0%, 62% { transform: translateX(-120%); }
  100% { transform: translateX(120%); }
}
@keyframes rank-glow {
  0%, 100% {
    box-shadow: inset 3px 0 0 #ffc64a, inset 0 -1px 0 var(--bg), 0 0 16px rgba(255, 198, 74, .08);
  }
  50% {
    box-shadow: inset 3px 0 0 #ffd76a, inset 0 -1px 0 var(--bg), 0 0 34px rgba(255, 198, 74, .24);
  }
}
@keyframes crown-bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-2px); }
}

.rank-table__row.is-rank-2 {
  background:
    linear-gradient(90deg, rgba(198, 214, 226, .18) 0%, rgba(198, 214, 226, .05) 50%, transparent 80%),
    var(--card-alt);
  box-shadow: inset 3px 0 0 #c6d6e2, inset 0 -1px 0 var(--bg), 0 0 18px rgba(198, 214, 226, .06);
}
.rank-table__row.is-rank-2 .rank-table__pos {
  color: #e6f0f8;
  text-shadow: 0 0 10px rgba(198, 214, 226, .75), 0 1px 0 rgba(0, 0, 0, .5);
}
.rank-table__row.is-rank-2 .rank-table__who b,
.rank-table__row.is-rank-2 .rank-table__val {
  color: #f2f7fb;
  text-shadow: 0 0 10px rgba(198, 214, 226, .45), 0 1px 0 rgba(0, 0, 0, .45);
}
.rank-table__row.is-rank-2 .rank-table__medal {
  color: #dfe9f1;
  filter: drop-shadow(0 0 5px rgba(198, 214, 226, .65));
}

.rank-table__row.is-rank-3 {
  background:
    linear-gradient(90deg, rgba(214, 138, 74, .2) 0%, rgba(214, 138, 74, .05) 50%, transparent 80%),
    var(--card-alt);
  box-shadow: inset 3px 0 0 #d68a4a, inset 0 -1px 0 var(--bg), 0 0 18px rgba(214, 138, 74, .07);
}
.rank-table__row.is-rank-3 .rank-table__pos {
  color: #f0b585;
  text-shadow: 0 0 10px rgba(214, 138, 74, .8), 0 1px 0 rgba(0, 0, 0, .5);
}
.rank-table__row.is-rank-3 .rank-table__who b,
.rank-table__row.is-rank-3 .rank-table__val {
  color: #f7d3b5;
  text-shadow: 0 0 10px rgba(214, 138, 74, .45), 0 1px 0 rgba(0, 0, 0, .45);
}
.rank-table__row.is-rank-3 .rank-table__medal {
  color: #e9a76d;
  filter: drop-shadow(0 0 5px rgba(214, 138, 74, .65));
}

.rank-table__row.is-rank-4,
.rank-table__row.is-rank-5 {
  background:
    linear-gradient(90deg, rgba(226, 122, 51, .1) 0%, transparent 60%),
    var(--card-alt);
  box-shadow: inset 2px 0 0 rgba(226, 122, 51, .5), inset 0 -1px 0 var(--bg);
}
.rank-table__row.is-rank-4 .rank-table__pos,
.rank-table__row.is-rank-5 .rank-table__pos {
  color: var(--accent-text);
  text-shadow: 0 0 8px rgba(226, 122, 51, .35);
}

@media (prefers-reduced-motion: reduce) {
  .rank-table__row.is-rank-1 { animation: none; box-shadow: inset 3px 0 0 #ffc64a, inset 0 -1px 0 var(--bg); }
  .rank-table__row.is-rank-1::after { animation: none; display: none; }
  .rank-table__row.is-rank-1 .rank-table__medal { animation: none; }
}

.rank-me .rank-table__pos { color: var(--accent-text); }
.rank-table__avatar img,
.rank-me .rank-table__avatar img { width: 36px; height: 36px; object-fit: contain; }
.rank-table__who {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  padding-right: 12px;
}
.rank-table__who b {
  overflow: hidden;
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  text-overflow: ellipsis;
}
.rank-table__who small {
  overflow: hidden;
  font-size: 16px;
  color: var(--muted);
  white-space: nowrap;
  text-overflow: ellipsis;
}
.rank-table__val {
  font-family: var(--semi);
  font-size: 18px;
  font-weight: 500;
  color: var(--text);
  text-align: right;
  white-space: nowrap;
}
.rank-table__val--muted { color: var(--text-2); }
.rank-table + .pagination { margin-top: 44px; }

/* ---------- Profile ---------- */
.profile-rows, .spec-grid { margin: 0; }
.profile-rows dd, .spec-grid dd { margin: 0; }
.profile-layout {
  display: grid;
  grid-template-columns: 400px minmax(0, 1fr);
  gap: 48px;
  align-items: start;
}
.profile-card {
  position: relative;
  padding: 46px 32px 28px;
  background: var(--card);
  box-shadow: inset 0 0 0 1px var(--line);
  overflow: hidden;
}
.profile-card::before {
  content: "";
  position: absolute;
  inset: 1px 1px auto;
  height: 14px;
  background: var(--ruler) repeat-x center / auto 14px;
}
.profile-head { display: flex; align-items: center; gap: 20px; }
.profile-avatar,
.profile-head > img { flex: 0 0 auto; width: 96px; height: 96px; object-fit: contain; }
.profile-head > div { min-width: 0; }
.profile-name {
  font-family: var(--cond);
  font-size: 32px;
  font-weight: 600;
  line-height: 1.15;
  color: var(--text);
}
.profile-clan { margin-top: 2px; font-size: 18px; color: var(--text-2); }
.profile-online {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  font-family: var(--cond);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: .03em;
  color: var(--green);
}
.profile-online .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
}
.profile-rows { margin-top: 26px; }
.profile-row {
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr);
  align-items: baseline;
  gap: 8px;
  padding-block: 11px;
}
.profile-row dt {
  font-family: var(--cond);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: .03em;
  color: var(--muted);
}
.profile-row dd { margin: 0; font-size: 18px; color: var(--text); }
.profile-actions {
  display: flex;
  gap: 20px;
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}
.profile-actions a {
  font-family: var(--cond);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: .03em;
  color: var(--text);
  text-decoration: none;
}
.profile-actions a:hover { color: var(--accent-text); }
.profile-actions .accent { color: var(--accent-text); }

/* Tiêu đề mục CÁ NHÂN trong thẻ hồ sơ */
.profile-card__section {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}
.profile-section-title--card {
  letter-spacing: .04em;
}
.profile-card__section + .profile-rows { margin-top: 10px; }

.profile-edit-link {
  color: var(--accent-text);
  text-decoration: none;
  border-bottom: 1px solid currentColor;
  padding-bottom: 1px;
}
.profile-edit-link:hover { color: var(--text); }

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}
.stat-card {
  min-height: 122px;
  padding: 24px;
  background: var(--card);
  box-shadow: inset 0 0 0 1px var(--line);
}
.stat-card__label {
  font-family: var(--cond);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: .03em;
  color: var(--muted);
}
.stat-card__value {
  margin-top: 8px;
  font-family: var(--display);
  font-size: 40px;
  font-weight: 900;
  line-height: 1;
  color: var(--text);
}

.profile-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  margin-top: 40px;
}
.profile-section-title {
  font-family: var(--cond);
  font-size: 32px;
  font-weight: 600;
  line-height: 1.15;
  color: var(--text);
}

.character-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 16px;
}
.character-card {
  padding: 24px 24px 32px;
  background: var(--card);
  box-shadow: inset 0 0 0 1px var(--line);
}
.character-card__top { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.character-card__name {
  font-family: var(--cond);
  font-size: 24px;
  font-weight: 600;
  line-height: 1.2;
  color: var(--text);
}
.character-card__meta { margin-top: 6px; font-size: 18px; color: var(--text-2); }
.character-card__status {
  display: inline-flex;
  align-items: center;
  height: 28px;
  padding: 0 12px;
  background: var(--line);
  font-family: var(--cond);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: .02em;
  color: var(--text);
  white-space: nowrap;
}
.character-weapon {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 112px;
  margin-top: 24px;
  padding: 16px 24px;
  background-color: var(--card-alt);
  background-image: var(--cross);
  background-repeat: repeat;
  background-size: 640px auto;
  box-shadow: inset 0 0 0 1px var(--line);
  overflow: hidden;
}
.character-weapon span {
  font-family: var(--cond);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: .03em;
  color: var(--muted);
}
.character-weapon img { max-width: 206px; max-height: 72px; object-fit: contain; }
.character-card__foot {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-top: 28px;
}
.character-card__foot span {
  font-family: var(--cond);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: .03em;
  color: var(--muted);
}
.character-card__foot b { font-size: 18px; font-weight: 600; color: var(--text); }

.skill-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 16px;
  margin-top: 17px;
}
.skill-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  min-height: 156px;
  padding: 17px 10px;
  background: var(--card);
  box-shadow: inset 0 0 0 1px var(--line);
  text-align: center;
}
.skill-card img { width: 64px; height: 64px; object-fit: contain; }
.skill-card__name {
  font-family: var(--cond);
  font-size: 18px;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: .02em;
  color: var(--text);
}
.skill-card__state {
  font-family: var(--cond);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: .02em;
  color: var(--accent-text);
}
.skill-card.is-locked .skill-card__name { color: var(--text-2); }
.skill-card.is-locked .skill-card__state { color: var(--muted); }

/* =========================================================
   Auth (đăng nhập / đăng ký)
   ========================================================= */
.auth-page { display: flex; flex-direction: column; min-height: 100vh; }
.auth-header { background: var(--bg); }
.auth-header .masthead__inner { justify-content: space-between; }
.auth-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  font-family: var(--cond);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: .03em;
  color: var(--accent-text);
  text-decoration: none;
}
.auth-back:hover { color: var(--text); }
.auth-back::before { content: "←"; }

.auth-main {
  display: grid;
  grid-template-columns: 720px minmax(0, 1fr);
  flex: 1;
}
.auth-panel {
  display: flex;
  flex-direction: column;
  min-height: 795px;
  padding: 64px;
  background-color: var(--card);
  background-image: var(--cross);
  background-repeat: repeat;
  background-size: 640px auto;
  overflow: hidden;
}
.auth-panel__eyebrow { margin-top: 0; }
.auth-panel__title {
  max-width: 560px;
  margin-top: 28px;
  font-family: var(--display);
  font-size: 64px;
  font-weight: 900;
  line-height: 1.17;
  letter-spacing: .005em;
  color: var(--text);
}
.auth-panel__lead {
  max-width: 560px;
  margin-top: 40px;
  font-size: 20px;
  line-height: 1.6;
  color: var(--text-2);
}
.auth-kit {
  margin-top: auto;
  padding-top: 40px;
  border-top: 14px solid transparent;
  border-image: var(--ruler) 14 repeat;
}
.auth-kit ul {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-top: 0;
}
.auth-kit li { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.auth-kit img { width: 128px; height: 78px; object-fit: contain; }
.auth-kit span {
  font-family: var(--cond);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: .03em;
  color: var(--text-2);
}

.auth-form-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 80px 100px;
}
.auth-form-inner { width: 100%; max-width: 520px; }
.auth-mobile-intro { display: none; }
.auth-card {
  position: relative;
  width: 100%;
  max-width: 520px;
  padding: 40px;
  background: var(--card);
  box-shadow: inset 0 0 0 1px var(--line);
  overflow: hidden;
}
.auth-card::before {
  content: "";
  position: absolute;
  inset: 1px 1px auto;
  height: 14px;
  background: var(--ruler) repeat-x center / auto 14px;
}
.auth-card__title {
  margin-top: 14px;
  font-family: var(--cond);
  font-size: 44px;
  font-weight: 700;
  line-height: 1.14;
  color: var(--text);
}
.auth-form { margin-top: 26px; }
.auth-field + .auth-field { margin-top: 24px; }
.auth-field label {
  display: block;
  margin-bottom: 8px;
  font-family: var(--cond);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: .03em;
  color: var(--text-2);
}
.auth-field input {
  width: 100%;
  height: 52px;
  padding: 0 17px;
  border: 0;
  background: var(--bg-dark);
  box-shadow: inset 0 0 0 1px var(--line);
  font-family: var(--body);
  font-size: 18px;
  color: var(--text);
  outline: none;
  transition: box-shadow .16s ease;
}
.auth-field input::placeholder { color: var(--muted); }
.auth-field input:focus { box-shadow: inset 0 0 0 1px var(--accent); }
.auth-field__hint { margin-top: 8px; font-family: var(--cond); font-size: 16px; line-height: 1.25; color: var(--muted); }
.auth-field__hint--error { color: #e5705a; }
.auth-forgot {
  display: block;
  margin-top: 20px;
  font-family: var(--cond);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: .03em;
  color: var(--accent-text);
  text-align: right;
  text-decoration: none;
}
.auth-forgot:hover { color: var(--text); }
.auth-submit { width: 100%; height: 56px; margin-top: 32px; }
.auth-legal { margin-top: 16px; font-family: var(--cond); font-size: 16px; color: var(--muted); }
.auth-alt {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  font-size: 18px;
  color: var(--text-2);
}
.auth-alt a {
  font-family: var(--cond);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: .03em;
  color: var(--accent-text);
  text-decoration: none;
}
.auth-alt a:hover { color: var(--text); }

.alert {
  display: flex;
  gap: 10px;
  margin-top: 20px;
  padding: 12px 16px;
  border-left: 3px solid var(--accent);
  background: rgba(208, 96, 28, .1);
  font-size: 16px;
  line-height: 1.45;
  color: var(--text);
}
.alert--success { border-color: var(--green); background: rgba(157, 184, 106, .1); }
.alert--warning { border-color: #d9a441; background: rgba(217, 164, 65, .1); }

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 1300px) {
  .feature { grid-template-columns: 520px minmax(0, 1fr); }
  .feature__body { padding: 40px; }
  .feature__title { font-size: 40px; }
  .store-layout { grid-template-columns: 250px minmax(0, 1fr); gap: 40px; }
  .profile-layout { grid-template-columns: 340px minmax(0, 1fr); gap: 32px; }
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .auth-main { grid-template-columns: 560px minmax(0, 1fr); }
  .auth-panel { padding: 48px; }
  .auth-panel__title { font-size: 52px; }
  .auth-form-wrap { padding: 64px 48px; }
}

@media (max-width: 1199px) {
  .page-title { font-size: 56px; }
  .feature { grid-template-columns: minmax(0, 1fr); }
  .feature__media { min-height: 320px; margin: 1px 1px 0; }
  .feature__body { padding: 32px; }
  .feature__meta { margin-top: 24px; padding-top: 0; }
  .store-layout { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .cat-list { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 12px; }
  .cat-item { width: auto; height: 44px; gap: 12px; padding: 0 16px; }
  .item-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .detail { grid-template-columns: 320px minmax(0, 1fr); }
  .detail__body { padding: 32px; }
  .detail__title { font-size: 36px; }
  .rank-search { grid-template-columns: minmax(0, 1fr) auto; width: 100%; justify-content: stretch; }
  .profile-layout { grid-template-columns: minmax(0, 1fr); }
  .skill-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .auth-main { grid-template-columns: minmax(0, 1fr); }
  .auth-panel { display: none; }
  .auth-form-wrap { padding: 64px 40px 96px; }
  .auth-mobile-intro { display: block; margin-bottom: 32px; }
  .auth-mobile-intro .auth-panel__title { font-size: 48px; margin-top: 20px; }
  .auth-mobile-intro .auth-panel__lead { margin-top: 20px; }
}

@media (max-width: 768px) {
  .page-hero { min-height: 0; padding-block: 32px 32px; }
  .page-title { margin-top: 12px; font-size: clamp(40px, 13vw, 56px); }
  .page-lead { margin-top: 10px; font-size: 18px; }
  .page-body { padding-block: 32px 64px; }

  .filters { flex-direction: column; align-items: flex-start; gap: 12px; }
  .filters__pills { flex-wrap: nowrap; gap: 2px; width: 100%; overflow-x: auto; scrollbar-width: none; }
  .filters__pills::-webkit-scrollbar { display: none; }
  .pill { height: 46px; padding: 0 14px; font-size: 17px; }
  .filters__count { font-size: 16px; }

  .feature { margin-top: 24px; }
  .feature__media { min-height: 168px; padding: 24px; }
  .feature__media img { max-width: 260px; }
  .feature__caption { left: 16px; bottom: 16px; }
  .feature__body { padding: 24px 20px 28px; }
  .feature__title { margin-top: 10px; font-size: 32px; }
  .feature__text { margin-top: 14px; font-size: 18px; }
  .feature__meta { margin-top: 20px; font-size: 16px; }

  .post-list { margin-top: 20px; }
  .post-list a {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "tag date"
      "title title";
    row-gap: 10px;
    min-height: 0;
    padding: 14px 0;
    border-bottom: 1px solid var(--line);
  }
  .post-list .tag { grid-area: tag; margin-left: 0; }
  .post-list__title { grid-area: title; padding-right: 0; font-size: 22px; }
  .post-list__date { grid-area: date; font-size: 16px; }

  .pagination { margin-top: 32px; gap: 2px; }
  .pagination a, .pagination span { min-width: 39px; height: 44px; }

  .store-layout { gap: 28px; }
  .cat-title { margin-top: 0; }
  .item-grid { gap: 12px; margin-top: 24px; }
  .item-grid .item-card__media { height: auto; aspect-ratio: 169 / 112; }
  .item-card__media { aspect-ratio: 169 / 112; }
  .detail { grid-template-columns: minmax(0, 1fr); margin-top: 24px; }
  .detail__media { min-height: 220px; }
  .detail__body { padding: 24px 20px 28px; }
  .detail__title { font-size: 32px; }
  .spec-grid { gap: 24px; margin-top: 28px; }

  .toolbar { flex-wrap: wrap; gap: 12px; }
  .sort { flex-wrap: wrap; }

  .me-head { margin-top: 32px; }
  .rank-top { flex-direction: column; align-items: stretch; gap: 20px; }
  .tabs { margin-top: 0; }
  .tabs--rank {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .tabs--rank::-webkit-scrollbar { display: none; }
  .tabs--rank .pill { flex: 0 0 auto; }
  .rank-count { display: block; margin-top: 24px; font-family: var(--cond); font-size: 18px; font-weight: 600; color: var(--muted); }
  .rank-me {
    grid-template-columns: 48px 40px minmax(0, 1fr) 112px;
    padding-inline: 8px;
  }
  .rank-table { margin-top: 28px; }
  .rank-table__head,
  .rank-table__row { grid-template-columns: 48px 40px minmax(0, 1fr) 116px; padding-inline: 8px; }
  .rank-table__head { min-height: 34px; font-size: 14px; line-height: 1.15; }
  .rank-table__head .num { white-space: normal; }
  .rank-table__metric .rank-icon { display: none; }
  .rank-table__pos { font-size: 22px; gap: 4px; }
  .rank-table__medal svg { width: 16px; height: 16px; }
  .rank-table__avatar img { width: 30px; height: 30px; }
  .rank-table__who b { font-size: 16px; }
  .rank-table__who small { font-size: 14px; }
  .rank-table__val { font-size: 15px; }
  .rank-search { grid-template-columns: minmax(0, 1fr); }
  .rank-search .btn { width: 100%; }

  .profile-card { padding: 40px 20px 24px; }
  .profile-avatar,
  .profile-head > img { width: 80px; height: 80px; }
  .profile-name { font-size: 28px; }
  .stat-card { min-height: 110px; padding: 18px; }
  .stat-card__value { font-size: 32px; }
  .profile-section-head { margin-top: 32px; }
  .profile-section-title { font-size: 26px; }
  .character-grid { grid-template-columns: minmax(0, 1fr); gap: 12px; margin-top: 16px; }
  .character-card { padding: 20px; }
  .character-weapon { padding: 12px 16px; min-height: 100px; }
  .skill-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 16px; }
  .skill-card { min-height: 144px; padding: 14px 6px 12px; }
  .skill-card img { width: 56px; height: 56px; }
  .skill-card__name { font-size: 16px; }
  .skill-card__state { font-size: 14px; }

  .auth-panel { display: none; }
  .auth-form-wrap { padding: 24px 20px 56px; align-items: flex-start; }
  .auth-mobile-intro { margin-bottom: 24px; }
  .auth-mobile-intro .auth-panel__title { font-size: 40px; margin-top: 16px; }
  .auth-mobile-intro .auth-panel__lead { margin-top: 16px; font-size: 18px; }
  .auth-card { padding: 28px 20px; }
  .auth-card__title { font-size: 32px; }
  .auth-header .masthead__inner { height: 72px; }
  .auth-back { font-size: 14px; }
  .auth-kit { display: none; }
}

@media (max-width: 480px) {
  .stat-grid { gap: 12px; }
  .profile-row { grid-template-columns: 110px minmax(0, 1fr); }
}

/* =========================================================
   Dữ liệu thật (site-data.js)
   ========================================================= */
.empty-note {
  margin: 0;
  padding: 20px 0;
  font-family: var(--cond);
  font-size: 18px;
  letter-spacing: .02em;
  color: var(--muted);
  list-style: none;
}
.item-grid .empty-note { grid-column: 1 / -1; }

.feature[hidden],
.article-view[hidden],
.filters[hidden],
.news-feed[hidden],
.detail[hidden],
[data-rank-me-wrap][hidden] { display: none; }

.feature--no-media { grid-template-columns: minmax(0, 1fr); }
.feature--no-media .feature__body { padding: 48px; }

.profile-section-note {
  font-family: var(--cond);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: .03em;
  color: var(--muted);
}
.profile-online.is-off { color: var(--muted); }
.profile-online.is-off .dot { background: var(--muted); }

.character-weapon > div { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.character-weapon b,
.character-weapon__value {
  font-family: var(--semi);
  font-size: 24px;
  font-weight: 600;
  line-height: 1.15;
  color: var(--text);
}

.item-card.is-selected { box-shadow: inset 0 0 0 1px var(--accent); }

/* ---------- Bài viết mở tại chỗ ---------- */
.article-view {
  margin-top: 32px;
  padding: 40px 48px 48px;
  background: var(--card);
  box-shadow: inset 0 0 0 1px var(--line);
}
.article-view__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
}
.article-view__title {
  margin-top: 10px;
  font-family: var(--cond);
  font-size: 40px;
  font-weight: 700;
  line-height: 1.14;
  color: var(--text);
}
.article-view__body {
  margin-top: 24px;
  font-size: 18px;
  line-height: 1.65;
  color: var(--text-2);
  overflow-wrap: break-word;
}
.article-view__body img { max-width: 100%; height: auto; }
.article-view__body h1,
.article-view__body h2,
.article-view__body h3 {
  margin: 28px 0 10px;
  font-family: var(--cond);
  font-weight: 700;
  line-height: 1.2;
  color: var(--text);
}
.article-view__body h1 { font-size: 32px; }
.article-view__body h2 { font-size: 28px; }
.article-view__body h3 { font-size: 24px; }
.article-view__body p { margin-top: 12px; }
.article-view__body a { color: var(--accent-text); }
.article-view__body strong, .article-view__body b { color: var(--text); }

@media (max-width: 900px) {
  .article-view { padding: 24px 20px 32px; }
  .article-view__title { font-size: 30px; }
  .article-view__head { flex-direction: column; }
  .feature--no-media .feature__body { padding: 28px 20px; }
}