.af-cs-page {
  max-width: 1120px;
  margin: 24px auto;
  padding: 0 16px 32px;
}

.af-cs-hero {
  display: grid;
  grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
  gap: 20px;
  align-items: stretch;
  margin-bottom: 24px;
}

.af-cs-portrait {
  border-radius: 16px;
  overflow: hidden;
  background: #1c1c1c;
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 320px;
}

.af-cs-portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.af-cs-summary {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.af-cs-summary__head h1 {
  margin: 0 0 6px 0;
  font-size: 28px;
  color: #efefef;
}

.af-cs-summary__title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: nowrap;
  position: relative;
  z-index: 2;
}

.af-cs-summary__title-row h1 {
  margin: 0;
  flex: 1 1 auto;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.af-cs-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  position: relative;
  z-index: 2;
  pointer-events: auto;
}

.af-cs-header-actions .af-cs-btn {
  pointer-events: auto;
}

.af-cs-name-ru {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  font-size: 14px;
  color: #efefef;
}

.af-cs-name-ru__main {
  font-weight: 700;
}

.af-cs-name-ru__nick {
  opacity: 0.6;
}

.af-cs-summary__info {color: #efefef;}

.af-cs-level {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 12px;
  background:rgb(38, 38, 38);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #efefef;
}

.af-cs-level__value {
  font-size: 22px;
  font-weight: 700;
}

.af-cs-level__bar {
  position: relative;
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  overflow: hidden;
}

.af-cs-level__bar span {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, #5cc3ff, #7bffb8);
}

.af-cs-level__label {
  grid-column: 1 / -1;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  opacity: 0.6;
}

.af-cs-button-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.af-cs-btn--compact {
  padding: 6px 10px;
  font-size: 12px;
}

.af-cs-btn--icon {
  width: 30px;
  height: 30px;
  padding: 0;
  line-height: 1;
  font-size: 14px;
  font-weight: 700;
}

.af-cs-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: inherit;
  text-decoration: none;
  font-size: 14px;
  letter-spacing: 0.02em;
  cursor: pointer;
}

.af-cs-btn[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
}

.af-cs-btn--ghost {
  background: transparent;
}

.af-cs-info-table {
  display: grid;
  gap: 10px;
  padding: 14px;
  border-radius: 12px;
  background: rgb(38, 38, 38);;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.af-cs-info-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.08);
  padding-bottom: 6px;
}

.af-cs-info-row:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.af-cs-info-label {
  opacity: 0.7;
}

.af-cs-info-value {
  font-weight: 600;
  text-align: right;
}

.af-cs-section {
  margin-bottom: 20px;
  padding: 16px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgb(38, 38, 38);
  color: #efefef;
}

.af-cs-section h2 {
  margin-top: 0;
  font-size: 18px;
}

.af-cs-muted {
  opacity: 0.7;
}

.af-cs-attrs {
  display: grid;
  gap: 16px;
}

.af-cs-attr-pool {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 13px;
}

.af-cs-attr-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.af-cs-attr-card {
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.12);
  display: grid;
  gap: 10px;
}

.af-cs-attr-card__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.af-cs-attr-card__meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  font-size: 12px;
}

.af-cs-attr-card__stat {
  display: grid;
  gap: 4px;
}

.af-cs-attr-card__stat span {
  opacity: 0.6;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 10px;
}

.af-cs-attr-input {
  width: 100%;
  padding: 6px 8px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.08);
  color: #efefef;
}

.af-cs-attr-final {
  font-weight: 700;
}

.af-cs-attr-readonly {
  opacity: 0.8;
}

.af-cs-attr-label {
  font-weight: 600;
}

.af-cs-attr-actions {
  display: flex;
  justify-content: flex-start;
}

.af-cs-warning {
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(255, 80, 80, 0.15);
  border: 1px solid rgba(255, 80, 80, 0.35);
  font-size: 12px;
}

.af-cs-choices {
  display: grid;
  gap: 8px;
}

.af-cs-choice-row {
  display: grid;
  grid-template-columns: minmax(140px, 1fr) 1fr auto;
  gap: 8px;
  align-items: center;
}

.af-cs-choice-row select {
  width: 100%;
  padding: 6px 8px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.08);
  color: #efefef;
}

.af-cs-progress {
  display: grid;
  gap: 12px;
}

.af-cs-progress__summary {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 14px;
}

.af-cs-progress__points {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  font-size: 13px;
  opacity: 0.85;
}

.af-cs-progress__bar {
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  overflow: hidden;
}

.af-cs-progress__bar span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #5cc3ff, #7bffb8);
}

.af-cs-ledger {
  display: grid;
  gap: 6px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.af-cs-progress__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.af-cs-award-panel {
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.af-cs-ledger-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 12px;
  font-size: 12px;
  opacity: 0.9;
}

.af-cs-ledger-amount {
  font-weight: 600;
}

.af-cs-ledger-date {
  opacity: 0.6;
}

.af-cs-award {
  display: grid;
  grid-template-columns: minmax(120px, 180px) minmax(160px, 1fr) auto;
  gap: 8px;
}

.af-cs-award input {
  padding: 6px 8px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.08);
  color: #efefef;
}

.af-cs-skills,
.af-cs-feats {
  display: grid;
  gap: 12px;
}

.af-cs-abilities {
  display: grid;
  gap: 12px;
}

.af-cs-skill-item,
.af-cs-feat-item {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 8px 12px;
  padding: 12px 14px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.af-cs-skills {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.af-cs-skill-name span {
  opacity: 0.6;
  font-size: 12px;
}

.af-cs-skill-value {
  font-weight: 700;
}

.af-cs-feat-title {
  font-weight: 600;
}

.af-cs-feat-meta {
  opacity: 0.7;
  font-size: 12px;
}

.af-cs-ability-card {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.af-cs-ability-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.15);
  overflow: hidden;
}

.af-cs-ability-icon img,
.af-cs-ability-icon .af-kb-icon-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.af-cs-ability-icon i {
  font-size: 20px;
}

.af-cs-kb-icon-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.af-cs-kb-icon-placeholder {
  font-weight: 700;
  opacity: 0.7;
}

.af-cs-ability-title {
  font-weight: 600;
}

.af-cs-ability-desc,
.af-cs-inventory-desc {
  opacity: 0.7;
  font-size: 12px;
  margin-top: 4px;
}

.af-cs-ability-actions {
  margin-top: 8px;
}

.af-cs-ability-bonus,
.af-cs-inventory-bonus {
  margin-top: 6px;
  font-size: 12px;
  opacity: 0.85;
}

.af-cs-modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.af-cs-modal.is-open {
  display: flex;
}

.af-cs-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
}

.af-cs-modal__dialog {
  position: relative;
  background: #111;
  border-radius: 14px;
  width: min(1100px, 90vw);
  height: min(720px, 85vh);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 1;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.af-cs-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.af-cs-modal__title {
  font-weight: 600;
}

.af-cs-modal__close {
  background: transparent;
  border: 0;
  color: inherit;
  font-size: 20px;
  cursor: pointer;
}

.af-cs-modal__body {
  flex: 1;
}

.af-cs-modal__frame {
  width: 100%;
  height: 100%;
  border: 0;
  background: #0c0c0c;
}

.af-cs-plaque {
  display: block;
  margin-top: 6px;
  position: relative;
  z-index: 1;
}

.af-cs-plaque__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(50, 120, 255, 0.2);
  border: 1px solid rgba(130, 190, 255, 0.5);
  color: #f4f8ff;
  text-decoration: none;
  font-size: 12px;
  letter-spacing: 0.02em;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.af-cs-plaque__btn:hover,
.af-cs-plaque__btn:focus {
  background: rgba(80, 150, 255, 0.35);
  border-color: rgba(170, 220, 255, 0.8);
  color: #ffffff;
}

.af-cs-chip {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  font-size: 12px;
  margin-left: 6px;
}

.af-cs-bonus-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.af-cs-bonus-card {
  padding: 12px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: grid;
  gap: 6px;
}

.af-cs-bonus-title {
  font-weight: 700;
}

.af-cs-mechanics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.af-cs-mech-card {
  padding: 12px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: grid;
  gap: 8px;
}

.af-cs-mech-title {
  font-weight: 700;
}

.af-cs-mech-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
}

.af-cs-mech-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.1);
  margin: 4px 0;
}

.af-cs-mech-total {
  font-weight: 700;
}

.af-cs-tabs__nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}

.af-cs-tabs__nav button {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: inherit;
  padding: 6px 12px;
  border-radius: 999px;
  cursor: pointer;
}

.af-cs-tabs__nav button.is-active {
  background: rgba(92, 195, 255, 0.2);
  border-color: rgba(92, 195, 255, 0.6);
}

.af-cs-tab {
  display: none;
}

.af-cs-tab.is-active {
  display: block;
}

.af-cs-inventory-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
}

.af-cs-inventory-card {
  padding: 12px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 8px;
}

.af-cs-inventory-title {
  font-weight: 700;
}

.af-cs-inventory-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
}

.af-cs-augmentations {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 260px);
  gap: 16px;
}

.af-cs-augmentations-list {
  display: grid;
  gap: 10px;
}

.af-cs-augmentation-item {
  padding: 12px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.af-cs-augmentation-title {
  font-weight: 600;
}

.af-cs-augmentation-meta {
  opacity: 0.7;
  font-size: 12px;
}

.af-cs-augmentation-empty {
  opacity: 0.7;
  font-size: 13px;
}

.af-cs-augmentation-controls {
  display: grid;
  gap: 12px;
  padding: 12px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.af-cs-augmentation-controls select {
  width: 100%;
  padding: 6px 8px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(0, 0, 0, 0.2);
  color: inherit;
}

.af-cs-augmentation-slot label {
  font-size: 12px;
  opacity: 0.7;
  display: block;
  margin-bottom: 4px;
}

.af-cs-augmentation-slot select {
  width: 100%;
  padding: 6px 8px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(0, 0, 0, 0.2);
  color: inherit;
}

.af-cs-augmentation-humanity {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.af-cs-catalog-header {
  display: grid;
  gap: 12px;
  margin-bottom: 16px;
}

.af-cs-catalog-controls {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) repeat(3, minmax(140px, 180px));
  gap: 12px;
}

.af-cs-input,
.af-cs-select {
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(0, 0, 0, 0.2);
  color: inherit;
}

.af-cs-catalog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.af-cs-catalog-card {
  display: grid;
  grid-template-rows: auto 1fr;
  text-decoration: none;
  color: inherit;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.12);
}

.af-cs-catalog-portrait {
  height: 200px;
  overflow: hidden;
  background: #1c1c1c;
}

.af-cs-catalog-portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.af-cs-catalog-body {
  padding: 12px;
  display: grid;
  gap: 6px;
}

.af-cs-catalog-name {
  font-weight: 700;
}

.af-cs-catalog-sub {
  font-size: 12px;
  opacity: 0.7;
}

.af-cs-catalog-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

@media (max-width: 860px) {
  .af-cs-hero {
    grid-template-columns: 1fr;
  }

  .af-cs-portrait {
    min-height: 260px;
  }

  .af-cs-catalog-controls {
    grid-template-columns: 1fr;
  }

  .af-cs-augmentations {
    grid-template-columns: 1fr;
  }

  .af-cs-skills {
    grid-template-columns: 1fr;
  }
}

/* ===== Attributes: compact view + gear toggle ===== */

.af-cs-attrs__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.af-cs-attrs__title {
  font-size: 18px;
  font-weight: 700;
}

.af-cs-attrs__gear {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: inherit;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.af-cs-attrs__gear:hover {
  background: rgba(92, 195, 255, 0.18);
  border-color: rgba(92, 195, 255, 0.55);
}

.af-cs-attrs__gear.is-active {
  background: rgba(92, 195, 255, 0.22);
  border-color: rgba(92, 195, 255, 0.7);
  transform: rotate(20deg);
}

.af-cs-attr-compact {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
}

.af-cs-attr-compact__cell {
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.12);
  display: grid;
  gap: 6px;
  text-align: center;
}

.af-cs-attr-compact__label {
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0.65;
  white-space: nowrap;
}

.af-cs-attr-compact__value {
  font-size: 22px;
  font-weight: 800;
  line-height: 1;
}

/* По умолчанию показываем компакт, редактирование скрыто */
.af-cs-attrs:not(.is-editing) [data-afcs-attr-edit] { display: none; }
.af-cs-attrs.is-editing [data-afcs-attr-compact] { display: none; }

/* если нет прав — шестеренка скрыта всегда */
.af-cs-attrs[data-afcs-can-edit="0"] .af-cs-attrs__gear { display: none; }

@media (max-width: 860px) {
  .af-cs-attr-compact {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}


/* ===== FIX: progress in hero should be full width ===== */
.af-cs-level {
  /* раньше было grid-template-columns: auto 1fr; */
  grid-template-columns: 1fr;
}

.af-cs-level > [data-afcs-block="progress"] {
  grid-column: 1 / -1;
  width: 100%;
  min-width: 0;
}

.af-cs-progress__bar {
  width: 100%;
}


/* ===== FIX: hidden must really hide ===== */
.af-cs-ledger[hidden],
.af-cs-award-panel[hidden] {
  display: none !important;
}

/* ===== Ledger spoiler box ===== */
.af-cs-ledger {
  max-height: 100px;
  overflow: auto;
}

/* ===== Skills ===== */
.af-cs-skill-pool {
  margin-bottom: 14px;
  display: flex;
  flex-wrap: nowrap;
  gap: 18px;
  align-items: center;
  font-size: 13px;
  opacity: 0.85;
}

.af-cs-skill-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.12);
  margin-bottom: 10px;
}

.af-cs-skill-left {
  min-width: 0;
}

.af-cs-skill-name {
  font-weight: 700;
}

.af-cs-skill-name span {
  display: block;
  font-size: 12px;
  opacity: 0.7;
  font-weight: 500;
}

.af-cs-skill-right {
  display: grid;
  justify-items: end;
  gap: 6px;
}

.af-cs-skill-controls {
  display: none;
  align-items: center;
  gap: 6px;
}

.af-cs-skill-item.is-controls-open .af-cs-skill-controls {
  display: inline-flex;
}

.af-cs-skill-gear {
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(0, 0, 0, 0.35);
  color: #fff;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  cursor: pointer;
}

.af-cs-skill-total {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.af-cs-skill-btn {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(0, 0, 0, 0.35);
  color: #fff;
  cursor: pointer;
}

.af-cs-skill-invested {
  min-width: 20px;
  text-align: center;
}

@media (max-width: 680px) {
  .af-cs-skill-pool {
    flex-wrap: wrap;
  }
}

/* ===== Knowledge ===== */
.af-cs-knowledge {
  display: grid;
  gap: 20px;
}

.af-cs-knowledge-section {
  padding: 14px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.af-cs-knowledge-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.af-cs-knowledge-form {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}

.af-cs-knowledge-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.af-cs-knowledge-chip {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas:
    "title action"
    "desc action";
  gap: 4px 8px;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  font-size: 12px;
  min-width: 180px;
}

.af-cs-knowledge-title {
  grid-area: title;
  font-weight: 600;
}

.af-cs-knowledge-desc {
  grid-area: desc;
  font-size: 11px;
  opacity: 0.75;
}

.af-cs-knowledge-badge {
  grid-area: action;
  font-style: normal;
  font-size: 10px;
  opacity: 0.7;
}

.af-cs-knowledge-chip button {
  grid-area: action;
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
}

/* ===== Inventory / Augments ===== */
.af-cs-inventory,
.af-cs-augmentations {
  display: grid;
  gap: 20px;
}

.af-cs-inventory-equip,
.af-cs-inventory-section,
.af-cs-augmentations-column {
  padding: 14px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.af-cs-panel-title {
  font-weight: 700;
  margin-bottom: 10px;
}

.af-cs-slot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 12px;
}

.af-cs-slot {
  padding: 10px;
  border-radius: 12px;
  border: 1px solid rgba(92, 195, 255, 0.25);
  background: linear-gradient(180deg, rgba(16, 25, 35, 0.9), rgba(5, 10, 16, 0.8));
  text-align: left;
  font-size: 12px;
  color: #dce7f3;
  display: grid;
  gap: 8px;
}

.af-cs-slot-header {
  display: flex;
  align-items: center;
  gap: 8px;
}

.af-cs-slot-icon {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: rgba(92, 195, 255, 0.15);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.af-cs-slot-icon--empty {
  background: rgba(92, 195, 255, 0.08);
  border: 1px dashed rgba(92, 195, 255, 0.35);
}

.af-cs-slot-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
}

.af-cs-slot-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  opacity: 0.75;
}

.af-cs-slot-title {
  font-weight: 600;
}

.af-cs-slot-actions {
  margin-top: 4px;
}

.af-cs-augmentations-ui {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(260px, 1fr);
  gap: 20px;
}

.af-cs-augmentations-list {
  display: grid;
  gap: 12px;
}

.af-cs-augment-card {
  display: grid;
  grid-template-columns: 54px 1fr;
  gap: 12px;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid rgba(92, 195, 255, 0.2);
  background: rgba(6, 12, 18, 0.75);
}

.af-cs-augment-card__icon {
  width: 54px;
  height: 54px;
  border-radius: 10px;
  background: rgba(92, 195, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
}

.af-cs-augment-card__icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 10px;
}

.af-cs-augment-card__title {
  font-weight: 700;
}

.af-cs-augment-card__desc {
  font-size: 12px;
  opacity: 0.75;
}

.af-cs-augment-card__effects {
  font-size: 12px;
  margin-top: 6px;
}

.af-cs-augment-card__actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.af-cs-augment-card__actions select {
  min-width: 140px;
  padding: 6px 8px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(0, 0, 0, 0.25);
  color: inherit;
}

.af-cs-inventory-ui {
  display: grid;
  gap: 16px;
}

.af-cs-inventory-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.af-cs-tab-btn {
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid rgba(92, 195, 255, 0.3);
  background: rgba(4, 10, 16, 0.6);
  color: inherit;
  cursor: pointer;
}

.af-cs-tab-btn.is-active {
  border-color: rgba(92, 195, 255, 0.7);
  background: rgba(92, 195, 255, 0.2);
}

.af-cs-inventory-panels {
  display: grid;
  gap: 16px;
}

.af-cs-inventory-panel {
  display: none;
  grid-template-columns: minmax(0, 2fr) minmax(220px, 1fr);
  gap: 16px;
}

.af-cs-inventory-panel.is-active {
  display: grid;
}

.af-cs-inventory-panel .af-cs-inventory-grid {
  grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
  gap: 10px;
}

.af-cs-inventory-info {
  padding: 14px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.12);
  display: grid;
  gap: 8px;
  min-height: 120px;
}

.af-cs-slot--item {
  position: relative;
  padding: 10px;
  background: rgba(6, 12, 18, 0.85);
  border: 1px solid rgba(92, 195, 255, 0.25);
  cursor: pointer;
}

.af-cs-slot--item:hover {
  border-color: rgba(92, 195, 255, 0.6);
}

.af-cs-slot--item.is-active {
  border-color: rgba(92, 195, 255, 0.8);
  box-shadow: 0 0 0 1px rgba(92, 195, 255, 0.4);
}

.af-cs-slot-qty {
  position: absolute;
  top: 6px;
  right: 6px;
  background: rgba(0, 0, 0, 0.7);
  border: 1px solid rgba(92, 195, 255, 0.5);
  border-radius: 8px;
  padding: 2px 6px;
  font-size: 11px;
  font-weight: 700;
}

.af-cs-slot-name {
  position: absolute;
  left: 6px;
  right: 6px;
  bottom: 6px;
  font-size: 10px;
  padding: 2px 4px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.7);
  border: 1px solid rgba(92, 195, 255, 0.4);
  text-align: center;
  opacity: 0;
  transition: opacity 0.15s ease;
  pointer-events: none;
}

.af-cs-slot--item:hover .af-cs-slot-name {
  opacity: 1;
}

.af-cs-slot-icon i {
  font-size: 20px;
}

.af-cs-slot-items {
  display: grid;
  gap: 10px;
}

.af-cs-slot-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 8px;
  align-items: center;
  padding: 8px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.af-cs-slot-item__body {
  display: grid;
  gap: 4px;
}

.af-cs-slot-humanity {
  font-size: 12px;
  opacity: 0.75;
}

.af-cs-augment-card__humanity {
  font-size: 12px;
  margin-top: 6px;
  opacity: 0.85;
}

.af-cs-augmentation-humanity-block {
  display: grid;
  gap: 8px;
  padding: 12px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: 12px;
}

.af-cs-inventory-sections {
  display: grid;
  gap: 16px;
}

.af-cs-inventory-section--wide {
  grid-column: 1 / -1;
}

.af-cs-augmentations {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

/* ===== Attributes stepper (+ 0 -) ===== */

.af-cs-attr-stepper {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-direction: row; /* на всякий */
  gap: 6px;

  padding: 4px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.af-cs-attr-stepper__btn {
  width: 28px;
  height: 28px;
  border-radius: 8px;

  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(0, 0, 0, 0.35);
  color: #fff;

  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;

  line-height: 1;
  font-size: 16px;
  font-weight: 700;

  user-select: none;
}

.af-cs-attr-stepper__btn:hover {
  background: rgba(92, 195, 255, 0.18);
  border-color: rgba(92, 195, 255, 0.55);
}

.af-cs-attr-stepper__btn:active {
  transform: translateY(1px);
}

.af-cs-attr-stepper__btn[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

.af-cs-attr-stepper__value {
  min-width: 22px;
  text-align: center;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.02em;
  color: #efefef;
}

/* Чтобы степпер нормально вставал в шапку/мету карточки и не растягивал сетку */
.af-cs-attr-card__head .af-cs-attr-stepper {
  justify-self: end;
}

/* На мобилках можно чуть ужать */
@media (max-width: 680px) {
  .af-cs-attr-stepper__btn {
    width: 26px;
    height: 26px;
    border-radius: 8px;
    font-size: 15px;
  }
}

/* Hide only Base/Bonus cells inside the 3-col meta grid */
.af-cs-attr-card__meta > .af-cs-attr-card__stat:nth-child(1),
.af-cs-attr-card__meta > .af-cs-attr-card__stat:nth-child(2) {
  display: none !important;
}

/* Make the remaining "total" cell stretch nicely */
.af-cs-attr-card__meta {
  grid-template-columns: 1fr !important;
}

.af-cs-skill-item.is-disabled {
  opacity: 0.55;
}

.af-cs-skill-category {
  margin: 10px 0;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .08em;
  opacity: .7;
}

.af-cs-skill-meta {
  display: flex;
  gap: 8px;
  margin-top: 6px;
}

.af-cs-rank-chip {
  display: inline-block;
  font-size: 11px;
  border-radius: 999px;
  padding: 3px 8px;
  background: rgba(98, 219, 176, 0.22);
  border: 1px solid rgba(98, 219, 176, 0.4);
}

.af-cs-rank-chip.is-muted {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
}

.af-cs-rank-chip.is-source {
  background: rgba(124, 161, 255, 0.2);
  border-color: rgba(124, 161, 255, 0.35);
}

.af-cs-skill-select-wrap {
  font-size: 12px;
  opacity: .9;
}

.af-cs-skill-select-wrap select {
  margin-left: 6px;
}

.af-cs-skill-controls-inline {
  display: flex;
  gap: 6px;
}