.hc-lb-shell {
  max-width: 1080px;
  margin: 0 auto;
  padding: 28px 24px 40px;
}

.hc-lb-hero {
  position: relative;
  background: #fff;
  border: 1px solid #ddd8d2;
  border-radius: 12px;
  padding: 22px 24px;
}

.hc-lb-settings {
  position: absolute;
  top: 18px;
  left: 18px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  background: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #97918a;
  text-decoration: none;
  cursor: pointer;
  z-index: 3;
}

.hc-lb-settings svg {
  width: 18px;
  height: 18px;
  display: block;
}

.hc-lb-hero-grid {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: 44px;
  align-items: center;
}

.hc-lb-member-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.hc-lb-avatar-wrap {
  position: relative;
  width: 182px;
  height: 182px;
  margin-bottom: 14px;
}

.hc-lb-avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  border: 4px solid #fff;
  box-shadow: 0 0 0 2px #d8d7d6, 0 0 0 6px #f3f2f1;
  display: block;
}

.hc-lb-avatar-badge {
  position: absolute;
  right: -6px;
  bottom: 14px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #4e61c8;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 700;
  box-shadow: 0 0 0 4px #fff;
}

.hc-lb-member-name {
  color: #131313;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.25;
}

.hc-lb-member-level {
  margin-top: 10px;
  color: #4960c4;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.3;
}

.hc-lb-member-progress {
  margin-top: 6px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #6f6a64;
  font-size: 13px;
  line-height: 1.35;
}

.hc-lb-help-button {
  width: 18px;
  height: 18px;
  border: 1px solid #bcb8b2;
  border-radius: 50%;
  background: #fff;
  color: #76716c;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

.hc-lb-member-empty {
  color: #8b847b;
  font-size: 14px;
}

.hc-lb-level-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 34px;
  row-gap: 18px;
}

.hc-lb-level-item {
  display: flex;
  align-items: center;
  gap: 12px;
}

.hc-lb-level-badge {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #ece9e5;
  color: #6f6a64;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.hc-lb-level-item.is-active .hc-lb-level-badge {
  background: #ffdf93;
  color: #1a1a1a;
}

.hc-lb-level-badge span {
  font-size: 16px;
  font-weight: 700;
  line-height: 1;
}

.hc-lb-level-badge svg {
  width: 15px;
  height: 15px;
}

.hc-lb-level-title {
  color: #111;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.2;
}

.hc-lb-level-meta {
  margin-top: 3px;
  color: #9a938a;
  font-size: 13px;
  line-height: 1.2;
}

.hc-lb-note {
  margin: 18px 0 16px;
  color: #b19161;
  font-size: 14px;
  font-style: italic;
}

.hc-lb-boards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.hc-lb-board-card {
  background: #fff;
  border: 1px solid #ddd8d2;
  border-radius: 12px;
  padding: 16px 14px 14px;
  min-height: 160px;
}

.hc-lb-board-card h2 {
  margin: 0;
  padding: 0 0 14px;
  border-bottom: 1px solid #ece7e1;
  color: #111;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.25;
}

.hc-lb-board-body {
  padding-top: 12px;
}

.hc-lb-empty {
  color: #928b83;
  font-size: 15px;
  line-height: 1.5;
  padding-top: 2px;
}

.hc-lb-rank-row {
  display: grid;
  grid-template-columns: 28px 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  color: #131313;
  text-decoration: none;
}

.hc-lb-rank-row + .hc-lb-rank-row {
  border-top: 1px solid #f1eeeb;
}

.hc-lb-rank-pill {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #f4f1ed;
  color: #6e685f;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
}

.hc-lb-rank-avatar {
  width: 34px;
  height: 34px;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}

.hc-lb-rank-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
  font-weight: 600;
}

.hc-lb-rank-score {
  color: #7d756c;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

.hc-lb-modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(25, 22, 18, 0.56);
  z-index: 1300;
}

.hc-lb-modal.is-open {
  display: flex;
}

.hc-lb-modal-dialog {
  position: relative;
  width: min(100%, 520px);
  background: #fff;
  border-radius: 12px;
  padding: 26px 28px 24px;
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.22);
}

.hc-lb-modal-close {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  color: #726c64;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
}

.hc-lb-modal-dialog h3 {
  margin: 0 0 18px;
  color: #262626;
  font-size: 19px;
  font-weight: 700;
}

.hc-lb-modal-section + .hc-lb-modal-section {
  margin-top: 18px;
}

.hc-lb-modal-section strong {
  display: block;
  margin-bottom: 6px;
  color: #222;
  font-size: 15px;
  font-weight: 700;
}

.hc-lb-modal-section p {
  margin: 0;
  color: #3f3a35;
  font-size: 15px;
  line-height: 1.65;
}

.hc-lb-level-list {
  margin-top: 20px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 20px;
  color: #2f2a26;
  font-size: 15px;
  line-height: 1.4;
}

.hc-lb-settings-dialog {
  width: min(100%, 460px);
}

.hc-lb-settings-copy {
  margin: -4px 0 18px;
  color: #47413c;
  font-size: 15px;
  line-height: 1.5;
}

.hc-lb-settings-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.hc-lb-settings-field input {
  width: 100%;
  height: 42px;
  border: 1px solid #ddd8d2;
  border-radius: 4px;
  padding: 0 12px;
  color: #1d1d1d;
  font-size: 15px;
  outline: none;
}

.hc-lb-settings-field input:focus {
  border-color: #d2a94c;
  box-shadow: 0 0 0 3px rgba(210, 169, 76, 0.12);
}

.hc-lb-settings-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 16px;
}

.hc-lb-btn {
  min-width: 84px;
  height: 40px;
  border-radius: 4px;
  border: none;
  padding: 0 18px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.hc-lb-btn-muted {
  background: transparent;
  color: #8d8780;
}

.hc-lb-btn-primary {
  background: #e5e2de;
  color: #7c7770;
}

.hc-lb-btn-primary.is-saving {
  opacity: 0.75;
  cursor: wait;
}

@media (max-width: 991px) {
  .hc-lb-shell {
    padding: 20px 16px 32px;
  }

  .hc-lb-hero-grid {
    grid-template-columns: 1fr;
    gap: 26px;
  }

  .hc-lb-level-grid,
  .hc-lb-boards {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .hc-lb-hero {
    padding: 18px 16px;
  }

  .hc-lb-settings {
    top: 14px;
    left: 14px;
  }

  .hc-lb-avatar-wrap {
    width: 154px;
    height: 154px;
    margin-bottom: 12px;
  }

  .hc-lb-avatar-badge {
    width: 38px;
    height: 38px;
    right: -4px;
    bottom: 10px;
    font-size: 17px;
  }

  .hc-lb-level-grid {
    gap: 14px;
  }

  .hc-lb-level-item {
    gap: 10px;
  }

  .hc-lb-level-title {
    font-size: 14px;
  }

  .hc-lb-level-meta,
  .hc-lb-member-progress,
  .hc-lb-note {
    font-size: 12px;
  }

  .hc-lb-rank-row {
    grid-template-columns: 24px 32px minmax(0, 1fr);
    gap: 8px;
  }

  .hc-lb-rank-score {
    grid-column: 2 / span 2;
    padding-left: 40px;
    margin-top: -4px;
  }

  .hc-lb-level-list {
    grid-template-columns: 1fr;
    gap: 6px;
    font-size: 14px;
  }

  .hc-lb-modal-dialog {
    padding: 24px 18px 20px;
  }

  .hc-lb-settings-actions {
    justify-content: space-between;
  }
}
