/* Entity settings modal — group chat (#groupChatSettingsModal) and channel (#channelSettingsV2Modal) */

:is(#groupChatSettingsModal, #channelSettingsV2Modal, #channelProfileModal, #groupChatProfileModal, #avatarCropModal).gcs-modal-backdrop {
  background: rgba(3, 8, 18, 0.72);
  backdrop-filter: blur(10px) saturate(0.8);
  -webkit-backdrop-filter: blur(10px) saturate(0.8);
  transition: opacity 170ms ease;
}

:is(#groupChatSettingsModal, #channelSettingsV2Modal, #channelProfileModal, #groupChatProfileModal, #avatarCropModal).gcs-modal-backdrop:not(.hidden) {
  animation: gcsBackdropIn 180ms ease;
}

@keyframes gcsBackdropIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

:is(#groupChatSettingsModal, #channelSettingsV2Modal, #channelProfileModal, #groupChatProfileModal, #avatarCropModal) .gcs-modal {
  position: relative;
  isolation: isolate;
  width: min(1100px, calc(100vw - 64px));
  height: min(800px, calc(100vh - 64px));
  max-height: calc(100vh - 64px);
  display: grid;
  grid-template-columns: 365px minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr) auto;
  border-radius: 26px;
  overflow: hidden;
  background: linear-gradient(
    135deg,
    rgba(13, 25, 44, 0.96) 0%,
    rgba(10, 21, 38, 0.94) 48%,
    rgba(9, 18, 34, 0.97) 100%
  );
  border: 1px solid rgba(132, 170, 224, 0.28);
  box-shadow:
    0 32px 100px rgba(0, 0, 0, 0.56),
    inset 0 1px 0 rgba(255, 255, 255, 0.055);
  color: #eef2ff;
  box-sizing: border-box;
}

:is(#groupChatSettingsModal, #channelSettingsV2Modal, #channelProfileModal, #groupChatProfileModal, #avatarCropModal) .gcs-modal::before {
  content: "";
  position: absolute;
  top: -18%;
  left: -8%;
  width: 52%;
  height: 48%;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.14) 0%, transparent 68%);
  pointer-events: none;
  z-index: 0;
}

:is(#groupChatSettingsModal, #channelSettingsV2Modal, #channelProfileModal, #groupChatProfileModal, #avatarCropModal) .gcs-modal::after {
  content: "";
  position: absolute;
  bottom: -12%;
  left: 28%;
  width: 44%;
  height: 40%;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.1) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

:is(#groupChatSettingsModal, #channelSettingsV2Modal, #channelProfileModal, #groupChatProfileModal, #avatarCropModal) .gcs-modal > * {
  position: relative;
  z-index: 1;
}

:is(#groupChatSettingsModal, #channelSettingsV2Modal, #channelProfileModal, #groupChatProfileModal, #avatarCropModal) .gcs-modal__close {
  position: absolute;
  top: 20px;
  right: 22px;
  z-index: 5;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: rgba(210, 223, 244, 0.82);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: color 140ms ease, background 140ms ease;
}

:is(#groupChatSettingsModal, #channelSettingsV2Modal, #channelProfileModal, #groupChatProfileModal, #avatarCropModal) .gcs-modal__close:hover {
  color: #f5f8ff;
  background: rgba(255, 255, 255, 0.04);
}

:is(#groupChatSettingsModal, #channelSettingsV2Modal, #channelProfileModal, #groupChatProfileModal, #avatarCropModal) .gcs-modal__close:focus-visible {
  outline: 2px solid rgba(81, 143, 255, 0.72);
  outline-offset: 2px;
}

:is(#groupChatSettingsModal, #channelSettingsV2Modal, #channelProfileModal, #groupChatProfileModal, #avatarCropModal) .gcs-modal__close svg {
  width: 20px;
  height: 20px;
}

:is(#groupChatSettingsModal, #channelSettingsV2Modal, #channelProfileModal, #groupChatProfileModal, #avatarCropModal) .gcs-modal__sidebar {
  grid-row: 1;
  grid-column: 1;
  padding: 52px 34px 28px;
  border-right: 1px solid rgba(134, 162, 205, 0.12);
  background: linear-gradient(180deg, rgba(17, 34, 58, 0.56), rgba(9, 20, 36, 0.34));
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

:is(#groupChatSettingsModal, #channelSettingsV2Modal, #channelProfileModal, #groupChatProfileModal, #avatarCropModal) .gcs-sidebar__profile {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 28px;
  min-width: 0;
  flex-shrink: 0;
}

:is(#groupChatSettingsModal, #channelSettingsV2Modal, #channelProfileModal, #groupChatProfileModal, #avatarCropModal) .gcs-sidebar__avatar-wrap {
  position: relative;
  flex: 0 0 94px;
  width: 94px;
  height: 94px;
  border-radius: 50%;
  padding: 4px;
  background: linear-gradient(145deg, #38bdf8 0%, #6366f1 55%, #a855f7 100%);
  box-shadow: 0 0 24px rgba(59, 130, 246, 0.22);
}

:is(#groupChatSettingsModal, #channelSettingsV2Modal, #channelProfileModal, #groupChatProfileModal, #avatarCropModal) .gcs-sidebar__avatar-inner {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  overflow: hidden;
  background: rgba(8, 16, 30, 0.92);
  display: grid;
  place-items: center;
}

:is(#groupChatSettingsModal, #channelSettingsV2Modal, #channelProfileModal, #groupChatProfileModal, #avatarCropModal) .gcs-sidebar__avatar-inner .entity-avatar-preview,
:is(#groupChatSettingsModal, #channelSettingsV2Modal, #channelProfileModal, #groupChatProfileModal, #avatarCropModal) .gcs-sidebar__avatar-inner .entity-avatar-preview--ph {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

:is(#groupChatSettingsModal, #channelSettingsV2Modal, #channelProfileModal, #groupChatProfileModal, #avatarCropModal) .gcs-sidebar__avatar-inner .entity-avatar-preview--ph {
  display: grid;
  place-items: center;
}

:is(#groupChatSettingsModal, #channelSettingsV2Modal, #channelProfileModal, #groupChatProfileModal, #avatarCropModal) .gcs-sidebar__avatar-inner .channel-icon-host,
:is(#groupChatSettingsModal, #channelSettingsV2Modal, #channelProfileModal, #groupChatProfileModal, #avatarCropModal) .gcs-sidebar__channel-avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  display: grid;
  place-items: center;
}

:is(#groupChatSettingsModal, #channelSettingsV2Modal, #channelProfileModal, #groupChatProfileModal, #avatarCropModal) .gcs-sidebar__extra {
  margin: 10px 0 0;
  font-size: 14px;
  line-height: 1.35;
  color: rgba(170, 185, 210, 0.72);
}

:is(#groupChatSettingsModal, #channelSettingsV2Modal, #channelProfileModal, #groupChatProfileModal, #avatarCropModal) .gcs-nav__btn--danger .gcs-nav__label {
  color: rgba(251, 146, 146, 0.92);
}

:is(#groupChatSettingsModal, #channelSettingsV2Modal, #channelProfileModal, #groupChatProfileModal, #avatarCropModal) .gcs-nav__btn--danger.is-active,
:is(#groupChatSettingsModal, #channelSettingsV2Modal, #channelProfileModal, #groupChatProfileModal, #avatarCropModal) .gcs-nav__btn--danger[aria-selected="true"] {
  border-color: rgba(248, 113, 113, 0.45);
  background: rgba(248, 113, 113, 0.1);
}

:is(#groupChatSettingsModal, #channelSettingsV2Modal, #channelProfileModal, #groupChatProfileModal, #avatarCropModal) .gcs-sidebar__meta {
  min-width: 0;
  flex: 1 1 auto;
}

:is(#groupChatSettingsModal, #channelSettingsV2Modal, #channelProfileModal, #groupChatProfileModal, #avatarCropModal) .gcs-sidebar__heading,
#groupChatSettingsModalTitle,
#channelSettingsV2ModalTitle {
  margin: 0;
  font-size: 27px;
  font-weight: 750;
  line-height: 1.15;
  color: rgba(248, 250, 255, 0.98);
  letter-spacing: -0.02em;
}

:is(#groupChatSettingsModal, #channelSettingsV2Modal, #channelProfileModal, #groupChatProfileModal, #avatarCropModal) .gcs-sidebar__chat-name {
  margin: 8px 0 0;
  font-size: 17px;
  font-weight: 500;
  line-height: 1.35;
  color: rgba(198, 211, 233, 0.84);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

:is(#groupChatSettingsModal, #channelSettingsV2Modal, #channelProfileModal, #groupChatProfileModal, #avatarCropModal) .gcs-sidebar__status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  height: 34px;
  padding: 0 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(130, 160, 210, 0.14);
  font-size: 13px;
  font-weight: 600;
  color: rgba(214, 226, 246, 0.88);
}

:is(#groupChatSettingsModal, #channelSettingsV2Modal, #channelProfileModal, #groupChatProfileModal, #avatarCropModal) .gcs-sidebar__status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 8px rgba(52, 211, 153, 0.55);
  flex-shrink: 0;
}

:is(#groupChatSettingsModal, #channelSettingsV2Modal, #channelProfileModal, #groupChatProfileModal, #avatarCropModal) .gcs-nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow-y: auto;
  min-height: 0;
  flex: 1 1 auto;
  padding-right: 2px;
  scrollbar-width: thin;
  scrollbar-color: rgba(130, 160, 210, 0.28) transparent;
}

:is(#groupChatSettingsModal, #channelSettingsV2Modal, #channelProfileModal, #groupChatProfileModal, #avatarCropModal) .gcs-nav::-webkit-scrollbar {
  width: 6px;
}

:is(#groupChatSettingsModal, #channelSettingsV2Modal, #channelProfileModal, #groupChatProfileModal, #avatarCropModal) .gcs-nav::-webkit-scrollbar-thumb {
  background: rgba(130, 160, 210, 0.28);
  border-radius: 999px;
}

:is(#groupChatSettingsModal, #channelSettingsV2Modal, #channelProfileModal, #groupChatProfileModal, #avatarCropModal) .gcs-nav__btn {
  width: 100%;
  min-height: 54px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 18px;
  border-radius: 16px;
  border: 1px solid rgba(130, 160, 210, 0.1);
  background: rgba(255, 255, 255, 0.012);
  color: rgba(224, 232, 246, 0.9);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.2;
  text-align: left;
  cursor: pointer;
  transition: background 170ms cubic-bezier(0.2, 0.8, 0.2, 1),
    border-color 170ms cubic-bezier(0.2, 0.8, 0.2, 1),
    color 170ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

:is(#groupChatSettingsModal, #channelSettingsV2Modal, #channelProfileModal, #groupChatProfileModal, #avatarCropModal) .gcs-nav__btn:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(130, 160, 210, 0.22);
}

:is(#groupChatSettingsModal, #channelSettingsV2Modal, #channelProfileModal, #groupChatProfileModal, #avatarCropModal) .gcs-nav__btn.is-active,
:is(#groupChatSettingsModal, #channelSettingsV2Modal, #channelProfileModal, #groupChatProfileModal, #avatarCropModal) .gcs-nav__btn[aria-selected="true"] {
  background: linear-gradient(
    135deg,
    rgba(59, 130, 246, 0.22) 0%,
    rgba(99, 102, 241, 0.16) 52%,
    rgba(139, 92, 246, 0.12) 100%
  );
  border-color: rgba(97, 139, 255, 0.72);
  color: #f5f8ff;
  box-shadow: inset -24px 0 36px rgba(139, 92, 246, 0.08);
}

:is(#groupChatSettingsModal, #channelSettingsV2Modal, #channelProfileModal, #groupChatProfileModal, #avatarCropModal) .gcs-nav__btn:focus-visible {
  outline: 2px solid rgba(81, 143, 255, 0.72);
  outline-offset: 2px;
}

:is(#groupChatSettingsModal, #channelSettingsV2Modal, #channelProfileModal, #groupChatProfileModal, #avatarCropModal) .gcs-nav__icon {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  color: rgba(147, 180, 230, 0.88);
}

:is(#groupChatSettingsModal, #channelSettingsV2Modal, #channelProfileModal, #groupChatProfileModal, #avatarCropModal) .gcs-nav__btn.is-active .gcs-nav__icon,
:is(#groupChatSettingsModal, #channelSettingsV2Modal, #channelProfileModal, #groupChatProfileModal, #avatarCropModal) .gcs-nav__btn[aria-selected="true"] .gcs-nav__icon {
  color: rgba(191, 219, 254, 0.96);
}

:is(#groupChatSettingsModal, #channelSettingsV2Modal, #channelProfileModal, #groupChatProfileModal, #avatarCropModal) .gcs-nav__icon svg {
  width: 22px;
  height: 22px;
}

:is(#groupChatSettingsModal, #channelSettingsV2Modal, #channelProfileModal, #groupChatProfileModal, #avatarCropModal) .gcs-nav__label {
  flex: 1 1 auto;
  min-width: 0;
}

:is(#groupChatSettingsModal, #channelSettingsV2Modal, #channelProfileModal, #groupChatProfileModal, #avatarCropModal) .gcs-nav__badge {
  flex-shrink: 0;
  height: 22px;
  padding: 0 8px;
  border-radius: 8px;
  background: linear-gradient(135deg, #7c3aed 0%, #6366f1 100%);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  display: inline-flex;
  align-items: center;
}

:is(#groupChatSettingsModal, #channelSettingsV2Modal, #channelProfileModal, #groupChatProfileModal, #avatarCropModal) .gcs-modal__main {
  grid-row: 1;
  grid-column: 2;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

:is(#groupChatSettingsModal, #channelSettingsV2Modal, #channelProfileModal, #groupChatProfileModal, #avatarCropModal) .gcs-sheet {
  display: none;
  flex-direction: column;
  min-height: 0;
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 52px 40px 36px;
  scrollbar-width: thin;
  scrollbar-color: rgba(130, 160, 210, 0.28) transparent;
}

:is(#groupChatSettingsModal, #channelSettingsV2Modal, #channelProfileModal, #groupChatProfileModal, #avatarCropModal) .gcs-sheet.is-active {
  display: flex;
}

:is(#groupChatSettingsModal, #channelSettingsV2Modal, #channelProfileModal, #groupChatProfileModal, #avatarCropModal) .gcs-sheet::-webkit-scrollbar {
  width: 6px;
}

:is(#groupChatSettingsModal, #channelSettingsV2Modal, #channelProfileModal, #groupChatProfileModal, #avatarCropModal) .gcs-sheet::-webkit-scrollbar-thumb {
  background: rgba(130, 160, 210, 0.28);
  border-radius: 999px;
}

:is(#groupChatSettingsModal, #channelSettingsV2Modal, #channelProfileModal, #groupChatProfileModal, #avatarCropModal) .gcs-sheet__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
}

:is(#groupChatSettingsModal, #channelSettingsV2Modal, #channelProfileModal, #groupChatProfileModal, #avatarCropModal) .gcs-sheet__title {
  margin: 0;
  font-size: 25px;
  font-weight: 750;
  line-height: 1.15;
  color: rgba(245, 248, 255, 0.96);
  letter-spacing: -0.02em;
}

:is(#groupChatSettingsModal, #channelSettingsV2Modal, #channelProfileModal, #groupChatProfileModal, #avatarCropModal) .gcs-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 0;
  cursor: pointer;
  font-family: inherit;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease, opacity 160ms ease;
}

:is(#groupChatSettingsModal, #channelSettingsV2Modal, #channelProfileModal, #groupChatProfileModal, #avatarCropModal) .gcs-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

:is(#groupChatSettingsModal, #channelSettingsV2Modal, #channelProfileModal, #groupChatProfileModal, #avatarCropModal) .gcs-btn--photo {
  height: 48px;
  padding: 0 20px;
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(134, 164, 210, 0.18);
  color: rgba(226, 235, 250, 0.92);
  font-size: 15px;
  font-weight: 600;
  flex-shrink: 0;
}

:is(#groupChatSettingsModal, #channelSettingsV2Modal, #channelProfileModal, #groupChatProfileModal, #avatarCropModal) .gcs-btn--photo:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.055);
  border-color: rgba(134, 164, 210, 0.28);
}

:is(#groupChatSettingsModal, #channelSettingsV2Modal, #channelProfileModal, #groupChatProfileModal, #avatarCropModal) .gcs-btn--photo svg {
  width: 20px;
  height: 20px;
}

:is(#groupChatSettingsModal, #channelSettingsV2Modal, #channelProfileModal, #groupChatProfileModal, #avatarCropModal) .gcs-field {
  display: block;
  margin-bottom: 22px;
}

:is(#groupChatSettingsModal, #channelSettingsV2Modal, #channelProfileModal, #groupChatProfileModal, #avatarCropModal) .gcs-field__label {
  display: block;
  margin-bottom: 10px;
  font-size: 15px;
  font-weight: 600;
  color: rgba(202, 214, 233, 0.86);
}

:is(#groupChatSettingsModal, #channelSettingsV2Modal, #channelProfileModal, #groupChatProfileModal, #avatarCropModal) .gcs-field__input,
:is(#groupChatSettingsModal, #channelSettingsV2Modal, #channelProfileModal, #groupChatProfileModal, #avatarCropModal) .gcs-field__textarea {
  width: 100%;
  box-sizing: border-box;
  border-radius: 15px;
  padding: 0 18px;
  font-size: 16px;
  font-family: inherit;
  color: #f2f6ff;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(137, 164, 207, 0.15);
  box-shadow: none;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

:is(#groupChatSettingsModal, #channelSettingsV2Modal, #channelProfileModal, #groupChatProfileModal, #avatarCropModal) .gcs-field__input {
  height: 56px;
}

:is(#groupChatSettingsModal, #channelSettingsV2Modal, #channelProfileModal, #groupChatProfileModal, #avatarCropModal) .gcs-field__textarea {
  min-height: 118px;
  padding: 16px 18px;
  line-height: 1.5;
  resize: none;
}

:is(#groupChatSettingsModal, #channelSettingsV2Modal, #channelProfileModal, #groupChatProfileModal, #avatarCropModal) .gcs-field__input:focus,
:is(#groupChatSettingsModal, #channelSettingsV2Modal, #channelProfileModal, #groupChatProfileModal, #avatarCropModal) .gcs-field__textarea:focus {
  outline: none;
  border-color: rgba(81, 143, 255, 0.72);
  box-shadow: 0 0 0 3px rgba(55, 124, 255, 0.1);
}

:is(#groupChatSettingsModal, #channelSettingsV2Modal, #channelProfileModal, #groupChatProfileModal, #avatarCropModal) .gcs-field__input:disabled,
:is(#groupChatSettingsModal, #channelSettingsV2Modal, #channelProfileModal, #groupChatProfileModal, #avatarCropModal) .gcs-field__textarea:disabled {
  opacity: 0.62;
  cursor: not-allowed;
}

:is(#groupChatSettingsModal, #channelSettingsV2Modal, #channelProfileModal, #groupChatProfileModal, #avatarCropModal) .gcs-field__help {
  margin: 8px 0 0;
  font-size: 13px;
  line-height: 1.45;
  color: rgba(154, 171, 197, 0.72);
}

:is(#groupChatSettingsModal, #channelSettingsV2Modal, #channelProfileModal, #groupChatProfileModal, #avatarCropModal) .gcs-field__help-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-top: 8px;
}

:is(#groupChatSettingsModal, #channelSettingsV2Modal, #channelProfileModal, #groupChatProfileModal, #avatarCropModal) .gcs-field__counter {
  flex-shrink: 0;
  font-size: 13px;
  color: rgba(154, 171, 197, 0.72);
}

:is(#groupChatSettingsModal, #channelSettingsV2Modal, #channelProfileModal, #groupChatProfileModal, #avatarCropModal) .gcs-field--readonly .gcs-field__textarea:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  background: rgba(255, 255, 255, 0.02);
}

:is(#groupChatSettingsModal, #channelSettingsV2Modal, #channelProfileModal, #groupChatProfileModal, #avatarCropModal) .gcs-type-grid__note {
  margin: -8px 0 14px;
  font-size: 13px;
  line-height: 1.45;
  color: rgba(154, 171, 197, 0.72);
}

:is(#groupChatSettingsModal, #channelSettingsV2Modal, #channelProfileModal, #groupChatProfileModal, #avatarCropModal) .gcs-type-grid--readonly .gcs-type-card {
  pointer-events: none;
  user-select: none;
}

:is(#groupChatSettingsModal, #channelSettingsV2Modal, #channelProfileModal, #groupChatProfileModal, #avatarCropModal) .gcs-type-card--readonly:not(.is-active) {
  opacity: 0.72;
}

:is(#groupChatSettingsModal, #channelSettingsV2Modal, #channelProfileModal, #groupChatProfileModal, #avatarCropModal) .gcs-divider {
  border: 0;
  border-top: 1px solid rgba(132, 160, 201, 0.1);
  margin: 28px 0 24px;
}

:is(#groupChatSettingsModal, #channelSettingsV2Modal, #channelProfileModal, #groupChatProfileModal, #avatarCropModal) .gcs-section-title {
  margin: 0 0 16px;
  font-size: 18px;
  font-weight: 700;
  color: rgba(236, 242, 255, 0.94);
}

:is(#groupChatSettingsModal, #channelSettingsV2Modal, #channelProfileModal, #groupChatProfileModal, #avatarCropModal) .gcs-type-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

:is(#groupChatSettingsModal, #channelSettingsV2Modal, #channelProfileModal, #groupChatProfileModal, #avatarCropModal) .gcs-type-card {
  min-height: 118px;
  border-radius: 16px;
  padding: 18px;
  display: grid;
  grid-template-columns: 44px 1fr auto;
  gap: 14px;
  align-items: start;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(132, 158, 203, 0.12);
  text-align: left;
  cursor: pointer;
  color: inherit;
  font: inherit;
  width: 100%;
}

:is(#groupChatSettingsModal, #channelSettingsV2Modal, #channelProfileModal, #groupChatProfileModal, #avatarCropModal) .gcs-type-card:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

:is(#groupChatSettingsModal, #channelSettingsV2Modal, #channelProfileModal, #groupChatProfileModal, #avatarCropModal) .gcs-type-card:focus-visible {
  outline: 2px solid rgba(92, 143, 255, 0.85);
  outline-offset: 2px;
}

:is(#groupChatSettingsModal, #channelSettingsV2Modal, #channelProfileModal, #groupChatProfileModal, #avatarCropModal) .gcs-join-requests {
  margin-bottom: 16px;
}

:is(#groupChatSettingsModal, #channelSettingsV2Modal, #channelProfileModal, #groupChatProfileModal, #avatarCropModal) .gcs-join-requests__head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

:is(#groupChatSettingsModal, #channelSettingsV2Modal, #channelProfileModal, #groupChatProfileModal, #avatarCropModal) .gcs-join-requests__badge {
  min-width: 22px;
  height: 22px;
  padding: 0 7px;
  border-radius: 999px;
  background: rgba(239, 68, 68, 0.85);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

:is(#groupChatSettingsModal, #channelSettingsV2Modal, #channelProfileModal, #groupChatProfileModal, #avatarCropModal) .gcs-join-request-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(132, 158, 203, 0.1);
}

:is(#groupChatSettingsModal, #channelSettingsV2Modal, #channelProfileModal, #groupChatProfileModal, #avatarCropModal) .gcs-join-request-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

:is(#groupChatSettingsModal, #channelSettingsV2Modal, #channelProfileModal, #groupChatProfileModal, #avatarCropModal) .gcs-type-card.is-active {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.14) 0%, rgba(99, 102, 241, 0.1) 100%);
  border-color: rgba(92, 143, 255, 0.72);
}

:is(#groupChatSettingsModal, #channelSettingsV2Modal, #channelProfileModal, #groupChatProfileModal, #avatarCropModal) .gcs-type-card__icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.04);
  color: rgba(147, 197, 253, 0.92);
}

:is(#groupChatSettingsModal, #channelSettingsV2Modal, #channelProfileModal, #groupChatProfileModal, #avatarCropModal) .gcs-type-card__icon svg {
  width: 22px;
  height: 22px;
}

:is(#groupChatSettingsModal, #channelSettingsV2Modal, #channelProfileModal, #groupChatProfileModal, #avatarCropModal) .gcs-type-card__title {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: rgba(245, 248, 255, 0.96);
}

:is(#groupChatSettingsModal, #channelSettingsV2Modal, #channelProfileModal, #groupChatProfileModal, #avatarCropModal) .gcs-type-card__desc {
  margin: 6px 0 0;
  font-size: 13px;
  line-height: 1.45;
  color: rgba(154, 171, 197, 0.78);
}

:is(#groupChatSettingsModal, #channelSettingsV2Modal, #channelProfileModal, #groupChatProfileModal, #avatarCropModal) .gcs-type-card__check {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1px solid rgba(132, 158, 203, 0.22);
  display: grid;
  place-items: center;
  color: transparent;
  margin-top: 2px;
}

:is(#groupChatSettingsModal, #channelSettingsV2Modal, #channelProfileModal, #groupChatProfileModal, #avatarCropModal) .gcs-type-card.is-active .gcs-type-card__check {
  background: linear-gradient(135deg, #3b82f6 0%, #6366f1 100%);
  border-color: transparent;
  color: #fff;
}

:is(#groupChatSettingsModal, #channelSettingsV2Modal, #channelProfileModal, #groupChatProfileModal, #avatarCropModal) .gcs-type-card.is-active .gcs-type-card__check svg {
  width: 14px;
  height: 14px;
}

:is(#groupChatSettingsModal, #channelSettingsV2Modal, #channelProfileModal, #groupChatProfileModal, #avatarCropModal) .gcs-invite__desc {
  margin: 0 0 16px;
  font-size: 14px;
  line-height: 1.5;
  color: rgba(154, 171, 197, 0.78);
}

:is(#groupChatSettingsModal, #channelSettingsV2Modal, #channelProfileModal, #groupChatProfileModal, #avatarCropModal) .gcs-invite__row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 56px;
  padding: 0 12px 0 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(137, 164, 207, 0.15);
}

:is(#groupChatSettingsModal, #channelSettingsV2Modal, #channelProfileModal, #groupChatProfileModal, #avatarCropModal) .gcs-invite__row-icon {
  flex-shrink: 0;
  color: rgba(147, 180, 230, 0.82);
}

:is(#groupChatSettingsModal, #channelSettingsV2Modal, #channelProfileModal, #groupChatProfileModal, #avatarCropModal) .gcs-invite__row-icon svg {
  width: 18px;
  height: 18px;
}

:is(#groupChatSettingsModal, #channelSettingsV2Modal, #channelProfileModal, #groupChatProfileModal, #avatarCropModal) .gcs-invite__url,
:is(#groupChatSettingsModal, #channelSettingsV2Modal, #channelProfileModal, #groupChatProfileModal, #avatarCropModal) #groupChatSettingsInviteUrl {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
  color: rgba(214, 226, 246, 0.88);
  background: transparent;
  border: 0;
  padding: 0;
}

:is(#groupChatSettingsModal, #channelSettingsV2Modal, #channelProfileModal, #groupChatProfileModal, #avatarCropModal) .gcs-btn--copy {
  height: 36px;
  padding: 0 14px;
  border-radius: 10px;
  background: rgba(59, 130, 246, 0.18);
  border: 1px solid rgba(96, 165, 250, 0.24);
  color: rgba(191, 219, 254, 0.96);
  font-size: 14px;
  font-weight: 600;
  flex-shrink: 0;
}

:is(#groupChatSettingsModal, #channelSettingsV2Modal, #channelProfileModal, #groupChatProfileModal, #avatarCropModal) .gcs-btn--copy:hover:not(:disabled) {
  background: rgba(59, 130, 246, 0.26);
}

:is(#groupChatSettingsModal, #channelSettingsV2Modal, #channelProfileModal, #groupChatProfileModal, #avatarCropModal) .gcs-invite__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 14px;
}

:is(#groupChatSettingsModal, #channelSettingsV2Modal, #channelProfileModal, #groupChatProfileModal, #avatarCropModal) .gcs-btn--neutral {
  height: 44px;
  padding: 0 16px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(134, 164, 210, 0.18);
  color: rgba(226, 235, 250, 0.92);
  font-size: 14px;
  font-weight: 600;
}

:is(#groupChatSettingsModal, #channelSettingsV2Modal, #channelProfileModal, #groupChatProfileModal, #avatarCropModal) .gcs-btn--neutral:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.055);
}

:is(#groupChatSettingsModal, #channelSettingsV2Modal, #channelProfileModal, #groupChatProfileModal, #avatarCropModal) .gcs-btn--danger-outline {
  height: 44px;
  padding: 0 16px;
  border-radius: 12px;
  background: transparent;
  border: 1px solid rgba(248, 113, 113, 0.42);
  color: rgba(252, 165, 165, 0.96);
  font-size: 14px;
  font-weight: 600;
}

:is(#groupChatSettingsModal, #channelSettingsV2Modal, #channelProfileModal, #groupChatProfileModal, #avatarCropModal) .gcs-btn--danger-outline:hover:not(:disabled) {
  background: rgba(248, 113, 113, 0.08);
}

:is(#groupChatSettingsModal, #channelSettingsV2Modal, #channelProfileModal, #groupChatProfileModal, #avatarCropModal) .gcs-btn svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

:is(#groupChatSettingsModal, #channelSettingsV2Modal, #channelProfileModal, #groupChatProfileModal, #avatarCropModal) .gcs-section-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 12px;
}

:is(#groupChatSettingsModal, #channelSettingsV2Modal, #channelProfileModal, #groupChatProfileModal, #avatarCropModal) .gcs-section-title-row .gcs-section-title {
  margin: 0;
}

:is(#groupChatSettingsModal, #channelSettingsV2Modal, #channelProfileModal, #groupChatProfileModal, #avatarCropModal) .advanced-chat-setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 82px;
  padding: 18px 20px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(132, 170, 224, 0.18);
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

:is(#groupChatSettingsModal, #channelSettingsV2Modal, #channelProfileModal, #groupChatProfileModal, #avatarCropModal) .advanced-chat-setting-row--on {
  border-color: rgba(92, 143, 255, 0.42);
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.08) 0%, rgba(99, 102, 241, 0.06) 100%);
  box-shadow: 0 0 0 1px rgba(99, 102, 241, 0.08);
}

:is(#groupChatSettingsModal, #channelSettingsV2Modal, #channelProfileModal, #groupChatProfileModal, #avatarCropModal) .advanced-chat-setting-info {
  min-width: 0;
  flex: 1 1 auto;
}

:is(#groupChatSettingsModal, #channelSettingsV2Modal, #channelProfileModal, #groupChatProfileModal, #avatarCropModal) .advanced-chat-setting-title {
  font-size: 16px;
  font-weight: 700;
  color: rgba(245, 248, 255, 0.96);
  letter-spacing: -0.01em;
  line-height: 1.25;
}

:is(#groupChatSettingsModal, #channelSettingsV2Modal, #channelProfileModal, #groupChatProfileModal, #avatarCropModal) .advanced-chat-setting-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
  min-width: 0;
}

:is(#groupChatSettingsModal, #channelSettingsV2Modal, #channelProfileModal, #groupChatProfileModal, #avatarCropModal) .advanced-chat-setting-description {
  font-size: 13px;
  font-weight: 500;
  color: rgba(154, 171, 197, 0.82);
  opacity: 0.65;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

:is(#groupChatSettingsModal, #channelSettingsV2Modal, #channelProfileModal, #groupChatProfileModal, #avatarCropModal) .advanced-chat-setting-help {
  position: relative;
  flex: 0 0 auto;
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  padding: 0;
  border-radius: 999px;
  border: 1px solid rgba(132, 170, 224, 0.24);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(170, 188, 214, 0.92);
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  cursor: help;
}

:is(#groupChatSettingsModal, #channelSettingsV2Modal, #channelProfileModal, #groupChatProfileModal, #avatarCropModal) .advanced-chat-setting-help::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  width: max-content;
  max-width: 280px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(15, 25, 45, 0.92);
  border: 1px solid rgba(132, 170, 224, 0.25);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.32);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.45;
  color: #dbe4f0;
  white-space: pre-line;
  text-align: left;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.16s ease, visibility 0.16s ease, transform 0.16s ease;
  z-index: 30;
}

:is(#groupChatSettingsModal, #channelSettingsV2Modal, #channelProfileModal, #groupChatProfileModal, #avatarCropModal) .advanced-chat-setting-help:hover::after,
:is(#groupChatSettingsModal, #channelSettingsV2Modal, #channelProfileModal, #groupChatProfileModal, #avatarCropModal) .advanced-chat-setting-help:focus-visible::after {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

:is(#groupChatSettingsModal, #channelSettingsV2Modal, #channelProfileModal, #groupChatProfileModal, #avatarCropModal) .settings-toggle {
  position: relative;
  display: inline-flex;
  flex: 0 0 auto;
  width: 46px;
  height: 24px;
  cursor: pointer;
}

:is(#groupChatSettingsModal, #channelSettingsV2Modal, #channelProfileModal, #groupChatProfileModal, #avatarCropModal) .settings-toggle input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  margin: 0;
  pointer-events: none;
}

:is(#groupChatSettingsModal, #channelSettingsV2Modal, #channelProfileModal, #groupChatProfileModal, #avatarCropModal) .settings-toggle-slider {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: rgba(12, 18, 34, 0.92);
  border: 1px solid rgba(132, 170, 224, 0.3);
  transition: background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

:is(#groupChatSettingsModal, #channelSettingsV2Modal, #channelProfileModal, #groupChatProfileModal, #avatarCropModal) .settings-toggle-slider::before {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(226, 234, 248, 0.96);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.28);
  transition: transform 0.18s ease, background 0.18s ease;
}

:is(#groupChatSettingsModal, #channelSettingsV2Modal, #channelProfileModal, #groupChatProfileModal, #avatarCropModal) .settings-toggle input:checked + .settings-toggle-slider {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.95) 0%, rgba(99, 102, 241, 0.95) 100%);
  border-color: rgba(120, 160, 255, 0.55);
  box-shadow: 0 0 14px rgba(99, 102, 241, 0.35);
}

:is(#groupChatSettingsModal, #channelSettingsV2Modal, #channelProfileModal, #groupChatProfileModal, #avatarCropModal) .settings-toggle input:checked + .settings-toggle-slider::before {
  transform: translateX(22px);
  background: #fff;
}

:is(#groupChatSettingsModal, #channelSettingsV2Modal, #channelProfileModal, #groupChatProfileModal, #avatarCropModal) .settings-toggle input:disabled + .settings-toggle-slider {
  opacity: 0.45;
  cursor: not-allowed;
}

:is(#groupChatSettingsModal, #channelSettingsV2Modal, #channelProfileModal, #groupChatProfileModal, #avatarCropModal) .settings-toggle input:focus-visible + .settings-toggle-slider {
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.28);
}

:is(#groupChatSettingsModal, #channelSettingsV2Modal, #channelProfileModal, #groupChatProfileModal, #avatarCropModal) .gcs-invite-card-block {
  padding: 16px 18px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(132, 158, 203, 0.12);
  margin-bottom: 12px;
}

:is(#groupChatSettingsModal, #channelSettingsV2Modal, #channelProfileModal, #groupChatProfileModal, #avatarCropModal) .gcs-invite-card-block__title {
  margin: 0 0 6px;
  font-size: 15px;
  font-weight: 800;
  color: rgba(245, 248, 255, 0.96);
  letter-spacing: -0.01em;
}

:is(#groupChatSettingsModal, #channelSettingsV2Modal, #channelProfileModal, #groupChatProfileModal, #avatarCropModal) .gcs-invite-card-block .gcs-invite__desc {
  margin-bottom: 12px;
}

:is(#groupChatSettingsModal, #channelSettingsV2Modal, #channelProfileModal, #groupChatProfileModal, #avatarCropModal) .gcs-invite-card-block .gcs-invite__actions {
  margin-top: 12px;
}

:is(#groupChatSettingsModal, #channelSettingsV2Modal, #channelProfileModal, #groupChatProfileModal, #avatarCropModal) .gcs-one-time-invites-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
}

:is(#groupChatSettingsModal, #channelSettingsV2Modal, #channelProfileModal, #groupChatProfileModal, #avatarCropModal) .gcs-one-time-invite-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(132, 158, 203, 0.1);
  font-size: 12px;
  color: rgba(154, 171, 197, 0.86);
}

:is(#groupChatSettingsModal, #channelSettingsV2Modal, #channelProfileModal, #groupChatProfileModal, #avatarCropModal) .gcs-one-time-invite-item__status {
  font-weight: 700;
  white-space: nowrap;
}

:is(#groupChatSettingsModal, #channelSettingsV2Modal, #channelProfileModal, #groupChatProfileModal, #avatarCropModal) .gcs-one-time-invite-item__status.is-active {
  color: rgba(120, 220, 160, 0.95);
}

:is(#groupChatSettingsModal, #channelSettingsV2Modal, #channelProfileModal, #groupChatProfileModal, #avatarCropModal) .gcs-one-time-invite-item__status.is-used {
  color: rgba(154, 171, 197, 0.72);
}

:is(#groupChatSettingsModal, #channelSettingsV2Modal, #channelProfileModal, #groupChatProfileModal, #avatarCropModal) .gcs-moderation-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

:is(#groupChatSettingsModal, #channelSettingsV2Modal, #channelProfileModal, #groupChatProfileModal, #avatarCropModal) .gcs-moderation-row {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: start;
  padding: 16px 18px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(132, 158, 203, 0.12);
  cursor: pointer;
}

:is(#groupChatSettingsModal, #channelSettingsV2Modal, #channelProfileModal, #groupChatProfileModal, #avatarCropModal) .gcs-moderation-row__icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: rgba(255, 93, 108, 0.1);
  border: 1px solid rgba(255, 93, 108, 0.22);
  color: rgba(255, 170, 178, 0.95);
}

:is(#groupChatSettingsModal, #channelSettingsV2Modal, #channelProfileModal, #groupChatProfileModal, #avatarCropModal) .gcs-moderation-row__icon svg {
  width: 20px;
  height: 20px;
}

:is(#groupChatSettingsModal, #channelSettingsV2Modal, #channelProfileModal, #groupChatProfileModal, #avatarCropModal) .gcs-moderation-row__title {
  display: block;
  font-size: 15px;
  font-weight: 800;
  color: rgba(245, 248, 255, 0.96);
  letter-spacing: -0.01em;
}

:is(#groupChatSettingsModal, #channelSettingsV2Modal, #channelProfileModal, #groupChatProfileModal, #avatarCropModal) .gcs-moderation-row__desc {
  display: block;
  margin-top: 6px;
  font-size: 13px;
  line-height: 1.45;
  color: rgba(154, 171, 197, 0.82);
  font-weight: 500;
}

:is(#groupChatSettingsModal) .gcs-moderation-row__icon--events {
  background: rgba(99, 102, 241, 0.1);
  border-color: rgba(120, 160, 255, 0.24);
  color: rgba(170, 198, 255, 0.95);
}

:is(#groupChatSettingsModal, #channelSettingsV2Modal, #channelProfileModal, #groupChatProfileModal, #avatarCropModal) .gcs-moderation-row__switch {
  padding-top: 4px;
  flex-shrink: 0;
}

:is(#groupChatSettingsModal, #channelSettingsV2Modal, #channelProfileModal, #groupChatProfileModal, #avatarCropModal) .gcs-moderation-row__switch .settings-toggle {
  flex-shrink: 0;
}

:is(#groupChatSettingsModal) .gcs-invites-locked {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 180px;
  padding: 28px 22px;
}

:is(#groupChatSettingsModal) .gcs-invites-locked.hidden {
  display: none !important;
}

:is(#groupChatSettingsModal) .gcs-invites-locked__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: min(460px, 100%);
  text-align: center;
}

:is(#groupChatSettingsModal) .gcs-invites-locked__icon {
  font-size: 28px;
  line-height: 1;
}

:is(#groupChatSettingsModal) .gcs-invites-locked__title {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: rgba(235, 242, 255, 0.92);
  line-height: 1.45;
}

:is(#groupChatSettingsModal, #channelSettingsV2Modal, #channelProfileModal, #groupChatProfileModal, #avatarCropModal) .gcs-moderation-row--action {
  width: 100%;
  text-align: left;
  font: inherit;
  color: inherit;
  appearance: none;
  -webkit-appearance: none;
}

:is(#groupChatSettingsModal, #channelSettingsV2Modal, #channelProfileModal, #groupChatProfileModal, #avatarCropModal) .gcs-moderation-row--action:hover {
  background: rgba(255, 255, 255, 0.045);
  border-color: rgba(132, 158, 203, 0.22);
}

:is(#groupChatSettingsModal, #channelSettingsV2Modal, #channelProfileModal, #groupChatProfileModal, #avatarCropModal) .gcs-moderation-row--action:focus-visible {
  outline: 2px solid rgba(108, 141, 255, 0.55);
  outline-offset: 2px;
}

:is(#groupChatSettingsModal, #channelSettingsV2Modal, #channelProfileModal, #groupChatProfileModal, #avatarCropModal) .gcs-moderation-row__icon--audit {
  background: rgba(108, 141, 255, 0.1);
  border-color: rgba(108, 141, 255, 0.22);
  color: rgba(170, 188, 255, 0.95);
}

:is(#groupChatSettingsModal, #channelSettingsV2Modal, #channelProfileModal, #groupChatProfileModal, #avatarCropModal) .gcs-moderation-row__chevron {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  color: rgba(154, 171, 197, 0.72);
  padding-top: 4px;
}

:is(#groupChatSettingsModal, #channelSettingsV2Modal, #channelProfileModal, #groupChatProfileModal, #avatarCropModal) .gcs-moderation-row__chevron svg {
  width: 18px;
  height: 18px;
}

:is(#groupChatSettingsModal, #channelSettingsV2Modal, #channelProfileModal, #groupChatProfileModal, #avatarCropModal) .gcs-advanced-toggle {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px 18px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(132, 158, 203, 0.12);
  cursor: pointer;
  margin-top: 8px;
}

:is(#groupChatSettingsModal, #channelSettingsV2Modal, #channelProfileModal, #groupChatProfileModal, #avatarCropModal) .gcs-advanced-toggle.hidden {
  display: none !important;
}

:is(#groupChatSettingsModal, #channelSettingsV2Modal, #channelProfileModal, #groupChatProfileModal, #avatarCropModal) .gcs-advanced-toggle input {
  margin-top: 4px;
  accent-color: #6366f1;
}

:is(#groupChatSettingsModal, #channelSettingsV2Modal, #channelProfileModal, #groupChatProfileModal, #avatarCropModal) .gcs-advanced-toggle strong {
  display: block;
  font-size: 15px;
  font-weight: 700;
  color: rgba(245, 248, 255, 0.96);
}

:is(#groupChatSettingsModal, #channelSettingsV2Modal, #channelProfileModal, #groupChatProfileModal, #avatarCropModal) .gcs-advanced-toggle span.gcs-advanced-toggle__sub {
  display: block;
  margin-top: 6px;
  font-size: 13px;
  line-height: 1.45;
  color: rgba(154, 171, 197, 0.78);
  font-weight: 400;
}

:is(#groupChatSettingsModal, #channelSettingsV2Modal, #channelProfileModal, #groupChatProfileModal, #avatarCropModal) .gcs-advanced-toggle--on {
  border-color: rgba(92, 143, 255, 0.42);
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(99, 102, 241, 0.08) 100%);
}

:is(#groupChatSettingsModal, #channelSettingsV2Modal, #channelProfileModal, #groupChatProfileModal, #avatarCropModal) .gcs-empty {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  padding: 28px 24px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(132, 158, 203, 0.12);
}

:is(#groupChatSettingsModal, #channelSettingsV2Modal, #channelProfileModal, #groupChatProfileModal, #avatarCropModal) .gcs-empty--inline {
  margin-top: 16px;
}

:is(#groupChatSettingsModal, #channelSettingsV2Modal, #channelProfileModal, #groupChatProfileModal, #avatarCropModal) .gcs-empty__icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.04);
  color: rgba(147, 197, 253, 0.88);
}

:is(#groupChatSettingsModal, #channelSettingsV2Modal, #channelProfileModal, #groupChatProfileModal, #avatarCropModal) .gcs-empty__icon svg {
  width: 22px;
  height: 22px;
}

:is(#groupChatSettingsModal, #channelSettingsV2Modal, #channelProfileModal, #groupChatProfileModal, #avatarCropModal) .gcs-empty__badge {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(99, 102, 241, 0.18);
  border: 1px solid rgba(129, 140, 248, 0.28);
  color: rgba(199, 210, 254, 0.96);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

:is(#groupChatSettingsModal, #channelSettingsV2Modal, #channelProfileModal, #groupChatProfileModal, #avatarCropModal) .gcs-premium-locked {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  padding: 28px 24px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.08) 0%, rgba(139, 92, 246, 0.1) 100%);
  border: 1px solid rgba(129, 140, 248, 0.24);
}

:is(#groupChatSettingsModal, #channelSettingsV2Modal, #channelProfileModal, #groupChatProfileModal, #avatarCropModal) .gcs-premium-locked[hidden],
:is(#groupChatSettingsModal, #channelSettingsV2Modal, #channelProfileModal, #groupChatProfileModal, #avatarCropModal) #groupChatSettingsThemesPremiumPanel.hidden {
  display: none !important;
}

:is(#groupChatSettingsModal, #channelSettingsV2Modal, #channelProfileModal, #groupChatProfileModal, #avatarCropModal) .gcs-premium-locked__icon {
  color: rgba(196, 181, 253, 0.92);
}

:is(#groupChatSettingsModal, #channelSettingsV2Modal, #channelProfileModal, #groupChatProfileModal, #avatarCropModal) .gcs-premium-locked__title {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  color: rgba(245, 248, 255, 0.96);
}

:is(#groupChatSettingsModal, #channelSettingsV2Modal, #channelProfileModal, #groupChatProfileModal, #avatarCropModal) .gcs-premium-locked__text {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  color: rgba(154, 171, 197, 0.82);
  max-width: 520px;
}

:is(#groupChatSettingsModal, #channelSettingsV2Modal, #channelProfileModal, #groupChatProfileModal, #avatarCropModal) .gcs-btn--save.is-loading {
  opacity: 0.72;
  pointer-events: none;
}

:is(#groupChatSettingsModal, #channelSettingsV2Modal, #channelProfileModal, #groupChatProfileModal, #avatarCropModal) .gcs-empty__title {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  color: rgba(236, 242, 255, 0.94);
}

:is(#groupChatSettingsModal, #channelSettingsV2Modal, #channelProfileModal, #groupChatProfileModal, #avatarCropModal) .gcs-empty__text {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  color: rgba(154, 171, 197, 0.78);
}

:is(#groupChatSettingsModal, #channelSettingsV2Modal, #channelProfileModal, #groupChatProfileModal, #avatarCropModal) .gcs-members-hint {
  margin: 0 0 16px;
  font-size: 14px;
  line-height: 1.5;
  color: rgba(154, 171, 197, 0.78);
}

:is(#groupChatSettingsModal, #channelSettingsV2Modal, #channelProfileModal, #groupChatProfileModal, #avatarCropModal) #groupChatSettingsMembers {
  max-height: none;
  overflow: visible;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(132, 158, 203, 0.12);
  border-radius: 16px;
  padding: 8px;
}

:is(#groupChatSettingsModal, #channelSettingsV2Modal, #channelProfileModal, #groupChatProfileModal, #avatarCropModal) #groupChatSettingsMembers .channel-audit-line,
:is(#groupChatSettingsModal, #channelSettingsV2Modal, #channelProfileModal, #groupChatProfileModal, #avatarCropModal) #groupChatSettingsMembers .gc-member-row {
  border-radius: 12px;
  padding: 12px 14px;
}

:is(#groupChatSettingsModal, #channelSettingsV2Modal, #channelProfileModal, #groupChatProfileModal, #avatarCropModal) .gcs-media-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 360px;
}

:is(#groupChatSettingsModal, #channelSettingsV2Modal, #channelProfileModal, #groupChatProfileModal, #avatarCropModal) .gcs-media-actions .channel-open-audit-btn {
  height: 52px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(134, 164, 210, 0.18);
  color: rgba(226, 235, 250, 0.92);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}

:is(#groupChatSettingsModal, #channelSettingsV2Modal, #channelProfileModal, #groupChatProfileModal, #avatarCropModal) .gcs-media-actions .channel-open-audit-btn:hover {
  background: rgba(255, 255, 255, 0.055);
}

:is(#groupChatSettingsModal, #channelSettingsV2Modal, #channelProfileModal, #groupChatProfileModal, #avatarCropModal) .gcs-modal__footer {
  grid-column: 1 / -1;
  grid-row: 2;
  min-height: 90px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 34px;
  border-top: 1px solid rgba(133, 160, 202, 0.13);
  background: rgba(6, 15, 28, 0.56);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

:is(#groupChatSettingsModal, #channelSettingsV2Modal, #channelProfileModal, #groupChatProfileModal, #avatarCropModal) .gcs-footer__left,
:is(#groupChatSettingsModal, #channelSettingsV2Modal, #channelProfileModal, #groupChatProfileModal, #avatarCropModal) .gcs-footer__right {
  display: flex;
  align-items: center;
  gap: 12px;
}

:is(#groupChatSettingsModal, #channelSettingsV2Modal, #channelProfileModal, #groupChatProfileModal, #avatarCropModal) .gcs-btn--reset {
  height: 48px;
  padding: 0 16px;
  border-radius: 13px;
  background: transparent;
  border: 0;
  color: rgba(167, 181, 212, 0.88);
  font-size: 15px;
  font-weight: 600;
}

:is(#groupChatSettingsModal, #channelSettingsV2Modal, #channelProfileModal, #groupChatProfileModal, #avatarCropModal) .gcs-btn--reset:hover:not(:disabled) {
  color: rgba(226, 235, 250, 0.96);
  background: rgba(255, 255, 255, 0.04);
}

:is(#groupChatSettingsModal, #channelSettingsV2Modal, #channelProfileModal, #groupChatProfileModal, #avatarCropModal) .gcs-btn--close {
  height: 48px;
  padding: 0 20px;
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(134, 164, 210, 0.18);
  color: rgba(226, 235, 250, 0.92);
  font-size: 15px;
  font-weight: 600;
}

:is(#groupChatSettingsModal, #channelSettingsV2Modal, #channelProfileModal, #groupChatProfileModal, #avatarCropModal) .gcs-btn--close:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.055);
}

:is(#groupChatSettingsModal, #channelSettingsV2Modal, #channelProfileModal, #groupChatProfileModal, #avatarCropModal) .gcs-btn--save,
:is(#groupChatSettingsModal, #channelSettingsV2Modal, #channelProfileModal, #groupChatProfileModal, #avatarCropModal) #groupChatSettingsSaveBtn,
:is(#groupChatSettingsModal, #channelSettingsV2Modal, #channelProfileModal, #groupChatProfileModal, #avatarCropModal) #channelSettingsV2SaveBtn {
  height: 48px;
  padding: 0 22px;
  border-radius: 13px;
  border: 0;
  background: linear-gradient(135deg, #3b82f6 0%, #6366f1 52%, #8b5cf6 100%);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  box-shadow: 0 8px 24px rgba(59, 130, 246, 0.22);
}

:is(#groupChatSettingsModal, #channelSettingsV2Modal, #channelProfileModal, #groupChatProfileModal, #avatarCropModal) .gcs-btn--save:hover:not(:disabled),
:is(#groupChatSettingsModal, #channelSettingsV2Modal, #channelProfileModal, #groupChatProfileModal, #avatarCropModal) #groupChatSettingsSaveBtn:hover:not(:disabled),
:is(#groupChatSettingsModal, #channelSettingsV2Modal, #channelProfileModal, #groupChatProfileModal, #avatarCropModal) #channelSettingsV2SaveBtn:hover:not(:disabled) {
  filter: brightness(1.05);
}

:is(#groupChatSettingsModal, #channelSettingsV2Modal, #channelProfileModal, #groupChatProfileModal, #avatarCropModal) .gcs-btn.hidden,
:is(#groupChatSettingsModal, #channelSettingsV2Modal, #channelProfileModal, #groupChatProfileModal, #avatarCropModal) .gcs-btn[hidden],
:is(#groupChatSettingsModal, #channelSettingsV2Modal, #channelProfileModal, #groupChatProfileModal, #avatarCropModal) .gcs-btn--save.hidden,
:is(#groupChatSettingsModal, #channelSettingsV2Modal, #channelProfileModal, #groupChatProfileModal, #avatarCropModal) #groupChatSettingsSaveBtn.hidden,
:is(#groupChatSettingsModal, #channelSettingsV2Modal, #channelProfileModal, #groupChatProfileModal, #avatarCropModal) #channelSettingsV2SaveBtn.hidden,
:is(#groupChatSettingsModal, #channelSettingsV2Modal, #channelProfileModal, #groupChatProfileModal, #avatarCropModal) #groupChatProfileOpenSettingsBtn.hidden,
:is(#groupChatSettingsModal, #channelSettingsV2Modal, #channelProfileModal, #groupChatProfileModal, #avatarCropModal) #groupChatProfileOpenSettingsBtn[hidden],
:is(#groupChatSettingsModal, #channelSettingsV2Modal, #channelProfileModal, #groupChatProfileModal, #avatarCropModal) #groupChatProfileOpenChatBtn.hidden,
:is(#groupChatSettingsModal, #channelSettingsV2Modal, #channelProfileModal, #groupChatProfileModal, #avatarCropModal) #groupChatProfileOpenChatBtn[hidden] {
  display: none !important;
}

:is(#groupChatSettingsModal, #channelSettingsV2Modal, #channelProfileModal, #groupChatProfileModal, #avatarCropModal) .gcs-hidden-avatar-actions {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

@media (max-width: 1099px) {
  :is(#groupChatSettingsModal, #channelSettingsV2Modal, #channelProfileModal, #groupChatProfileModal, #avatarCropModal) .gcs-modal {
    width: calc(100vw - 32px);
    height: calc(100vh - 32px);
    max-height: calc(100vh - 32px);
    grid-template-columns: 280px minmax(0, 1fr);
  }

  #channelProfileModal .gcs-modal.channel-profile-modal {
    width: min(1000px, calc(100vw - 32px));
    height: min(620px, calc(100vh - 32px));
    max-height: min(620px, calc(100vh - 32px));
    grid-template-columns: 300px minmax(0, 1fr);
  }

  :is(#groupChatSettingsModal, #channelSettingsV2Modal, #channelProfileModal, #groupChatProfileModal, #avatarCropModal) .gcs-modal__sidebar {
    padding: 40px 22px 22px;
  }

  :is(#groupChatSettingsModal, #channelSettingsV2Modal, #channelProfileModal, #groupChatProfileModal, #avatarCropModal) .gcs-sheet {
    padding: 40px 28px 28px;
  }

  :is(#groupChatSettingsModal, #channelSettingsV2Modal, #channelProfileModal, #groupChatProfileModal, #avatarCropModal) .gcs-sidebar__heading,
  :is(#groupChatSettingsModal, #channelSettingsV2Modal, #channelProfileModal, #groupChatProfileModal, #avatarCropModal) .gcs-sidebar__heading,
  #groupChatSettingsModalTitle,
  #channelSettingsV2ModalTitle {
    font-size: 22px;
  }
}

@media (max-width: 767px) {
  :is(#groupChatSettingsModal, #channelSettingsV2Modal, #channelProfileModal, #groupChatProfileModal, #avatarCropModal).gcs-modal-backdrop {
    padding: 10px;
    align-items: stretch;
  }

  :is(#groupChatSettingsModal, #channelSettingsV2Modal, #channelProfileModal, #groupChatProfileModal, #avatarCropModal) .gcs-modal {
    width: calc(100vw - 20px);
    height: calc(100vh - 20px);
    max-height: calc(100vh - 20px);
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(0, 1fr) auto;
    border-radius: 20px;
  }

  :is(#groupChatSettingsModal, #channelSettingsV2Modal, #channelProfileModal, #groupChatProfileModal, #avatarCropModal) .gcs-modal__sidebar {
    grid-row: 1;
    grid-column: 1;
    padding: 20px 16px 12px;
    border-right: 0;
    border-bottom: 1px solid rgba(134, 162, 205, 0.12);
  }

  :is(#groupChatSettingsModal, #channelSettingsV2Modal, #channelProfileModal, #groupChatProfileModal, #avatarCropModal) .gcs-sidebar__profile {
    margin-bottom: 14px;
  }

  :is(#groupChatSettingsModal, #channelSettingsV2Modal, #channelProfileModal, #groupChatProfileModal, #avatarCropModal) .gcs-sidebar__avatar-wrap {
    width: 64px;
    height: 64px;
    flex-basis: 64px;
  }

  :is(#groupChatSettingsModal, #channelSettingsV2Modal, #channelProfileModal, #groupChatProfileModal, #avatarCropModal) .gcs-sidebar__heading,
  :is(#groupChatSettingsModal, #channelSettingsV2Modal, #channelProfileModal, #groupChatProfileModal, #avatarCropModal) .gcs-sidebar__heading,
  #groupChatSettingsModalTitle,
  #channelSettingsV2ModalTitle {
    font-size: 20px;
  }

  :is(#groupChatSettingsModal, #channelSettingsV2Modal, #channelProfileModal, #groupChatProfileModal, #avatarCropModal) .gcs-nav {
    flex-direction: row;
    overflow-x: auto;
    overflow-y: hidden;
    gap: 8px;
    padding-bottom: 4px;
    scrollbar-width: none;
  }

  :is(#groupChatSettingsModal, #channelSettingsV2Modal, #channelProfileModal, #groupChatProfileModal, #avatarCropModal) .gcs-nav::-webkit-scrollbar {
    display: none;
  }

  :is(#groupChatSettingsModal, #channelSettingsV2Modal, #channelProfileModal, #groupChatProfileModal, #avatarCropModal) .gcs-nav__btn {
    min-width: max-content;
    min-height: 44px;
    padding: 0 14px;
    font-size: 14px;
  }

  :is(#groupChatSettingsModal, #channelSettingsV2Modal, #channelProfileModal, #groupChatProfileModal, #avatarCropModal) .gcs-nav__icon {
    display: none;
  }

  :is(#groupChatSettingsModal, #channelSettingsV2Modal, #channelProfileModal, #groupChatProfileModal, #avatarCropModal) .gcs-modal__main {
    grid-row: 2;
    grid-column: 1;
  }

  :is(#groupChatSettingsModal, #channelSettingsV2Modal, #channelProfileModal, #groupChatProfileModal, #avatarCropModal) .gcs-sheet {
    padding: 20px 16px 16px;
  }

  :is(#groupChatSettingsModal, #channelSettingsV2Modal, #channelProfileModal, #groupChatProfileModal, #avatarCropModal) .gcs-sheet__head {
    flex-direction: column;
    align-items: flex-start;
  }

  :is(#groupChatSettingsModal, #channelSettingsV2Modal, #channelProfileModal, #groupChatProfileModal, #avatarCropModal) .gcs-type-grid {
    grid-template-columns: 1fr;
  }

  :is(#groupChatSettingsModal, #channelSettingsV2Modal, #channelProfileModal, #groupChatProfileModal, #avatarCropModal) .gcs-invite__row {
    flex-wrap: wrap;
    height: auto;
    min-height: 56px;
    padding: 10px 12px;
  }

  :is(#groupChatSettingsModal, #channelSettingsV2Modal, #channelProfileModal, #groupChatProfileModal, #avatarCropModal) .gcs-modal__footer {
    grid-row: 3;
    flex-direction: column;
    align-items: stretch;
    padding: 14px 16px;
    min-height: auto;
  }

  :is(#groupChatSettingsModal, #channelSettingsV2Modal, #channelProfileModal, #groupChatProfileModal, #avatarCropModal) .gcs-footer__left,
  :is(#groupChatSettingsModal, #channelSettingsV2Modal, #channelProfileModal, #groupChatProfileModal, #avatarCropModal) .gcs-footer__right {
    width: 100%;
    justify-content: stretch;
  }

  :is(#groupChatSettingsModal, #channelSettingsV2Modal, #channelProfileModal, #groupChatProfileModal, #avatarCropModal) .gcs-footer__right {
    flex-direction: column;
  }

  :is(#groupChatSettingsModal, #channelSettingsV2Modal, #channelProfileModal, #groupChatProfileModal, #avatarCropModal) .gcs-footer__right .gcs-btn,
  :is(#groupChatSettingsModal, #channelSettingsV2Modal, #channelProfileModal, #groupChatProfileModal, #avatarCropModal) .gcs-footer__right #groupChatSettingsSaveBtn,
  :is(#groupChatSettingsModal, #channelSettingsV2Modal, #channelProfileModal, #groupChatProfileModal, #avatarCropModal) .gcs-footer__right #channelSettingsV2SaveBtn {
    width: 100%;
  }

  #avatarCropModal .avatar-crop-gcs-modal__body {
    width: 100%;
  }

  #avatarCropModal .avatar-crop-canvas {
    width: min(360px, 100%);
  }
}

/* Channel profile modal — view-only deltas on shared gcs shell */
#channelProfileModal .gcs-modal.channel-profile-modal {
  width: min(1000px, calc(100vw - 64px));
  height: min(620px, calc(100vh - 48px));
  max-height: min(620px, calc(100vh - 48px));
  grid-template-columns: 330px minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr) auto;
  border-radius: 26px;
}

#channelProfileModal .gcs-modal__main.channel-profile-main {
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

#channelProfileModal .channel-profile-sheet.is-active,
#channelProfileModal .gcs-sheet.channel-profile-sheet.is-active {
  overflow-y: hidden;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 16px 20px 12px;
}

#channelProfileModal .channel-profile-sheet:not(.is-active),
#channelProfileModal .gcs-sheet.channel-profile-sheet:not(.is-active) {
  display: none !important;
}

#channelProfileModal .channel-profile-sheet[data-channel-profile-sheet="media"] {
  overflow-y: auto;
  max-height: calc(min(620px, calc(100vh - 48px)) - 72px);
}

#channelProfileModal .channel-profile-sidebar__avatar-wrap.channel-profile-avatar--clickable {
  cursor: zoom-in;
}

#channelProfileModal .channel-profile-sidebar__avatar-wrap.channel-profile-avatar--clickable:hover {
  filter: brightness(1.04);
}

#channelProfileModal .channel-profile-sidebar__avatar-wrap.channel-profile-avatar--static {
  cursor: default;
}

#channelProfileModal .channel-profile-info-card__desc-btn {
  display: block;
  width: 100%;
  margin: 8px 0 0;
  padding: 0;
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
  font: inherit;
  color: inherit;
}

#channelProfileModal .channel-profile-info-card__desc-btn:hover .channel-profile-info-card__desc,
#channelProfileModal .channel-profile-info-card__desc-btn:hover .channel-profile-info-card__read-more {
  color: rgba(226, 235, 250, 0.98);
}

#channelProfileModal .channel-profile-info-card__read-more {
  display: block;
  margin-top: 10px;
  font-size: 13px;
  font-weight: 650;
  line-height: 1.3;
  color: rgba(147, 197, 253, 0.92);
}

#channelProfileModal .channel-profile-side-card--clickable {
  width: 100%;
  text-align: left;
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

#channelProfileModal .channel-profile-side-card--clickable:hover {
  border-color: rgba(147, 197, 253, 0.34);
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.045) 0%, rgba(255, 255, 255, 0.028) 100%);
  transform: translateY(-1px);
}

#channelProfileModal .channel-profile-pinned-preview {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  padding-right: 0;
  margin: 0;
}

#channelProfileModal .channel-profile-pinned-card {
  cursor: pointer;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  text-align: left;
  width: 100%;
}

#channelProfileModal .channel-profile-pinned-card__icon {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  color: rgba(147, 197, 253, 0.92);
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(129, 140, 248, 0.24);
  box-shadow: 0 0 0 1px rgba(99, 102, 241, 0.08);
}

#channelProfileModal .channel-profile-pinned-card__icon svg {
  width: 18px;
  height: 18px;
}

#channelProfileModal .channel-profile-pinned-card__main {
  flex: 1 1 auto;
  min-width: 0;
  padding-right: 18px;
}

#channelProfileModal .channel-profile-pinned-card__title {
  margin: 0 0 4px;
}

#channelProfileModal .channel-profile-pinned-card--empty .channel-profile-pinned-preview {
  color: rgba(154, 171, 197, 0.78);
}

#channelProfileModal .channel-profile-rules-card {
  position: relative;
}

#channelProfileModal .channel-profile-side-card__chevron {
  position: absolute;
  top: 50%;
  right: 14px;
  transform: translateY(-50%);
  font-size: 18px;
  line-height: 1;
  color: rgba(154, 171, 197, 0.72);
  pointer-events: none;
}

#channelProfileModal .channel-profile-links-card.hidden {
  display: none !important;
}

#channelProfileModal .channel-profile-footer {
  min-height: 72px;
  height: 72px;
}

.channel-profile-text-modal {
  width: min(520px, calc(100vw - 32px));
  max-height: min(420px, calc(100vh - 48px));
  border-radius: 20px;
  border: 1px solid rgba(132, 170, 224, 0.28);
  background: linear-gradient(155deg, rgba(13, 25, 44, 0.98) 0%, rgba(10, 21, 38, 0.96) 100%);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.48);
  padding: 0 0 18px;
  overflow: hidden;
}

.channel-profile-text-modal__body {
  padding: 0 22px 4px;
  max-height: min(320px, calc(100vh - 160px));
  overflow-y: auto;
  font-size: 15px;
  line-height: 1.58;
  color: rgba(226, 235, 250, 0.94);
  white-space: pre-wrap;
  word-break: break-word;
}

#channelProfileModal .gcs-modal__sidebar.channel-profile-sidebar {
  padding: 28px 22px 16px;
  gap: 8px;
  width: 330px;
  max-width: 330px;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

#channelProfileModal .channel-profile-sidebar__hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  margin-bottom: 0;
  text-align: center;
  width: 100%;
}

#channelProfileModal .channel-profile-sidebar__avatar-wrap {
  width: 136px;
  height: 136px;
  flex: 0 0 136px;
  padding: 5px;
  border-radius: 50%;
  overflow: hidden;
  background: linear-gradient(145deg, #38bdf8 0%, #6366f1 52%, #a855f7 100%);
  box-shadow:
    0 0 0 1px rgba(147, 197, 253, 0.18),
    0 0 36px rgba(56, 189, 248, 0.38),
    0 0 52px rgba(139, 92, 246, 0.28);
}

#channelProfileModal .channel-profile-sidebar__title {
  margin: 4px 0 0;
  text-align: center;
  font-size: 21px;
  line-height: 1.1;
  letter-spacing: 0.015em;
  max-width: 100%;
}

#channelProfileModal .channel-profile-sidebar__handle {
  margin: 0;
  font-size: 16px;
  font-weight: 550;
  line-height: 1.35;
  color: rgba(198, 211, 233, 0.84);
}

#channelProfileModal .channel-profile-sidebar__status {
  margin-top: 2px;
}

#channelProfileModal .channel-profile-sidebar__subs {
  margin: 0;
  font-size: 14px;
  font-weight: 650;
  color: rgba(214, 226, 246, 0.9);
}

#channelProfileModal .channel-profile-sidebar__actions {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-top: 8px;
  padding: 0 2px;
}

#channelProfileModal .channel-profile-sidebar__actions .gcs-btn {
  width: 100%;
  min-height: 50px;
  height: 50px;
  border-radius: 14px;
  font-size: 15px;
  font-weight: 650;
}

#channelProfileModal .channel-profile-sidebar__actions .gcs-btn--save {
  box-shadow: 0 10px 28px rgba(59, 130, 246, 0.28);
}

#channelProfileModal .channel-profile-notification-btn {
  width: 100%;
  height: 48px;
  min-height: 48px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0 16px;
  border: 1px solid rgba(132, 170, 224, 0.18);
  background: rgba(20, 32, 55, 0.75);
  color: #d7deee;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

#channelProfileModal .channel-profile-notification-btn:hover:not(:disabled) {
  background: rgba(40, 55, 90, 0.85);
  border-color: rgba(132, 170, 224, 0.35);
}

#channelProfileModal .channel-profile-notification-btn.is-active {
  background: rgba(88, 70, 220, 0.18);
  border-color: rgba(120, 110, 255, 0.45);
  color: #b8b5ff;
}

#channelProfileModal .channel-profile-notification-btn.is-active:hover:not(:disabled) {
  background: rgba(88, 70, 220, 0.24);
  border-color: rgba(120, 110, 255, 0.55);
}

#channelProfileModal .channel-profile-notification-btn .icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

#channelProfileModal .channel-profile-notification-btn .icon svg {
  width: 20px;
  height: 20px;
}

#channelProfileModal .channel-profile-notification-btn .icon.bell {
  display: none;
}

#channelProfileModal .channel-profile-notification-btn.is-active .icon.bell-off {
  display: none;
}

#channelProfileModal .channel-profile-notification-btn.is-active .icon.bell {
  display: inline-flex;
}

#channelProfileModal .channel-profile-nav {
  margin-top: auto;
  flex: 0 0 auto;
  min-height: 0;
  padding-top: 8px;
}

#channelProfileModal .channel-profile-nav .gcs-nav__btn {
  min-height: 46px;
  border-radius: 14px;
}

#channelProfileModal .channel-profile-nav .gcs-nav__btn.is-active {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.28) 0%, rgba(139, 92, 246, 0.22) 100%);
  border-color: rgba(129, 140, 248, 0.34);
}

#channelProfileModal .channel-profile-sheet {
  padding: 16px 20px 12px;
  flex: 1 1 auto;
}

#channelProfileModal .channel-profile-sheet[data-channel-profile-sheet="overview"] {
  overflow-y: hidden;
  justify-content: flex-start;
}

#channelProfileModal .channel-profile-sheet[data-channel-profile-sheet="media"] {
  overflow-y: auto;
  max-height: calc(min(620px, calc(100vh - 48px)) - 72px);
}

#channelProfileModal .channel-profile-sheet .gcs-sheet__head {
  margin-bottom: 10px;
  flex: 0 0 auto;
}

#channelProfileModal .channel-profile-sheet .gcs-sheet__title {
  font-size: 22px;
  font-weight: 750;
  line-height: 1.15;
}

#channelProfileModal .channel-profile-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 272px;
  grid-template-rows: auto auto;
  gap: 8px 12px;
  align-items: start;
  align-content: start;
  width: 100%;
  flex: 0 1 auto;
  min-height: 0;
}

#channelProfileModal .channel-profile-primary-col {
  display: contents;
}

#channelProfileModal .channel-profile-info-card {
  grid-column: 1;
  grid-row: 1;
  width: 100%;
  min-height: 0;
  border-radius: 18px;
  border: 1px solid rgba(132, 158, 203, 0.16);
  background: linear-gradient(155deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.022) 100%);
  padding: 18px 20px 16px;
  display: block;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

#channelProfileModal .channel-profile-info-card__title {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 17px;
  font-weight: 750;
  line-height: 1.15;
  color: rgba(245, 248, 255, 0.96);
}

#channelProfileModal .channel-profile-info-card__title-primary,
#channelProfileModal .channel-profile-info-card__title-secondary {
  display: block;
}

#channelProfileModal .channel-profile-info-card__title-secondary:empty {
  display: none;
}

#channelProfileModal .channel-profile-info-card__handle {
  margin: 2px 0 0;
  font-size: 15px;
  font-weight: 600;
  color: rgba(191, 219, 254, 0.9);
}

#channelProfileModal .channel-profile-info-card__desc {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
  margin: 10px 0 0;
  font-size: 13px;
  line-height: 1.55;
  color: rgba(210, 223, 244, 0.88);
  max-width: none;
}

#channelProfileModal .channel-profile-stats {
  display: grid;
  width: 100%;
}

#channelProfileModal .channel-profile-stats--overview {
  grid-column: 2;
  grid-row: 2;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  width: 100%;
  max-width: 272px;
  margin-top: 0;
  align-self: stretch;
  align-items: stretch;
  justify-self: stretch;
  min-height: 0;
}

#channelProfileModal .channel-profile-stats--overview .channel-profile-stat-card {
  min-height: 0;
  height: 100%;
  padding: 10px 8px 8px;
  border-radius: 14px;
  gap: 6px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  box-sizing: border-box;
}

#channelProfileModal .channel-profile-stats--overview .channel-profile-stat-card__icon {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  flex: 0 0 30px;
}

#channelProfileModal .channel-profile-stats--overview .channel-profile-stat-card__icon svg {
  width: 15px;
  height: 15px;
}

#channelProfileModal .channel-profile-stats--overview .channel-profile-stat-card__content {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 4px;
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
}

#channelProfileModal .channel-profile-stats--overview .channel-profile-stat-card__value {
  font-size: 20px;
  line-height: 1.05;
  margin: 0;
  min-height: 21px;
}

#channelProfileModal .channel-profile-stats--overview .channel-profile-stat-card__value--small {
  font-size: 11px;
  line-height: 1.15;
  margin: 0;
  min-height: 21px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

#channelProfileModal .channel-profile-stats--overview .channel-profile-stat-card__label {
  margin: 0;
  font-size: 10px;
  line-height: 1.15;
}

#channelProfileModal .channel-profile-stats--side {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  width: 100%;
  margin-top: 0;
  align-items: stretch;
}

#channelProfileModal .channel-profile-stats--side .channel-profile-stat-card {
  min-height: 88px;
  height: 88px;
  padding: 10px 8px 8px;
  border-radius: 14px;
  gap: 6px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  box-sizing: border-box;
}

#channelProfileModal .channel-profile-stats--side .channel-profile-stat-card__icon {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  flex: 0 0 30px;
}

#channelProfileModal .channel-profile-stats--side .channel-profile-stat-card__icon svg {
  width: 15px;
  height: 15px;
}

#channelProfileModal .channel-profile-stats--side .channel-profile-stat-card__content {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 4px;
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
}

#channelProfileModal .channel-profile-stats--side .channel-profile-stat-card__value {
  font-size: 20px;
  line-height: 1.05;
  margin: 0;
  min-height: 21px;
}

#channelProfileModal .channel-profile-stats--side .channel-profile-stat-card__value--small {
  font-size: 11px;
  line-height: 1.15;
  margin: 0;
  min-height: 21px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

#channelProfileModal .channel-profile-stats--side .channel-profile-stat-card__label {
  margin: 0;
  font-size: 10px;
  line-height: 1.15;
}

#channelProfileModal .channel-profile-stats--analytics {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

#channelProfileModal .channel-profile-stat-card--analytics {
  min-height: 108px;
  height: auto;
  padding: 18px 16px 16px;
  align-items: stretch;
  justify-content: center;
}

#channelProfileModal .channel-profile-stat-card--analytics .channel-profile-stat-card__value {
  font-size: clamp(24px, 2.8vw, 32px);
  line-height: 1.05;
}

#channelProfileModal .channel-profile-stat-card--analytics .channel-profile-stat-card__label {
  margin: 10px 0 0;
  font-size: 12px;
  line-height: 1.2;
}

#channelProfileModal .channel-profile-stats-created {
  margin-top: 14px;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid rgba(132, 158, 203, 0.14);
  background: rgba(255, 255, 255, 0.028);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

#channelProfileModal .channel-profile-stats-created__label {
  font-size: 13px;
  font-weight: 600;
  color: rgba(154, 171, 197, 0.82);
}

#channelProfileModal .channel-profile-stats-created__value {
  font-size: 14px;
  font-weight: 700;
  color: rgba(245, 248, 255, 0.94);
  white-space: nowrap;
}

#channelProfileModal .channel-profile-stats--extended {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

#channelProfileModal .channel-profile-stat-card--optional.hidden {
  display: none !important;
}

#channelProfileModal .channel-profile-subscribers {
  display: grid;
  gap: 14px;
}

#channelProfileModal .channel-profile-subscribers__search {
  margin: 0;
}

#channelProfileModal .channel-profile-subscribers__status {
  margin: 0;
  min-height: 20px;
}

#channelProfileModal .channel-profile-subscribers__list {
  display: grid;
  gap: 8px;
}

#channelProfileModal .channel-profile-subscriber-row {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(132, 158, 203, 0.14);
  background: rgba(255, 255, 255, 0.028);
  color: inherit;
  text-align: left;
  cursor: pointer;
  transition: background 140ms ease, border-color 140ms ease, transform 140ms ease;
}

#channelProfileModal .channel-profile-subscriber-row:hover {
  background: rgba(255, 255, 255, 0.045);
  border-color: rgba(147, 197, 253, 0.32);
  transform: translateY(-1px);
}

#channelProfileModal .channel-profile-subscriber-row__avatar {
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 14px;
  font-weight: 700;
  background: rgba(99, 102, 241, 0.16);
  border: 1px solid rgba(129, 140, 248, 0.24);
  color: rgba(226, 235, 250, 0.94);
  overflow: hidden;
}

#channelProfileModal .channel-profile-subscriber-row__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

#channelProfileModal .channel-profile-subscriber-row__text {
  min-width: 0;
  flex: 1 1 auto;
  display: grid;
  gap: 2px;
}

#channelProfileModal .channel-profile-subscriber-row__name {
  font-size: 15px;
  font-weight: 650;
  color: rgba(245, 248, 255, 0.96);
  line-height: 1.2;
}

#channelProfileModal .channel-profile-subscriber-row__meta {
  font-size: 12px;
  color: rgba(154, 171, 197, 0.78);
}

#channelProfileModal .channel-profile-stat-card {
  min-height: 120px;
  height: 120px;
  border-radius: 16px;
  padding: 18px 16px 16px;
  border: 1px solid rgba(132, 158, 203, 0.14);
  background: rgba(255, 255, 255, 0.03);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 12px;
}

#channelProfileModal .channel-profile-stat-card__icon {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: rgba(99, 102, 241, 0.16);
  border: 1px solid rgba(129, 140, 248, 0.26);
  color: rgba(191, 219, 254, 0.92);
}

#channelProfileModal .channel-profile-stat-card__icon svg {
  width: 20px;
  height: 20px;
}

#channelProfileModal .channel-profile-stat-card__content {
  min-width: 0;
  width: 100%;
}

#channelProfileModal .channel-profile-stat-card__label {
  margin: 8px 0 0;
  font-size: 12px;
  font-weight: 600;
  color: rgba(154, 171, 197, 0.78);
  line-height: 1.2;
}

#channelProfileModal .channel-profile-stat-card__value {
  margin: 0;
  font-size: 28px;
  font-weight: 750;
  line-height: 1.05;
  color: rgba(245, 248, 255, 0.96);
}

#channelProfileModal .channel-profile-stat-card__value--small {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.15;
  white-space: nowrap;
  letter-spacing: -0.01em;
}

#channelProfileModal .channel-profile-media {
  grid-column: 1;
  grid-row: 2;
  align-self: stretch;
  border: 1px solid rgba(132, 158, 203, 0.16);
  border-radius: 18px;
  padding: 10px 12px 10px;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.03) 0%, rgba(255, 255, 255, 0.018) 100%);
  width: 100%;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

#channelProfileModal .channel-profile-media__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  min-height: 24px;
}

#channelProfileModal .channel-profile-media__head .gcs-section-title {
  margin: 0;
  font-size: 15px;
  line-height: 1.2;
}

#channelProfileModal .channel-profile-media__show-all {
  color: rgba(191, 219, 254, 0.92);
  font-size: 13px;
  font-weight: 650;
  padding: 0;
  min-height: 0;
  height: auto;
}

#channelProfileModal .channel-profile-media__grid {
  margin-top: 4px;
}

#channelProfileModal .channel-profile-media__grid.hidden {
  display: none !important;
}

#channelProfileModal .channel-profile-media__empty {
  margin: 8px 0 0;
  padding: 4px 2px;
  font-size: 13px;
  color: rgba(154, 171, 197, 0.78);
}

#channelProfileModal .channel-profile-media__empty.hidden {
  display: none !important;
}

#channelProfileModal .channel-profile-media__thumb {
  display: block;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: inherit;
}

#channelProfileModal .channel-profile-media__thumb img,
#channelProfileModal .channel-profile-media__thumb video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.channel-profile-open-trigger {
  cursor: pointer;
}

.channel-rail-item .channel-profile-open-trigger:hover {
  color: rgba(191, 219, 254, 0.96);
}

.olone-chat-header__avatar.channel-profile-open-trigger,
.olone-chat-header__title.channel-profile-open-trigger {
  cursor: pointer;
}

#channelProfileModal .channel-profile-sidebar__title.channel-profile-open-trigger:hover,
#channelProfileModal .channel-profile-sidebar__avatar-wrap.channel-profile-open-trigger:hover {
  opacity: 0.92;
}

#channelProfileModal .channel-profile-media__item {
  height: 96px;
  min-height: 96px;
  border-radius: 14px;
  border: 1px solid rgba(147, 197, 253, 0.2);
  background: var(--channel-profile-media-bg, rgba(255, 255, 255, 0.04));
  overflow: hidden;
  position: relative;
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 180ms ease, filter 160ms ease;
  backdrop-filter: blur(12px) saturate(1.15);
  -webkit-backdrop-filter: blur(12px) saturate(1.15);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 4px 16px rgba(15, 23, 42, 0.2);
}

#channelProfileModal .channel-profile-media__item:hover {
  transform: translateY(-2px);
  border-color: rgba(147, 197, 253, 0.52);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 14px 32px rgba(15, 23, 42, 0.38);
  filter: brightness(1.06);
}

#channelProfileModal .channel-profile-media__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

#channelProfileModal .channel-profile-media__item::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06) 0%, transparent 42%);
  pointer-events: none;
  z-index: 1;
}

#channelProfileModal .channel-profile-media__item::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(180deg, transparent 48%, rgba(2, 8, 23, 0.42));
  pointer-events: none;
  z-index: 2;
}

#channelProfileModal [data-channel-profile-sheet="overview"] .channel-profile-media__item--placeholder,
#channelProfileModal [data-channel-profile-sheet="overview"] .channel-media__card--placeholder {
  display: none !important;
}

#channelProfileModal .channel-profile-media__item--placeholder {
  background: var(--channel-profile-media-bg, linear-gradient(145deg, rgba(59, 130, 246, 0.22), rgba(15, 23, 42, 0.24)));
}

#channelProfileModal .channel-profile-media__ph {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: rgba(191, 219, 254, 0.62);
  z-index: 3;
}

#channelProfileModal .channel-profile-media__ph svg {
  width: 30px;
  height: 30px;
  opacity: 0.82;
  filter: drop-shadow(0 2px 8px rgba(15, 23, 42, 0.35));
}

#channelProfileModal .channel-profile-side-cards {
  grid-column: 2;
  grid-row: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-content: stretch;
  align-self: start;
  min-width: 0;
  width: 272px;
  max-width: 272px;
  min-height: 0;
}

#channelProfileModal .channel-profile-side-card--clickable {
  appearance: none;
  display: block;
  font: inherit;
  color: inherit;
}

#channelProfileModal .channel-profile-side-card {
  border-radius: 18px;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.034) 0%, rgba(255, 255, 255, 0.02) 100%);
  border: 1px solid rgba(132, 158, 203, 0.14);
  padding: 14px 14px 12px;
  min-height: 96px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

#channelProfileModal .channel-profile-side-card .gcs-empty__title {
  font-size: 15px;
  margin-bottom: 4px;
}

#channelProfileModal .channel-profile-link-btn {
  width: 100%;
  min-height: 46px;
  height: auto;
  padding: 10px 12px;
  justify-content: flex-start;
  align-items: flex-start;
  margin-top: 6px;
  border-radius: 14px;
  flex-direction: column;
  gap: 4px;
}

#channelProfileModal .channel-profile-link-btn span {
  font-size: 13px;
  color: rgba(154, 171, 197, 0.82);
}

#channelProfileModal .channel-profile-link-btn strong,
#channelProfileModal .channel-profile-link-btn__label {
  color: rgba(236, 242, 255, 0.96);
  font-weight: 700;
  font-size: 15px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

#channelProfileModal .channel-profile-link-btn__label::after {
  content: "";
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
  background: currentColor;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6'/%3E%3Cpolyline points='15 3 21 3 21 9'/%3E%3Cline x1='10' y1='14' x2='21' y2='3'/%3E%3C/svg%3E") center / contain no-repeat;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6'/%3E%3Cpolyline points='15 3 21 3 21 9'/%3E%3Cline x1='10' y1='14' x2='21' y2='3'/%3E%3C/svg%3E") center / contain no-repeat;
  opacity: 0.72;
}

#channelProfileModal .channel-profile-contact-card {
  margin-top: 8px;
  border-radius: 14px;
  padding: 10px 12px;
  border: 1px solid rgba(132, 158, 203, 0.14);
  background: rgba(255, 255, 255, 0.025);
  min-height: 56px;
}

#channelProfileModal .channel-profile-contact-card p {
  margin: 0;
  color: rgba(154, 171, 197, 0.78);
  font-size: 13px;
}

#channelProfileModal .channel-profile-contact-card strong {
  display: block;
  margin-top: 8px;
  font-size: 16px;
  color: rgba(236, 242, 255, 0.96);
}

#channelProfileModal .channel-profile-side-card .gcs-empty__text {
  margin-top: 10px;
  font-size: 14px;
  line-height: 1.6;
  color: rgba(210, 223, 244, 0.86);
}

#channelProfileModal .channel-profile-footer {
  min-height: 72px;
  height: 72px;
  justify-content: flex-end;
}

#channelProfileModal .channel-profile-footer .gcs-footer__left {
  display: none;
}

#channelProfileModal .channel-profile-footer .gcs-footer__right {
  margin-left: auto;
}

#channelProfileModal .channel-profile-footer .gcs-footer__right .gcs-btn {
  height: 46px;
  min-height: 46px;
}

@media (max-width: 1400px) {
  #channelProfileModal .channel-profile-sheet {
    padding: 18px 20px 14px;
  }

  #channelProfileModal .channel-profile-info-card {
    padding: 16px 18px;
  }

  #channelProfileModal .channel-profile-side-card {
    min-height: 100px;
    padding: 14px;
  }
}

@media (max-width: 1099px) {
  #channelProfileModal .channel-profile-layout {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
  }

  #channelProfileModal .channel-profile-info-card,
  #channelProfileModal .channel-profile-media,
  #channelProfileModal .channel-profile-side-cards,
  #channelProfileModal .channel-profile-stats--overview {
    grid-column: 1;
    grid-row: auto;
  }

  #channelProfileModal .channel-profile-side-cards {
    width: 100%;
    max-width: none;
  }

  #channelProfileModal .channel-profile-stats--overview {
    max-width: none;
  }
}

@media (max-width: 767px) {
  #channelProfileModal.gcs-modal-backdrop {
    padding: 10px;
    align-items: stretch;
  }

  #channelProfileModal .gcs-modal.channel-profile-modal {
    width: calc(100vw - 20px);
    height: calc(100vh - 20px);
    max-height: calc(100vh - 20px);
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(0, 1fr) auto;
    border-radius: 20px;
  }

  #channelProfileModal .gcs-modal__sidebar.channel-profile-sidebar {
    grid-row: 1;
    grid-column: 1;
    width: 100%;
    max-width: none;
    padding: 14px 14px 8px;
    flex-shrink: 0;
  }

  #channelProfileModal .gcs-modal__main.channel-profile-main {
    grid-row: 2;
    grid-column: 1;
    min-height: 0;
    overflow: hidden;
  }

  #channelProfileModal .channel-profile-sheet,
  #channelProfileModal .gcs-sheet.channel-profile-sheet {
    padding: 12px 14px 10px;
    overflow-x: hidden;
    overflow-y: auto;
    min-height: 0;
  }

  #channelProfileModal .channel-profile-sheet[data-channel-profile-sheet="overview"] {
    overflow-y: auto;
    overflow-x: hidden;
  }

  #channelProfileModal .channel-profile-layout {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
    gap: 10px;
    overflow-x: hidden;
    min-width: 0;
  }

  #channelProfileModal .channel-profile-info-card,
  #channelProfileModal .channel-profile-media,
  #channelProfileModal .channel-profile-side-cards,
  #channelProfileModal .channel-profile-stats--overview {
    grid-column: 1;
    grid-row: auto;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-x: hidden;
  }

  #channelProfileModal .channel-profile-side-cards {
    margin-top: 0;
  }

  #channelProfileModal .channel-profile-stats--overview {
    max-width: none;
  }

  #channelProfileModal .channel-profile-stats--overview,
  #channelProfileModal .channel-profile-stats--side {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-top: 0;
  }

  #channelProfileModal .channel-profile-footer {
    grid-row: 3;
    grid-column: 1;
    min-height: 56px;
    height: auto;
    padding: 10px 12px;
    flex-shrink: 0;
  }

  #channelProfileModal .channel-profile-footer .gcs-footer__right {
    flex-direction: row;
    gap: 8px;
    width: 100%;
  }

  #channelProfileModal .channel-profile-footer .gcs-footer__right .gcs-btn {
    flex: 1 1 0;
    min-height: 44px;
    height: 44px;
    width: auto;
  }

  #channelProfileModal .channel-profile-sidebar__avatar-wrap {
    width: 88px;
    height: 88px;
    flex-basis: 88px;
  }

  #channelProfileModal .channel-profile-sidebar__actions {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 6px;
  }

  #channelProfileModal .channel-profile-sidebar__actions .gcs-btn {
    min-height: 44px;
    height: 44px;
    font-size: 14px;
  }

  #channelProfileModal .channel-profile-nav {
    flex-direction: row;
    margin-top: 6px;
    padding-top: 0;
    overflow-x: auto;
    overflow-y: hidden;
    gap: 8px;
    padding-bottom: 2px;
  }

  #channelProfileModal .channel-profile-nav .gcs-nav__btn {
    min-width: max-content;
    min-height: 40px;
    padding: 0 12px;
  }

  #channelProfileModal .channel-profile-nav .gcs-nav__icon {
    display: none;
  }

  #channelProfileModal .channel-profile-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  #channelProfileModal .channel-profile-media__grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  #channelProfileModal .channel-profile-info-card {
    padding: 14px 16px 12px;
  }

  #channelProfileModal .channel-profile-info-card__title {
    font-size: 16px;
  }
}

#channelProfileModal .channel-profile-info-page {
  display: flex;
  flex-direction: column;
  gap: 22px;
  max-width: 720px;
}

#channelProfileModal .channel-profile-info-block {
  border: 1px solid rgba(132, 158, 203, 0.16);
  border-radius: 18px;
  padding: 20px 22px;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.03) 0%, rgba(255, 255, 255, 0.018) 100%);
}

#channelProfileModal .channel-profile-info-block .gcs-section-title {
  margin: 0 0 12px;
  font-size: 16px;
}

#channelProfileModal .channel-profile-info-block__text {
  margin: 0;
  font-size: 15px;
  line-height: 1.55;
  color: rgba(226, 232, 240, 0.92);
  white-space: pre-wrap;
}

#channelProfileModal .channel-profile-info-block__links {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

#channelProfileModal .channel-profile-info-block__empty {
  margin: 0;
  color: rgba(154, 171, 197, 0.78);
}

/* Avatar crop modal — same gcs shell, single-column layout (no sidebar). */
#avatarCropModal .gcs-modal.avatar-crop-gcs-modal {
  grid-template-columns: 1fr;
  grid-template-rows: minmax(0, 1fr) auto;
}

#avatarCropModal .avatar-crop-gcs-modal__main {
  grid-column: 1;
  grid-row: 1;
  min-height: 0;
}

#avatarCropModal .avatar-crop-gcs-modal__sheet {
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: 100%;
}

#avatarCropModal .avatar-crop-gcs-modal__body {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 18px;
  width: min(560px, 100%);
  margin: 0 auto;
  flex: 1 1 auto;
  min-height: 0;
}

#avatarCropModal .avatar-crop-gcs-modal__preview {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
}

#avatarCropModal .avatar-crop-canvas {
  width: min(420px, 100%);
  max-width: 100%;
  aspect-ratio: 1;
  height: auto;
  touch-action: none;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
  border-radius: 16px;
  border: 1px solid rgba(134, 164, 210, 0.22);
  background: #000;
  display: block;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

#avatarCropModal .avatar-crop-canvas:active {
  cursor: grabbing;
}

#avatarCropModal .avatar-crop-gcs-modal__zoom-field {
  width: 100%;
  margin: 0;
}

#avatarCropModal .avatar-crop-gcs-modal__zoom {
  width: 100%;
  accent-color: #518fff;
  margin-top: 8px;
}

#avatarCropModal .avatar-crop-hint {
  margin: 0;
  text-align: center;
}

/* Channel description / pinned info modals — compact gcs shell over Channel Profile */
:is(#channelDescriptionModal, #channelPinnedInfoModal).gcs-modal-backdrop {
  background: rgba(3, 8, 18, 0.72);
  backdrop-filter: blur(10px) saturate(0.8);
  -webkit-backdrop-filter: blur(10px) saturate(0.8);
  transition: opacity 170ms ease;
}

:is(#channelDescriptionModal, #channelPinnedInfoModal).gcs-modal-backdrop:not(.hidden) {
  animation: gcsBackdropIn 180ms ease;
  z-index: 1300;
}

:is(#channelDescriptionModal, #channelPinnedInfoModal) .gcs-modal:is(.channel-description-modal, .channel-pinned-info-modal) {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  width: 480px;
  min-height: 260px;
  max-width: calc(100vw - 32px);
  max-height: calc(100vh - 48px);
  height: auto;
  border-radius: 24px;
  overflow: hidden;
  background: linear-gradient(
    135deg,
    rgba(13, 25, 44, 0.96) 0%,
    rgba(10, 21, 38, 0.94) 48%,
    rgba(9, 18, 34, 0.97) 100%
  );
  border: 1px solid rgba(132, 170, 224, 0.28);
  box-shadow:
    0 32px 100px rgba(0, 0, 0, 0.56),
    inset 0 1px 0 rgba(255, 255, 255, 0.055);
  backdrop-filter: blur(12px) saturate(1.1);
  -webkit-backdrop-filter: blur(12px) saturate(1.1);
  color: #eef2ff;
  box-sizing: border-box;
}

:is(#channelDescriptionModal, #channelPinnedInfoModal) .gcs-modal:is(.channel-description-modal, .channel-pinned-info-modal)::before {
  content: "";
  position: absolute;
  top: -18%;
  left: -8%;
  width: 52%;
  height: 48%;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.14) 0%, transparent 68%);
  pointer-events: none;
  z-index: 0;
}

:is(#channelDescriptionModal, #channelPinnedInfoModal) .gcs-modal:is(.channel-description-modal, .channel-pinned-info-modal)::after {
  content: "";
  position: absolute;
  bottom: -12%;
  left: 28%;
  width: 44%;
  height: 40%;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.1) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

:is(#channelDescriptionModal, #channelPinnedInfoModal) .gcs-modal:is(.channel-description-modal, .channel-pinned-info-modal) > * {
  position: relative;
  z-index: 1;
}

:is(#channelDescriptionModal, #channelPinnedInfoModal) :is(.channel-description-header, .channel-pinned-info-header) {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 20px 22px 12px;
  flex: 0 0 auto;
}

:is(#channelDescriptionModal, #channelPinnedInfoModal) :is(.channel-description-header__title, .channel-pinned-info-header__title) {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.2;
  color: rgba(245, 248, 255, 0.96);
}

:is(#channelDescriptionModal, #channelPinnedInfoModal) :is(.channel-description-close, .channel-pinned-info-close) {
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: rgba(210, 223, 244, 0.82);
  display: grid;
  place-items: center;
  cursor: pointer;
  flex: 0 0 36px;
  transition: color 140ms ease, background 140ms ease;
}

:is(#channelDescriptionModal, #channelPinnedInfoModal) :is(.channel-description-close, .channel-pinned-info-close):hover {
  color: #f5f8ff;
  background: rgba(255, 255, 255, 0.04);
}

:is(#channelDescriptionModal, #channelPinnedInfoModal) :is(.channel-description-close, .channel-pinned-info-close):focus-visible {
  outline: 2px solid rgba(81, 143, 255, 0.72);
  outline-offset: 2px;
}

:is(#channelDescriptionModal, #channelPinnedInfoModal) :is(.channel-description-close, .channel-pinned-info-close) svg {
  width: 20px;
  height: 20px;
}

:is(#channelDescriptionModal, #channelPinnedInfoModal) :is(.channel-description-body, .channel-pinned-info-body) {
  flex: 1 1 auto;
  min-height: 0;
  padding: 8px 22px 16px;
  overflow-y: auto;
}

:is(#channelDescriptionModal, #channelPinnedInfoModal) :is(.channel-description-empty, .channel-pinned-info-empty) {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
  padding: 12px 8px 8px;
}

:is(#channelDescriptionModal, #channelPinnedInfoModal) :is(.channel-description-empty, .channel-pinned-info-empty).hidden {
  display: none !important;
}

:is(#channelDescriptionModal, #channelPinnedInfoModal) :is(.channel-description-icon, .channel-pinned-info-icon) {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: rgba(147, 197, 253, 0.92);
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(129, 140, 248, 0.28);
  box-shadow:
    0 0 0 1px rgba(99, 102, 241, 0.12),
    0 10px 28px rgba(59, 130, 246, 0.18);
}

:is(#channelDescriptionModal, #channelPinnedInfoModal) :is(.channel-description-icon, .channel-pinned-info-icon) svg {
  width: 28px;
  height: 28px;
}

:is(#channelDescriptionModal, #channelPinnedInfoModal) :is(.channel-description-empty__title, .channel-pinned-info-empty__title) {
  margin: 8px 0 0;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.35;
  color: rgba(236, 242, 255, 0.94);
}

:is(#channelDescriptionModal, #channelPinnedInfoModal) :is(.channel-description-empty__text, .channel-pinned-info-empty__text) {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  color: rgba(154, 171, 197, 0.82);
  max-width: 360px;
}

:is(#channelDescriptionModal, #channelPinnedInfoModal) :is(.channel-description-content, .channel-pinned-info-content) {
  margin: 0;
  font-size: 15px;
  line-height: 1.5;
  color: rgba(226, 235, 250, 0.94);
  white-space: pre-wrap;
  word-break: break-word;
}

:is(#channelDescriptionModal, #channelPinnedInfoModal) :is(.channel-description-content, .channel-pinned-info-content).hidden {
  display: none !important;
}

:is(#channelDescriptionModal, #channelPinnedInfoModal) :is(.channel-description-footer, .channel-pinned-info-footer) {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  padding: 0 22px 20px;
  flex: 0 0 auto;
}

:is(#channelDescriptionModal, #channelPinnedInfoModal) :is(.channel-description-footer__btn, .channel-pinned-info-footer__btn) {
  height: 42px;
  min-width: 108px;
  padding: 0 20px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(134, 164, 210, 0.18);
  color: rgba(226, 235, 250, 0.92);
  font-size: 15px;
  font-weight: 600;
}

:is(#channelDescriptionModal, #channelPinnedInfoModal) :is(.channel-description-footer__btn, .channel-pinned-info-footer__btn):hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.055);
}

@media (max-width: 520px) {
  :is(#channelDescriptionModal, #channelPinnedInfoModal) .gcs-modal:is(.channel-description-modal, .channel-pinned-info-modal) {
    width: calc(100vw - 24px);
    min-height: 260px;
  }

  :is(#channelDescriptionModal, #channelPinnedInfoModal) :is(.channel-description-header, .channel-pinned-info-header),
  :is(#channelDescriptionModal, #channelPinnedInfoModal) :is(.channel-description-body, .channel-pinned-info-body),
  :is(#channelDescriptionModal, #channelPinnedInfoModal) :is(.channel-description-footer, .channel-pinned-info-footer) {
    padding-left: 16px;
    padding-right: 16px;
  }
}

/* ===== Group Chat Roles & Permissions (final UI) ===== */

#groupChatSettingsModal .gcs-sheet--roles {
  overflow: hidden;
  padding-bottom: 24px;
}

#groupChatSettingsModal .gcs-btn--create-role {
  height: 42px;
  padding: 0 18px;
  border-radius: 12px;
  border: 1px solid rgba(132, 170, 224, 0.28);
  background: linear-gradient(135deg, #3b82f6 0%, #6366f1 52%, #8b5cf6 100%);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.01em;
  box-shadow: 0 8px 22px rgba(59, 130, 246, 0.28);
  transition: transform 160ms ease, filter 160ms ease, box-shadow 160ms ease;
}

#groupChatSettingsModal .gcs-btn--create-role:hover:not(:disabled) {
  transform: scale(1.02);
  filter: brightness(1.06);
  box-shadow: 0 10px 28px rgba(99, 102, 241, 0.46);
}

#groupChatSettingsModal .gcs-btn--create-role svg {
  width: 16px;
  height: 16px;
}

#groupChatSettingsModal .gcs-roles {
  display: grid;
  grid-template-columns: 292px minmax(0, 1fr);
  gap: 16px;
  min-height: 0;
  flex: 1 1 auto;
  align-items: stretch;
  overflow: hidden;
}

#groupChatSettingsModal .gcs-roles__list-card,
#groupChatSettingsModal .gcs-roles__details-card {
  min-height: 0;
  border-radius: 16px;
  background: rgba(15, 25, 45, 0.42);
  border: 1px solid rgba(132, 170, 224, 0.18);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

#groupChatSettingsModal .gcs-roles__list-card {
  padding: 10px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

#groupChatSettingsModal .gcs-roles__list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow-y: auto;
  overflow-x: hidden;
  min-height: 0;
  flex: 1 1 auto;
  padding: 2px;
  scrollbar-width: thin;
  scrollbar-color: rgba(130, 160, 210, 0.28) transparent;
}

#groupChatSettingsModal .gcs-role-row {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  min-height: 64px;
  height: 64px;
  padding: 0 12px;
  border-radius: 14px;
  border: 1px solid rgba(120, 160, 255, 0.15);
  background: rgba(20, 32, 55, 0.55);
  color: inherit;
  text-align: left;
  font: inherit;
  cursor: pointer;
  transition: background 180ms ease, border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
}

#groupChatSettingsModal .gcs-role-row:hover {
  background: rgba(28, 42, 70, 0.72);
  border-color: rgba(120, 160, 255, 0.28);
}

#groupChatSettingsModal .gcs-role-row.is-active {
  background: linear-gradient(
    135deg,
    rgba(59, 130, 246, 0.28) 0%,
    rgba(99, 102, 241, 0.2) 52%,
    rgba(139, 92, 246, 0.16) 100%
  );
  border-color: rgba(100, 150, 255, 0.55);
  box-shadow:
    0 0 0 1px rgba(99, 102, 241, 0.18),
    0 10px 28px rgba(59, 130, 246, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    inset 0 0 24px rgba(99, 102, 241, 0.12);
}

#groupChatSettingsModal .gcs-role-row:focus-visible {
  outline: 2px solid rgba(108, 141, 255, 0.55);
  outline-offset: 2px;
}

#groupChatSettingsModal .gcs-role-row__icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: rgba(108, 141, 255, 0.1);
  border: 1px solid rgba(108, 141, 255, 0.22);
  color: rgba(186, 204, 255, 0.96);
  font-size: 18px;
  line-height: 1;
  flex-shrink: 0;
}

#groupChatSettingsModal .gcs-role-row__icon--owner {
  background: rgba(250, 204, 21, 0.12);
  border-color: rgba(250, 204, 21, 0.28);
  color: rgba(253, 224, 71, 0.96);
}

#groupChatSettingsModal .gcs-role-row__icon--admin {
  background: rgba(99, 102, 241, 0.14);
  border-color: rgba(129, 140, 248, 0.28);
  color: rgba(196, 181, 253, 0.96);
}

#groupChatSettingsModal .gcs-role-row__icon--moderator {
  background: rgba(251, 146, 60, 0.12);
  border-color: rgba(251, 146, 60, 0.28);
  color: rgba(253, 186, 116, 0.96);
}

#groupChatSettingsModal .gcs-role-row__icon--custom {
  background: rgba(56, 189, 248, 0.1);
  border-color: rgba(56, 189, 248, 0.24);
  color: rgba(186, 230, 253, 0.96);
}

#groupChatSettingsModal .gcs-role-row__body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

#groupChatSettingsModal .gcs-role-row__name {
  font-size: 15px;
  font-weight: 750;
  color: rgba(245, 248, 255, 0.96);
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#groupChatSettingsModal .gcs-role-row__subtitle {
  font-size: 12px;
  font-weight: 500;
  color: rgba(154, 171, 197, 0.82);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#groupChatSettingsModal .gcs-roles__badge {
  flex-shrink: 0;
  height: 22px;
  padding: 0 8px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

#groupChatSettingsModal .gcs-roles__badge--system {
  background: rgba(99, 102, 241, 0.16);
  border: 1px solid rgba(129, 140, 248, 0.28);
  color: rgba(199, 210, 254, 0.95);
}

#groupChatSettingsModal .gcs-roles__badge--custom {
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.24);
  color: rgba(186, 230, 253, 0.95);
}

#groupChatSettingsModal .gcs-roles__details-card {
  padding: 22px 24px;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: rgba(130, 160, 210, 0.28) transparent;
}

#groupChatSettingsModal .gcs-roles__details-empty {
  display: grid;
  place-content: center;
  text-align: center;
  min-height: 280px;
  gap: 6px;
}

#groupChatSettingsModal .gcs-roles__details-empty-title {
  margin: 0;
  font-size: 16px;
  font-weight: 750;
  color: rgba(245, 248, 255, 0.92);
}

#groupChatSettingsModal .gcs-roles__details-empty-text {
  margin: 0;
  font-size: 13px;
  color: rgba(154, 171, 197, 0.78);
}

#groupChatSettingsModal .gcs-roles__details-body.hidden,
#groupChatSettingsModal .gcs-roles__details-empty.hidden,
#groupChatSettingsModal .gcs-roles__details-actions.hidden {
  display: none !important;
}

#groupChatSettingsModal .gcs-roles__details-head {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 16px;
}

#groupChatSettingsModal .gcs-roles__details-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: rgba(108, 141, 255, 0.12);
  border: 1px solid rgba(108, 141, 255, 0.24);
  color: rgba(186, 204, 255, 0.96);
  font-size: 22px;
  flex-shrink: 0;
}

#groupChatSettingsModal .gcs-roles__details-icon.gcs-role-row__icon--owner {
  background: rgba(250, 204, 21, 0.12);
  border-color: rgba(250, 204, 21, 0.28);
  color: rgba(253, 224, 71, 0.96);
}

#groupChatSettingsModal .gcs-roles__details-icon.gcs-role-row__icon--admin {
  background: rgba(99, 102, 241, 0.14);
  border-color: rgba(129, 140, 248, 0.28);
  color: rgba(196, 181, 253, 0.96);
}

#groupChatSettingsModal .gcs-roles__details-icon.gcs-role-row__icon--moderator {
  background: rgba(251, 146, 60, 0.12);
  border-color: rgba(251, 146, 60, 0.28);
  color: rgba(253, 186, 116, 0.96);
}

#groupChatSettingsModal .gcs-roles__details-icon.gcs-role-row__icon--custom {
  background: rgba(56, 189, 248, 0.1);
  border-color: rgba(56, 189, 248, 0.24);
  color: rgba(186, 230, 253, 0.96);
}

#groupChatSettingsModal .gcs-roles__details-meta {
  min-width: 0;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

#groupChatSettingsModal .gcs-roles__details-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

#groupChatSettingsModal .gcs-roles__details-title {
  margin: 0;
  font-size: 22px;
  font-weight: 750;
  letter-spacing: -0.02em;
  color: rgba(245, 248, 255, 0.96);
  line-height: 1.15;
}

#groupChatSettingsModal .gcs-roles__details-desc {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: rgba(154, 171, 197, 0.86);
  font-weight: 500;
}

#groupChatSettingsModal .gcs-roles__details-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 20px;
}

#groupChatSettingsModal .gcs-btn--role-edit,
#groupChatSettingsModal .gcs-btn--role-delete {
  height: 38px;
  padding: 0 14px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 650;
}

#groupChatSettingsModal .gcs-btn--role-edit {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(134, 164, 210, 0.2);
  color: rgba(226, 235, 250, 0.94);
}

#groupChatSettingsModal .gcs-btn--role-edit:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.07);
}

#groupChatSettingsModal .gcs-btn--role-delete {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(248, 113, 113, 0.28);
  color: rgba(254, 202, 202, 0.96);
}

#groupChatSettingsModal .gcs-btn--role-delete:hover:not(:disabled) {
  background: rgba(239, 68, 68, 0.16);
}

#groupChatSettingsModal .gcs-roles__perms-title,
#groupChatCreateRoleModal .gcs-roles__perms-title {
  margin: 0 0 12px;
  font-size: 16px;
  font-weight: 750;
  letter-spacing: -0.01em;
  color: rgba(245, 248, 255, 0.96);
}

#groupChatSettingsModal .gcs-roles__perms,
#groupChatCreateRoleModal .gcs-roles__perms {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

#groupChatSettingsModal .gcs-role-perm,
#groupChatCreateRoleModal .gcs-role-perm {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-height: 56px;
  height: 56px;
  padding: 0 14px;
  border-radius: 14px;
  background: rgba(20, 32, 55, 0.55);
  border: 1px solid rgba(120, 160, 255, 0.15);
}

#groupChatSettingsModal .gcs-role-perm--dep-locked,
#groupChatCreateRoleModal .gcs-role-perm--dep-locked {
  opacity: 0.62;
  border-color: rgba(120, 160, 255, 0.1);
}

#groupChatSettingsModal .gcs-role-perm--dep-locked .gcs-role-perm__desc,
#groupChatCreateRoleModal .gcs-role-perm--dep-locked .gcs-role-perm__desc {
  color: rgba(180, 198, 230, 0.72);
  font-style: italic;
}

#groupChatSettingsModal .gcs-role-perm__icon,
#groupChatCreateRoleModal .gcs-role-perm__icon {
  width: 36px;
  height: 36px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  background: rgba(108, 141, 255, 0.1);
  border: 1px solid rgba(108, 141, 255, 0.2);
  color: rgba(170, 188, 255, 0.95);
}

#groupChatSettingsModal .gcs-role-perm__icon svg,
#groupChatCreateRoleModal .gcs-role-perm__icon svg {
  width: 17px;
  height: 17px;
}

#groupChatSettingsModal .gcs-role-perm__body,
#groupChatCreateRoleModal .gcs-role-perm__body {
  min-width: 0;
}

#groupChatSettingsModal .gcs-role-perm__title,
#groupChatCreateRoleModal .gcs-role-perm__title {
  display: block;
  font-size: 14px;
  font-weight: 750;
  color: rgba(245, 248, 255, 0.96);
  letter-spacing: -0.01em;
}

#groupChatSettingsModal .gcs-role-perm__desc,
#groupChatCreateRoleModal .gcs-role-perm__desc {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  line-height: 1.35;
  color: rgba(154, 171, 197, 0.78);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#groupChatCreateRoleModal.modal-backdrop {
  z-index: 1310;
}

#groupChatCreateRoleModal .gcs-create-role-modal {
  width: min(1100px, calc(100vw - 64px));
  height: min(800px, calc(100vh - 64px));
  max-height: calc(100vh - 64px);
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: minmax(0, 1fr);
  border-radius: 26px;
  overflow: hidden;
  background: linear-gradient(
    135deg,
    rgba(13, 25, 44, 0.96) 0%,
    rgba(10, 21, 38, 0.94) 48%,
    rgba(9, 18, 34, 0.97) 100%
  );
  border: 1px solid rgba(132, 170, 224, 0.28);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow:
    0 32px 100px rgba(0, 0, 0, 0.56),
    inset 0 1px 0 rgba(255, 255, 255, 0.055);
  color: #eef2ff;
  position: relative;
  isolation: isolate;
}

#groupChatCreateRoleModal .gcs-create-role-modal__inner {
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: 100%;
  position: relative;
  z-index: 1;
}

#groupChatCreateRoleModal .gcs-create-role-modal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 28px 40px 12px;
  flex-shrink: 0;
}

#groupChatCreateRoleModal .gcs-create-role-modal__title {
  margin: 0;
  font-size: 25px;
  font-weight: 750;
  letter-spacing: -0.02em;
  color: rgba(245, 248, 255, 0.96);
}

#groupChatCreateRoleModal .gcs-create-role-modal__body {
  padding: 8px 40px 20px;
  overflow-y: auto;
  min-height: 0;
  flex: 1 1 auto;
  scrollbar-width: thin;
}

#groupChatCreateRoleModal .gcs-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}

#groupChatCreateRoleModal .gcs-field__label {
  font-size: 13px;
  font-weight: 650;
  color: rgba(174, 191, 217, 0.88);
}

#groupChatCreateRoleModal .gcs-field__input,
#groupChatCreateRoleModal .gcs-field__textarea {
  width: 100%;
  box-sizing: border-box;
  border-radius: 14px;
  border: 1px solid rgba(132, 170, 224, 0.22);
  background: rgba(20, 32, 55, 0.55);
  color: rgba(245, 248, 255, 0.96);
  font: inherit;
  padding: 12px 14px;
  outline: none;
  backdrop-filter: blur(12px);
}

#groupChatCreateRoleModal .gcs-field__input {
  height: 48px;
}

#groupChatCreateRoleModal .gcs-field__textarea {
  min-height: 96px;
  resize: vertical;
}

#groupChatCreateRoleModal .gcs-field__input:focus,
#groupChatCreateRoleModal .gcs-field__textarea:focus {
  border-color: rgba(108, 141, 255, 0.55);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.16);
}

#groupChatCreateRoleModal .gcs-create-role-modal__footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  padding: 18px 40px 28px;
  border-top: 1px solid rgba(133, 160, 202, 0.13);
  flex-shrink: 0;
}

#groupChatCreateRoleModal .gcs-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  cursor: pointer;
  font-family: inherit;
}

#groupChatCreateRoleModal .gcs-btn--close {
  height: 48px;
  padding: 0 20px;
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(134, 164, 210, 0.18);
  color: rgba(226, 235, 250, 0.92);
  font-size: 15px;
  font-weight: 600;
}

#groupChatCreateRoleModal .gcs-btn--close:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.055);
}

#groupChatCreateRoleModal .gcs-btn--save {
  height: 48px;
  padding: 0 22px;
  border-radius: 13px;
  background: linear-gradient(135deg, #3b82f6 0%, #6366f1 52%, #8b5cf6 100%);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  box-shadow: 0 8px 22px rgba(59, 130, 246, 0.28);
}

#groupChatCreateRoleModal .gcs-btn--save:hover:not(:disabled) {
  filter: brightness(1.05);
}

#groupChatCreateRoleModal .gcs-btn--save:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

#groupChatCreateRoleModal .settings-toggle {
  position: relative;
  display: inline-flex;
  flex: 0 0 auto;
  width: 46px;
  height: 24px;
  cursor: pointer;
}

#groupChatCreateRoleModal .settings-toggle input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  margin: 0;
  pointer-events: none;
}

#groupChatCreateRoleModal .settings-toggle-slider {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: rgba(12, 18, 34, 0.92);
  border: 1px solid rgba(132, 170, 224, 0.3);
  transition: background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

#groupChatCreateRoleModal .settings-toggle-slider::before {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(226, 234, 248, 0.96);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.28);
  transition: transform 0.18s ease, background 0.18s ease;
}

#groupChatCreateRoleModal .settings-toggle input:checked + .settings-toggle-slider {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.95) 0%, rgba(99, 102, 241, 0.95) 100%);
  border-color: rgba(120, 160, 255, 0.55);
  box-shadow: 0 0 14px rgba(99, 102, 241, 0.35);
}

#groupChatCreateRoleModal .settings-toggle input:checked + .settings-toggle-slider::before {
  transform: translateX(22px);
  background: #fff;
}

#groupChatCreateRoleModal .settings-toggle input:disabled + .settings-toggle-slider {
  opacity: 0.45;
  cursor: not-allowed;
}

#groupChatCreateRoleModal .gcs-modal__close {
  position: absolute;
  top: 18px;
  right: 18px;
  z-index: 2;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 0;
  background: rgba(255, 255, 255, 0.04);
  color: rgba(210, 222, 240, 0.88);
  display: grid;
  place-items: center;
  cursor: pointer;
}

#groupChatCreateRoleModal .gcs-modal__close svg {
  width: 16px;
  height: 16px;
}

#groupChatCreateRoleModal .gcs-modal__close:hover {
  background: rgba(255, 255, 255, 0.07);
}

@media (max-width: 980px) {
  #groupChatSettingsModal .gcs-roles {
    grid-template-columns: 1fr;
  }

  #groupChatSettingsModal .gcs-roles__list-card {
    max-height: 240px;
  }
}

@media (max-width: 767px) {
  #groupChatSettingsModal .gcs-sheet[data-gc-settings-sheet="permissions"] .gcs-sheet__head {
    flex-wrap: wrap;
  }

  #groupChatSettingsModal .gcs-btn--create-role {
    width: 100%;
  }

  #groupChatCreateRoleModal .gcs-create-role-modal {
    width: calc(100vw - 24px);
    height: calc(100vh - 24px);
  }

  #groupChatCreateRoleModal .gcs-create-role-modal__head,
  #groupChatCreateRoleModal .gcs-create-role-modal__body,
  #groupChatCreateRoleModal .gcs-create-role-modal__footer {
    padding-left: 20px;
    padding-right: 20px;
  }
}

/* ============================================================
   STANDARD OLONE ICON — transparent padding crop-scale (V1)
   Scoped to profile / settings modals only. Assets unchanged.
   ============================================================ */

.olone-icon-crop {
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  object-fit: contain;
  object-position: center;
  border: 0;
  background: transparent;
  transform-origin: 50% 50%;
  pointer-events: none;
  user-select: none;
  border-radius: 0;
}

:is(#channelProfileModal, #groupChatProfileModal, #channelSettingsV2Modal, #groupChatSettingsModal)
  .gcs-sidebar__avatar-wrap.is-standard-icon {
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  box-shadow: none;
  overflow: visible;
}

:is(#channelProfileModal, #groupChatProfileModal, #channelSettingsV2Modal, #groupChatSettingsModal)
  .gcs-sidebar__avatar-wrap.is-standard-icon
  .gcs-sidebar__avatar-inner {
  overflow: visible;
  background: transparent;
}

:is(#channelProfileModal, #groupChatProfileModal, #channelSettingsV2Modal, #groupChatSettingsModal)
  .gcs-sidebar__avatar-wrap.is-standard-icon
  .channel-icon-host,
:is(#channelProfileModal, #groupChatProfileModal, #channelSettingsV2Modal, #groupChatSettingsModal)
  .gcs-sidebar__avatar-wrap.is-standard-icon
  .chat-icon-host,
:is(#channelProfileModal, #groupChatProfileModal, #channelSettingsV2Modal, #groupChatSettingsModal)
  .gcs-sidebar__avatar-wrap.is-standard-icon
  .gcs-sidebar__channel-avatar,
:is(#channelProfileModal, #groupChatProfileModal, #channelSettingsV2Modal, #groupChatSettingsModal)
  .gcs-sidebar__avatar-wrap.is-standard-icon
  .entity-avatar-preview--ph {
  overflow: visible;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

#channelProfileModal .olone-icon-crop--channel {
  transform: scale(1.22) !important;
}

#groupChatProfileModal .olone-icon-crop--chat {
  transform: scale(1.2);
}

#channelSettingsV2Modal .olone-icon-crop--channel {
  transform: scale(1.2) !important;
}

#groupChatSettingsModal .olone-icon-crop--chat {
  transform: scale(1.2);
}

#channelProfileModal .channel-profile-sidebar__avatar-wrap.is-standard-icon .olone-icon-crop,
#groupChatProfileModal .group-chat-profile-sidebar__avatar-wrap.is-standard-icon .olone-icon-crop,
#channelSettingsV2Modal .gcs-sidebar__avatar-wrap.is-standard-icon .olone-icon-crop,
#groupChatSettingsModal .gcs-sidebar__avatar-wrap.is-standard-icon .olone-icon-crop {
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  object-fit: contain;
  object-position: center;
  border-radius: 0;
}
