.cabinet {
  grid-template-columns: 288px minmax(0, 1fr);
}

.cabinet > .main {
  width: 100%;
  margin-inline: auto;
}

.gpt-panel .panel__head {
  flex-wrap: wrap;
}

.gpt-panel .panel__head > div:first-child {
  flex: 1 1 200px;
  min-width: 0;
}

.gpt-panel .select,
.gpt-panel select {
  max-width: 100%;
}

.gptbar,
.chat__input {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: stretch;
}

.gptbar > .input,
.chat__input > .input {
  min-width: 0;
  width: 100%;
}

.tg-bind-banner {
  position: relative;
  align-self: flex-end;
  width: min(100%, 340px);
  flex: none;
}

.tg-bind-banner .tgcta {
  position: static;
  z-index: auto;
  width: 100%;
  max-width: none;
  min-height: 76px;
  padding-right: 48px;
  animation: none;
  transform: none;
}

.tg-bind-close {
  position: absolute;
  top: 4px;
  right: 4px;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  color: #f5c518;
  background: transparent;
  border: 0;
  border-radius: 10px;
  cursor: pointer;
}

.tg-bind-close svg {
  width: 22px;
  height: 22px;
}

.tg-bind-close:hover {
  background: #2a181026;
}

.tg-bind-close:focus-visible {
  outline: 2px solid #f5c518;
  outline-offset: -4px;
}

@media (max-width: 860px) {
  .cabinet {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 560px) {
  .cabinet .panel {
    padding: 16px;
  }

  .gptbar,
  .chat__input {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .gptbar > .btn--primary,
  .chat__input > .btn--primary {
    grid-column: 1 / -1;
    width: 100%;
  }

  .gptbar > .input,
  .chat__input > .input,
  .gpt-panel select {
    font-size: 16px;
  }

  .gpt-panel .select,
  .gpt-panel select,
  .tg-bind-banner {
    width: 100%;
  }

  .gptchat {
    padding: 12px;
  }
}
